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$
|
$else$
|
||||||
\setcounter{secnumdepth}{0}
|
\setcounter{secnumdepth}{0}
|
||||||
$endif$
|
$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)$
|
$if(dir)$
|
||||||
\ifxetex
|
\ifxetex
|
||||||
% load bidi as late as possible as it modifies e.g. graphicx
|
% load bidi as late as possible as it modifies e.g. graphicx
|
||||||
|
@ -164,6 +176,9 @@ $if(dir)$
|
||||||
\newenvironment{LTR}{\beginL}{\endL}
|
\newenvironment{LTR}{\beginL}{\endL}
|
||||||
\fi
|
\fi
|
||||||
$endif$
|
$endif$
|
||||||
|
$for(header-includes)$
|
||||||
|
$header-includes$
|
||||||
|
$endfor$
|
||||||
|
|
||||||
$if(title)$
|
$if(title)$
|
||||||
\title{$title$}
|
\title{$title$}
|
||||||
|
@ -176,22 +191,6 @@ $if(author)$
|
||||||
\author{$for(author)$$author$$sep$ \and $endfor$}
|
\author{$for(author)$$author$$sep$ \and $endfor$}
|
||||||
$endif$
|
$endif$
|
||||||
\date{$date$}
|
\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}
|
\begin{document}
|
||||||
$if(title)$
|
$if(title)$
|
||||||
|
|
Loading…
Add table
Reference in a new issue