mirror of
https://codeberg.org/Yael-II/LaTeX-Package.git
synced 2026-03-14 20:06:28 +01:00
245 lines
6.8 KiB
TeX
245 lines
6.8 KiB
TeX
%[TLP:CLEAR]
|
|
% MANCHOT
|
|
%
|
|
% Manchot is an Astrophysics package aNd Class to Help writing dOcuments in Tex
|
|
% (MANCHOT)
|
|
%
|
|
%@ Author: Moussouni, Yaël (MSc student; yael.moussouni@etu.unistra.fr)
|
|
%@ Institution: Université de Strasbourg, CNRS, Observatoire astronomique
|
|
% de Strasbourg, UMR 7550, F-67000 Strasbourg, France
|
|
%@ Date: 2025-05-03
|
|
%
|
|
% Licence:
|
|
% MSc2 Internship: SMACS Cluster
|
|
% Copyright (C) 2025 Yaël Moussouni (yael.moussouni@etu.unistra.fr)
|
|
%
|
|
% package_commands.tex
|
|
% Copyright (C) 2025 Yaël Moussouni (yael.moussouni@etu.unistra.fr)
|
|
%
|
|
% This program is free software: you can redistribute it and/or modify
|
|
% it under the terms of the GNU General Public License as published by
|
|
% the Free Software Foundation; either version 3 of the License, or
|
|
% (at your option) any later version.
|
|
%
|
|
% This program is distributed in the hope that it will be useful,
|
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
% GNU General Public License for more details.
|
|
%
|
|
% You should have received a copy of the GNU General Public License
|
|
% along with this program. If not, see www.gnu.org/licenses/.
|
|
|
|
% Vectors
|
|
\let\vect\vb
|
|
\let\rot\curl
|
|
|
|
% Set and spaces
|
|
\newcommand{\set}[1]{\mathbf{#1}} % set (in bold)
|
|
\newcommand{\spc}[1]{\mathcal{#1}} % space (in cal)
|
|
\newcommand{\N}{\set{N}}
|
|
\newcommand{\Z}{\set{Z}}
|
|
\newcommand{\D}{\set{D}}
|
|
\newcommand{\Q}{\set{Q}}
|
|
\newcommand{\R}{\set{R}}
|
|
\newcommand{\C}{\set{C}}
|
|
\newcommand{\K}{\set{K}}
|
|
|
|
\newcommand{\intqty}[1]{\left[\!\left[{#1}\right]\!\right]}
|
|
|
|
% Quantities
|
|
\newcommand{\lag}{\mathcal{L}}
|
|
\newcommand{\ham}{\mathcal{H}}
|
|
\newcommand{\mom}{\mathcal{M}}
|
|
|
|
% Symbols
|
|
\newcommand{\odeg}{\text{°}}
|
|
\newcommand{\omin}{\text{'}}
|
|
\newcommand{\osec}{\text{''}}
|
|
\let\transp\top
|
|
\let\Sun\odot
|
|
\let\sun\odot
|
|
\let\Earth\oplus
|
|
\let\earth\oplus
|
|
|
|
% Operators
|
|
\DeclareMathOperator{\Sp}{Sp}
|
|
\DeclareMathOperator{\Image}{Im}
|
|
\DeclareMathOperator{\Ker}{Ker}
|
|
\DeclareMathOperator{\diag}{diag}
|
|
\DeclareMathOperator{\arctantwo}{arctan2}
|
|
\DeclareMathOperator{\argmin}{\arg\min}
|
|
\DeclareMathOperator{\argmax}{\arg\max}
|
|
\let\FT\yii@FT
|
|
\let\lap\laplacian % Physics alias
|
|
|
|
% Probability
|
|
\DeclareMathOperator{\p}{\mathbb{P}}
|
|
\DeclareMathOperator{\pO}{\mathbb{O}}
|
|
\DeclareMathOperator{\pF}{\mathbb{F}}
|
|
\DeclareMathOperator{\pdf}{\mathbb{F'}}
|
|
\DeclareMathOperator{\pE}{\mathbb{E}}
|
|
\DeclareMathOperator{\pV}{\mathbb{V}}
|
|
\DeclareMathOperator{\normal}{\mathcal{N}}
|
|
\DeclareMathOperator{\binomial}{\mathcal{B}}
|
|
\DeclareMathOperator{\poisson}{\mathcal{P}}
|
|
|
|
% Constants
|
|
\newcommand{\im}{\mathrm{i}}
|
|
\newcommand{\jm}{\mathrm{j}}
|
|
\newcommand{\e}{\mathrm{e}}
|
|
\newcommand{\NA}{\mathcal{N}_\mathrm{A}}
|
|
\newcommand{\kB}{k_\mathrm{B}}
|
|
\newcommand{\muB}{\mu_\mathrm{B}}
|
|
\newcommand{\cst}{\mathrm{cst}}
|
|
\newcommand{\uma}{\mathrm{u}}
|
|
|
|
% Unitary vectors
|
|
\newcommand{\ux}{\vu u_x}
|
|
\newcommand{\uy}{\vu u_y}
|
|
\newcommand{\uz}{\vu u_z}
|
|
\newcommand{\ur}{\vu u_r}
|
|
\newcommand{\un}{\vu u_n}
|
|
\newcommand{\ut}{\vu u_t}
|
|
\newcommand{\urho}{\vu u_\rho}
|
|
\newcommand{\uvarrho}{\vu u_\varrho}
|
|
\newcommand{\utheta}{\vu u_\theta}
|
|
\newcommand{\uvartheta}{\vu u_\vartheta}
|
|
\newcommand{\uphi}{\vu u_\phi}
|
|
\newcommand{\uvarphi}{\vu u_\varphi}
|
|
|
|
\newcommand{\ex}{\vu e_x}
|
|
\newcommand{\ey}{\vu e_y}
|
|
\newcommand{\ez}{\vu e_z}
|
|
\newcommand{\er}{\vu e_r}
|
|
\newcommand{\en}{\vu e_n}
|
|
\newcommand{\et}{\vu e_t}
|
|
\newcommand{\erho}{\vu e_\rho}
|
|
\newcommand{\evarrho}{\vu e_\varrho}
|
|
\newcommand{\etheta}{\vu e_\theta}
|
|
\newcommand{\evartheta}{\vu e_\vartheta}
|
|
\newcommand{\ephi}{\vu e_\phi}
|
|
\newcommand{\evarphi}{\vu e_\varphi}
|
|
|
|
\newcommand{\vux}{\vu x}
|
|
\newcommand{\vuy}{\vu y}
|
|
\newcommand{\vuz}{\vu z}
|
|
\newcommand{\vur}{\vu r}
|
|
\newcommand{\vun}{\vu n}
|
|
\newcommand{\vut}{\vu t}
|
|
\newcommand{\vurho}{\vu{\boldsymbol{\rho}}}
|
|
\newcommand{\vuvarrho}{\vu{\boldsymbol{\varrho}}}
|
|
\newcommand{\vutheta}{\vu{\boldsymbol{\theta}}}
|
|
\newcommand{\vuvartheta}{\vu{\boldsymbol{\vartheta}}}
|
|
\newcommand{\vuphi}{\vu{\boldsymbol{\phi}}}
|
|
\newcommand{\vuvarphi}{\vu{\boldsymbol{\varphi}}}
|
|
|
|
% Differential elements
|
|
\newcommand{\ds}{\dd{s}}
|
|
\newcommand{\dx}{\dd{x}}
|
|
\newcommand{\dy}{\dd{y}}
|
|
\newcommand{\dz}{\dd{z}}
|
|
\newcommand{\dt}{\dd{t}}
|
|
\newcommand{\dr}{\dd{r}}
|
|
\newcommand{\drho}{\dd{\rho}}
|
|
\newcommand{\dvarrho}{\dd{\varrho}}
|
|
\newcommand{\dtheta}{\dd{\theta}}
|
|
\newcommand{\dvartheta}{\dd{\vartheta}}
|
|
\newcommand{\dphi}{\dd{\phi}}
|
|
\newcommand{\dvarphi}{\dd{\varphi}}
|
|
\newcommand{\deron}{\partial}
|
|
\newcommand{\ddr}{\dd[3]{\vect r}}
|
|
\newcommand{\ddp}{\dd[3]{\vect p}}
|
|
\newcommand{\ddk}{\dd[3]{\vect k}}
|
|
|
|
% Physics complement
|
|
\def\diffD{\mathrm{D}}
|
|
\DeclareDocumentCommand\Differential{ o g d() }{
|
|
\IfNoValueTF{#2}{
|
|
\IfNoValueTF{#3}{
|
|
\diffD\IfNoValueTF{#1}{}{^{#1}}
|
|
}{
|
|
\mathinner{\diffD\IfNoValueTF{#1}{}{^{#1}}\argopen(#3\argclose)}}
|
|
}{
|
|
\mathinner{\diffD\IfNoValueTF{#1}{}{^{#1}}#2} \IfNoValueTF{#3}{}{(#3)}
|
|
}
|
|
}
|
|
\DeclareDocumentCommand\DD{}{\Differential}
|
|
\DeclareDocumentCommand\Variation{ o g d() }{
|
|
\IfNoValueTF{#2}{
|
|
\IfNoValueTF{#3}{
|
|
\Delta \IfNoValueTF{#1}{}{^{#1}}
|
|
}{
|
|
\mathinner{\Delta \IfNoValueTF{#1}{}{^{#1}}\argopen(#3\argclose)}}
|
|
}{
|
|
\mathinner{\Delta \IfNoValueTF{#1}{}{^{#1}}#2} \IfNoValueTF{#3}{}{(#3)}
|
|
}
|
|
}
|
|
\DeclareDocumentCommand\Var{}{\Variation}
|
|
|
|
% other commands
|
|
\newcommand{\eg}{e.g.}
|
|
\newcommand{\etal}{et al}
|
|
\newcommand{\ie}{i.e.}
|
|
\newcommand{\unit}[1]{\mathrm{~#1}}
|
|
\newcommand{\axunit}[1]{\mathrm{~[#1]}}
|
|
\newcommand{\colunit}[1]{\mathrm{[#1]}}
|
|
\newcommand{\angstrom}{\text{\r A}}
|
|
\newcommand{\range}{\text{--}}
|
|
\newcommand{\E}[1]{\times 10^{#1}}
|
|
\newcommand{\simpropto}{\underset{\sim}{\propto}}
|
|
\newcommand{\cfill}[1]{\hspace*{0cm}\hfill{#1}\hfill\hspace*{0cm}}
|
|
\DeclareDocumentCommand\mean{s m}{
|
|
\IfBooleanTF{#1}
|
|
{ % \mean*{}
|
|
\langle {#2} \rangle
|
|
}{ % \mean{}
|
|
\left\langle {#2} \right\rangle
|
|
}
|
|
}
|
|
\newcommand{\ope}[1]{\hat{#1}}
|
|
\newcommand{\opevect}[1]{\hat{\vb{#1}}}
|
|
\DeclareDocumentCommand\atom{m g g g o}{
|
|
\IfNoValueTF{#5}{
|
|
\IfNoValueTF{#2}{
|
|
\mathrm{#1}
|
|
}{
|
|
\IfNoValueTF{#3}{
|
|
\prescript{#2}{}{\mathrm{#1}}
|
|
}{
|
|
\IfNoValueTF{#4}{
|
|
\prescript{#2}{#3}{\mathrm{#1}}
|
|
}{
|
|
\prescript{#2}{#3}{\mathrm{#1}}_{#4}
|
|
}}}}{
|
|
\IfNoValueTF{#2}{
|
|
\mathrm{#1}\text{\textsc{#5}}
|
|
}{
|
|
\IfNoValueTF{#3}{
|
|
\prescript{#2}{}{\mathrm{#1}\text{\textsc{#5}}}
|
|
}{
|
|
\IfNoValueTF{#4}{
|
|
\prescript{#2}{#3}{\mathrm{#1}\text{\textsc{#5}}}
|
|
}{
|
|
\prescript{#2}{#3}{\mathrm{#1}\text{\textsc{#5}}}_{#4}
|
|
}}}}
|
|
}
|
|
\DeclareDocumentCommand\underbraceset{m g}{
|
|
\IfNoValueTF{#2}{
|
|
\underbrace{#1}
|
|
}{
|
|
\underset{#1}{\underbrace{#2}}
|
|
}
|
|
}
|
|
\DeclareDocumentCommand\overbraceset{m g}{
|
|
\IfNoValueTF{#2}{
|
|
\overbrace{#1}
|
|
}{
|
|
\overset{#1}{\overbrace{#2}}
|
|
}
|
|
}
|
|
\newcommand{\metal}[1]{[\atom{#1}]}
|
|
\let\eqdef\yii@eqdef
|
|
\let\ol\overline
|
|
\let\ul\underline
|
|
\let\name\yii@name
|