Add customs macros
This commit is contained in:
parent
2690a41563
commit
2465bfbdb6
2 changed files with 208 additions and 0 deletions
62
Boites.tex
Executable file
62
Boites.tex
Executable file
|
@ -0,0 +1,62 @@
|
||||||
|
\usepackage{tikz,environ}
|
||||||
|
\tikzstyle{mybox} = [draw=black, very thick,
|
||||||
|
rectangle, inner sep=10pt, inner ysep=20pt]
|
||||||
|
\tikzstyle{fancytitle} =[draw=black, fill=white, text=black]
|
||||||
|
|
||||||
|
|
||||||
|
\NewEnviron{defin}{\par
|
||||||
|
\begin{center}
|
||||||
|
\begin{tikzpicture}
|
||||||
|
\node [mybox] (box){%
|
||||||
|
\begin{minipage}{0.8\textwidth}
|
||||||
|
\BODY
|
||||||
|
\end{minipage} };
|
||||||
|
\node[fancytitle, right=10pt] at (box.north west) {\textbf{Définition}};
|
||||||
|
\end{tikzpicture}\end{center}\par
|
||||||
|
}
|
||||||
|
|
||||||
|
\NewEnviron{thm}{\par
|
||||||
|
\begin{center}
|
||||||
|
\begin{tikzpicture}
|
||||||
|
\node [mybox] (box){%
|
||||||
|
\begin{minipage}{0.8\textwidth}
|
||||||
|
\BODY
|
||||||
|
\end{minipage} };
|
||||||
|
\node[fancytitle, right=10pt] at (box.north west) {\textbf{Théorème}};
|
||||||
|
\end{tikzpicture}\end{center}\par
|
||||||
|
}
|
||||||
|
|
||||||
|
\usepackage{thmbox}
|
||||||
|
\usepackage{xparse}
|
||||||
|
\NewDocumentEnvironment{prop}{o}{%
|
||||||
|
\begin{center}\begin{minipage}{0.8\textwidth}
|
||||||
|
\thmbox[M]{\textbf{Proposition \IfNoValueTF{#1}{}{\em (#1)}}}%
|
||||||
|
%\hspace*{-1.5em}%
|
||||||
|
}
|
||||||
|
{%
|
||||||
|
\endthmbox\vspace*{.75ex}\end{minipage}\end{center}%
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\NewDocumentEnvironment{corol}{o}{%
|
||||||
|
\begin{center}\begin{minipage}{0.8\textwidth}
|
||||||
|
\thmbox[M]{\textbf{Corollaire \IfNoValueTF{#1}{}{\em (#1)}}}%
|
||||||
|
%\hspace*{-1.5em}%
|
||||||
|
}
|
||||||
|
{%
|
||||||
|
\endthmbox\vspace*{.75ex}\end{minipage}\end{center}%
|
||||||
|
}
|
||||||
|
|
||||||
|
\NewDocumentEnvironment{lemEM}{o}{%
|
||||||
|
\begin{center}\begin{minipage}{0.8\textwidth}
|
||||||
|
\thmbox[M]{\textbf{Lemme ergodique maximal \IfNoValueTF{#1}{}{\em (#1)}}}%
|
||||||
|
%\hspace*{-1.5em}%
|
||||||
|
}
|
||||||
|
{%
|
||||||
|
\endthmbox\vspace*{.75ex}\end{minipage}\end{center}%
|
||||||
|
}
|
||||||
|
|
||||||
|
\newenvironment{rem}{\par\textbf{Remarque: }\nopagebreak}{\par}
|
||||||
|
\newenvironment{exemple}{\par\textbf{Exemple: }\nopagebreak}{\par}
|
||||||
|
\newenvironment{preuve}{\par\textit{Démonstration: }\nopagebreak}{\par}
|
146
Raccourcis.tex
Executable file
146
Raccourcis.tex
Executable file
|
@ -0,0 +1,146 @@
|
||||||
|
\usepackage{enumitem}
|
||||||
|
\setlist[itemize]{label=\textbullet}
|
||||||
|
|
||||||
|
%ensembles usuels
|
||||||
|
\newcommand{\R}{\mathbb{R}}
|
||||||
|
\newcommand{\C}{\mathbb{C}}
|
||||||
|
\newcommand{\N}{\mathbb{N}}
|
||||||
|
\newcommand{\Z}{\mathbb{Z}}
|
||||||
|
|
||||||
|
\newcommand{\K}{\mathbb{K}}
|
||||||
|
\newcommand{\M}{\mathcal{M}}
|
||||||
|
\newcommand{\Lin}{\mathcal{L}}
|
||||||
|
\newcommand{\Img}{\text{Im}}
|
||||||
|
\newcommand{\Ker}{\text{Ker}}
|
||||||
|
|
||||||
|
\newcommand{\A}{\text{A}}
|
||||||
|
\newcommand{\B}{\text{B}}
|
||||||
|
\newcommand{\fromatob}{\A\to\B}
|
||||||
|
|
||||||
|
\DeclareFontFamily{U}{wncy}{}
|
||||||
|
\DeclareFontShape{U}{wncy}{m}{n}{<->wncyr10}{}
|
||||||
|
\DeclareSymbolFont{mcy}{U}{wncy}{m}{n}
|
||||||
|
\DeclareMathSymbol{\Sh}{\mathord}{mcy}{"58}
|
||||||
|
|
||||||
|
%relations
|
||||||
|
|
||||||
|
\newcommand{\eqv}{\Leftrightarrow}
|
||||||
|
\newcommand{\tr}{{}^t\! }
|
||||||
|
|
||||||
|
\DeclareMathOperator*{\equals}{=}
|
||||||
|
|
||||||
|
\newcommand{\limfty}[1]{\xrightarrow[#1 \to +\infty]{}}
|
||||||
|
\newcommand{\simfty}{\underset{+\infty}{\sim}}
|
||||||
|
|
||||||
|
\newcommand{\intinfty}{\int_{-\infty}^{+\infty}}
|
||||||
|
|
||||||
|
\renewcommand{\d}{\text{d}}
|
||||||
|
\newcommand{\dd}[2]{\frac{\text{d} #1}{\text{d} #2}}
|
||||||
|
\newcommand{\ddd}[2]{\frac{\text{d}^2 #1}{\text{d} {#2}^2}}
|
||||||
|
\newcommand{\dr}[2]{\frac{\partial #1}{\partial #2}}
|
||||||
|
|
||||||
|
% Macros mieux :)
|
||||||
|
\newcommand{\chimie}[1]{$\mathrm{#1}$}
|
||||||
|
\newcommand{\chimiecite}[1]{\[\mathrm{#1}\]}
|
||||||
|
\newcommand{\nchim}{\mathit{n}}
|
||||||
|
\newcommand{\xchim}{\mathit{x}}
|
||||||
|
\newcommand{\unit}[1]{~\mathrm{#1}}
|
||||||
|
\renewcommand{\d}{\mbox{d}}
|
||||||
|
\newcommand{\deriv}[2][]{\frac{\d#1}{\d#2}}
|
||||||
|
\newcommand{\derivp}[2][]{\frac{\partial#1}{\partial#2}}
|
||||||
|
\newcommand{\derivpp}[2][]{\frac{\partial^2#1}{\partial#2^2}}
|
||||||
|
|
||||||
|
\newcommand{\NA}{\mathcal{N}_A}% Avogadro
|
||||||
|
\newcommand{\e}{\text{e}}
|
||||||
|
\newcommand{\sinc}{\text{sinc}}
|
||||||
|
|
||||||
|
\newcommand{\fonct}[4]{%
|
||||||
|
\left\lbrace \begin{array}{l}
|
||||||
|
{#1}\longrightarrow {#2} \\
|
||||||
|
{#3}\longmapsto {#4}
|
||||||
|
\end{array}\right.}
|
||||||
|
|
||||||
|
|
||||||
|
\makeatletter
|
||||||
|
|
||||||
|
\@ifpackageloaded{circuitikz}{%
|
||||||
|
\tikzset{every picture/.style={execute at begin picture={%
|
||||||
|
\shorthandoff{:;!?};}}}}{}
|
||||||
|
|
||||||
|
\@ifpackageloaded{stmaryrd}{%
|
||||||
|
\newcommand{\entint}[1]{\llbracket #1 \rrbracket}}{}
|
||||||
|
\@ifpackageloaded{siunitx}{%
|
||||||
|
%\newcommand{\gdr}[3]{\ensuremath{#1 = }\SI{#2}{#3}}
|
||||||
|
|
||||||
|
}{}
|
||||||
|
\@ifpackageloaded{listings}{%
|
||||||
|
\usepackage{xcolor}
|
||||||
|
|
||||||
|
\AtBeginDocument{%
|
||||||
|
\lstset{
|
||||||
|
language=Python,
|
||||||
|
basicstyle=\ttfamily\small,
|
||||||
|
aboveskip={1.0\baselineskip},
|
||||||
|
belowskip={1.0\baselineskip},
|
||||||
|
columns=fixed,
|
||||||
|
extendedchars=true,
|
||||||
|
breaklines=true,
|
||||||
|
tabsize=4,
|
||||||
|
prebreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},
|
||||||
|
frame=lines,
|
||||||
|
showtabs=false,
|
||||||
|
showspaces=false,
|
||||||
|
showstringspaces=false,
|
||||||
|
keywordstyle=\color[rgb]{0.627,0.126,0.941},
|
||||||
|
commentstyle=\color[rgb]{0.133,0.545,0.133},
|
||||||
|
stringstyle=\color[rgb]{01,0,0},
|
||||||
|
numbers=left,
|
||||||
|
numberstyle=\small,
|
||||||
|
stepnumber=1,
|
||||||
|
numbersep=10pt,
|
||||||
|
captionpos=t,
|
||||||
|
literate={{á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1
|
||||||
|
{Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1
|
||||||
|
{à}{{\`a}}1 {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1
|
||||||
|
{À}{{\`A}}1 {È}{{\'E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1
|
||||||
|
{ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1
|
||||||
|
{Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1
|
||||||
|
{â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1
|
||||||
|
{Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1
|
||||||
|
{œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1
|
||||||
|
{ű}{{\H{u}}}1 {Ű}{{\H{U}}}1 {ő}{{\H{o}}}1 {Ő}{{\H{O}}}1
|
||||||
|
{ç}{{\c c}}1 {Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1
|
||||||
|
{€}{{\euro}}1 {£}{{\pounds}}1 {«}{{\guillemotleft}}1
|
||||||
|
{»}{{\guillemotright}}1 {ñ}{{\~n}}1 {Ñ}{{\~N}}1 {¿}{{?`}}1}
|
||||||
|
}
|
||||||
|
\lstset{language=Matlab,%
|
||||||
|
%basicstyle=\color{red},
|
||||||
|
breaklines=true,%
|
||||||
|
morekeywords={matlab2tikz},
|
||||||
|
keywordstyle=\color{blue},%
|
||||||
|
morekeywords=[2]{1}, keywordstyle=[2]{\color{black}},
|
||||||
|
identifierstyle=\color{black},%
|
||||||
|
stringstyle=\color{mylilas},
|
||||||
|
commentstyle=\color{mygreen},%
|
||||||
|
showstringspaces=false,%without this there will be a symbol in the places where there is a space
|
||||||
|
numbers=left,%
|
||||||
|
numberstyle={\tiny \color{black}},% size of the numbers
|
||||||
|
numbersep=9pt, % this defines how far the numbers are from the text
|
||||||
|
emph=[1]{for,end,break},emphstyle=[1]\color{red}, %some words to emphasise
|
||||||
|
literate=
|
||||||
|
{á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1
|
||||||
|
{Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1
|
||||||
|
{à}{{\`a}}1 {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1
|
||||||
|
{À}{{\`A}}1 {È}{{\'E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1
|
||||||
|
{ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1
|
||||||
|
{Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1
|
||||||
|
{â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1
|
||||||
|
{Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1
|
||||||
|
{œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1
|
||||||
|
{ű}{{\H{u}}}1 {Ű}{{\H{U}}}1 {ő}{{\H{o}}}1 {Ő}{{\H{O}}}1
|
||||||
|
{ç}{{\c c}}1 {Ç}{{\\cite{} C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1
|
||||||
|
{€}{{\euro}}1 {£}{{\pounds}}1 {«}{{\guillemotleft}}1
|
||||||
|
{»}{{\guillemotright}}1 {ñ}{{\~n}}1 {Ñ}{{\~N}}1 {¿}{{?`}}1
|
||||||
|
}
|
||||||
|
}}{}
|
||||||
|
\makeatother
|
Loading…
Reference in a new issue