Skip to content

Commit a593fa5

Browse files
committed
latexpdf: add section styling
JIRA: CI-526
1 parent 81e8fb6 commit a593fa5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

_static/latex/preamble.tex

+21
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,27 @@
2222
\titleformat{\paragraph}{\bfseries\color{darkblue}}{\theparagraph}{1em}{}
2323
\titleformat{\subparagraph}{\bfseries\color{darkblue}}{\thesubparagraph}{1em}{}
2424

25+
% Section title styling
26+
\makeatletter
27+
\def\@makesectionhead#1{%
28+
{\parindent \z@
29+
\interlinepenalty\@M
30+
\noindent\textcolor{orange}{\rule{\textwidth}{2pt}}
31+
\par\vspace{0.5em}
32+
{\bfseries\Large\itshape#1}
33+
\noindent\textcolor{orange}{\rule{\textwidth}{2pt}}
34+
\par\vspace{0em}
35+
}}
36+
\renewcommand{\section}{\@startsection{section}{1}{\z@}%
37+
{-3.5ex \@plus -1ex \@minus -.2ex}%
38+
{2.3ex \@plus.2ex}%
39+
{\@makesectionhead}}
40+
\makeatother
41+
% Add dot to the section title only
42+
\renewcommand{\thesection}{\arabic{section}.\hspace{-0.5em}}
43+
\renewcommand{\thesubsection}{\arabic{section}.\arabic{subsection}}
44+
\renewcommand{\thesubsubsection}{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}
45+
2546
% Make chapters start on new pages
2647
\newcommand{\sectionbreak}{\clearpage}
2748

0 commit comments

Comments
 (0)