diff --git a/workshops/latex/beispieldokument/zeta_0.tex b/workshops/latex/beispieldokument/zeta_0.tex index fd8c790e62b8fb5e3d5d3625529ccb7c1b70bf29..feec950d00322378f93811d26c682b69934934c8 100644 --- a/workshops/latex/beispieldokument/zeta_0.tex +++ b/workshops/latex/beispieldokument/zeta_0.tex @@ -1,7 +1,7 @@ \documentclass[a4paper,german,12pt]{article} -\usepackage[utf8]{inputenc} -\usepackage[ngerman]{babel} +\usepackage{polyglossia} +\setmainlanguage{german} \usepackage{amsmath} \usepackage{hyperref} \usepackage{xcolor} diff --git a/workshops/latex/examples/preamble.pdf b/workshops/latex/examples/preamble.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5fa8b7ba61e41f04ee700fd59274dd379b255caa Binary files /dev/null and b/workshops/latex/examples/preamble.pdf differ diff --git a/workshops/latex/examples/preamble.tex b/workshops/latex/examples/preamble.tex new file mode 100644 index 0000000000000000000000000000000000000000..aea8eb5bf7ef4233f49bafca739cb497ce587df5 --- /dev/null +++ b/workshops/latex/examples/preamble.tex @@ -0,0 +1,21 @@ +\documentclass[12pt,a6paper]{article} +% Minimale Präambel für die meisten Fälle +\usepackage{polyglossia} % Silbentrennung +\setmainlanguage{german} % Sprache für ^^ +\usepackage[margin=2cm]{geometry} % Rand +\usepackage{amsmath} % Viel Mathe-Zeug +\usepackage{graphicx} % Bilder +\usepackage{xcolor} % Farben +\usepackage{hyperref} % Links +% Makros +\newcommand{\hello}[1]{Hallo #1} +\newcommand{\bye}{Und Tschüss} +% Abstände bei neuen Absätzen +\setlength\parskip{5pt} % vertikal +\setlength\parindent{0pt} % Einrückung + +\begin{document} +\hello{zusammen}! + +\bye +\end{document} diff --git a/workshops/latex/latex.tex b/workshops/latex/latex.tex index aae100b303742846005996d196795243252be15a..beca5c3201bcbab710928c8ea726e4e6b0c7e4fa 100644 --- a/workshops/latex/latex.tex +++ b/workshops/latex/latex.tex @@ -24,8 +24,8 @@ texcsstyle=*\color{Mahogany}\bfseries, commentstyle=\itshape\color{RoyalBlue}, keywordstyle=\color{RoyalBlue}\bfseries, - moretexcs={lstset,subsubsection,paragraph,subsection,color,sl,textcolor,lstinputlisting,newfontfamily,fontsize,section,documentclass,begin,includegraphics}, - morekeywords={center,document,flushleft,flushright,itemize,enumerate,tabular} + 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} } \makeatletter @@ -91,7 +91,7 @@ \item Automatische Formatierung \item Weitere Formatierung durch\\Befehle im Text \item Für (fast) alles gibt es Befehle - \setlength\itemsep{\fill} %wieso geht das nicht? + \setlength\itemsep{\fill} %wieso geht das nicht? \end{itemize} \end{column} \begin{column}{.63\textwidth} @@ -302,35 +302,37 @@ \\ }; \end{tikzpicture} +% TODO Kommentare, Sonderzeichen +\$\%\&\#\{\} \end{frame} \begin{frame}[fragile]{Abschnitte} \begin{columns} - \begin{column}{0.4\textwidth} - \structure{section, subsection, subsubsection:} - \begin{itemize} - \item Überschriften (automatisch numeriert) - \begin{tikzpicture} - \node[draw=blue!20!lightgray, line width=2pt]{ - \begin{minipage}[t][22mm][c]{0.7\textwidth} - \lstinputlisting[basicstyle=\notsotiny\ttfamily]{examples/2h.tex} - \end{minipage} - }; - \end{tikzpicture} - \item Inhaltsverzeichnis (automatisch erstellt) - \texttt{\textbackslash tableofcontents} - \end{itemize} - \end{column} - \begin{column}{0.5\textwidth} + \begin{column}{0.4\textwidth} + \structure{section, subsection, subsubsection:} + \begin{itemize} + \item Überschriften (automatisch numeriert) + \begin{tikzpicture} + \node[draw=blue!20!lightgray, line width=2pt]{ + \begin{minipage}[t][22mm][c]{0.7\textwidth} + \lstinputlisting[basicstyle=\notsotiny\ttfamily]{examples/2h.tex} + \end{minipage} + }; + \end{tikzpicture} + \item Inhaltsverzeichnis (automatisch erstellt) + \texttt{\textbackslash tableofcontents} + \end{itemize} + \end{column} + \begin{column}{0.5\textwidth} \includegraphics[width=\textwidth,trim=0cm 0cm 0cm 0cm, clip]{examples/2h_fake.pdf} - \end{column} + \end{column} \end{columns} \end{frame} \begin{frame}[fragile]{Umgebungen} \begin{itemize} - \setbeamertemplate{itemize items}[square] - \item Umgebungen durch \texttt{begin} und \texttt{end} begrenzt + \setbeamertemplate{itemize items}[square] + \item Umgebungen durch \texttt{begin} und \texttt{end} begrenzt \end{itemize} \begin{tikzpicture} \node[matrix, column sep=4pt, row sep=6pt] { @@ -557,72 +559,99 @@ \structure{Referenzen} markieren mit \texttt{\textbackslash label}, verweisen mit \texttt{\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, \textbf{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 \texttt{ref} darf auch vor vor dem \texttt{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} + \node{ + \begin{minipage}[t][10mm][c]{.28\textwidth} + \begin{itemize} + \item Gleichungen, Sections, \textbf{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 \texttt{ref} darf auch vor vor dem \texttt{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{minipage} + }; + \\ }; \end{tikzpicture} \end{frame} \begin{frame}[fragile]{Fußnoten} - \structure{Footnotes:} - \begin{itemize} - \item Einfügen mit \verb|\footnote{Fußnotentext}| irgendwo: - \end{itemize} - \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} - }; - \\ - }; - \end{tikzpicture} + \structure{Footnotes:} + \begin{itemize} + \item Einfügen mit \verb|\footnote{Fußnotentext}| irgendwo: + \end{itemize} + \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} + }; + \\ + }; + \end{tikzpicture} \end{frame} -\begin{frame}{Präambel} +\begin{frame}[fragile]{Präambel} + \begin{columns} + \begin{column}{0.4\textwidth} + \structure{Die \glqq{Präambel}\grqq} wird benutzt für + \begin{itemize} + \item \glqq{Dokumentenklasse\grqq} -- also \emph{Vorlage} + (\highlightRed{\textbackslash{}documentclass}) + \item Pakete laden (\highlightRed{\textbackslash{}usepackage}) + \item Macros definieren (\highlightRed{\textbackslash{}newcommand}) + \item \highlightRed{\textbackslash{}begin}\verb+{document}+ \\ + (\highlightRed{\textbackslash{}end}\verb+{document}+) + \item {\color{Gray}optionale Einstellungen} + %TODO wegnehmen? + \end{itemize} + \end{column} + \begin{column}{0.05\textwidth} + \only<1>{ % + \color{RoyalBlue}\rule{0.5pt}{0.8\textheight} % + } % + \only<2>{ % + \color{Green}\rule{0.5pt}{0.8\textheight} % + } % + \end{column} + \begin{column}{0.55\textwidth} + \only<1>{\lstinputlisting[basicstyle=\tiny\ttfamily]{examples/preamble.tex}} + \only<2>{\includegraphics[width=0.8\textwidth]{examples/preamble.pdf}} + \end{column} + \end{columns} \end{frame} \end{document}