Issues

Issue #318 resolved

latex/pdf : output problems for @directive[] in code-blocks directives

Thomas Desvenain
created an issue

from the rst source :

{{{

.. code-block:: xml

<?xml version="1.0"?>
<metadata>
  <version>1</version>
  <dependencies>
    <dependency>profile-Products.PloneArticle:default</dependency>
  </dependencies>
</metadata>

}}}

the latex generated is :

{{{

!latex

\begin{Verbatim}[commandchars=\{}] \PYG{c+cp}{@textless[]?xml version="1.0"?@textgreater[]} \PYG{n+nt}{@textless[]metadata}\PYG{n+nt}{@textgreater[]} \PYG{n+nt}{@textless[]version}\PYG{n+nt}{@textgreater[]}1\PYG{n+nt}{@textless[]/version@textgreater[]} \PYG{n+nt}{@textless[]dependencies}\PYG{n+nt}{@textgreater[]} \PYG{n+nt}{@textless[]dependency}\PYG{n+nt}{@textgreater[]}profile-Products.PloneArticle:default\PYG{n+nt}{@textless[]/dependency@textgreater[]} \PYG{n+nt}{@textless[]/dependencies@textgreater[]} \PYG{n+nt}{@textless[]/metadata@textgreater[]} \end{Verbatim}

}}} so the pdf generated is :

@textless[]?xml version="1.0"?@textgreater[] @textless[]metadata@textgreater[] @textless[]version@textgreater[]1@textless[]/version@textgreater[] @textless[]dependencies@textgreater[] @textless[]dependency@textgreater[]profile-Products.PloneArticle:default@textless[]/dependenc @textless[]/dependencies@textgreater[] @textless[]/metadata@textgreater[]

if we use \directive{} :

{{{

!latex

\begin{Verbatim}[commandchars=\{}] \PYG{c+cp}{\textless{}?xml version="1.0"?\textgreater{}} \PYG{n+nt}{\textless{}metadata}\PYG{n+nt}{\textgreater{}} \PYG{n+nt}{\textless{}version}\PYG{n+nt}{\textgreater{}}1\PYG{n+nt}{\textless{}/version\textgreater{}} \PYG{n+nt}{\textless{}dependencies}\PYG{n+nt}{\textgreater{}} \PYG{n+nt}{\textless{}dependency}\PYG{n+nt}{\textgreater{}}profile-Products.PloneArticle:default\PYG{n+nt}{\textless{}/dependency\textgreater{}} \PYG{n+nt}{\textless{}/dependencies\textgreater{}} \PYG{n+nt}{\textless{}/metadata\textgreater{}} \end{Verbatim}

}}}

we got the correct appearance :

{{{

!xml

<?xml version="1.0"?> <metadata> <version>1</version> <dependencies> <dependency>profile-Products.PloneArticle:default</dependency> </dependencies> </metadata>

}}}

Comments (5)

  1. Log in to comment