Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
osak
talks
Commits
1688d658
Commit
1688d658
authored
Jun 04, 2019
by
Valentin Bruch
Browse files
presentation: added examples of equation and align
parent
b76653de
Changes
3
Show whitespace changes
Inline
Side-by-side
workshops/latex/examples/align.tex
0 → 100644
View file @
1688d658
\begin{align}
\vec
{
x
}^
2
&
=
\|\vec
{
x
}
\|
^
2
\\
&
= x
_
1
^
2 + x
_
2
^
2
\end{align}
workshops/latex/examples/equation.tex
0 → 100644
View file @
1688d658
\begin{equation}
1 + 1 = 2
\end{equation}
workshops/latex/latex.tex
View file @
1688d658
...
...
@@ -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]
\\
[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][
7
mm][c]
{
.45
\textwidth
}
\begin{minipage}
[t][
6
mm][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][
7
mm][c]
{
.3
\textwidth
}
\begin{minipage}
[t][
6
mm][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=
6
pt]
{
\node
[draw=blue!20!lightgray,
line width=2pt]
{
\begin{minipage}
[t][
7
mm][c]
{
.4
\textwidth
}
\
centering
\
scriptsize
\ttfamily
\verb
|
\vec{x}^2 = x_1^2 + x_2^2
|
\node
[matrix, column sep=4pt, row sep=
4
pt]
{
\node
[draw=blue!20!lightgray,line width=2pt]
{
\begin{minipage}
[t][
14.5
mm][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][
7
mm][c]
{
.4
\textwidth
}
\begin{minipage}
[t][
6
mm][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][
7
mm][c]
{
.4
\textwidth
}
\begin{minipage}
[t][
6
mm][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][
7
mm][c]
{
.4
\textwidth
}
\begin{minipage}
[t][
6
mm][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][
7
mm][c]
{
.4
\textwidth
}
\begin{minipage}
[t][
6
mm][c]
{
.4
\textwidth
}
\centering
$
\displaystyle
\sqrt
{
e
^{
i
\pi
}}
=
\pm
i
$
\end{minipage}
}
;
\\
\node
[draw=blue!20!lightgray, line width=2pt]
{
\begin{minipage}
[t][
10
mm][c]
{
.4
\textwidth
}
\begin{minipage}
[t][
9
mm][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][
10
mm][c]
{
.4
\textwidth
}
\begin{minipage}
[t][
9
mm][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][
7
mm][c]
{
.4
\textwidth
}
\begin{minipage}
[t][
6
mm][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][
7
mm][c]
{
.4
\textwidth
}
\begin{minipage}
[t][
6
mm][c]
{
.4
\textwidth
}
\centering
$
\displaystyle
m
\approx
80
\,\mathrm
{
kg
}$
\end{minipage}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment