%! TeX program = lualatex
% (for vimtex)
\documentclass[11pt, a4paper]{article}
% SET LANGUAGE HERE
\usepackage[english]{babel}
\usepackage[left=1.6cm,right=1.6cm,top=2cm,bottom=2cm]{geometry}
% ENVIRONMENTS etc
\usepackage{adjustbox}
\usepackage{colortbl}   % color table
\usepackage{tabularx}   % bravais table
\usepackage{array}      % more array options
\newcolumntype{C}{>{$}c<{$}} % math-mode version of "c" column type
\usepackage{multirow}   % for superconducting qubit table
\usepackage{hhline}     % for superconducting qubit table
% TOOLING
\usepackage{graphicx}
\usepackage{etoolbox}
% \usepackage{luacode}
\usepackage{expl3}      % switch case and other stuff
\usepackage{substr}
\usepackage{xcolor}
% FORMATING
\usepackage{float}                  % float barrier
\usepackage{subcaption}             % subfigures
\usepackage[hidelinks]{hyperref}    % hyperrefs for \fRef, \qtyRef, etc
\usepackage[shortlabels]{enumitem}  % easily change enum symbols to i), a. etc
\setlist{noitemsep}                 % no vertical space between items
\setlist[1]{labelindent=\parindent} % < Usually a good idea
\setlist[itemize]{leftmargin=*}
% \setlist[enumerate]{labelsep=*, leftmargin=1.5pc}  % horizontal indent of items

\usepackage{titlesec}   % colored titles
% \usepackage{sectsty}
% GRAPHICS
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepackage{tikz}       % drawings
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.pathreplacing} % braces
\usetikzlibrary{calc}
\usetikzlibrary{3d}
\usetikzlibrary{perspective} % 3d view
\usetikzlibrary{patterns}
\usetikzlibrary{patterns}
\input{util/tikz_macros}
% speed up compilation by externalizing figures
% \usetikzlibrary{external}
% \tikzexternalize[prefix=tikz_figures]
% \tikzexternalize
\usepackage{circuitikz} % electrical circuits with tikz
% SCIENCE PACKAGES
\usepackage{mathtools}
% set display math skips
\AtBeginDocument{
    \abovedisplayskip=0pt
    \abovedisplayshortskip=0pt
    \belowdisplayskip=0pt   
    \belowdisplayshortskip=0pt
}
\usepackage{MnSymbol}   % for >>> \ggg sign
\usepackage[version=4,arrows=pgf-filled]{mhchem}
\usepackage{upgreek}    % upright greek letters for chemmacros
\usepackage{chemmacros} % for orbitals images
% \usepackage{esdiff} % derivatives
% esdiff breaks when taking \dot{q} has argument
\usepackage{derivative} % \odv, \pdv
\usepackage{bbold}      % \mathbb font
\usepackage{braket}     % <bra|ket>
\usepackage{siunitx}    % \si \SI units
\sisetup{output-decimal-marker = {,}}
\sisetup{separate-uncertainty}
\sisetup{per-mode = power}
\sisetup{exponent-product=\ensuremath{\cdot}}

% DEBUG
% \usepackage{lua-visual-debug}
% DUMB STUFF
% \usepackage{emoji}
% \newcommand\temoji[1]{\text{\emoji{#1}}}
% \def\sigma{\temoji{shark}}
% \def\lambda{\temoji{sheep}}
% \def\psi{\temoji{pickup-truck}}
% \def\pi{\temoji{birthday-cake}}
% % \def\Pi{\temoji{hospital}}
% % \def\rho{\temoji{rhino}}
% \def\nu{\temoji{unicorn}}
% \def\mu{\temoji{mouse}}

\newcommand{\TODO}[1]{{\color{fg-red}TODO:#1}}
\newcommand{\ts}{\textsuperscript}

\input{circuit.tex}
\input{util/macros.tex}
\input{util/math-macros.tex}
\input{util/environments.tex}   % requires util/translation.tex to be loaded first
\usepackage{mqlua}
\usepackage{mqfqname}
\usepackage{mqref}
% TRANSLATION
% \usepackage{translations}
\usepackage{mqtranslation}
\input{util/colorscheme.tex}
\input{util/colors.tex} % after colorscheme

\usepackage{mqconstant}
\usepackage{mqquantity}
\usepackage{mqformula}
\usepackage{mqperiodictable}


\title{Formelsammlung}
\author{Matthias Quintern}
\date{\today}
\begin{document}

\makeatletter\let\percentchar\@percentchar\makeatother

\maketitle
\tableofcontents
\newpage
\setcounter{page}{1}

\input{util/translations.tex}

% \InputOnly{test}

\Input{math/math}
\Input{math/linalg}
\Input{math/geometry}
\Input{math/calculus}
\Input{math/probability_theory}

\Input{mechanics}
\Input{statistical_mechanics}

\Input{ed/ed}
\Input{ed/el}
\Input{ed/mag}
\Input{ed/em}
\Input{ed/optics}
\Input{ed/misc}

\Input{qm/qm}
\Input{qm/atom}

\Input{cm/cm}
\Input{cm/crystal}
\Input{cm/egas}
\Input{cm/charge_transport}
\Input{cm/vib}
\Input{cm/semiconductors}
\Input{cm/misc}
\Input{cm/techniques}
\Input{cm/topo}
\Input{cm/superconductivity}
\Input{cm/mat}

\Input{particle}

\Input{quantum_computing}

\Input{comp/comp}
\Input{comp/qmb}
\Input{comp/est}
\Input{comp/ad}
\Input{comp/ml}

\Input{ch/periodic_table}  % only definitions
\Input{ch/ch}
\Input{ch/el}
\Input{ch/misc}

\newpage
\Part{appendix}
    \desc{Appendix}{}{}
    \desc[german]{Anhang}{}{}
\begin{formula}{world}
    \desc{World formula}{}{}
    \desc[german]{Weltformel}{}{}
    \eq{E = mc^2 +\text{AI}}
\end{formula}
\Input{quantities}
\Input{constants}

% \listofquantities
\listoffigures
\listoftables
\Section{elements}
    \desc{List of elements}{}{}
    \desc[german]{Liste der Elemente}{}{}
    \printAllElements
\newpage
\Input{test}

% \bibliographystyle{plain}
% \bibliography{ref}

\end{document}
