Hi, I'd like to see your your source code. Could you share it for us?
BTW, rubric directive takes :class: option to give CSS class for the node in HTML output. I think it might help your case. Thanks, Takeshi KOMIYA 2019年10月25日(金) 16:17 Stefano David <[email protected]>: > > Hi all, > > I am trying to add to sphinx a directive to sphinx, but unsuccessfully. I > think I still haven't grabbed all the points necessary to fully implement it. > My use case is quite simple: to have an alternative version .. rubric:: (call > it .. altrubric::), and be able to alternate them. The idea is that they have > a different style in HTML, but the same in PDF. For the HTML part, there is > no problem, because I can use .. container:: to create a DIV and give it a > CSS style. > > Containers, however, do not get converted in any latex command, so they > become simple text, instead of a (non-numbered) sectioning item. I then tried > to duplicate the definition of visit_rubric and depart_rubric in latex.py > writer and change their name in visit_altrubric and depart_altrubric, with no > luck. I didn't think that implementing such a simple directive would prove > such a diffcult job.Can someone point me to some example? Most of the > directives I found are written for the HTML writer only and do not help me > that much. > > Thank you in advance for any pointer, > Stefano > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sphinx-users/3651d816-ed6f-4f7e-8bca-ba074357fbe2%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/CAFmkQAPP3J6X5RGOP%3DkmWJKsY%3DReWdjuffbUQcJhsiEPx5Ug-g%40mail.gmail.com.
