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.
This commit is contained in:
parent
4ac59af242
commit
db3aec1a82
1 changed files with 15 additions and 16 deletions
|
@ -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)$
|
||||
|
|
Loading…
Reference in a new issue