diff --git a/workshops/latex/examples/4a.tex b/workshops/latex/examples/4a.tex index 55ac308aabb8fa91f33b26c87b61748e65fc2a9f..9bd14628528b1cd841aa536abe867f158af53559 100644 --- a/workshops/latex/examples/4a.tex +++ b/workshops/latex/examples/4a.tex @@ -1,7 +1,7 @@ \begin{equation} - a^2+b^2=c^2 + a^2 + b^2 = c^2 \label{pythagoras} \end{equation} -As shown in equation +Beachte in Gleichung \ref{pythagoras} ... diff --git a/workshops/latex/examples/4c.tex b/workshops/latex/examples/4c.tex index 61c80c4306b7a8813b617f10da717e20b9d91858..9dac0ea8d48393838e3e3822a85af92bdd1aabed 100644 --- a/workshops/latex/examples/4c.tex +++ b/workshops/latex/examples/4c.tex @@ -1,2 +1,2 @@ -egestas vel odio. Dieser Beweis ist -richtig.\footnote{außer wenn $x>0$} \ No newline at end of file +dignissim rutrum. Dieser Beweis ist +richtig.\footnote{außer wenn $x>0$} diff --git a/workshops/latex/latex.tex b/workshops/latex/latex.tex index 523df7dff80e5fc29be36f70299e2bc9e59b1c84..d2eb5fa6746beeac4f8a08df14ad0b3c4abf8df3 100644 --- a/workshops/latex/latex.tex +++ b/workshops/latex/latex.tex @@ -599,50 +599,50 @@ \begin{frame}[fragile]{Labels, Referenzen und Links} \structure{Referenzen} markieren mit \texttt{\bfseries\color{Mahogany}\textbackslash label}, - verweisen mit \texttt{\bfseries\color{Mahogany}\textbackslash ref}: -\begin{tikzpicture} -\node[matrix, column sep=4pt, row sep=6pt] { - \node{ - \begin{minipage}[t][10mm][c]{.28\textwidth} - \begin{itemize} - \item Gleichungen, Sections, Figures und vieles mehr! - \end{itemize} - \end{minipage} - }; & - \node[draw=blue!20!lightgray, line width=2pt]{ - \begin{minipage}[t][30mm][c]{.3\textwidth} - \lstinputlisting{examples/4a.tex} - \end{minipage} - }; & - \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; & - \node[draw=blue!20!lightgray, line width=2pt]{ - \begin{minipage}[t][30mm][c]{.25\textwidth} - \input{examples/4a.tex} - \end{minipage} - }; - \\ - \node{ - \begin{minipage}[t][10mm][c]{.28\textwidth} - \begin{itemize} - \item \highlightRed{\bsl ref} darf auch vor vor dem \highlightRed{\bsl - label} stehen - \end{itemize} - \end{minipage} - }; & - \node[draw=blue!20!lightgray, line width=2pt]{ - \begin{minipage}[t][30mm][c]{.3\textwidth} - \lstinputlisting{examples/4b.tex} - \end{minipage} - }; & - \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; & - \node[draw=blue!20!lightgray, line width=2pt]{ - \begin{minipage}[t][30mm][c]{.25\textwidth} - \includegraphics[width=\textwidth,trim=0cm 0cm 0cm 0cm, clip]{examples/4b_fake.png} - \end{minipage} - }; - \\ -}; -\end{tikzpicture} + verweisen mit \texttt{\bfseries\color{Mahogany}\textbackslash ref}:\\[2pt] + \hspace*{-6pt}\begin{tikzpicture} + \node[matrix, column sep=3pt, row sep=8pt] { + \node{ + \begin{minipage}[t][10mm][c]{.28\textwidth} + \begin{itemize} + \item Gleichungen, Sections, Figures und vieles mehr! + \end{itemize} + \end{minipage} + }; & + \node[draw=blue!20!lightgray, line width=2pt]{ + \begin{minipage}[t][26mm][c]{.3\textwidth} + \lstinputlisting{examples/4a.tex} + \end{minipage} + }; & + \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; & + \node[draw=blue!20!lightgray, line width=2pt]{ + \begin{minipage}[t][26mm][c]{.25\textwidth} + \input{examples/4a.tex} + \end{minipage} + }; + \\ + \node{ + \begin{minipage}[t][10mm][c]{.28\textwidth} + \begin{itemize} + \item \highlightRed{\bsl ref} darf auch vor vor dem + \highlightRed{\bsl label} stehen + \end{itemize} + \end{minipage} + }; & + \node[draw=blue!20!lightgray, line width=2pt]{ + \begin{minipage}[t][26mm][c]{.3\textwidth} + \lstinputlisting{examples/4b.tex} + \end{minipage} + }; & + \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; & + \node[draw=blue!20!lightgray, line width=2pt]{ + \begin{minipage}[t][26mm][c]{.25\textwidth} + \includegraphics[width=\textwidth,trim=0cm 0cm 0cm 0cm, clip]{examples/4b_fake.png} + \end{minipage} + }; + \\ + }; + \end{tikzpicture} \end{frame} \begin{frame}[fragile]{Verschiedenes} @@ -652,26 +652,27 @@ irgendwo: \end{itemize} \begin{center} - \vspace{-6pt} - \begin{tikzpicture} - \node[matrix, column sep=4pt, row sep=6pt] { - \node[draw=blue!20!lightgray, line width=2pt]{ - \begin{minipage}[t][30mm][c]{.5\textwidth} - \lstinputlisting{examples/4c.tex} - \end{minipage} - }; & - \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; & - \node[draw=blue!20!lightgray, line width=2pt]{ - \begin{minipage}[t][30mm][c]{.3\textwidth} - \includegraphics[width=1\textwidth,trim=0cm 0cm 0cm 0cm, clip]{examples/4c_fake.png} - \end{minipage} + \vspace{-8pt} + \begin{tikzpicture} + \node[matrix, column sep=4pt, row sep=0pt] { + \node[draw=blue!20!lightgray, line width=2pt]{ + \begin{minipage}[t][24mm][c]{.5\textwidth} + \lstinputlisting{examples/4c.tex} + \end{minipage} + }; & + \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; & + \node[draw=blue!20!lightgray, line width=2pt]{ + \begin{minipage}[t][24mm][c]{.3\textwidth} + \includegraphics[width=1\textwidth,trim=0cm 0cm 0cm 0cm, clip]{examples/4c_fake.png} + \end{minipage} + }; + \\ }; - \\ - }; - \end{tikzpicture} - \vspace{-6pt} + \end{tikzpicture} + \vspace{-8pt} \end{center} - \structure{URLs:} \highlightRed{\textbackslash url}\verb+{http://fsmpi.eu/latex}+ \\ + \structure{URLs:} + \highlightRed{\textbackslash url}\verb+{http://fsmpi.eu/latex}+ \\[2pt] \structure{Besondere Zeichen} \begin{itemize} \item {\bfseries\color{MidnightBlue}\%, "{}}: \texttt{\textbackslash\%}, \verb+"{}+ @@ -687,7 +688,7 @@ \begin{frame}[fragile]{Präambel} \begin{columns} - \begin{column}{0.4\textwidth} + \begin{column}{0.45\textwidth} \structure{Die \glqq{Präambel}\grqq} wird benutzt für \\[3pt] \begin{itemize} \item Dokumententyp: \\ @@ -699,14 +700,16 @@ \item \highlightRed{\textbackslash{}begin}\verb+{document}+ \\ \highlightRed{\textbackslash{}end}\verb+{document}+ \end{itemize} + \vspace{12pt} \end{column} \hspace{10pt} \begin{column}{0.05\textwidth} {\only<1>{\color{RoyalBlue}}\only<2>{\color{Green}}\rule{0.5pt}{0.8\textheight}} \end{column} - \begin{column}{0.55\textwidth} + \begin{column}{0.45\textwidth} + \vspace*{-20pt} \only<1>{\lstinputlisting[basicstyle=\tiny\ttfamily]{examples/preamble.tex}} - \only<2>{\vspace{-.5em}\includegraphics[width=0.8\textwidth]{examples/preamble.pdf}} + \only<2>{\includegraphics[width=\textwidth]{examples/preamble.pdf}\vspace{-10pt}} \end{column} \hspace{-10pt} \end{columns} diff --git a/workshops/latex/makefile b/workshops/latex/makefile index 71eb01b944be67c88d844c249797f9b411ad16c1..623e7ec464a360dd673e1871b6c26ff8df1f6316 100644 --- a/workshops/latex/makefile +++ b/workshops/latex/makefile @@ -1,9 +1,22 @@ #!/bin/make -f EXAMPLES = examples/2h_fake.pdf examples/tabular.pdf examples/figure.pdf examples/preamble.pdf +EXAMPLE_INPUTS = $(wildcard examples/*.tex) -latex.pdf: latex.tex $(EXAMPLES) +latex.pdf: latex.tex $(EXAMPLES) $(EXAMPLE_INPUTS) latexmk -lualatex latex.tex -notes.pdf: latex.tex $(EXAMPLES) +notes.pdf: latex.tex $(EXAMPLES) $(EXAMPLE_INPUTS) latexmk -lualatex notes.tex + +examples/2h_fake.pdf: examples/2h_fake.tex + cd examples; latexmk --lualatex 2h_fake.tex +# +#examples/tabular.pdf: examples/tabular.tex +# cd examples; latexmk --lualatex tabular.tex +# +#examples/figure.pdf: examples/figure.tex +# cd examples; latexmk --lualatex figure.tex +# +#examples/preamble.pdf: examples/preamble.tex +# cd examples; latexmk --lualatex preamble.tex