From 6aa85e15b691e398f2342cfbdf9fb5168e503367 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Thu, 25 Nov 2021 11:08:06 +0100 Subject: [PATCH] [format] feat: split math.tex format create base.tex to have a generic format file --- format/base.tex | 43 +++++++++++++++++++++++++++++++++++++++++++ format/math.tex | 48 ++++-------------------------------------------- 2 files changed, 47 insertions(+), 44 deletions(-) create mode 100644 format/base.tex diff --git a/format/base.tex b/format/base.tex new file mode 100644 index 0000000..b8c77eb --- /dev/null +++ b/format/base.tex @@ -0,0 +1,43 @@ +\usepackage{setspace} +\usepackage{enumitem} + +\renewcommand\thesection{\Roman{section}} +\renewcommand\thesubsection{\arabic{subsection}} +\renewcommand\thesubsubsection{\alph{subsubsection}} + +% ------------------------------------ % + +\usepackage{titlesec} + +\titleformat{\section} +{\LARGE\bfseries} +{\thesection. } +{0em} +{\setstretch{0.4}} + +\titleformat{\subsection} +{\Large} +{\thesubsection. } +{0em} +{\setstretch{0.4}} + +\titleformat{\subsubsection} +{} +{\thesubsubsection \,- } +{0em} +{\setstretch{0.4}} + +\setlength{\parindent}{0em} + +% ------------------------------------ % + +\usepackage{fancyhdr} + +\pagestyle{fancy} +\fancyhf{} +\lhead{\nouppercase{\leftmark}} +\rfoot{Page \thepage} + +% ------------------------------------ % + +\usepackage{dirtytalk} diff --git a/format/math.tex b/format/math.tex index fe1829d..4cdcabc 100644 --- a/format/math.tex +++ b/format/math.tex @@ -1,3 +1,7 @@ +\input{$LATEX_RESOURCES/format/base.tex} + +% ------------------------------------ % + \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsthm} @@ -5,13 +9,6 @@ \usepackage{bbold} \usepackage[framemethod=TikZ]{mdframed} -\usepackage{setspace} -\usepackage{enumitem} - -\renewcommand\thesection{\Roman{section}} -\renewcommand\thesubsection{\arabic{subsection}} -\renewcommand\thesubsubsection{\alph{subsubsection}} - % ------------------------------------ % \newcounter{thm}\setcounter{thm}{0} @@ -82,40 +79,3 @@ \theoremstyle{remark} \newtheorem*{rmk}{Remark} \newtheorem*{note}{Note} - -% ------------------------------------ % - -\usepackage{titlesec} - -\titleformat{\section} -{\bfseries} -{\thesection. } -{0em} -{\setstretch{0.4}}[\titlerule] - -\titleformat{\subsection} -{} -{\thesubsection. } -{0em} -{\setstretch{0.4}} - -\titleformat{\subsubsection} -{} -{\thesubsubsection \,- } -{0em} -{\setstretch{0.4}} - -\setlength{\parindent}{0em} - -% ------------------------------------ % - -\usepackage{fancyhdr} - -\pagestyle{fancy} -\fancyhf{} -\lhead{\nouppercase{\leftmark}} -\rfoot{Page \thepage} - -% ------------------------------------ % - -\usepackage{dirtytalk}