raccourcis.sty 5.08 KB
Newer Older
Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
1 2 3 4 5
\usepackage{enumitem}
\setlist[itemize]{label=\textbullet}

%ensembles usuels
\newcommand{\R}{\mathbb{R}}
Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
6
\renewcommand{\C}{\mathbb{C}}
Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
\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}}
40
\newcommand{\divv}{\text{div}}
41 42
\newcommand{\grad}{\text{grad}}
%Macros mieux :)
Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
\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.}
\newcommand{\vect}[1]{%
  \begin{bmatrix}
    #1
  \end{bmatrix}
}

\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