qtys, constants

This commit is contained in:
matth@ultra 2024-12-23 09:26:53 +01:00
parent 2c2da27752
commit 82556282f3
17 changed files with 779 additions and 442 deletions

131
src/computational.tex Normal file
View File

@ -0,0 +1,131 @@
\Part[
\eng{Computational Physics}
\ger{Computergestützte Physik}
]{comp}
\Section[
\eng{Many-body physics}
\ger{Vielteilchenphysik}
]{mb}
\TODO{TODO}
\Subsection[
\eng{Importance sampling}
\ger{Importance sampling / Stichprobenentnahme nach Wichtigkeit}
]{importance_sampling}
\TODO{Monte Carlo}
\Subsection[
\eng{Matrix product states}
\ger{Matrix Produktzustände}
]{mps}
\Section[
\eng{Misc}
\ger{Verschiedenes}
]{misc}
\begin{formula}{mean_field}
\desc{Mean field approximation}{Replaces 2-particle operator by 1-particle operator}{Example for Coulumb interaction between many electrons}
\desc[german]{Molekularfeldnäherung}{Ersetzt 2-Teilchen Operator durch 1-Teilchen Operator}{Beispiel für Coulumb Wechselwirkung zwischen Elektronen}
\eq{
\frac{1}{2}\sum_{i\neq j} \frac{e^2}{\abs{\vec{r}_i - \vec{r}_j}} \approx \sum_{i} V_\text{eff}(\vec{r}_i)
}
\end{formula}
\Section[
\eng{Tight-binding}
\ger{Tight-binding}
]{tb}
\Section[
\eng{Density functional theory (DFT)}
\ger{Dichtefunktionaltheorie (DFT)}
]{dft}
\Subsection[
\eng{Hartree-Fock}
\ger{Hartree-Fock}
]{hf}
\begin{ttext}
\eng{
\begin{itemize}
\item \fqEqRef{comp:misc:mean_field} theory
\item Self-interaction free: Self interaction is cancelled out by the Fock-term
\end{itemize}
}
\end{ttext}
\begin{formula}{equation}
\desc{Hartree-Fock equation}{}{
$\varphi_\xi$ single particle wavefunction of $\xi$th orbital,
$\hat{T}$ kinetic electron energy,
$\hat{V}_{\text{en}}$ electron-nucleus attraction,
$\hat{V}_{\text{HF}}$ \fqEqRef{comp:dft:hf:potential},
}
\desc[german]{Hartree-Fock Gleichung}{}{
$\varphi_\xi$ ein-Teilchen Wellenfunktion des $\xi$-ten Orbitals,
$\hat{T}$ kinetische Energie der Elektronen,
$\hat{V}_{\text{en}}$ Electron-Kern Anziehung,
$\hat{V}_{\text{HF}}$ \fqEqRef{comp:dft:hf:potential}
}
\eq{
\left(\hat{T} + \hat{V}_{\text{en}} + \hat{V}_{\text{HF}}^\xi\right)\varphi_\xi(x) = \epsilon_\xi \varphi_\xi(x)
}
\end{formula}
\begin{formula}{potential}
\desc{Hartree-Fock potential}{}{}
\desc[german]{Hartree Fock Potential}{}{}
\eq{
V_{\text{HF}}^\xi(\vecr) =
\sum_{\vartheta} \int \d x'
\frac{e^2}{\abs{\vecr - \vecr'}}
\left(
\underbrace{\abs{\varphi_\xi(x')}^2}_{\text{Hartree-Term}}
- \underbrace{\frac{\varphi_{\vartheta}^*(x') \varphi_{\xi}(x') \varphi_{\vartheta}(x)}{\varphi_\xi(x)}}_{\text{Fock-Term}}
\right)
}
\end{formula}
\begin{formula}{scf}
\desc{Self-consistend field}{}{}
% \desc[german]{}{}{}
\ttxt{
\eng{
\begin{enumerate}
\item Initial guess for $\psi$
\item Solve SG for each particle
\item Make new guess for $\psi$
\end{enumerate}
}
}
\end{formula}
\Subsection[
\eng{Kohn-Sham}
\ger{Kohn-Sham}
]{ks}
\TODO{TODO}
\Subsection[
\eng{Born-Oppenheimer Approximation}
\ger{Born-Oppenheimer Näherung}
]{bo}
\TODO{TODO}
\Subsection[
\eng{Molecular Dynamics}
\ger{Molekulardynamik}
]{md}
\begin{ttext}
\eng{Statistical method}
\end{ttext}
\Section[
\eng{Gradient descent}
\ger{Gradientenverfahren}
]{gd}
\TODO{TODO}

View File

@ -166,53 +166,6 @@ family of plane that are equivalent due to crystal symmetry
\eq{\mu = \frac{q \tau}{m}} \eq{\mu = \frac{q \tau}{m}}
\end{formula} \end{formula}
\Subsection[
\eng{Drude model}
\ger{Drude-Modell}
]{drude}
\begin{ttext}
\eng{Classical model describing the transport properties of electrons in materials (metals):
The material is assumed to be an ion lattice and with freely moving electrons (electron gas). The electrons are
accelerated by an electric field and decelerated through collisions with the lattice ions.
The model disregards the Fermi-Dirac partition of the conducting electrons.
}
\ger{Ein klassisches Model zur Beschreibung der Transporteigenschaften von Elektronen in (v.a.) Metallen:
Der Festkörper wird als Ionenkristall mit frei beweglichen Elektronen (Elektronengas).
Die Elektronen werden durch ein Elektrisches Feld $E$ beschleunigt und durch Stöße mit den Gitterionen gebremst.
Das Modell vernachlässigt die Fermi-Dirac Verteilung der Leitungselektronen.
}
\end{ttext}
\begin{formula}{motion}
\desc{Equation of motion}{}{$v$ electron speed, $\vec{v}_\text{D}$ drift velocity, $\tau$ mean free time between collisions}
\desc[german]{Bewegungsgleichung}{}{$v$ Elektronengeschwindigkeit, $\vec{v}_\text{D}$ Driftgeschwindigkeit, $\tau$ Stoßzeit}
\eq{\masse \odv{\vec{v}}{t} + \frac{\masse}{\tau} \vec{v}_\text{D} = -e \vec{E}}
\end{formula}
\begin{formula}{current_density}
\desc{Current density}{Ohm's law}{$n$ charge particle density}
\desc[german]{Stromdichte}{Ohmsches Gesetz}{$n$ Ladungsträgerdichte}
\eq{\vec{j} = -ne\vec{v}_\text{D} = ne\mu \vec{E}}
\end{formula}
\begin{formula}{conductivity}
\desc{Drude-conductivity}{}{}
\desc[german]{Drude-Leitfähigkeit}{}{}
\eq{\sigma = \frac{\vec{j}}{\vec{E}} = \frac{e^2 \tau n}{\masse} = n e \mu}
\end{formula}
\Subsection[
\eng{Sommerfeld model}
\ger{Sommerfeld-Modell}
]{sommerfeld}
\begin{ttext}
\eng{Assumes a gas of free fermions underlying the pauli-exclusion principle. Only electrons in an energy range of $\kB T$ around the Fermi energy $\EFermi$ participate in scattering processes.}
\ger{Annahme eines freien Fermionengases, welches dem Pauli-Prinzip unterliegt. Nur Elektronen in einem Energiebereich von $\kB T$ um die Fermi Energe $\EFermi$ nehmen an Streuprozessen teil.}
\end{ttext}
\begin{formula}{current_density}
\desc{Current density}{}{}
\desc[german]{Stromdichte}{}{}
\eq{\vec{j} = -en\braket{v} = -e n \frac{\hbar}{\masse}\braket{\vec{k}} = -e \frac{1}{V} \sum_{\vec{k},\sigma} \frac{\hbar \vec{k}}{\masse}}
\end{formula}
\TODO{The formula for the conductivity is the same as in the drude model?}
\Subsection[ \Subsection[
\eng{2D electron gas} \eng{2D electron gas}
\ger{2D Elektronengas} \ger{2D Elektronengas}
@ -256,177 +209,9 @@ family of plane that are equivalent due to crystal symmetry
\TODO{TODO} \TODO{TODO}
\Section[
\eng{Semiconductors}
\ger{Halbleiter}
]{semic}
\begin{formula}{charge_density_eq}
\desc{Equilibrium charge densitites}{}{}
\desc[german]{Ladungsträgerdichte im Equilibrium}{}{}
\eq{
n_0 &\approx N_\text{c}(T) e^{-\frac{E_\text{c} - \EFermi}{\kB T}} \\
p_0 &\approx N_\text{v}(T) e^{-\frac{\EFermi - E_\text{v}}{\kB T}}
}
\end{formula}
\begin{formula}{charge_density_intrinsic}
\desc{Intrinsic charge density}{}{}
\desc[german]{Intrinsische Ladungsträgerdichte}{}{}
\eq{
n_\text{i} \approx \sqrt{n_0 p_0} = \sqrt{N_\text{c}(T) N_\text{v}(T)} e^{-\frac{E_\text{gap}}{2\kB T}}
}
\end{formula}
\Section[ \Section[
\eng{Measurement techniques} \eng{\GT{misc}}
\ger{Messtechniken} \ger{\GT{misc}}
]{meas} ]{misc}
\Subsection[
\eng{ARPES}
\ger{ARPES}
]{arpes}
what?
in?
how?
plot
\Subsection[
\eng{Scanning probe microscopy SPM}
\ger{Rastersondenmikroskopie (SPM)}
]{spm}
\begin{ttext}
\eng{Images of surfaces are taken by scanning the specimen with a physical probe.}
\ger{Bilder der Oberfläche einer Probe werden erstellt, indem die Probe mit einer Sonde abgetastet wird.}
\end{ttext}
\Eng[name]{Name}
\Ger[name]{Name}
\Eng[application]{Application}
\Ger[application]{Anwendung}
\begin{minipagetable}{amf}
\entry{name}{
\eng{Atomic force microscopy (AMF)}
\ger{Atomare Rasterkraftmikroskopie (AMF)}
}
\entry{application}{
\eng{Surface stuff}
\ger{Oberflächenzeug}
}
\entry{how}{
\eng{With needle}
\ger{Mit Nadel}
}
\end{minipagetable}
\begin{minipage}{0.5\textwidth}
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth]{img/cm_amf.pdf}
\caption{\cite{Bian2021}}
\end{figure}
\end{minipage}
\begin{minipagetable}{stm}
\entry{name}{
\eng{Scanning tunneling microscopy (STM)}
\ger{Rastertunnelmikroskop (STM)}
}
\entry{application}{
\eng{Surface stuff}
\ger{Oberflächenzeug}
}
\entry{how}{
\eng{With TUnnel}
\ger{Mit TUnnel}
}
\end{minipagetable}
\begin{minipage}{0.5\textwidth}
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth]{img/cm_stm.pdf}
\caption{\cite{Bian2021}}
\end{figure}
\end{minipage}
\Section[
\eng{Fabrication techniques}
\ger{Herstellungsmethoden}
]{fab}
\begin{minipagetable}{cvd}
\entry{name}{
\eng{Chemical vapor deposition (CVD)}
\ger{Chemische Gasphasenabscheidung (CVD)}
}
\entry{how}{
\eng{
A substrate is exposed to volatile precursors, which react and/or decompose on the heated substrate surface to produce the desired deposit.
By-products are removed by gas flow through the chamber.
}
\ger{
An der erhitzten Oberfläche eines Substrates wird aufgrund einer chemischen Reaktion mit einem Gas eine Feststoffkomponente abgeschieden.
Nebenprodukte werden durch den Gasfluss durch die Kammer entfernt.
}
}
\entry{application}{
\eng{
\begin{itemize}
\item Polysilicon \ce{Si}
\item Silicon dioxide \ce{SiO_2}
\item Graphene
\item Diamond
\end{itemize}
}
\ger{
\begin{itemize}
\item Poly-silicon \ce{Si}
\item Siliziumdioxid \ce{SiO_2}
\item Graphen
\item Diamant
\end{itemize}
}
}
\end{minipagetable}
\begin{minipage}{0.5\textwidth}
\centering
\includegraphics[width=\textwidth]{img/cm_cvd_english.pdf}
\end{minipage}
\Subsection[
\eng{Epitaxy}
\ger{Epitaxie}
]{epitaxy}
\begin{ttext}
\eng{A type of crystal groth in which new layers are formed with well-defined orientations with respect to the crystalline seed layer.}
\ger{Eine Art des Kristallwachstums, bei der mindestens eine kristallographische Ordnung der wachsenden Schicht der des Substrates entspricht.}
\end{ttext}
\begin{minipagetable}{mbe}
\entry{name}{
\eng{Molecular Beam Epitaxy (MBE)}
\ger{Molekularstrahlepitaxie (MBE)}
}
\entry{how}{
\eng{In a ultra-high vacuum, the elements are heated until they slowly sublime. The gases then condensate on the substrate surface}
\ger{Die Elemente werden in einem Ultrahochvakuum erhitzt, bis sie langsam sublimieren. Die entstandenen Gase kondensieren dann auf der Oberfläche des Substrats}
}
\entry{application}{
\eng{
\begin{itemize}
\item Gallium arsenide \ce{GaAs}
\end{itemize}
\TODO{Link to GaAs}
}
\ger{
\begin{itemize}
\item Galliumarsenid \ce{GaAs}
\end{itemize}
}
}
\end{minipagetable}
\begin{minipage}{0.5\textwidth}
\centering
\includegraphics[width=\textwidth]{img/cm_mbe_english.pdf}
\end{minipage}

10
src/constants.tex Normal file
View File

@ -0,0 +1,10 @@
\Section[
\eng{Constants}
\ger{Konstanten}
]{constants}
\begin{constant}{planck}{h}{def}
\desc{Planck Constant}{}{}
\desc[german]{Plancksches Wirkumsquantum}{}{}
\val{6.62607015\cdot 10^{-34}}{\joule\s}
\val{4.135667969\dots\cdot 10^{-15}}{\eV\s}
\end{constant}

View File

@ -1,5 +1,3 @@
\def\PhiB{\Phi_\text{B}}
\def\PhiE{\Phi_\text{E}}
\Part[ \Part[
\eng{Electrodynamics} \eng{Electrodynamics}
@ -10,7 +8,7 @@
\Section[ \Section[
\eng{Maxwell-Equations} \eng{Maxwell-Equations}
\ger{Maxwell-Gleichungen} \ger{Maxwell-Gleichungen}
]{Maxwell} ]{Maxwell}
\begin{formula}{vacuum} \begin{formula}{vacuum}
\desc{Vacuum}{microscopic formulation}{} \desc{Vacuum}{microscopic formulation}{}
\desc[german]{Vakuum}{Mikroskopische Formulierung}{} \desc[german]{Vakuum}{Mikroskopische Formulierung}{}
@ -32,38 +30,60 @@
\Rot \vec{H} &= \vec{j} + \odv{\vec{D}}{t} \Rot \vec{H} &= \vec{j} + \odv{\vec{D}}{t}
} }
\end{formula} \end{formula}
\TODO{Polarization, Magnetisation} \TODO{Polarization}
\Section[ \Section[
\eng{Fields}
\ger{Felder}
]{fields}
\Subsection[
\eng{Electric field} \eng{Electric field}
\ger{Elektrisches Feld} \ger{Elektrisches Feld}
]{el} ]{el}
\begin{formula}{gauss_law} \begin{formula}{gauss_law}
\desc{Gauss's law for electric fields}{Electric flux through a closed surface is proportional to the electric charge}{$S$ closed surface} \desc{Gauss's law for electric fields}{Electric flux through a closed surface is proportional to the electric charge}{$S$ closed surface}
\desc[german]{Gaußsches Gesetz für elektrische Felder}{Der magnetische Fluss durch eine geschlossene Fläche ist proportional zur elektrischen Ladung}{$S$ geschlossene Fläche} \desc[german]{Gaußsches Gesetz für elektrische Felder}{Der magnetische Fluss durch eine geschlossene Fläche ist proportional zur elektrischen Ladung}{$S$ geschlossene Fläche}
\eq{\PhiE = \iint_S \vec{E}\cdot\d\vec{S} = \frac{Q}{\varepsilon_0}} \eq{\PhiE = \iint_S \vec{E}\cdot\d\vec{S} = \frac{Q}{\varepsilon_0}}
\end{formula} \end{formula}
\Subsection[ \Section[
\eng{Magnetic field} \eng{Magnetic field}
\ger{Magnetfeld} \ger{Magnetfeld}
]{mag} ]{mag}
\begin{constant}{h_joule}{\hbar}{def}
\desc{Planck Constant}{}{}
\desc[german]{Plancksches Wirkumsquantum}{}{}
\val{6.62607015\cdot 10^{-34}}{\joule\s}
\val{4.135667969\dots\cdot 10^{-15}}{\eV\s}
\end{constant}
\Eng[magnetic_flux]{Magnetix flux density} \Eng[magnetic_flux]{Magnetix flux density}
\Ger[magnetic_flux]{Magnetische Flussdichte} \Ger[magnetic_flux]{Magnetische Flussdichte}
\begin{quantity}{mag_flux}{\Phi}{\weber=\volt\per\s=\kg\m^2\per\s^2\A}{scalar} \begin{quantity}{magnetic_flux}{\PhiB}{\weber=\volt\per\s=\kg\m^2\per\s^2\A}{scalar}
\desc{Magnetic flux}{} \desc{Magnetic flux}{}
\desc[german]{Magnetischer Fluss}{} \desc[german]{Magnetischer Fluss}{}
\end{quantity} \end{quantity}
\begin{quantity}{magnetic_flux_density}{\vec{B}}{\tesla=\volt\s\per\m^2=\newton\per\ampere\m=\kg\per\ampere\s^2}{}
\desc{Magnetic flux density}{}
\desc[german]{Magnetische Flussdichte}{}
\end{quantity}
\begin{formula}{magnetic_flux_density}
\desc{\qtyRef{magnetic_flux_density}}{}{$\vec{H}$ \qtyRef{magnetic_field_density}, $\vec{M}$ \qtyRef{magnetization}, $\mu_0$ \constRef{vacuum_permeability}}
\desc[german]{}{}{}
\eq{\vec{B} = \mu_0 (\vec{H}+\vec{M})}
\end{formula}
\begin{quantity}{magnetic_permeability}{\mu}{\henry\per\m=\volt\s\per\ampere\m}{scalar}
\desc{Magnetic permeability}{}
\desc[german]{Magnetisch Permeabilität}{}
\end{quantity}
\begin{constant}{vacuum_permeability}{\mu_0}{exp}
\desc{Magnetic vauum permeability}{}{}
\desc[german]{Magnetische Vakuumpermeabilität}{}{}
\val{1.25663706127(20)}{\henry\per\m=\newton\per\ampere^2}
\end{constant}
\begin{formula}{magnetic_flux} \begin{formula}{magnetic_flux}
\desc{Magnetic flux}{}{} \desc{Magnetic flux}{}{$\vec{A}$ \GT{area}}
\desc[german]{Magnetischer Fluss}{}{} \desc[german]{Magnetischer Fluss}{}{}
\eq{\PhiB = \iint_A \vec{B}\cdot\d\vec{A}} \eq{\PhiB = \iint_A \vec{B}\cdot\d\vec{A}}
\end{formula} \end{formula}
@ -74,15 +94,24 @@
\eq{\PhiB = \iint_S \vec{B}\cdot\d\vec{S} = 0} \eq{\PhiB = \iint_S \vec{B}\cdot\d\vec{S} = 0}
\end{formula} \end{formula}
\begin{quantity}{magnetization}{\vec{M}}{\ampere\per\m}{vector}
\desc{Magnetization}{Vector field describing the density of magnetic dipoles}
\desc[german]{Magnetisierung}{Vektorfeld, welches die Dichte von magnetischen Dipolen beschreibt.}
\end{quantity}
\begin{quantity}{magnetic_moment}{\vec{m}}{\ampere\m^2}{vector}
\desc{Magnetic moment}{Strength and direction of a magnetic dipole}
\desc[german]{Magnetisches Moment}{Stärke und Richtung eines magnetischen Dipols}
\end{quantity}
\begin{formula}{magnetization} \begin{formula}{magnetization}
\desc{Magnetization}{}{$m$ mag. moment, $V$ volume} \desc{\qtyRef{magnetization}}{}{$m$ \qtyRef{magnetic_moment}, $V$ \qtyRef{volume}}
\desc[german]{Magnetisierung}{}{$m$ mag. Moment, $V$ Volumen} \desc[german]{}{}{}
\eq{\vec{M} = \odv{\vec{m}}{V} = \chi_\text{m} \cdot \vec{H}} \eq{\vec{M} = \odv{\vec{m}}{V} = \chi_\text{m} \cdot \vec{H}}
\end{formula} \end{formula}
\begin{formula}{angular_torque} \begin{formula}{angular_torque}
\desc{Torque}{}{$m$ mag. moment} \desc{Torque}{}{$m$ \qtyRef{magnetic_moment}}
\desc[german]{Drehmoment}{}{$m$ mag. Moment} \desc[german]{Drehmoment}{}{}
\eq{\vec{\tau} = \vec{m} \times \vec{B}} \eq{\vec{\tau} = \vec{m} \times \vec{B}}
\end{formula} \end{formula}
@ -99,7 +128,11 @@
\eq{\vec{S} = \vec{E} \times \vec{H}} \eq{\vec{S} = \vec{E} \times \vec{H}}
\end{formula} \end{formula}
\begin{formula}{magnetic_permeability}
\desc{\qtyRef{magnetic_permeability}}{}{$B$ \qtyRef{magnetic_flux_density}, $H$ \qtyRef{magnetic_field_intensity}}
\desc[german]{}{}{}
\eq{\mu=\frac{B}{H}}
\end{formula}
\Subsection[ \Subsection[
\eng{Induction} \eng{Induction}
@ -124,6 +157,17 @@
} }
\end{formula} \end{formula}
\Subsection[
\eng{Magnetic materials}
\ger{Magnetische Materialien}
]{materials}
\begin{formula}{paramagnetism}
\desc{Paramagnetism}{}{$\mu$ \fqEqRef{ed:mag:permeability}, $\chi$ \fqEqRef{ed:mag:susecptibility}}
\desc[german]{Paramagnetismus}{}{}
\eq{\mu &> 1 \\ \chi > 0}
\end{formula}
\Section[ \Section[
\eng{Hall-Effect} \eng{Hall-Effect}
\ger{Hall-Effekt} \ger{Hall-Effekt}
@ -152,9 +196,9 @@
\end{formula} \end{formula}
\begin{formula}{coefficient} \begin{formula}{coefficient}
\desc{Hall coefficient}{}{} \desc{Hall coefficient}{Sometimes $R_\txH$}{}
\desc[german]{Hall-Koeffizient}{}{} \desc[german]{Hall-Koeffizient}{Manchmal $R_\txH$}{}
\eq{R_\text{H} = -\frac{Eg}{j_x Bg} = \frac{1}{ne} = \frac{\rho_{xy}}{B_z}} \eq{A_\text{H} := -\frac{E_y}{j_x B_z} \explOverEq{\GT{metals}} \frac{1}{ne} = \frac{\rho_{xy}}{B_z}}
\end{formula} \end{formula}
\begin{formula}{resistivity} \begin{formula}{resistivity}
@ -240,7 +284,7 @@
\Section[ \Section[
\eng{Dipole-stuff} \eng{Dipole-stuff}
\ger{Dipol-zeug} \ger{Dipol-zeug}
]{dipole} ]{dipole}
\begin{formula}{poynting} \begin{formula}{poynting}
\desc{Dipole radiation Poynting vector}{}{} \desc{Dipole radiation Poynting vector}{}{}

142
src/main.tex Normal file → Executable file
View File

@ -1,6 +1,6 @@
\documentclass[11pt, a4paper]{article} \documentclass[11pt, a4paper]{article}
% \usepackage[utf8]{inputenc} % \usepackage[utf8]{inputenc}
\usepackage[english]{babel} \usepackage[german]{babel}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
% ENVIRONMENTS etc % ENVIRONMENTS etc
\usepackage{adjustbox} \usepackage{adjustbox}
@ -15,23 +15,19 @@
\usepackage{expl3} % switch case and other stuff \usepackage{expl3} % switch case and other stuff
\usepackage{substr} \usepackage{substr}
\usepackage{xcolor} \usepackage{xcolor}
\usepackage{float} % FORMATING
\usepackage{float} % float barrier
\usepackage{subcaption} % subfigure
\usepackage[hidelinks]{hyperref} \usepackage[hidelinks]{hyperref}
\usepackage{subcaption}
\usepackage[shortlabels]{enumitem} % easily change enum symbols to i), a. etc \usepackage[shortlabels]{enumitem} % easily change enum symbols to i), a. etc
\hypersetup{colorlinks = true, % Colours links instead of ugly boxes \usepackage{titlesec} % colored titles
urlcolor = blue, % Colour for external hyperlinks \usepackage{array}
linkcolor = cyan, % Colour of internal links \newcolumntype{C}{>{$}c<{$}} % math-mode version of "c" column type
citecolor = red % Colour of citations % \usepackage{sectsty}
} % TRANSLATION
\usepackage{translations} \usepackage{translations}
\input{util/translation.tex} \input{util/translation.tex}
\usepackage{sectsty}
\usepackage{titlesec}
\input{util/colorscheme.tex} \input{util/colorscheme.tex}
% GRAPHICS % GRAPHICS
\usepackage{tikz} % drawings \usepackage{tikz} % drawings
\usetikzlibrary{decorations.pathmorphing} \usetikzlibrary{decorations.pathmorphing}
@ -40,9 +36,7 @@
% \usetikzlibrary{external} % \usetikzlibrary{external}
% \tikzexternalize[prefix=tikz_figures] % \tikzexternalize[prefix=tikz_figures]
% \tikzexternalize % \tikzexternalize
\usepackage{circuitikz} \usepackage{circuitikz}
% SCIENCE PACKAGES % SCIENCE PACKAGES
\usepackage{mathtools} \usepackage{mathtools}
\usepackage{MnSymbol} % for >>> \ggg sign \usepackage{MnSymbol} % for >>> \ggg sign
@ -57,23 +51,21 @@
\sisetup{separate-uncertainty} \sisetup{separate-uncertainty}
\sisetup{per-mode = power} \sisetup{per-mode = power}
\sisetup{exponent-product=\ensuremath{\cdot}} \sisetup{exponent-product=\ensuremath{\cdot}}
% 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{bright_red}TODO:#1}} \newcommand{\TODO}[1]{{\color{bright_red}TODO:#1}}
\newcommand{\ts}{\textsuperscript} \newcommand{\ts}{\textsuperscript}
% put an explanation above an equal sign
% [1]: equality sign (or anything else)
% 2: text (not in math mode!)
\newcommand{\explUnderEq}[2][=]{%
\underset{\substack{\uparrow\\\mathrlap{\text{\hspace{-1em}#2}}}}{#1}}
\newcommand{\explOverEq}[2][=]{%
\overset{\substack{\mathrlap{\text{\hspace{-1em}#2}}\\\downarrow}}{#1}}
% "automate" sectioning % "automate" sectioning
% start <section>, get heading from translation, set label % start <section>, get heading from translation, set label
% fqname is the fully qualified name: the keys of all previous sections joined with a ':' % fqname is the fully qualified name: the keys of all previous sections joined with a ':'
@ -118,37 +110,57 @@
% Make the translation of #1 a reference to a equation % Make the translation of #1 a reference to a equation
% 1: key % 1: key
\newcommand{\fqEqRef}[1]{ \newrobustcmd{\fqEqRef}[1]{%
\edef\fqeqrefname{\GT{#1}} % \edef\fqeqrefname{\GT{#1}}
\hyperref[eq:#1]{\fqeqrefname} % \hyperref[eq:#1]{\fqeqrefname}
\hyperref[eq:#1]{\GT{#1}}%
} }
\newcommand{\qtyRef}[1]{ \newrobustcmd{\qtyRef}[1]{%
% using temp edef so that underscores in undefined trasnlation keys are printed as characters \hyperref[qty:#1]{\GT{#1}}%
\edef\qtyrefname{\GT{qty:#1}} }
\hyperref[qty:#1]{\qtyrefname} \newrobustcmd{\constRef}[1]{%
\hyperref[const:#1]{\GT{#1}}%
} }
% Make the translation of #1 a reference to a section % Make the translation of #1 a reference to a section
% 1: key % 1: key
\newcommand{\fqSecRef}[1]{ \newrobustcmd{\fqSecRef}[1]{%
\hyperref[sec:#1]{\GT{#1}} \hyperref[sec:#1]{\GT{#1}}%
} }
% \usepackage{xstring} % \usepackage{xstring}
\input{circuit.tex} \input{circuit.tex}
\input{util/macros.tex}
\input{util/environments.tex} % requires util/translation.tex to be loaded first
% some translations \def\inputOnlyFile{\relax}
\newcommand\Input[1]{
\ifstrequal{\relax}{\inputOnlyFile}{
\input{#1}
}{
\ifstrequal{#1}{\inputOnlyFile}{
\input{#1}
}{}
}
}
% \includeonly{mechanics}
% \includeonly{low_temp}
\title{Formelsammlung} \title{Formelsammlung}
\author{Matthias Quintern} \author{Matthias Quintern}
\date{\today} \date{\today}
\input{util/macros.tex}
\input{util/environments.tex}
% \includeonly{computational}
\begin{document} \begin{document}
\IfFileExists{\jobname.translations.aux}{%
\input{\jobname.translations.aux}
}{}
\newwrite\translationsaux
\immediate\openout\translationsaux=\jobname.translations.aux
\immediate\write\translationsaux{\noexpand\def\noexpand\MYVAR{AUSM AUX}}%
\AtEndDocument{\immediate\closeout\translationsaux}
\maketitle \maketitle
\tableofcontents \tableofcontents
@ -159,7 +171,7 @@
% \include{maths/linalg} % \include{maths/linalg}
% \include{maths/geometry} % \include{maths/geometry}
% \include{maths/analysis} \input{maths/analysis.tex}
% \include{maths/probability_theory} % \include{maths/probability_theory}
\include{mechanics} \include{mechanics}
@ -168,25 +180,30 @@
\include{electrodynamics} \include{electrodynamics}
\include{quantum_mechanics} % \include{quantum_mechanics}
\include{atom} % \include{atom}
\include{condensed_matter} \include{condensed_matter}
\include{low_temp} \input{cm/charge_transport.tex}
\input{cm/low_temp.tex}
\input{cm/semiconductors.tex}
% \include{cm/techniques}
\include{topo} \include{topo}
\include{quantum_computing} % \include{quantum_computing}
\include{computational} \include{computational}
\include{quantities} \include{quantities}
\include{constants}
\newpage \newpage
% \DT[english]{ttest}{TESTT EN} % \DT[english]{ttest}{TESTT EN}
% \DT[german]{ttest}{TESTT DE} % \DT[german]{ttest}{TESTT DE}
\addtranslation{english}{ttest}{JA MOIN} \paragraph{Testing GT, GetTranslation, IfTranslationExists, IfTranslation}
\addtranslation{english}{ttest}{This is the english translation of \texttt{ttest}}
\noindent \noindent
GT: ttest = \GT{ttest}\\ GT: ttest = \GT{ttest}\\
GetTranslation: ttest = \GetTranslation{ttest}\\ GetTranslation: ttest = \GetTranslation{ttest}\\
@ -194,6 +211,7 @@ Is english? = \IfTranslation{english}{ttest}{yes}{no} \\
Is german? = \IfTranslation{german}{ttest}{yes}{no} \\ Is german? = \IfTranslation{german}{ttest}{yes}{no} \\
Is defined = \IfTranslationExists{ttest}{yes}{no} \\ Is defined = \IfTranslationExists{ttest}{yes}{no} \\
\paragraph{Testing translation keys containing macros}
\def\ttest{NAME} \def\ttest{NAME}
% \addtranslation{english}{\ttest:name}{With variable} % \addtranslation{english}{\ttest:name}{With variable}
% \addtranslation{german}{\ttest:name}{Mit Variable} % \addtranslation{german}{\ttest:name}{Mit Variable}
@ -211,17 +229,27 @@ Is defined? = \expandafter\IfTranslationExists\expandafter{\ttest:name}{yes}{no}
% \DT[qty:test]{english}{HAHA} % \DT[qty:test]{english}{HAHA}
{blablabla \label{test}} \paragraph{Testing hyperrefs}
\noindent{This text is labeled with "test" \label{test}}\\
\hyperref[test]{This should refer to the line above}\\
Link to quantity which is defined after the reference: \qtyRef{test}\\
\DT[qty:test]{english}{If you read this, then the translation for qty:test was expandend!}
Link to defined quantity: \qtyRef{mass}
\begin{equation}
\label{qty:test}
E = mc^2
\end{equation}
\paragraph{Testing translation keys with token symbols like undescores}
\noindent
\GT{absolute_undefined_translation_with_underscors}\\
\gt{relative_undefined_translation_with_underscors}\\
\GT{absolute_undefined_translation_with_&ampersand}
\hyperref[test]{TEST reference}
\qtyRef{test}
\DT[qty:test]{english}{HAHA}
\qtyRef{mass}
\GT{qty:#1}
\GT{\qtyname}
\newpage \newpage
\Eng[appendix]{Appendix} \Eng[appendix]{Appendix}

View File

@ -3,6 +3,13 @@
\ger{Analysis} \ger{Analysis}
]{cal} ]{cal}
% \begin{formula}{shark}
% \desc{Shark-midnight formula}{\emoji{shark}-s}{}
% \desc[german]{Shark-Mitternachtformel}{}{}
% \eq{
% \temoji{seal}_{1,2} = \frac{-\temoji{shark}\pm \sqrt{\temoji{shark}^2-4\temoji{octopus}\temoji{tropical-fish}}}{2\temoji{octopus}}
% }
% \end{formula}
\Subsection[ \Subsection[
\eng{Convolution} \eng{Convolution}
@ -15,7 +22,7 @@
\begin{formula}{def} \begin{formula}{def}
\desc{Definition}{}{} \desc{Definition}{}{}
\desc[german]{Definition}{}{} \desc[german]{Definition}{}{}
\eq{(f*g)(t) = f(t) * g(t) = int_{-\infty}^\infty f(\tau) g(t-\tau) \d \tau} \eq{(f*g)(t) = f(t) * g(t) = \int_{-\infty}^\infty f(\tau) g(t-\tau) \d \tau}
\end{formula} \end{formula}
\begin{formula}{notation} \begin{formula}{notation}
\desc{Notation}{}{} \desc{Notation}{}{}
@ -134,6 +141,12 @@
} }
\end{formula} \end{formula}
\begin{formula}{delta_of_function}
\desc{Dirac-Delta of a function}{}{$g(x_0) = 0$}
\desc[german]{Dirac-Delta einer Funktion}{}{}
\eq{\delta(f(x)) = \frac{\delta(x-x_0)}{\abs{g'(x_0)}}}
\end{formula}
\Section[ \Section[
\eng{Logarithm} \eng{Logarithm}
@ -150,12 +163,23 @@
x^{\log(y)} &= y^{\log(x)} x^{\log(y)} &= y^{\log(x)}
} }
\end{formula} \end{formula}
\begin{formula}{intergral}
\desc{Integral of natural logarithm}{}{}
\desc[german]{Integral des natürluchen Logarithmus}{}{}
\eq{
\int \ln(x) \d x &= x \left(\ln(x) -1\right) \\
\int \ln(ax + b) \d x &= \frac{ax+b}{a} \left(\ln(ax + b) -1\right)
}
\end{formula}
\Section[ \Section[
\eng{List of common integrals} \eng{List of common integrals}
\ger{Liste nützlicher Integrale} \ger{Liste nützlicher Integrale}
]{integrals} ]{integrals}
% Put links to other integrals here
\fqEqRef{cal:log:integral}
\begin{formula}{spherical-coordinates} \begin{formula}{spherical-coordinates}
\desc{Spherical coordinates}{}{} \desc{Spherical coordinates}{}{}
\desc[german]{Kugelkoordinaten}{}{} \desc[german]{Kugelkoordinaten}{}{}
@ -179,3 +203,4 @@

View File

@ -47,6 +47,12 @@
\eq{F(x) = \int_{-\infty}^x f(t) \d t} \eq{F(x) = \int_{-\infty}^x f(t) \d t}
\end{formula} \end{formula}
\begin{formula}{autocorrelation}
\desc{Autocorrelation}{Correlation of $f$ to itself at an earlier point in time, $C$ is a covariance function}{}
\desc[german]{Autokorrelation}{Korrelation vonn $f$ zu sich selbst zu einem früheren Zeitpunkt. $C$ ist auch die Kovarianzfunktion}{}
\eq{C_A(\tau) = \lim_{T \to \infty} \frac{1}{2T}\int_{-T}^{T} f(t+\tau) f(t) \d t) = \braket{f(t+\tau)\cdot f(t)}}
\end{formula}
\Section[ \Section[
\eng{Distributions} \eng{Distributions}
\ger{Verteilungen} \ger{Verteilungen}

77
src/quantities.tex Normal file
View File

@ -0,0 +1,77 @@
% if this causes a compilation error, check that none of the units have been redefined
\Eng[si_base_units]{SI base units}
\Ger[si_base_units]{SI Basisgrößen}
\paragraph{\GT{si_base_units}}
\begin{quantity}{time}{t}{\second}{}
\desc{Time}{}
\desc[german]{Zeit}{}
\end{quantity}
\begin{quantity}{Length}{l}{\m}{e}
\desc{Length}{}
\desc[german]{Länge}{}
\end{quantity}
\begin{quantity}{mass}{m}{\kg}{es}
\desc{Mass}{}
\desc[german]{Masse}{}
\end{quantity}
\begin{quantity}{temperature}{T}{\kelvin}{is}
\desc{Temperature}{}
\desc[german]{Temperatur}{}
\end{quantity}
\begin{quantity}{current}{I}{\ampere}{es}
\desc{Electric current}{}
\desc[german]{Elektrischer Strom}{}
\end{quantity}
\begin{quantity}{amount}{n}{\mol}{es}
\desc{Amount of substance}{}
\desc[german]{Stoffmenge}{}
\end{quantity}
\begin{quantity}{luminous_intensity}{I_\text{V}}{\candela}{s}
\desc{Luminous intensity}{}
\desc[german]{Lichtstärke}{}
\end{quantity}
\paragraph{\GT{other}}
\begin{quantity}{volume}{V}{\m^d}{}
\desc{Volume}{$d$ dimensional Volume}
\desc[german]{Volumen}{$d$ dimensionales Volumen}
\end{quantity}
\begin{quantity}{force}{\vec{F}}{\newton=\kg\m\per\second^2}{ev}
\desc{Force}{}
\desc[german]{Kraft}{}
\end{quantity}
\begin{quantity}{spring_constant}{k}{\newton\per\m=\kg\per\second^2}{s}
\desc{Spring constant}{}
\desc[german]{Federkonstante}{}
\end{quantity}
\begin{quantity}{velocity}{\vec{v}}{\m\per\s}{v}
\desc{Velocity}{}
\desc[german]{Geschwindigkeit}{}
\end{quantity}
\begin{quantity}{torque}{\tau}{\newton\m=\kg\m^2\per\s^2}{v}
\desc{Torque}{}
\desc[german]{Drehmoment}{}
\end{quantity}
\begin{quantity}{heat_capacity}{C}{\joule\per\kelvin}{}
\desc{Heat capacity}{}
\desc[german]{Wärmekapazität}{}
\end{quantity}
\begin{quantity}{charge}{q}{\coulomb=\ampere\s}{}
\desc{Charge}{}
\desc[german]{Ladung}{}
\end{quantity}

View File

@ -53,6 +53,43 @@
\eq{\hat{A} = \hat{A}^\dagger} \eq{\hat{A} = \hat{A}^\dagger}
\end{formula} \end{formula}
\Subsubsection[
\eng{Measurement}
\ger{Messung}
]{measurement}
\begin{ttext}
\eng{An observable is a hermition operator acting on $\hat{H}$. The measurement randomly yields one of the eigenvalues of $\hat{O}$ (all real).}
\ger{Eine Observable ist ein hermitscher Operator, der auf $\hat{H}$ wirkt. Die Messung ergibt zufällig einen der Eigenwerte von $\hat{O}$, welche alle reell sind.}
\end{ttext}
\begin{formula}{name}
\desc{Measurement probability}{Probability to measure $\psi$ in state $\lambda$}{}
\desc[german]{Messwahrscheinlichkeit}{Wahrscheinlichkeit, $\psi$ im Zustand $\lambda$ zu messen}{}
\eq{p(\lambda) = \braket{\psi|\hat{P}_\lambda|\psi}}
\end{formula}
\begin{formula}{state_after}
\desc{State after measurement}{}{}
\desc[german]{Zustand nach der Messung}{}{}
\eq{\ket{\psi}_\text{post} = \frac{1}{\sqrt{p(\lambda)}}\hat{P}_\lambda \ket{\psi}}
\end{formula}
\Subsubsection[
\eng{Pauli matrices}
\ger{Pauli-Matrizen}
]{pauli_matrices}
\begin{formula}{pauli_matrices}
\desc{Pauli matrices}{}{}
\desc[german]{Pauli Matrizen}{}{}
\eqAlignedAt{2}{
\sigma_x &= \sigmaxmatrix &&= \sigmaxbraket \label{eq:pauli_x} \\
\sigma_y &= \sigmaymatrix &&= \sigmaybraket \label{eq:pauli_y} \\
\sigma_z &= \sigmazmatrix &&= \sigmazbraket \label{eq:pauli_z}
}
\end{formula}
% $\sigma_x$ NOT
% $\sigma_y$ PHASE
% $\sigma_z$ Sign
\Subsection[ \Subsection[
\ger{Wahrscheinlichkeitstheorie} \ger{Wahrscheinlichkeitstheorie}
\eng{Probability theory} \eng{Probability theory}
@ -85,23 +122,6 @@
} }
\end{formula} \end{formula}
\Subsubsection[
\eng{Pauli matrices}
\ger{Pauli-Matrizen}
]{pauli_matrices}
\begin{formula}{pauli_matrices}
\desc{Pauli matrices}{}{}
\desc[german]{Pauli Matrizen}{}{}
\eqAlignedAt{2}{
\sigma_x &= \sigmaxmatrix &&= \sigmaxbraket \label{eq:pauli_x} \\
\sigma_y &= \sigmaymatrix &&= \sigmaybraket \label{eq:pauli_y} \\
\sigma_z &= \sigmazmatrix &&= \sigmazbraket \label{eq:pauli_z}
}
\end{formula}
% $\sigma_x$ NOT
% $\sigma_y$ PHASE
% $\sigma_z$ Sign
\Subsection[ \Subsection[
\eng{Commutator} \eng{Commutator}

View File

@ -27,7 +27,11 @@ Functions that create a hyperlink (and use the translation of the target element
## Multilanguage ## Multilanguage
All text should be defined as a translation (`translations` package, see `util/translation.tex`) and then used using the `gt` or `GT` macros. All text should be defined as a translation (`translations` package, see `util/translation.tex`).
Use `\dt` or `\DT` or the the shorthand language commands `\eng`, `\Eng` etc. to define translations.
These commands also be write the translations to an auxiliary file, which is read after the document begins.
This means (on subsequent compilations) that the translation can be resolved before they are defined.
Use the `gt` or `GT` macros to retrieve translations.
The english translation of any key must be defined, because it will also be used as fallback. The english translation of any key must be defined, because it will also be used as fallback.
Lower case macros are relative to the current `fqname`, while upper case macros are absolute. Lower case macros are relative to the current `fqname`, while upper case macros are absolute.

View File

@ -5,12 +5,12 @@
\begin{ttext} \begin{ttext}
\eng{ \eng{
\textbf{Intensive quantities:} Additive for subsystems (system size dependent): $S(\lambda E, \lambda V, \lambda N) = \lambda S(E, V, N)$\\ \textbf{Extensive quantities:} Additive for subsystems (system size dependent): $S(\lambda E, \lambda V, \lambda N) = \lambda S(E, V, N)$\\
\textbf{Extensive quantities:} Independent of system size, ratio of two intensive quantities \textbf{Intensive quantities:} Independent of system size, ratio of two extensive quantities
} }
\ger{ \ger{
\textbf{Intensive Größen:} Additiv für Subsysteme (Systemgrößenabhänig): $S(\lambda E, \lambda V, \lambda N) = \lambda S(E, V, N)$\\ \textbf{Extensive Größen:} Additiv für Subsysteme (Systemgrößenabhänig): $S(\lambda E, \lambda V, \lambda N) = \lambda S(E, V, N)$\\
\textbf{Extensive Größen:} Unabhängig der Systemgröße, Verhältnis zweier intensiver Größen \textbf{Intensive Größen:} Unabhängig der Systemgröße, Verhältnis zweier extensiver Größen
} }
\end{ttext} \end{ttext}
@ -660,7 +660,7 @@
\eq{ \eq{
pV &= \kB T \ln Z_g \\ pV &= \kB T \ln Z_g \\
\shortintertext{\GT{after} \GT{td:real_gas:virial}} \shortintertext{\GT{after} \GT{td:real_gas:virial}}
&= N \kB T \left[1 \mp \frac{\lambda^3}{2^{5/2} g v} + \Order\left(\left(\frac{\lambda^3}{v}\right)^2\right)\right] &= N \kB T \left[1 \mp \frac{\lambda^3}{2^{5/2} g v} + \Order{\left(\frac{\lambda^3}{v}\right)^2}\right]
} }
\end{formula} \end{formula}
\begin{formula}{relevance} \begin{formula}{relevance}

0
src/svgs/convertToPdf.sh Executable file → Normal file
View File

View File

@ -1,4 +1,4 @@
% Define Gruvbox colors % Gruvbox colors
\definecolor{dark0_hard}{HTML}{1d2021} \definecolor{dark0_hard}{HTML}{1d2021}
\definecolor{dark0}{HTML}{282828} \definecolor{dark0}{HTML}{282828}
\definecolor{dark0_soft}{HTML}{32302f} \definecolor{dark0_soft}{HTML}{32302f}
@ -36,13 +36,13 @@
\definecolor{faded_aqua}{HTML}{427b58} \definecolor{faded_aqua}{HTML}{427b58}
\definecolor{faded_orange}{HTML}{af3a03} \definecolor{faded_orange}{HTML}{af3a03}
% Use Gruvbox colors for various elements % Dark mode
% \pagecolor{light0_hard} % \pagecolor{light0_hard}
% \color{dark0_hard} % \color{dark0_hard}
% \pagecolor{dark0_hard} % \pagecolor{dark0_hard}
% \color{light0_hard} % \color{light0_hard}
% Section headings in bright colors % section headings in bright colors, \titleformat from titlesec package
\titleformat{\section} \titleformat{\section}
{\color{neutral_purple}\normalfont\Large\bfseries} {\color{neutral_purple}\normalfont\Large\bfseries}
{\color{neutral_purple}\thesection}{1em}{} {\color{neutral_purple}\thesection}{1em}{}
@ -63,10 +63,9 @@
{\color{neutral_purple}\normalfont\normalsize\bfseries} {\color{neutral_purple}\normalfont\normalsize\bfseries}
{\color{neutral_purple}\thesubparagraph}{1em}{} {\color{neutral_purple}\thesubparagraph}{1em}{}
% Links in neutral colors
\hypersetup{ \hypersetup{
colorlinks=true, colorlinks=true,
linkcolor=neutral_red, linkcolor=neutral_purple,
citecolor=neutral_green, citecolor=neutral_green,
filecolor=neutral_blue, filecolor=neutral_blue,
urlcolor=neutral_orange urlcolor=neutral_orange

View File

@ -7,7 +7,7 @@
\edef\realfqname{\fqname} \edef\realfqname{\fqname}
\edef\fqname{\fqname:#1} \edef\fqname{\fqname:#1}
}{ }{
\expandafter\GT\expandafter{\fqname} \\ \expandafter\GT\expandafter{\fqname}% \\
\edef\fqname{\realfqname} \edef\fqname{\realfqname}
} }
@ -149,7 +149,7 @@
% 4: definitions/links % 4: definitions/links
\newcommand{\desc}[4][english]{ \newcommand{\desc}[4][english]{
% language, name, description, definitions % language, name, description, definitions
\dt[#1]{##1}{##2} \ifblank{##2}{}{\dt[#1]{##1}{##2}}
\ifblank{##3}{}{\dt[#1_desc]{##1}{##3}} \ifblank{##3}{}{\dt[#1_desc]{##1}{##3}}
\ifblank{##4}{}{\dt[#1_defs]{##1}{##4}} \ifblank{##4}{}{\dt[#1_defs]{##1}{##4}}
} }
@ -211,13 +211,114 @@
tex.print(result) tex.print(result)
end end
} }
% 1: key
% 2: symbol
% 3: value
% 4: units
% 5: exp or def
% \newenvironment{constant}[5]{
% % key, symbol, si unit(s), comment (key to global translation)
% \newcommand{\desc}[3][english]{
% % language, name, description
% % \DT[qty:#1]{##1}{##2}
% % \ifblank{##3}{}{\DT[qty:#1_desc]{##1}{##3}}
% \ifblank{##2}{}{\DT[const:#1]{##1}{##2}}
% \ifblank{##3}{}{\DT[const:#1_desc]{##1}{##3}}
% }
% % TODO put these in long term key - value storage for generating a full table and global referenes \constRef
% % for references, there needs to be a label somwhere
% \edef\constName{const:#1}
% \edef\constDesc{const:#1_desc}
% \def\constSymbol{#2}
% \edef\constValue{#3}
% \def\constUnits{#4}
% \edef\constExpOrDef{const:#5}
% }
% {
% \NameLeftContentRight{\constName}{
% \begingroup
% Symbol: $\constSymbol$
% \IfTranslationExists{\constDesc}{
% \\Description: \GT{\constDesc}
% }{}
% \\Value: $\constValue$
% \\Unit: $\directlua{split_and_print_units([[\constUnits]])}$
% \GT{\constExpOrDef}
% \label{\constName}
% \endgroup
% }
% \ignorespacesafterend
% % for TOC
% \refstepcounter{constant}%
% % \addquantity{\expandafter\gt\expandafter{\qtyname}}%
% % \noindent\textbf{My Environment \themyenv: #1}\par%
% }
\newcounter{constant}
\newenvironment{constant}[3]{
% [1]: language
% 2: name
% 3: description
% 4: definitions/links
\newcommand{\desc}[4][english]{
% language, name, description, definitions
\ifblank{##2}{}{\DT[const:#1]{##1}{##2}}
\ifblank{##3}{}{\DT[const:#1_desc]{##1}{##3}}
\ifblank{##4}{}{\DT[const:#1_defs]{##1}{##4}}
}
\directlua{
constVals = {}
constUnits = {}
}
% 1: equation for align environment
\newcommand{\val}[2]{
\directlua{
%--table.insert(constVals, "LOL")
table.insert(constVals, [[##1]])
table.insert(constUnits, [[##2]])
%--table.insert(constUnits, "\luaescapestring{##2}")
}
\def\constValue{##1}
\def\constUnit{##2}
}
\edef\constName{const:#1}
\edef\constDesc{const:#1_desc}
\def\constSymbol{#2}
\edef\constExpOrDef{\GT{const:#3}}
}{
\NameLeftContentRight{\constName}{
\begingroup % for label
Symbol: $\constSymbol$
\IfTranslationExists{\constDesc}{
\\Description: \GT{\constDesc}
}{}
% TODO manage multiple values
% \\Value: $\constValue\,\si{\constUnit}$
\\\constExpOrDef:
\directlua{
%--tex.sprint("Hier steht Luatext" .. ":", #constVals)
for i, v in ipairs(constVals) do
tex.sprint("\\\\\\hspace*{1cm}${", constVals[i], "}\\,\\si{", constUnits[i], "}$")
%--tex.sprint("VALUE ", i, v)
end
}
\label{\constName}
\endgroup
}
\ignorespacesafterend
}
% 1: key
% 2: symbol
% 3: units
% 4: comment key to translation
\newenvironment{quantity}[4]{ \newenvironment{quantity}[4]{
% key, symbol, si unit(s), comment (key to global translation)
\newcommand{\desc}[3][english]{
% language, name, description % language, name, description
% \DT[qty:#1]{##1}{##2} \newcommand{\desc}[3][english]{
% \ifblank{##3}{}{\DT[qty:#1_desc]{##1}{##3}} \ifblank{##2}{}{\DT[qty:#1]{##1}{##2}}
\DT[qty:#1]{##1}{##2}
\ifblank{##3}{}{\DT[qty:#1_desc]{##1}{##3}} \ifblank{##3}{}{\DT[qty:#1_desc]{##1}{##3}}
} }
% TODO put these in long term key - value storage for generating a full table and global referenes \qtyRef % TODO put these in long term key - value storage for generating a full table and global referenes \qtyRef
@ -227,6 +328,7 @@
\def\qtysymbol{#2} \def\qtysymbol{#2}
\def\qtyunits{#3} \def\qtyunits{#3}
\edef\qtycomment{#4} \edef\qtycomment{#4}
% Unit: $\directlua{split_and_print_units([[\m\per\kg]])}$
} }
{ {
\NameLeftContentRight{\qtyname}{ \NameLeftContentRight{\qtyname}{
@ -238,7 +340,7 @@
\\Unit: $\directlua{split_and_print_units([[\qtyunits]])}$ \\Unit: $\directlua{split_and_print_units([[\qtyunits]])}$
\expandafter\IfTranslationExists\expandafter\qtycomment{ \expandafter\IfTranslationExists\expandafter\qtycomment{
\\Comment: \GT\qtycomment \\Comment: \GT\qtycomment
}{\\No comment \color{gray}} }{}%{\\No comment \color{gray}}
\label{\qtyname} \label{\qtyname}
\endgroup \endgroup
} }
@ -246,12 +348,10 @@
% for TOC % for TOC
\refstepcounter{quantity}% \refstepcounter{quantity}%
\addquantity{\expandafter\gt\expandafter{\qtyname}}% % \addquantity{\expandafter\gt\expandafter{\qtyname}}%
% \noindent\textbf{My Environment \themyenv: #1}\par% % \noindent\textbf{My Environment \themyenv: #1}\par%
} }
\newcounter{quantity} \newcounter{quantity}
\Eng[list_of_quantitites]{List of quantitites}
\Ger[list_of_quantitites]{Liste von Größen}
\newcommand{\listofquantities}{% \newcommand{\listofquantities}{%
\section*{\GT{list_of_quantitites}}% \section*{\GT{list_of_quantitites}}%
\addcontentsline{toc}{section}{\GT{list_of_quantitites}}% \addcontentsline{toc}{section}{\GT{list_of_quantitites}}%

View File

@ -1,38 +1,108 @@
\def\gooditem{\item[{$\color{neutral_red}\bullet$}]} \def\gooditem{\item[{$\color{neutral_red}\bullet$}]}
\def\baditem{\item[{$\color{neutral_green}\bullet$}]} \def\baditem{\item[{$\color{neutral_green}\bullet$}]}
% put an explanation above an equal sign
% [1]: equality sign (or anything else)
% 2: text (not in math mode!)
\newcommand{\explUnderEq}[2][=]{%
\underset{\substack{\uparrow\\\mathrlap{\text{\hspace{-1em}#2}}}}{#1}}
\newcommand{\explOverEq}[2][=]{%
\overset{\substack{\mathrlap{\text{\hspace{-1em}#2}}\\\downarrow}}{#1}}
% COMMON SYMBOLS WITH SUPER/SUBSCRIPTS, VECTOR ARROWS ETC.
\def\Grad{\vec{\nabla}} \def\Grad{\vec{\nabla}}
\def\Div{\vec{\nabla} \cdot} \def\Div{\vec{\nabla} \cdot}
\def\Rot{\vec{\nabla} \times} \def\Rot{\vec{\nabla} \times}
% common vectors
\def\vecr{\vec{r}} \def\vecr{\vec{r}}
\def\vecx{\vec{x}} \def\vecx{\vec{x}}
\def\kB{k_\text{B}} \def\kB{k_\text{B}}
\def\EFermi{E_\text{F}} \def\EFermi{E_\text{F}}
\def\Evalence{E_\text{v}}
\def\Econd{E_\text{c}}
\def\Egap{E_\text{gap}}
\def\masse{m_\textrm{e}} \def\masse{m_\textrm{e}}
\def\Four{\mathcal{F}} % Fourier transform
\def\Lebesgue{\mathcal{L}} % Lebesgue
\def\O{\mathcal{O}}
\def\PhiB{\Phi_\text{B}}
\def\PhiE{\Phi_\text{E}}
% SYMBOLS
\def\R{\mathbb{R}} \def\R{\mathbb{R}}
\def\C{\mathbb{C}} \def\C{\mathbb{C}}
\def\Z{\mathbb{Z}} \def\Z{\mathbb{Z}}
\def\N{\mathbb{N}} \def\N{\mathbb{N}}
% caligraphic
\def\calE{\mathcal{E}}
% upright
\def\txA{\text{A}}
\def\txB{\text{B}}
\def\txC{\text{C}}
\def\txD{\text{D}}
\def\txE{\text{E}}
\def\txF{\text{F}}
\def\txG{\text{G}}
\def\txH{\text{H}}
\def\txI{\text{I}}
\def\txJ{\text{J}}
\def\txK{\text{K}}
\def\txL{\text{L}}
\def\txM{\text{M}}
\def\txN{\text{N}}
\def\txO{\text{O}}
\def\txP{\text{P}}
\def\txQ{\text{Q}}
\def\txR{\text{R}}
\def\txS{\text{S}}
\def\txT{\text{T}}
\def\txU{\text{U}}
\def\txV{\text{V}}
\def\txW{\text{W}}
\def\txX{\text{X}}
\def\txY{\text{Y}}
\def\txZ{\text{Z}}
\def\Four{\mathcal{F}} % Fourier transform \def\txa{\text{a}}
\def\Lebesgue{\mathcal{L}} % Lebesgue \def\txb{\text{b}}
\def\Order{\mathcal{O}} \def\txc{\text{c}}
\def\txd{\text{d}}
\def\txe{\text{e}}
\def\txf{\text{f}}
\def\txg{\text{g}}
\def\txh{\text{h}}
\def\txi{\text{i}}
\def\txj{\text{j}}
\def\txk{\text{k}}
\def\txl{\text{l}}
\def\txm{\text{m}}
\def\txn{\text{n}}
\def\txo{\text{o}}
\def\txp{\text{p}}
\def\txq{\text{q}}
\def\txr{\text{r}}
\def\txs{\text{s}}
\def\txt{\text{t}}
\def\txu{\text{u}}
\def\txv{\text{v}}
\def\txw{\text{w}}
\def\txx{\text{x}}
\def\txy{\text{y}}
\def\txz{\text{z}}
% complex, may be changed later to idot or upright... % complex, may be changed later to idot or upright...
\def\I{i} \def\I{i}
% SPACES
\def\sdots{\,\dots\,} \def\sdots{\,\dots\,}
\def\qdots{\quad\dots\quad} \def\qdots{\quad\dots\quad}
\def\qRarrow{\quad\Rightarrow\quad} \def\qRarrow{\quad\Rightarrow\quad}
% DELIMITERS
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert} \DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor} \DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil} \DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
% OPERATORS
\DeclareMathOperator{\e}{e} \DeclareMathOperator{\e}{e}
\DeclareMathOperator{\T}{T} % transposed \DeclareMathOperator{\T}{T} % transposed
\DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\sgn}{sgn}
@ -44,7 +114,6 @@
% diff, for integrals and stuff % diff, for integrals and stuff
% \DeclareMathOperator{\dd}{d} % \DeclareMathOperator{\dd}{d}
\renewcommand*\d{\mathop{}\!\mathrm{d}} \renewcommand*\d{\mathop{}\!\mathrm{d}}
% functions with paranthesis % functions with paranthesis
\newcommand\CmdWithParenthesis[2]{ \newcommand\CmdWithParenthesis[2]{
#1\left(#2\right) #1\left(#2\right)
@ -52,3 +121,4 @@
\newcommand\Exp[1]{\CmdWithParenthesis{\exp}{#1}} \newcommand\Exp[1]{\CmdWithParenthesis{\exp}{#1}}
\newcommand\Sin[1]{\CmdWithParenthesis{\sin}{#1}} \newcommand\Sin[1]{\CmdWithParenthesis{\sin}{#1}}
\newcommand\Cos[1]{\CmdWithParenthesis{\cos}{#1}} \newcommand\Cos[1]{\CmdWithParenthesis{\cos}{#1}}
\newcommand\Order[1]{\CmdWithParenthesis{\mathcal{O}}{#1}}

View File

@ -15,19 +15,29 @@
% expandafter required because the translation commands dont expand anything % expandafter required because the translation commands dont expand anything
% shortcuts for translations % shortcuts for translations
% 1: key % 1: key
\newcommand{\gt}[1]{\expandafter\GetTranslation\expandafter{\fqname:#1}}
\newcommand{\GT}[1]{\expandafter\GetTranslation\expandafter{#1}}
\newcommand{\IfTranslationExists}[1]{ \newcommand{\IfTranslationExists}[1]{%
% \IfTranslation{english}{#1}%{#2}{#3} % only check english. All translations must be defined for english % only check english. All translations must be defined for english
% \edef\arg{#1} \def\tempiftranslation{\IfTranslation{english}}%
\def\tempiftranslation{\IfTranslation{english}} \expandafter\tempiftranslation\expandafter{#1}%
\expandafter\tempiftranslation\expandafter{#1} % only check english. All translations must be defined for english
% {S\color{red}\arg END}
% \IfTranslation{english}{\arg} % only check english. All translations must be defined for english
} }
\newcommand{\iftranslation}[3]{ \newcommand{\iftranslation}[3]{%
\IfTranslationExists{\fqname:#1}{#2}{#3} \IfTranslationExists{\fqname:#1}{#2}{#3}%
}
\newcommand{\gt}[1]{%
\iftranslation{#1}{%
\expandafter\GetTranslation\expandafter{\fqname:#1}%
}{%
\fqname:\detokenize{#1}%
}%
}
\newrobustcmd{\GT}[1]{%\expandafter\GetTranslation\expandafter{#1}}
\IfTranslationExists{#1}{%
\expandafter\GetTranslation\expandafter{#1}%
}{%
\detokenize{#1}%
}%
} }
% Define a translation and also make the fallback if it is the english translation % Define a translation and also make the fallback if it is the english translation
@ -35,7 +45,10 @@
\newcommand{\addtranslationcustom}[3]{ \newcommand{\addtranslationcustom}[3]{
\ifstrequal{#1}{english}{ \ifstrequal{#1}{english}{
\addtranslationfallback{#2}{#3} \addtranslationfallback{#2}{#3}
\immediate\write\translationsaux{\noexpand\addtranslationfallback{#2}{\detokenize{#3}}}
% \immediate\write\translationsaux{\noexpand\addtranslationfallback{#2}{{#3}}}%
}{} }{}
\immediate\write\translationsaux{\noexpand\addtranslation{#1}{#2}{\detokenize{#3}}}
\addtranslation{#1}{#2}{#3} \addtranslation{#1}{#2}{#3}
} }
@ -46,9 +59,11 @@
% hack because using expandafter on the second arg didnt work % hack because using expandafter on the second arg didnt work
\def\tempaddtranslation{\addtranslationcustom{#2}} \def\tempaddtranslation{\addtranslationcustom{#2}}
\ifstrequal{#1}{\fqname}{ \ifstrequal{#1}{\fqname}{
\expandafter\tempaddtranslation\expandafter{\fqname}{#3} % \expandafter\tempaddtranslation\expandafter{\fqname}{#3}
\addtranslationcustom{#2}{#1}{#3}
}{ }{
\expandafter\tempaddtranslation\expandafter{\fqname:#1}{#3} \addtranslationcustom{#2}{\fqname:#1}{#3}
% \expandafter\tempaddtranslation\expandafter{\fqname:#1}{#3}
} }
} }
} }
@ -59,9 +74,11 @@
% hack because using expandafter on the second arg didnt work % hack because using expandafter on the second arg didnt work
\def\tempaddtranslation{\addtranslationcustom{#2}} \def\tempaddtranslation{\addtranslationcustom{#2}}
\ifstrequal{#1}{dummy}{ \ifstrequal{#1}{dummy}{
\expandafter\tempaddtranslation\expandafter{\fqname}{#3} % \expandafter\tempaddtranslation\expandafter{\fqname}{#3}
\addtranslationcustom{#2}{\fqname}{#3}
}{ }{
\expandafter\tempaddtranslation\expandafter{#1}{#3} % \expandafter\tempaddtranslation\expandafter{#1}{#3}
\addtranslationcustom{#2}{#1}{#3}
} }
} }
} }

View File

@ -1,9 +1,37 @@
% WORDS
\Eng[even]{even}
\Ger[even]{gerade}
\Eng[odd]{odd}
\Ger[odd]{ungerade}
% SCIENTIFIC
\Eng[angle_deg]{Degree} \Eng[angle_deg]{Degree}
\Ger[angle_deg]{Grad} \Ger[angle_deg]{Grad}
\Eng[angle_rad]{Radian} \Eng[angle_rad]{Radian}
\Ger[angle_rad]{Rad} \Ger[angle_rad]{Rad}
\Eng[time]{Time}
\Ger[time]{Zeit}
\Eng[ensemble]{Ensemble}
\Ger[ensemble]{Ensemble}
\Eng[area]{area}
\Ger[area]{Fläche}
% SPECIFIC
\Eng[diamond]{Diamond}
\Ger[diamond]{Diamant}
% FORMATING
\Eng[list_of_quantitites]{List of quantitites}
\Ger[list_of_quantitites]{Liste von Größen}
\Eng[other]{Others}
\Ger[other]{Sonstige}
\Eng[see_also]{See also} \Eng[see_also]{See also}
\Ger[see_also]{Siehe auch} \Ger[see_also]{Siehe auch}
@ -13,15 +41,8 @@
\Eng[and_therefore_also]{and therefore also} \Eng[and_therefore_also]{and therefore also}
\Ger[and_therefore_also]{und damit auch} \Ger[and_therefore_also]{und damit auch}
\Eng[time]{Time} \Eng[const:exp]{Experimental value}
\Ger[time]{Zeit} \Ger[const:exp]{Experimenteller Wert}
\Eng[const:def]{Defined value}
\Eng[ensemble]{Ensemble} \Ger[const:def]{Definierter Wert}
\Ger[ensemble]{Ensemble}
\Eng[even]{even}
\Ger[even]{gerade}
\Eng[odd]{odd}
\Ger[odd]{ungerade}