- Added comment about misuse of code-block element.
1 parent 7ae32cb commit 36fe8200b7fdb8b191340b375e2c67f5a2699b1d
nstanger authored on 18 Apr 2012
Showing 1 changed file
View
5
modules/code-formatting.xml
<xsl:text>\begin{minipage}{\textwidth}</xsl:text>
</xsl:if>
<xsl:call-template name="newline-internal" />
<xsl:text>\begin{lstlisting}</xsl:text>
<!--
Note that code-block shouldn't be used for code that's really inline (in other words, don't create a code-block element that occurs all on the same line). Otherwise, the template generates a lstlisting environment with the \begin, code \end all on the same line, which eventually gives LaTeX severe indigestion.
We can't just do the obvious fix of wrapping newlines around the code, because this messes up code that actually /does/ have newlines at the start or end by adding extra whitespace.
-->
<xsl:if test="@language">
<xsl:text>[language=</xsl:text>
<xsl:value-of select="@language" />
<xsl:text>]</xsl:text>