Admonitions and Latex

Jérôme Carretero <[email protected]>
Newsgroups gmane.text.docutils.devel
Message-ID <[email protected]>
Hi,



From an admonition title mytitle and class myclass and body text, the
latex generator generates:

\begin{DUclass}{myclass}
\begin{DUadmonition}
\DUtitle{mytitle}

text

\end{DUadmonition}
\end{DUclass}


In order to transform this into eg:

\begin{admonitionboxmyclass}{mytitle}
text
\end{admonitionboxmyclass}


I've had to do:

\newenvironment{DUCLASSmyclass}
{
\let\oldDUtitle\DUtitle
\let\oldDUadmonition\DUadmonition
\renewenvironment{DUadmonition}{}{
        \end{admonitionboxmyclass}
}
\renewcommand{\DUtitle}[1]{%
    \begin{admonitionboxmyclass}{##1}%
}
}
{
\let\DUtitle\oldDUtitle
\let\DUadmonition\oldDUadmonition
}

Which I find a bit dirty. I seem to recall that before, the admonition
title was included as an argument to DUadmonition, and it was easier to
process. Is there a better solution?



Best regards,

-- 
Jérôme


_______________________________________________
Docutils-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/docutils-develop

Please use "Reply All" to reply to the list.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.