From bebc255a1d0b49153f2934a4c78486531afea88b Mon Sep 17 00:00:00 2001 From: Erwan Normand Date: Thu, 4 Jul 2024 20:34:30 +0200 Subject: [PATCH] Replace secsty with titlesec --- README.md | 2 +- config/template.tex | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5ebd23a..a6e7c03 100644 --- a/README.md +++ b/README.md @@ -5,5 +5,5 @@ Compile `main.tex` using either `pdflatex` with `biblatex` or `lualatex` (recomm You may need to install the following packages: ```bash -tlmgr install adjustbox babel babel-english biber biblatex bookmark booktabs caption changes csquotes emptypage enumitem etoc etoolbox fancyhdr fontaxes fontenc graphicx hyperref iftex import inconsolata libertinus libertinus-fonts libertinus-otf libertinus-type1 makecell mathtools microtype multirow nextpage pdflscape pdfpages sectsty setspace siunitx subfig tabularx textcomp truncate todonotes ulem upquote xcolor xstring +tlmgr install adjustbox babel babel-english biber biblatex bookmark booktabs caption changes csquotes emptypage enumitem etoc etoolbox fancyhdr fontaxes fontenc graphicx hyperref iftex import inconsolata libertinus libertinus-fonts libertinus-otf libertinus-type1 makecell mathtools microtype multirow nextpage pdflscape pdfpages setspace siunitx subfig tabularx textcomp titlesec truncate todonotes ulem upquote xcolor xstring ``` diff --git a/config/template.tex b/config/template.tex index 1eab6bc..7d5dfc3 100644 --- a/config/template.tex +++ b/config/template.tex @@ -22,9 +22,12 @@ \usepackage{microtype} % Micro-typography improvements (slightly more compact, better to read) % Use sans-serif font for sectionss -\usepackage{sectsty} -\chapterfont{\sffamily} -\allsectionsfont{\sffamily} +\usepackage{titlesec} +\titleformat{\chapter}[display]{\normalfont\Large\sffamily\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge} +\titleformat{\section}{\normalfont\large\sffamily\bfseries}{\thesection}{1em}{} +\titleformat{\subsection}{\normalfont\normalsize\sffamily\bfseries}{\thesubsection}{1em}{} +\titleformat{\subsubsection}[runin]{\normalfont\normalsize\sffamily\mdseries}{\thesubsubsection}{1em}{} +\titleformat{\paragraph}[runin]{\normalfont\normalsize\sffamily\bfseries}{\theparagraph}{1em}{} % Headers \usepackage{emptypage} % Remove headers and footers on empty pages