From db3aec1a82d1f4f73e24217db8995ce27c48f7d6 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 20 Nov 2015 14:29:36 -0800 Subject: latex: Moved definitions of subparagraph, header-includes. `header-includes` now occurs before setting of title, author, etc. This allows you to include a definition of `\subtitle`, for example, before `\subtitle` is called. Redefining of `\paragraph` and `\subparagraph` now occurs before `header-includes` rather than after. --- default.latex | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/default.latex b/default.latex index f4f2d629a..fa19f2bc1 100644 --- a/default.latex +++ b/default.latex @@ -147,6 +147,18 @@ $if(numbersections)$ $else$ \setcounter{secnumdepth}{0} $endif$ +$if(subparagraph)$ +$else$ +% Redefines (sub)paragraphs to behave more like sections +\ifx\paragraph\undefined\else +\let\oldparagraph\paragraph +\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} +\fi +\ifx\subparagraph\undefined\else +\let\oldsubparagraph\subparagraph +\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} +\fi +$endif$ $if(dir)$ \ifxetex % load bidi as late as possible as it modifies e.g. graphicx @@ -164,6 +176,9 @@ $if(dir)$ \newenvironment{LTR}{\beginL}{\endL} \fi $endif$ +$for(header-includes)$ +$header-includes$ +$endfor$ $if(title)$ \title{$title$} @@ -176,22 +191,6 @@ $if(author)$ \author{$for(author)$$author$$sep$ \and $endfor$} $endif$ \date{$date$} -$for(header-includes)$ -$header-includes$ -$endfor$ - -$if(subparagraph)$ -$else$ -% Redefines (sub)paragraphs to behave more like sections -\ifx\paragraph\undefined\else -\let\oldparagraph\paragraph -\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} -\fi -\ifx\subparagraph\undefined\else -\let\oldsubparagraph\subparagraph -\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} -\fi -$endif$ \begin{document} $if(title)$ -- cgit v1.2.3