Re: Custom admonitions in rst2latex
Dailly Sébastien <[email protected]>
| Newsgroups | gmane.text.docutils.user |
|---|---|
| Message-ID | <[email protected]> |
Le 28/04/2017 à 19:07, Guenter Milde a écrit :
> Yes, this problem is still present:
>
> The doctree for the above example is
>
> <admonition classes="admonition-test">
> <title>
> test
> <paragraph>
> This is a test
>
> i.e. it is an example of class arguments that cannot be part of a standard
> latex command name mentioned in "latex.txt":
>
> Class arguments may contain numbers and hyphens, which need special
> treatment in LaTeX command names (see `class directive`_). The
> commands ``\csname`` and ``\endcsname`` or the special command
> ``\@namedef`` can help with the definition of corresponding macros or
> environments.
>
> The above example should be
>
> \expandafter\newcommand\csname DUadmonitionadmonition-test\endcsname{…}
>
> or alternatively
>
> \makeatletter
> \@namedef{DUadmonitionadmonition-test}{…}
> \makeatother
>
> (in a package file (*.sty) you can omit the \makeat... lines).
>
> Hope this helps,
>
Thanks a lot, the solution you give are much better than the *sed
command* I've use.
This would be very helpfull to add those exemple on the page «
Generating LaTeX with Docutils ».
Regard,
--
Sébastien
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Docutils-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/docutils-users
Please use "Reply All" to reply to the list.