Commit 1688d658 authored by Valentin Bruch's avatar Valentin Bruch

presentation: added examples of equation and align

parent b76653de
\begin{align}
\vec{x}^2 &= \|\vec{x}\|^2\\
&= x_1^2 + x_2^2
\end{align}
\begin{equation}
1 + 1 = 2
\end{equation}
......@@ -16,6 +16,7 @@
\usetikzlibrary{backgrounds, fit, matrix, calc}
\usepackage{listings}
\usepackage{calc}
\usepackage{mathtools}
\graphicspath{{figures/}{examples/}}
\usefonttheme{professionalfonts}
\newcommand{\bsl}{\textbackslash}
......@@ -35,7 +36,7 @@
commentstyle=\itshape\color{RoyalBlue},
keywordstyle=\color{RoyalBlue}\bfseries,
moretexcs={lstset,subsubsection,paragraph,subsection,color,sl,textcolor,lstinputlisting,newfontfamily,fontsize,section,documentclass,begin,includegraphics,hello,bye,setmainlanguage,setlength},
morekeywords={center,document,flushleft,flushright,itemize,enumerate,tabular,article,polyglossia,geometry,amsmath,graphicx,xcolor,hyperref,figure,babel,mathtools}
morekeywords={center,document,flushleft,flushright,itemize,enumerate,tabular,article,polyglossia,geometry,amsmath,graphicx,xcolor,hyperref,figure,babel,mathtools,equation,align}
}
\makeatletter
......@@ -377,18 +378,34 @@
\newcommand{\highlightBlu}[1]{{\color{RoyalBlue}\texttt{\bfseries #1}}}
\section{Mathematik}
% TODO: Anders strukturieren, explizites Beispiel für \begin{equation}... ?
\begin{frame}[fragile]{Mathematik}
\structure{Umgebungen:} \\[10pt]
\structure{Umgebungen:}
\begin{itemize}
\item \highlightBlu{equation}{\bfseries:} Vom Text abgesetzte Gleichung
\\[10pt]
\item \highlightBlu{align}{\bfseries:} Wie \highlightBlu{equation}, nur dass man an \highlightRed{\&}
ausrichten kann \\[10pt]
\item \highlightBlu{equation}{\bfseries:} Vom Text abgesetzte Gleichung
\\[4pt]
\begin{tikzpicture}
\node[matrix, column sep=4pt, row sep=4pt] {
\node[draw=blue!20!lightgray,line width=2pt]{
\begin{minipage}[t][11mm][c]{.3\textwidth}
\lstinputlisting{examples/equation.tex}
\end{minipage}
};&
\node{\includegraphics[width=12pt]{figures/texstudio-compile.pdf}};&
\node[draw=blue!20!lightgray,line width=2pt]{
\begin{minipage}[t][11mm][c]{.3\textwidth}
\vspace*{-2pt}
\input{examples/equation}
\end{minipage}
};\\
};
\end{tikzpicture}\\[8pt]
\item \highlightBlu{align}{\bfseries:} Wie \highlightBlu{equation}, nur
dass man an \highlightRed{\&} ausrichten kann\\[10pt]
\item Wie bei z.\,B. \highlightRed{\textbackslash section*\{...\}} auch:\\
\highlightBlu{*} für nicht-nummerierte Gleichungen, also
\highlightRed{\textbackslash begin\{}%
\highlightBlu{align*}\highlightRed{\}} \\[10pt]
\highlightBlu{align*}\highlightRed{\}}
\\[10pt]
\end{itemize}
\structure{Im Textfluss} kann man Gleichungen mit \highlightRed{\$...\$}
schreiben, also z.\,B.
......@@ -396,13 +413,13 @@
\begin{tikzpicture}
\node[matrix, column sep=4pt, row sep=6pt] {
\node[draw=blue!20!lightgray,line width=2pt]{
\begin{minipage}[t][7mm][c]{.45\textwidth}
\begin{minipage}[t][6mm][c]{.45\textwidth}
\texttt{Gleichung: \highlightRed{\$x\^\ 2 = 25\$}}
\end{minipage}
};&
\node{\includegraphics[width=12pt]{figures/texstudio-compile.pdf}};&
\node[draw=blue!20!lightgray,line width=2pt]{
\begin{minipage}[t][7mm][c]{.3\textwidth}
\begin{minipage}[t][6mm][c]{.3\textwidth}
\textrm{Gleichung: $x^2 = 25$}
\end{minipage}
};\\
......@@ -413,21 +430,35 @@
\begin{frame}[fragile]{Mathematik -- Beispiele}
\begin{tikzpicture}
\node[matrix, column sep=4pt, row sep=6pt] {
\node[draw=blue!20!lightgray, line width=2pt]{
\begin{minipage}[t][7mm][c]{.4\textwidth}
\centering
\scriptsize \ttfamily \verb|\vec{x}^2 = x_1^2 + x_2^2|
\node[matrix, column sep=4pt, row sep=4pt] {
\node[draw=blue!20!lightgray,line width=2pt]{
\begin{minipage}[t][14.5mm][c]{.4\textwidth}
\vspace{1pt}
\lstinputlisting{examples/align.tex}
\end{minipage}
}; &
\node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
\node[draw=blue!20!lightgray, line width=2pt]{
\begin{minipage}[t][7mm][c]{.4\textwidth}
\centering
$\displaystyle \vec x^2 = x_1^2 + x_2^2 $
};&
\node{\includegraphics[width=12pt]{figures/texstudio-compile.pdf}};&
\node[draw=blue!20!lightgray,line width=2pt]{
\begin{minipage}[t][14.5mm][c]{.4\textwidth}
\null\hfill$\displaystyle%
\vec{x}=\mathrlap{\|\vec{x}\|^2}\hphantom{x_1^2+x_2^2}\hfill\mathllap{(1)}$\\[2pt]
\null\hfill$\displaystyle\hphantom{\vec{x}}=x_1^2+x_2^2{}\hfill\mathllap{(2)}$\\[-6pt]
\end{minipage}
};
\\
};\\
%\node[draw=blue!20!lightgray, line width=2pt]{
% \begin{minipage}[t][7mm][c]{.4\textwidth}
% \centering
% \scriptsize \ttfamily \verb|\vec{x}^2 = x_1^2 + x_2^2|
% \end{minipage}
%}; &
%\node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
%\node[draw=blue!20!lightgray, line width=2pt]{
% \begin{minipage}[t][7mm][c]{.4\textwidth}
% \centering
% $\displaystyle \vec x^2 = x_1^2 + x_2^2 $
% \end{minipage}
%};
%\\
\node[draw=blue!20!lightgray, line width=2pt]{
\begin{minipage}[t][10mm][c]{.4\textwidth}
\centering
......@@ -444,7 +475,7 @@
};
\\
\node[draw=blue!20!lightgray, line width=2pt]{
\begin{minipage}[t][7mm][c]{.4\textwidth}
\begin{minipage}[t][6mm][c]{.4\textwidth}
\centering
\scriptsize \ttfamily
\verb|\nabla\cdot\vec{E} = 4\pi\rho|
......@@ -452,14 +483,14 @@
}; &
\node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
\node[draw=blue!20!lightgray, line width=2pt]{
\begin{minipage}[t][7mm][c]{.4\textwidth}
\begin{minipage}[t][6mm][c]{.4\textwidth}
\centering
$\displaystyle\nabla\cdot\vec E = 4\pi\rho$
\end{minipage}
};
\\
\node[draw=blue!20!lightgray, line width=2pt]{
\begin{minipage}[t][7mm][c]{.4\textwidth}
\begin{minipage}[t][6mm][c]{.4\textwidth}
\centering
\scriptsize \ttfamily
\verb|\sqrt{e^{i\pi}} = \pm i|
......@@ -467,14 +498,14 @@
}; &
\node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
\node[draw=blue!20!lightgray, line width=2pt]{
\begin{minipage}[t][7mm][c]{.4\textwidth}
\begin{minipage}[t][6mm][c]{.4\textwidth}
\centering
$\displaystyle \sqrt{e^{i\pi}} = \pm i$
\end{minipage}
};
\\
\node[draw=blue!20!lightgray, line width=2pt]{
\begin{minipage}[t][10mm][c]{.4\textwidth}
\begin{minipage}[t][9mm][c]{.4\textwidth}
\centering
\scriptsize \ttfamily
\verb|\sin(30^\circ) =| \verb|\frac{\sqrt{3}}{2}|
......@@ -482,14 +513,14 @@
}; &
\node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
\node[draw=blue!20!lightgray, line width=2pt]{
\begin{minipage}[t][10mm][c]{.4\textwidth}
\begin{minipage}[t][9mm][c]{.4\textwidth}
\centering
$\displaystyle \sin(30^\circ) = \frac{\sqrt{3}}{2}$
\end{minipage}
};
\\
\node[draw=blue!20!lightgray, line width=2pt]{
\begin{minipage}[t][7mm][c]{.4\textwidth}
\begin{minipage}[t][6mm][c]{.4\textwidth}
\centering
\scriptsize \ttfamily
\verb|m\approx 80\,\mathrm{kg}|
......@@ -497,7 +528,7 @@
}; &
\node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
\node[draw=blue!20!lightgray, line width=2pt]{
\begin{minipage}[t][7mm][c]{.4\textwidth}
\begin{minipage}[t][6mm][c]{.4\textwidth}
\centering
$\displaystyle m\approx 80\,\mathrm{kg}$
\end{minipage}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment