LaTeX template: redefine `\paragraph`, `\subparagraph`...
to behave more like section headers. Closes #1658.
commit9ad336f586542cd8af30f2e16d2c935fb0f97a3e
authorJohn MacFarlane <jgm@berkeley.edu>
dateFri 17 Apr 2015, 18:38 (12 years ago)
parent13b230a
data/templates+1−1
Submodule changed.
tests/lhs-test.latex+6
@@ -68,6 +68,12 @@
6868
6969\date{}
7070
71+% Redefines (sub)paragraphs to behave more like sections
72+\let\oldparagraph\paragraph
73+\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
74+\let\oldsubparagraph\subparagraph
75+\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
76+
7177\begin{document}
7278
7379\section{lhs test}\label{lhs-test}
tests/lhs-test.latex+lhs+6
@@ -49,6 +49,12 @@
4949
5050\date{}
5151
52+% Redefines (sub)paragraphs to behave more like sections
53+\let\oldparagraph\paragraph
54+\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
55+\let\oldsubparagraph\subparagraph
56+\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
57+
5258\begin{document}
5359
5460\section{lhs test}\label{lhs-test}
tests/writer.latex+6
@@ -64,6 +64,12 @@
6464\author{John MacFarlane \and Anonymous}
6565\date{July 17, 2006}
6666
67+% Redefines (sub)paragraphs to behave more like sections
68+\let\oldparagraph\paragraph
69+\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
70+\let\oldsubparagraph\subparagraph
71+\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
72+
6773\begin{document}
6874\maketitle
6975