Skip to content
Snippets Groups Projects
Commit 1688d658 authored by Valentin Bruch's avatar Valentin Bruch
Browse files

presentation: added examples of equation and align

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