From 04b34fe09bf5f85fc0e28ea88ff6d1ba648b180e Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sat, 20 Nov 2021 16:40:08 +0100 Subject: [PATCH] feat: add classnotes templates --- templates/cours.tex | 13 +++++ templates/exo.tex | 13 +++++ templates/format_def.tex | 114 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 140 insertions(+) create mode 100644 templates/cours.tex create mode 100644 templates/exo.tex create mode 100644 templates/format_def.tex diff --git a/templates/cours.tex b/templates/cours.tex new file mode 100644 index 0000000..af2fc1b --- /dev/null +++ b/templates/cours.tex @@ -0,0 +1,13 @@ +\documentclass[11pt]{article} +\usepackage[a4paper, margin=5em]{geometry} + +\author{David JULIEN} +\title{Cours} + +\input{~/documents/ens/templates/format_def.tex} + +\begin{document} + +\maketitle + +\end{document} diff --git a/templates/exo.tex b/templates/exo.tex new file mode 100644 index 0000000..c38453c --- /dev/null +++ b/templates/exo.tex @@ -0,0 +1,13 @@ +\documentclass[11pt]{article} +\usepackage[a4paper, margin=5em]{geometry} + +\author{David JULIEN} +\title{Exercices} + +\input{~/documents/ens/templates/format_def.tex} + +\begin{document} + +\maketitle + +\end{document} diff --git a/templates/format_def.tex b/templates/format_def.tex new file mode 100644 index 0000000..2d88339 --- /dev/null +++ b/templates/format_def.tex @@ -0,0 +1,114 @@ +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{amsthm} +\usepackage{mathrsfs} +\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} +\renewcommand{\thethm}{\arabic{thm}} +\newenvironment{thm}[2][]{ + \refstepcounter{thm} + \ifstrempty{#1} + {\mdfsetup{ + frametitle={% + {\strut Theorem~\thethm}}} + } + {\mdfsetup{ + frametitle={% + {\strut Theorem~\thethm:~#1}}} + } + \begin{mdframed}[]\relax% + \label{#2}}{\end{mdframed} +} + +\newcounter{lem}[section]\setcounter{lem}{0} +\renewcommand{\thelem}{\arabic{section}.\arabic{lem}} +\newenvironment{lem}[2][]{ + \refstepcounter{lem} + \ifstrempty{#1} + {\mdfsetup{ + frametitle={% + {\strut Lemma~\thelem}}} + } + {\mdfsetup{ + frametitle={% + {\strut Lemma~\thelem:~#1}}} + } + \begin{mdframed}[]\relax% + \label{#2}}{\end{mdframed}} + +\newcounter{prop}[subsection]\setcounter{prop}{0} +\renewcommand{\theprop}{\arabic{section}.\arabic{prop}} +\newenvironment{prop}[2][]{ + \refstepcounter{prop} + \ifstrempty{#1} + {\mdfsetup{ + frametitle={% + {\strut Proposition~\theprop}}} + } + {\mdfsetup{ + frametitle={% + {\strut Proposition~\theprop:~#1}}} + } + \begin{mdframed}[]\relax% + \label{#2}}{\end{mdframed}} + +\newcounter{defn}[section]\setcounter{defn}{0} +\renewcommand{\thedefn}{\arabic{defn}} +\newenvironment{defn}[2][]{ + \refstepcounter{defn} + \ifstrempty{#1} + {\mdfsetup{ + frametitle={% + {\strut Definition~\thedefn}}} + } + {\mdfsetup{ + frametitle={% + {\strut Definition~\thedefn:~#1}}} + } + \begin{mdframed}[]\relax% + \label{#2}}{\end{mdframed}} + +\theoremstyle{remark} +\newtheorem*{rmk}{Remark} + +% ------------------------------------ % + +\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}} + +% ------------------------------------ % +% +\usepackage{fancyhdr} + +\pagestyle{fancy} +\fancyhf{} +\lhead{\nouppercase{\leftmark}} +\rfoot{Page \thepage}