Compare commits

...

5 Commits

Author SHA1 Message Date
David JULIEN 07d16668f4 refactor: no need to declare all cref labels 2022-06-20 09:10:23 +02:00
David JULIEN 77c20c4630 format: define thm/lem/prop before rmk... 2022-06-20 09:09:55 +02:00
David JULIEN 404644def9 feat: bigger space outside envs 2022-06-20 09:09:24 +02:00
David JULIEN b0f4317b9d feat: do not call base.tex 2022-06-20 09:08:59 +02:00
David JULIEN f7a5869f0e feat: update math format
define custom theorem + defn environments
define cleveref notations
2022-06-03 17:01:58 +02:00
1 changed files with 38 additions and 70 deletions

View File

@ -1,85 +1,53 @@
\input{$LATEX_RESOURCES/format/base.tex}
% ------------------------------------ %
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{mathrsfs}
\usepackage{bbold}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{tikz}
\usetikzlibrary{automata,arrows}
% ------------------------------------ %
\mdfsetup{nobreak=true}
\newtheoremstyle{thm}
{1.2\topsep}% measure of space to leave above the theorem. E.g.: 3pt
{1.5\topsep}% measure of space to leave below the theorem. E.g.: 3pt
{\itshape}% name of font to use in the body of the theorem
{0pt}% measure of space to indent
{\large\bfseries}% name of head font
{. \newline}% punctuation between head and body
{ }% space after theorem head; " " = normal interword space
{\thmname{#1}\thmnumber{ #2}\textnormal{\thmnote{ (#3)}}}
\newcounter{thm}\setcounter{thm}{0}
\newtheoremstyle{defn}
{\topsep}% measure of space to leave above the theorem. E.g.: 3pt
{\topsep}% measure of space to leave below the theorem. E.g.: 3pt
{\normalfont}% name of font to use in the body of the theorem
{0pt}% measure of space to indent
{\large\bfseries}% name of head font
{. ---}% punctuation between head and body
{ }% space after theorem head; " " = normal interword space
{\thmname{#1}\thmnumber{ #2}\textnormal{\thmnote{ (#3)}}}
\theoremstyle{thm}
\newtheorem{thm}{Theorem}
\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}}
\newtheorem{lem}{Lemma}
\renewcommand{\thelem}{\arabic{lem}}
\newtheorem{prop}{Proposition}
\renewcommand{\theprop}{\arabic{prop}}
\theoremstyle{defn}
\newtheorem{defn}{Definition}
\newtheorem{rmd}{Reminder}
\newtheorem{clm}{Claim}
\theoremstyle{remark}
\newtheorem*{rmk}{Remark}
\newtheorem*{note}{Note}
% --------- Cleveref -----------
\usepackage{cleveref}
\crefname{thm}{Theorem}{Theorems}
\crefname{lem}{Lemma}{Lemmas}
\crefname{defn}{definition}{definitions}
\crefname{rmd}{reminder}{reminders}
\crefname{clm}{claim}{claims}