• Switched to using \def instead of \newcommand for pre-\begin{document} definitions, as it seems safer.
1 parent 0f16a4c commit c3db103dda8953a458b6499e76ddff106500132c
Nigel Stanger authored on 25 Feb 2014
Showing 1 changed file
View
2
■■■
xml2xslt.xsl
This is currently BROKEN. If the document class specified loads packages that are then loaded by the boilerplate below with different optons, it will cause LaTeX "option clash" errors. Therefore, DO NOT use the @latex-document-class attribute for now until a solution can be devised!
-->
<xsl-out:template name="setup-document-class">
<xsl-out:text>
\newcommand{\DocumentClass}{</xsl-out:text>
\def\DocumentClass{</xsl-out:text>
<xsl-out:value-of select="@latex-document-class" />
<xsl-out:if test="not( @latex-document-class )">
<xsl-out:text>article</xsl-out:text>
</xsl-out:if>