switch to report document class, with chapters

This commit is contained in:
Frédéric Péters 2014-05-09 10:24:26 +02:00
parent 5b8ae40097
commit d3e163454b
1 changed files with 27 additions and 12 deletions

View File

@ -242,10 +242,22 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\titleformat{\section}[block]{\color{eopink}\Large\bfseries\filcenter}{}{1em}{}
\titleformat{\subsection}[hang]{\color{eopink}\Large\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}[hang]{\color{eopink}\large\bfseries}{\thesubsubsection}{1em}{}
\newcommand{\sectionbreak}{\clearpage}
\titleformat{\section}[block]{\color{eoblue}\LARGE\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}[hang]{\color{eoblue}\Large\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}[hang]{\color{eoblue}\large\bfseries}{\thesubsubsection}{1em}{}
\titleformat{\chapter}[block]
{}
{\llap{\color{eopink}\chapterNumber\thechapter
\hspace{10pt}\vline}}
{10pt}
{\color{eopink}\formatchaptertitle}
\newcommand{\formatchaptertitle}[1]{%
\parbox[t]{\dimexpr\textwidth-10pt}{\raggedright\Huge\bfseries#1}}
\newcommand{\chapterNumber}{%
\fontsize{50}{50}\usefont{U}{eur}{b}{n}}
\makeatother
@ -270,7 +282,7 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
<xsl:if test="not(position()=last())" >, </xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:text>\documentclass[a4paper,11pt]{article}&#x000A;</xsl:text>
<xsl:text>\documentclass[a4paper,11pt]{report}&#x000A;</xsl:text>
<xsl:call-template name="sty"/>
<xsl:text>\usepackage[colorlinks=true,linkcolor=eoblue,pdftitle={</xsl:text>
<xsl:value-of select="$title"/>
@ -297,10 +309,11 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
<xsl:param name="depth">-1</xsl:param>
<xsl:choose>
<xsl:when test="$depth = 0"><xsl:text>%{</xsl:text></xsl:when>
<xsl:when test="$depth = 1"><xsl:text>\section{</xsl:text></xsl:when>
<xsl:when test="$depth = 2"><xsl:text>\subsection{</xsl:text></xsl:when>
<xsl:when test="$depth = 3"><xsl:text>\subsubsection{</xsl:text></xsl:when>
<xsl:when test="$depth = 4"><xsl:text>\paragraph{</xsl:text></xsl:when>
<xsl:when test="$depth = 1"><xsl:text>\chapter{</xsl:text></xsl:when>
<xsl:when test="$depth = 2"><xsl:text>\section{</xsl:text></xsl:when>
<xsl:when test="$depth = 3"><xsl:text>\subsection{</xsl:text></xsl:when>
<xsl:when test="$depth = 4"><xsl:text>\subsubsection{</xsl:text></xsl:when>
<xsl:when test="$depth = 5"><xsl:text>\paragraph{</xsl:text></xsl:when>
<xsl:otherwise><xsl:text>\textbf{</xsl:text></xsl:otherwise>
</xsl:choose>
<xsl:value-of select="mal:title"/>
@ -318,9 +331,11 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
<xsl:template match="mal:section">
<xsl:param name="depth">-1</xsl:param>
<xsl:choose>
<xsl:when test="$depth+count(ancestor::mal:section) = 1"><xsl:text>\subsection*{</xsl:text></xsl:when>
<xsl:when test="$depth+count(ancestor::mal:section) = 2"><xsl:text>\subsubsection*{</xsl:text></xsl:when>
<xsl:when test="$depth+count(ancestor::mal:section) = 3"><xsl:text>\paragraph{</xsl:text></xsl:when>
<xsl:when test="$depth+count(ancestor::mal:section) = 0"><xsl:text>\chapter{</xsl:text></xsl:when>
<xsl:when test="$depth+count(ancestor::mal:section) = 1"><xsl:text>\section{</xsl:text></xsl:when>
<xsl:when test="$depth+count(ancestor::mal:section) = 2"><xsl:text>\subsection{</xsl:text></xsl:when>
<xsl:when test="$depth+count(ancestor::mal:section) = 3"><xsl:text>\subsubsection{</xsl:text></xsl:when>
<xsl:when test="$depth+count(ancestor::mal:section) = 4"><xsl:text>\paragraph{</xsl:text></xsl:when>
<xsl:otherwise><xsl:text>\textsc{</xsl:text></xsl:otherwise>
</xsl:choose>
<xsl:value-of select="mal:title"/>