Initial commit from overleaf
This commit is contained in:
commit
37ec74bd1d
2 changed files with 359 additions and 0 deletions
248
cours.sty
Normal file
248
cours.sty
Normal file
|
@ -0,0 +1,248 @@
|
|||
\ProvidesPackage{cours}
|
||||
%%% XeLaTeX ONLY
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%% Packages
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\@ifclassloaded{beamer}{}{
|
||||
\RequirePackage[xetex]{geometry}
|
||||
\RequirePackage[pdfusetitle]{hyperref}
|
||||
\RequirePackage{enumitem}
|
||||
}
|
||||
\RequirePackage{fontspec}
|
||||
\RequirePackage{polyglossia}
|
||||
\RequirePackage{csquotes}
|
||||
\RequirePackage{amsmath, amssymb, amsbsy}
|
||||
%\RequirePackage{mathtools}
|
||||
\RequirePackage{siunitx}
|
||||
\RequirePackage{stmaryrd}
|
||||
\RequirePackage{dsfont}
|
||||
\RequirePackage{array}
|
||||
\RequirePackage{esvect}
|
||||
\RequirePackage{tikz}
|
||||
\RequirePackage{pgfplots}
|
||||
\RequirePackage{amsthm}
|
||||
\RequirePackage{pgfpages}
|
||||
\RequirePackage[version=4]{mhchem}
|
||||
%\RequirePackage{breqn}
|
||||
\RequirePackage{listings}
|
||||
\RequirePackage{esint}
|
||||
\RequirePackage{tabularx}
|
||||
\RequirePackage{multirow}
|
||||
\RequirePackage{booktabs}
|
||||
%\RequirePackage{multicol}
|
||||
\RequirePackage{setspace}
|
||||
%\RequirePackage{ulem}
|
||||
\RequirePackage{cancel}
|
||||
\RequirePackage{xcolor}
|
||||
\RequirePackage{unicode-math}
|
||||
%\RequirePackage[backend=biber,sorting=ynt]{biblatex}
|
||||
\RequirePackage[notransparent]{svg}
|
||||
\@ifclassloaded{beamer}{}{
|
||||
\RequirePackage[list=true]{subcaption}
|
||||
}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%% Langue
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\setdefaultlanguage{french}
|
||||
\MakeOuterQuote{"}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%% Macros
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%% Dérivées / Intégrales
|
||||
\renewcommand\d{\mathrm d}
|
||||
\newcommand\dd{\mathop{}\,\mathrm d}
|
||||
\newcommand\deriv[2]{\frac{\d#1}{\d#2}}
|
||||
\newcommand\dderiv[2]{\frac{\d^2#1}{\d#2^2}}
|
||||
\newcommand\der[2]{\frac{\d#1}{\d#2}}
|
||||
\newcommand\dder[2]{\frac{\d^2#1}{\d#2^2}}
|
||||
\newcommand\dpar[2]{\frac{\partial#1}{\partial#2}}
|
||||
\newcommand\ddpar[2]{\frac{\partial^2#1}{\partial#2^2}}
|
||||
\newcommand\derp[2]{\frac{\partial#1}{\partial#2}}
|
||||
\newcommand\dderp[2]{\frac{\partial^2#1}{\partial#2^2}}
|
||||
\newcommand\dint{\int\displaylimits}
|
||||
\newcommand\doint{\oint\displaylimits}
|
||||
|
||||
%%% Symboles
|
||||
\newcommand\bOmega{\boldsymbol\Omega}
|
||||
\newcommand\bepsilon{\boldsymbol\epsilon}
|
||||
\newcommand\btheta{\boldsymbol\theta}
|
||||
\newcommand\bsigma{\boldsymbol\sigma}
|
||||
\renewcommand\epsilon{\varepsilon}
|
||||
%\renewcommand\C{\coulomb}
|
||||
\newcommand\e{\mathrm e}
|
||||
|
||||
\newcommand\RR{\mathbb R}
|
||||
\newcommand\CC{\mathbb C}
|
||||
\newcommand\KK{\mathbb K}
|
||||
\newcommand\NN{\mathbb N}
|
||||
\newcommand\FF{\mathbb F}
|
||||
\newcommand\EE{\mathbb E}
|
||||
\newcommand\DD{\mathbb D}
|
||||
\newcommand\fF{\mathcal F}
|
||||
\newcommand\dD{\mathcal D}
|
||||
\newcommand\lL{\mathcal L}
|
||||
\newcommand\cC{\mathcal C}
|
||||
|
||||
\newcommand\id{\mathbf 1}
|
||||
\newcommand\Id{\mathrm Id}
|
||||
|
||||
%%% Exposant / Indice à gauche
|
||||
\newcommand\trans[1]{\vphantom{#1}^t#1}
|
||||
\newcommand\eul[1]{\vphantom{#1}^E#1}
|
||||
\newcommand\lag[1]{\vphantom{#1}^L#1}
|
||||
\newcommand\indL[2]{\vphantom{#2}_{#1}#2}
|
||||
\newcommand\expL[2]{\vphantom{#2}^{#1}#2}
|
||||
|
||||
%%% Opérateurs mathématiques
|
||||
\newcommand\abs[1]{\left|#1\right|}
|
||||
\newcommand\nor[1]{\left\lVert#1\right\lVert}
|
||||
\newcommand\peigne{\mathbin{\rotatebox[origin=c]{-90}{$\exists$}}}
|
||||
\newcommand\moy[1]{\left<#1\right>}
|
||||
\newcommand\tor[2]{\vphantom{\begin{array}c#2\end{array}}_{#1}\left|\begin{array}c#2\end{array}\right.}
|
||||
|
||||
\DeclareMathOperator\grad{\u{grad}}
|
||||
\DeclareMathOperator\ggrad{\uu{grad}}
|
||||
\let\div\relax
|
||||
\DeclareMathOperator\diverg{\u{div}}
|
||||
\DeclareMathOperator\rot{\u{rot}}
|
||||
\DeclareMathOperator\Ker{Ker}
|
||||
\DeclareMathOperator\sign{sign}
|
||||
\DeclareMathOperator\tr{tr}
|
||||
\DeclareMathOperator\cotan{cotan}
|
||||
\DeclareMathOperator\cond{cond}
|
||||
\DeclareMathOperator\erf{erf}
|
||||
\DeclareMathOperator\erfc{erfc}
|
||||
|
||||
%%% Vecteurs et Matrices
|
||||
\renewcommand\u[1]{\underline{#1}}
|
||||
\newcommand\uu[1]{\underline{\underline{#1}}}
|
||||
\newcommand\ov[1]{\overline{#1}}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%% Paramétrage des packages
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%% Styles de théorèmes
|
||||
\theoremstyle{remark}
|
||||
\newtheorem{rem}{Remarque}
|
||||
\newtheorem*{rem*}{Remarque}
|
||||
\theoremstyle{definition}
|
||||
\newtheorem*{defi}{Définition}
|
||||
\newtheorem{ex}{Exemple}
|
||||
\newtheorem*{theo}{Théorème}
|
||||
|
||||
%%% Listings (code)
|
||||
\lstset{numbers=left,
|
||||
numberstyle=\tiny\color{gray}\ttfamily,
|
||||
language=Python,
|
||||
basicstyle=\linespread{1.2}\ttfamily,
|
||||
columns = flexible,
|
||||
keywordstyle=\color{blue},
|
||||
commentstyle=\itshape\color{gray},
|
||||
stringstyle=\color{ForestGreen},
|
||||
frame=single,
|
||||
stepnumber=5,
|
||||
showstringspaces=true,
|
||||
backgroundcolor=\color{ultralightgray},
|
||||
morekeywords={>>>, np, array, zeros, shape},
|
||||
%breaklines=true,
|
||||
%prebreak=\textbackslash,
|
||||
alsoletter=>
|
||||
}
|
||||
|
||||
%%% Tikz / PGF
|
||||
\usetikzlibrary{shapes}
|
||||
\pgfplotsset{compat=1.14}
|
||||
|
||||
%%% SIUnitX
|
||||
\sisetup{
|
||||
mode = text,
|
||||
%locale = FR,
|
||||
%list-final-separator = {\text{~et~}},
|
||||
%list-pair-separator = {\text{~et~}},
|
||||
%range-phrase = {\text{~à~}},
|
||||
retain-explicit-plus,
|
||||
forbid-literal-units,
|
||||
sticky-per,
|
||||
%inter-unit-product = {.},
|
||||
per-mode = power-positive-first,
|
||||
uncertainty-mode = separate,
|
||||
reset-text-series = false,
|
||||
}
|
||||
\SendSettingsToPgf
|
||||
\DeclareSIUnit\met{met}
|
||||
\DeclareSIUnit\gon{gon}
|
||||
\DeclareSIUnit\bar{bar}
|
||||
\DeclareSIUnit\psi{psi}
|
||||
\DeclareSIUnit\deg{deg}
|
||||
|
||||
%%% Arcs
|
||||
\DeclareFontFamily{OMX}{yhex}{}
|
||||
\DeclareFontShape{OMX}{yhex}{m}{n}{<->yhcmex10}{}
|
||||
\DeclareSymbolFont{yhlargesymbols}{OMX}{yhex}{m}{n}
|
||||
\DeclareMathAccent{\wideparen}{\mathord}{yhlargesymbols}{"F3}
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%% Mise en forme
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\@ifclassloaded{beamer}{}{
|
||||
\geometry{
|
||||
a4paper,
|
||||
total={16cm, 24cm}
|
||||
}
|
||||
}
|
||||
|
||||
\RequirePackage[sfdefault]{inter}
|
||||
%\setmainfont{Inter}
|
||||
%\setsansfont{Inter}
|
||||
\setmathfont[mathrm=sym]{Fira Math}
|
||||
\setmonofont[Ligatures=TeX]{Fira Code}
|
||||
|
||||
\definecolor{ENSblue}{RGB}{0,119,139}
|
||||
\definecolor{ultralightgray}{gray}{.95}
|
||||
|
||||
%\@ifclassloaded{letter}{}{
|
||||
% \renewcommand\thesection{\Roman{section}}
|
||||
% \renewcommand\thesubsection{\thesection.\arabic{subsection}}
|
||||
% \renewcommand\thesubsubsection{\thesubsection.\arabic{subsubsection}}
|
||||
%}
|
||||
|
||||
\@ifclassloaded{beamer}{}{
|
||||
\hypersetup{
|
||||
citecolor=ENSblue,
|
||||
filecolor=ENSblue,
|
||||
colorlinks=true,
|
||||
linkcolor=ENSblue,
|
||||
urlcolor=ENSblue
|
||||
}
|
||||
|
||||
\setlist[itemize]{nosep}
|
||||
}
|
||||
|
||||
\setcounter{secnumdepth}{3}
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%% Fonctions pgfplots
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\makeatletter
|
||||
\pgfmathdeclarefunction{erf}{1}{%
|
||||
\begingroup
|
||||
\pgfmathparse{#1 > 0 ? 1 : -1}%
|
||||
\edef\sign{\pgfmathresult}%
|
||||
\pgfmathparse{abs(#1)}%
|
||||
\edef\x{\pgfmathresult}%
|
||||
\pgfmathparse{1/(1+0.3275911*\x)}%
|
||||
\edef\t{\pgfmathresult}%
|
||||
\pgfmathparse{%
|
||||
1 - (((((1.061405429*\t -1.453152027)*\t) + 1.421413741)*\t
|
||||
-0.284496736)*\t + 0.254829592)*\t*exp(-(\x*\x))}%
|
||||
\edef\y{\pgfmathresult}%
|
||||
\pgfmathparse{(\sign)*\y}%
|
||||
\pgfmath@smuggleone\pgfmathresult%
|
||||
\endgroup
|
||||
}
|
||||
\makeatother
|
111
main.tex
Normal file
111
main.tex
Normal file
|
@ -0,0 +1,111 @@
|
|||
\documentclass{article}
|
||||
\usepackage{cours}
|
||||
\usepackage{lipsum}
|
||||
|
||||
\title{\bfseries Cours}
|
||||
\author{Edgar P. Burkhart}
|
||||
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
\tableofcontents
|
||||
|
||||
\section{AH}
|
||||
\subsection{Ah}
|
||||
\subsubsection{ah}
|
||||
\paragraph{Paragraphe §1} \lipsum[1]{} On a donc $L=\SI{23.556}{\kg\per\square\m\s}$, soit \SI{+3.14e2}{\newton\meter\per\watt} de \ce{CO2}, comme démontré en \autoref{eq:1} (Cf \autoref{fig:case}).
|
||||
|
||||
\begin{equation}
|
||||
\int\sum x^n\sin y-1\label{eq:1}
|
||||
\end{equation}
|
||||
|
||||
\begin{lstlisting}[language=python]
|
||||
def f(x, n, y):
|
||||
if x>=0:
|
||||
return int(sum(x**n*sin(y)))-1
|
||||
return 0
|
||||
\end{lstlisting}
|
||||
|
||||
|
||||
\begin{figure}
|
||||
\centering
|
||||
\begin{subfigure}{\linewidth}
|
||||
\centering
|
||||
\begin{tikzpicture}[scale=2,
|
||||
cote/.style={|<->|, gray},
|
||||
mesh/.style={dashed, gray},
|
||||
]
|
||||
\fill[blue!20] (0,0) rectangle (1,0.4);
|
||||
\fill[blue!20] (1.05,0.2) rectangle (2.55,0) rectangle (6,0.1);
|
||||
\draw (0,0) node[below left]{0} -- (1,0) node[below left]{1} -- (1,0.4) node[below left]{5} -- (1.05,0.4) node[below right]{6} -- (1.05,0) node[below right]{2} -- (6,0) node[below right]{3} -- (6,0.4) node[right]{7} -- (6,0.6) node[above right]{11} -- (1.05,0.6) node[above right]{10} -- (1,0.6) node[above left]{9} -- (0,0.6) node[above left]{8} -- (0,0.4) node[left]{4} -- cycle;
|
||||
\draw[mesh] (0,0.4) -- (1,0.4) -- (1,0.6);
|
||||
\draw[mesh] (6,0.4) -- (1.05,0.4) -- (1.05,0.6);
|
||||
\draw[cote] (0,-0.35) -- ++(1,0) node[midway, below]{\SI{1}{\m}};
|
||||
\draw[gray, |-|] (1,-0.35) -- ++(0.05,0) node[midway, below]{\SI{5}{\cm}};
|
||||
\draw[cote] (1.05,-0.35) -- ++(1.5,0) node[midway, below]{\SI{1.5}{\m}};
|
||||
\draw[cote] (0,-0.25) -- ++(6,0) node[midway, below]{\SI{6}{\m}};
|
||||
\draw[cote] (0.3,0) -- ++(0,.4) node[midway, left]{$h_0$} node[midway, right]{\SI{40}{\cm}};
|
||||
\draw[cote] (2,0) -- ++(0,.2) node[midway, left]{\SI{20}{\cm}};
|
||||
\draw[cote] (4,0) -- ++(0,.1) node[midway, above left]{\SI{10}{\cm}};
|
||||
\draw[cote] (-0.25,0) -- ++(0,.6) node[midway, left]{\SI{60}{\cm}};
|
||||
\end{tikzpicture}
|
||||
\caption{Initial configuration.}\label{fig:dbd}
|
||||
\end{subfigure}
|
||||
\begin{subfigure}{\linewidth}
|
||||
\centering
|
||||
\begin{tikzpicture}[scale=2,
|
||||
cote/.style={|<->|, gray},
|
||||
mesh/.style={dashed, gray},
|
||||
]
|
||||
\fill[blue!20] (0,0) rectangle (1,0.6);
|
||||
\fill[blue!20] (1.01,0.2) rectangle (2.51,0) rectangle (6,0.1);
|
||||
\draw (0,0) node[below left]{0} -- (1,0) node[below left]{1} -- (1,0.6) node[below left]{5} -- (1.01,0.6) node[below right]{6} -- (1.01,0) node[below right]{2} -- (6,0) node[below right]{3} -- (6,0.6) node[right]{7} -- (6,0.8) node[above right]{11} -- (1.01,0.8) node[above right]{10} -- (1,0.8) node[above left]{9} -- (0,0.8) node[above left]{8} -- (0,0.6) node[left]{4} -- cycle;
|
||||
\draw[mesh] (0,0.6) -- (1,0.6) -- (1,0.8);
|
||||
\draw[mesh] (6,0.6) -- (1.01,0.6) -- (1.01,0.8);
|
||||
\draw[cote] (0,-0.35) -- ++(1,0) node[midway, below]{\SI{1}{\m}};
|
||||
\draw[gray, |-|] (1,-0.35) -- ++(0.01,0) node[midway, below]{\SI{1}{\cm}};
|
||||
\draw[cote] (1.01,-0.35) -- ++(1.5,0) node[midway, below]{\SI{1.5}{\m}};
|
||||
\draw[cote] (0,-0.25) -- ++(6,0) node[midway, below]{\SI{6}{\m}};
|
||||
\draw[cote] (0.3,0) -- ++(0,.6) node[midway, left]{$h_0$} node[midway, right]{\SI{60}{\cm}};
|
||||
\draw[cote] (2,0) -- ++(0,.2) node[midway, left]{\SI{20}{\cm}};
|
||||
\draw[cote] (4,0) -- ++(0,.1) node[midway, above left]{\SI{10}{\cm}};
|
||||
\draw[cote] (-0.25,0) -- ++(0,.8) node[midway, left]{\SI{80}{\cm}};
|
||||
\end{tikzpicture}
|
||||
\caption{Adjusted configuration.}\label{fig:dbda}
|
||||
\end{subfigure}
|
||||
\caption{Studied case.}\label{fig:case}
|
||||
\end{figure}
|
||||
|
||||
$$\scriptsize
|
||||
\begin{bmatrix}
|
||||
\ddot q_1 & sin(q_2)^2\ddot q_1 + \frac{1}{2}(\dot q_2\dot q_1 sin(2q_2)+q_1 sin(2q_2)\dot q_2) & cos(q_2) \ddot q_2- \dot q_2^2 sin(q_2) & 0 & 0 & \dot q_1 & 0 & tanh(1000 \dot q_1) & 0 \\
|
||||
0 &
|
||||
- \frac{1}{2} \dot q_1^2 sin(2 q_2) &
|
||||
cos(q_2) \ddot q_1 &
|
||||
\ddot q_2 & -sin(q_2) &
|
||||
0 &
|
||||
\dot q_2 &
|
||||
0 &
|
||||
tanh(1000 \dot q_2)
|
||||
\end{bmatrix}
|
||||
$$
|
||||
|
||||
$$
|
||||
\text{GridSWAN}=\begin{bmatrix}
|
||||
x_{11} & x_{12} & \dots & x_{1m} & y_{11} & y_{12} & \dots & y_{1m} \\
|
||||
x_{21} & x_{22} & \dots & x_{2m} & y_{21} & y_{22} & \dots & y_{2m} \\
|
||||
\dots & & & & & & & \dots \\
|
||||
x_{n1} & x_{n2} & \dots & x_{nm} & y_{n1} & y_{n2} & \dots & y_{nm} \\
|
||||
\end{bmatrix}
|
||||
$$
|
||||
$$
|
||||
\text{BathySWAN}=\begin{bmatrix}
|
||||
z_{11} & z_{12} & \dots & z_{1m} \\
|
||||
z_{21} & z_{22} & \dots & z_{2m} \\
|
||||
\dots & & & \dots \\
|
||||
z_{n1} & z_{n2} & \dots & z_{nm} \\
|
||||
\end{bmatrix}
|
||||
$$
|
||||
|
||||
\listoffigures
|
||||
\end{document}
|
Reference in a new issue