From: Dailly S. <con...@ch...> - 2017-04-30 08:35:06
|
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 |