@@ -147,6 +147,18 @@ $if(numbersections)$
148\setcounter{secnumdepth}{0}
148\setcounter{secnumdepth}{0}
152+% Redefines (sub)paragraphs to behave more like sections
153+\ifx\paragraph\undefined\else
154+\let\oldparagraph\paragraph
155+\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
157+\ifx\subparagraph\undefined\else
158+\let\oldsubparagraph\subparagraph
159+\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
152 % load bidi as late as possible as it modifies e.g. graphicx
164 % load bidi as late as possible as it modifies e.g. graphicx
@@ -164,6 +176,9 @@ $if(dir)$
164 \newenvironment{LTR}{\beginL}{\endL}
176 \newenvironment{LTR}{\beginL}{\endL}
179+$for(header-includes)$
168$if(title)$
183$if(title)$
169\title{$title$}
184\title{$title$}
@@ -176,22 +191,6 @@ $if(author)$
176\author{$for(author)$$author$$sep$ \and $endfor$}
191\author{$for(author)$$author$$sep$ \and $endfor$}
178\date{$date$}
193\date{$date$}
179−$for(header-includes)$
185−% Redefines (sub)paragraphs to behave more like sections
186−\ifx\paragraph\undefined\else
187−\let\oldparagraph\paragraph
188−\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
190−\ifx\subparagraph\undefined\else
191−\let\oldsubparagraph\subparagraph
192−\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
196\begin{document}
195\begin{document}
197$if(title)$
196$if(title)$