Last active
August 22, 2016 05:27
-
-
Save daverosoff/74527e309234038de0622ff028137593 to your computer and use it in GitHub Desktop.
LaTeX XSLT stylesheet for Survey of Algebra and Probability
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
<xsl:import href="../xsl/mathbook-latex.xsl" /> | |
<xsl:output method="text" /> | |
<xsl:param name="latex.preamble.late"> | |
\setcounter{chapter}{-1} | |
\newcounter{mysection} | |
\let\oldchapter\chapter | |
\renewcommand{\chapter}{% | |
\ifnum\thechapter<0% | |
\setcounter{mysection}{-1}% | |
\else% | |
\setcounter{mysection}{0}% | |
\fi\oldchapter} | |
\let\oldsection\section | |
\renewcommand{\section}{% | |
\stepcounter{mysection} | |
\oldsection} | |
\renewcommand\thesection{\ifcase\thechapter\relax\thechapter.\arabic{mysection}\else\thechapter.\Alph{section}\fi} | |
</xsl:param> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment