From: Sébastien D. <seb...@ch...> - 2017-04-19 07:55:14
|
Hello, I'm stuck with rst2latex : I want to customize the code-block rendering with a dark background. rst2latex translate this directive to a quote environnment which I can't override because it is already used elsewhere in the document. I've tried to add a class parameter to the directive > > .. code-block:: C > :class: darkBackground > > // Comment > But this does not seems to work (the class parameter is discarded) > \begin{quote} > {\ttfamily \raggedright \noindent > \DUrole{comment}{\DUrole{single}{//~Comment\\ > }}~\\ I've also tried to wrap the code directive inside a class one : > .. class:: darkBackground > > .. code-block:: C > > // Comment But this does not give the expected result. This seems to be a problem with the writer, because rst2html gives the class in the output : > <pre class="code C darkBackground literal-block"> > <span class="comment single">// Comment Is this a known bug ? Is there a workaround for this ? Thanks a lot ! -- Sébastien |