Compare commits
No commits in common. "10e069f7f8a6be1fe3218b827bb8dc0b08d8db42" and "3113dbb47f8d3b35a7e8f4fcb414a240c14c62e6" have entirely different histories.
10e069f7f8
...
3113dbb47f
94
befehle.tex
94
befehle.tex
@ -1,94 +0,0 @@
|
|||||||
|
|
||||||
% Acronyms
|
|
||||||
% ========
|
|
||||||
% The argument appears in small caps.
|
|
||||||
\newcommand\acro[1]{\textsc{\lowercase{#1}}}
|
|
||||||
|
|
||||||
% Variables
|
|
||||||
% =========
|
|
||||||
\newcommand\widefiguremargin{-.22\textwidth}
|
|
||||||
\newcommand\widefigurewidth{.49\textwidth}
|
|
||||||
\newcommand\widefiguregap{.02\textwidth}
|
|
||||||
\newcommand\widefiguresum{1.4\textwidth}
|
|
||||||
|
|
||||||
% Wide box
|
|
||||||
% ========
|
|
||||||
% Box that runs into both margins. To be used inside a floating environment like figure or table.
|
|
||||||
\newcommand\widebox[1]{
|
|
||||||
\hspace{\widefiguremargin}
|
|
||||||
\begin{minipage}{\widefiguresum}
|
|
||||||
#1
|
|
||||||
\end{minipage}
|
|
||||||
}
|
|
||||||
|
|
||||||
% Column rules
|
|
||||||
% ============
|
|
||||||
% Adds two rules each spanning approximately half of the available textwidth (as defined by \widefigurewidth).
|
|
||||||
\newcommand\colrules{
|
|
||||||
\rule{\widefigurewidth}{0.4pt}
|
|
||||||
\hspace{\widefiguregap}
|
|
||||||
\rule{\widefigurewidth}{0.4pt}
|
|
||||||
}
|
|
||||||
|
|
||||||
% Simple code examples
|
|
||||||
% ====================
|
|
||||||
% Box for example code next to the rendered example.
|
|
||||||
%
|
|
||||||
% Arguments:
|
|
||||||
% 1. Label.
|
|
||||||
% 2. Content path without extension. If a corresponding PDF file exists, it gets included as an image. Otherwise, the LaTeX code gets rendered directly.
|
|
||||||
% 3. Caption.
|
|
||||||
\newcommand\example[3]{
|
|
||||||
\Example{#1}{#2}{#2}{#3}
|
|
||||||
}
|
|
||||||
|
|
||||||
% Extended code examples
|
|
||||||
% ======================
|
|
||||||
% Box for example code next to the rendered example.
|
|
||||||
% Depending on the third argument, the source path for the right-side rendering can differ from the source path of the left-side listing.
|
|
||||||
% Useful if only an excerpt of the document to be rendered affects the entire output.
|
|
||||||
%
|
|
||||||
% Arguments:
|
|
||||||
% 1. Label.
|
|
||||||
% 2. Content path without extension. If a corresponding PDF file exists, it gets included as an image. Otherwise, the LaTeX code gets rendered directly.
|
|
||||||
% 3. Alternative path for Rendering (c.f. 2.)
|
|
||||||
% 4. Caption.
|
|
||||||
\newcommand\Example[4]{
|
|
||||||
\begin{figure}[htp]
|
|
||||||
\widebox{
|
|
||||||
% Top rules:
|
|
||||||
\colrules
|
|
||||||
% Left content: code listing:
|
|
||||||
\begin{subfigure}{\widefigurewidth}
|
|
||||||
\inputminted[breaklines]{tex}{listings/#2.tex}
|
|
||||||
\end{subfigure}
|
|
||||||
\hspace{\widefiguregap}
|
|
||||||
% Right content: image or rendered example:
|
|
||||||
\begin{subfigure}{\widefigurewidth}
|
|
||||||
\IfFileExists{listings/#3.pdf}{
|
|
||||||
\includegraphics[width=\linewidth]{listings/#3.pdf}
|
|
||||||
}{
|
|
||||||
\medskip
|
|
||||||
\input{listings/#3}
|
|
||||||
\medskip
|
|
||||||
}
|
|
||||||
\end{subfigure}
|
|
||||||
% Bottom rules:
|
|
||||||
\colrules
|
|
||||||
% Left caption:
|
|
||||||
\begin{subfigure}[t]{\widefigurewidth}
|
|
||||||
\caption{\LaTeX-Code}
|
|
||||||
\label{#1-code}
|
|
||||||
\end{subfigure}
|
|
||||||
\hspace{\widefiguregap}
|
|
||||||
% Right caption:
|
|
||||||
\begin{subfigure}[t]{\widefigurewidth}
|
|
||||||
\caption{Ergebnis}
|
|
||||||
\label{#1-result}
|
|
||||||
\end{subfigure}
|
|
||||||
}
|
|
||||||
% General caption:
|
|
||||||
\caption{#4}
|
|
||||||
\label{#1}
|
|
||||||
\end{figure}
|
|
||||||
}
|
|
||||||
@ -5,7 +5,8 @@
|
|||||||
\vspace{3em}
|
\vspace{3em}
|
||||||
\rule{\textwidth}{1pt}\par
|
\rule{\textwidth}{1pt}\par
|
||||||
\vspace{0.8\baselineskip}
|
\vspace{0.8\baselineskip}
|
||||||
\Huge\bfseries Skript zum \LaTeX-Tutorium der Fachschaft \acro{WIAI}
|
\Huge\bfseries \LaTeX-Tutorium der \\
|
||||||
|
Fachschaft \acro{WIAI}
|
||||||
\vspace{0.8\baselineskip}
|
\vspace{0.8\baselineskip}
|
||||||
\rule{\textwidth}{1pt}\par
|
\rule{\textwidth}{1pt}\par
|
||||||
%\vspace{2em}
|
%\vspace{2em}
|
||||||
|
|||||||
16
main.tex
16
main.tex
@ -1,20 +1,20 @@
|
|||||||
\input{praeambel.tex} % Preamble
|
\input{praeambel.tex} % Präambel
|
||||||
\input{befehle.tex} % Custom commands
|
|
||||||
% \addbibresource{literature.bib}
|
% \addbibresource{literature.bib}
|
||||||
|
|
||||||
\title{Skript zum \LaTeX-Tutorium der Fachschaft \acro{WIAI}}
|
|
||||||
|
\title{\LaTeX-Skript}
|
||||||
\author{Bernhard Luedtke \and Christian Kremitzl \and Florian Knoch \and Anika Amma}
|
\author{Bernhard Luedtke \and Christian Kremitzl \and Florian Knoch \and Anika Amma}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
% Title page
|
% Titelseite
|
||||||
\input{content/titelseite.tex}
|
\input{content/titelseite.tex}
|
||||||
% or simply
|
% oder einfach
|
||||||
% \maketitle
|
%\maketitle
|
||||||
\thispagestyle{empty}
|
\thispagestyle{empty}
|
||||||
\newpage
|
\newpage
|
||||||
|
|
||||||
\setcounter{page}{1} % Don't count title page.
|
\setcounter{page}{1} % Titelseite soll nicht mitgezählt werden
|
||||||
\tableofcontents
|
\tableofcontents
|
||||||
\newpage
|
\newpage
|
||||||
|
|
||||||
@ -37,6 +37,6 @@
|
|||||||
\input{content/hilfe-und-informationen.tex}
|
\input{content/hilfe-und-informationen.tex}
|
||||||
|
|
||||||
|
|
||||||
% References
|
% Literaturverzeichnis
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|||||||
113
praeambel.tex
113
praeambel.tex
@ -1,41 +1,110 @@
|
|||||||
\documentclass[a4paper, ngerman]{article}
|
\documentclass[a4paper, ngerman]{article}
|
||||||
|
|
||||||
% Language and font encoding
|
|
||||||
\usepackage[utf8]{inputenc}
|
\usepackage[utf8]{inputenc}
|
||||||
\usepackage[T1]{fontenc}
|
\usepackage[T1]{fontenc}
|
||||||
\usepackage{babel}
|
\usepackage{babel}
|
||||||
|
|
||||||
% Special characters
|
\usepackage{eurosym, tipa, textcomp, textgreek, upgreek} % Sonderzeichen
|
||||||
\usepackage{eurosym, tipa, textcomp, textgreek, upgreek}
|
|
||||||
|
|
||||||
% Mathematical symbols
|
\usepackage{amssymb, amsfonts, amsmath} % Mathezeug
|
||||||
\usepackage{amssymb, amsfonts, amsmath}
|
|
||||||
|
|
||||||
% References and URLs
|
\usepackage[hidelinks]{hyperref} % Referenzen als Links
|
||||||
\usepackage[hidelinks]{hyperref}
|
|
||||||
\usepackage{cleveref}
|
\usepackage{cleveref} % mehr mit Referenzen
|
||||||
|
|
||||||
% Images
|
|
||||||
\usepackage{graphicx}
|
\usepackage{graphicx}
|
||||||
\graphicspath{graphics/}
|
\graphicspath{graphics/}
|
||||||
|
|
||||||
% Multiple captions in one figure
|
|
||||||
\usepackage{subcaption}
|
\usepackage{subcaption}
|
||||||
|
%\usepackage{floatrow}
|
||||||
|
|
||||||
% Compact lists
|
\usepackage{paralist} % kompakte Listen
|
||||||
\usepackage{paralist}
|
|
||||||
|
|
||||||
% Tables
|
\usepackage{longtable, array, tabularx, booktabs, colortbl} % Tabellenzeug
|
||||||
\usepackage{longtable, array, tabularx, booktabs, colortbl}
|
|
||||||
|
|
||||||
% ToDos
|
|
||||||
\usepackage{todonotes}
|
\usepackage{todonotes}
|
||||||
|
|
||||||
% Sourcecode listings
|
\usepackage{minted} % Quelltext-Listings
|
||||||
\usepackage{minted}
|
|
||||||
|
\usepackage{csquotes} % für \enquote
|
||||||
|
|
||||||
|
\usepackage{fontawesome5} % Icons
|
||||||
|
% TODO: Ggf. rauswerfen
|
||||||
|
|
||||||
|
\newcommand\acro[1]{\textsc{\lowercase{#1}}}
|
||||||
|
|
||||||
|
\newcommand\widefiguremargin{-.22\textwidth}
|
||||||
|
\newcommand\widefigurewidth{.49\textwidth}
|
||||||
|
\newcommand\widefiguregap{.02\textwidth}
|
||||||
|
\newcommand\widefiguresum{1.4\textwidth}
|
||||||
|
|
||||||
|
% Box that runs into both margins. To be used inside a floating environment like figure or table.
|
||||||
|
\newcommand\widebox[1]{
|
||||||
|
\hspace{\widefiguremargin}
|
||||||
|
\begin{minipage}{\widefiguresum}
|
||||||
|
#1
|
||||||
|
\end{minipage}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand\colrules{
|
||||||
|
\rule{\widefigurewidth}{0.4pt}
|
||||||
|
\hspace{\widefiguregap}
|
||||||
|
\rule{\widefigurewidth}{0.4pt}
|
||||||
|
}
|
||||||
|
|
||||||
|
% Box for example code next to the rendered example.
|
||||||
|
% Arguments:
|
||||||
|
% 1. Label.
|
||||||
|
% 2. Content path without extension. If a corresponding PDF file exists, it gets included as an image. Otherwise, the LaTeX code gets rendered directly.
|
||||||
|
% 3. Caption.
|
||||||
|
\newcommand\example[3]{
|
||||||
|
\Example{#1}{#2}{#2}{#3}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
% Box for example code next to the rendered example.
|
||||||
|
% Arguments:
|
||||||
|
% 1. Label.
|
||||||
|
% 2. Content path without extension. If a corresponding PDF file exists, it gets included as an image. Otherwise, the LaTeX code gets rendered directly.
|
||||||
|
% 3. Alternative path for Rendering (c.f. 2.)
|
||||||
|
% 4. Caption.
|
||||||
|
\newcommand\Example[4]{
|
||||||
|
\begin{figure}[htp]
|
||||||
|
\widebox{
|
||||||
|
% Top rules:
|
||||||
|
\colrules
|
||||||
|
% Left content: code listing:
|
||||||
|
\begin{subfigure}{\widefigurewidth}
|
||||||
|
\inputminted[breaklines]{tex}{listings/#2.tex}
|
||||||
|
\end{subfigure}
|
||||||
|
\hspace{\widefiguregap}
|
||||||
|
% Right content: image or rendered example:
|
||||||
|
\begin{subfigure}{\widefigurewidth}
|
||||||
|
\IfFileExists{listings/#3.pdf}{
|
||||||
|
\includegraphics[width=\linewidth]{listings/#3.pdf}
|
||||||
|
}{
|
||||||
|
\medskip
|
||||||
|
\input{listings/#3}
|
||||||
|
\medskip
|
||||||
|
}
|
||||||
|
\end{subfigure}
|
||||||
|
% Bottom rules:
|
||||||
|
\colrules
|
||||||
|
% Left caption:
|
||||||
|
\begin{subfigure}[t]{\widefigurewidth}
|
||||||
|
\caption{\LaTeX-Code}
|
||||||
|
\label{#1-code}
|
||||||
|
\end{subfigure}
|
||||||
|
\hspace{\widefiguregap}
|
||||||
|
% Right caption:
|
||||||
|
\begin{subfigure}[t]{\widefigurewidth}
|
||||||
|
\caption{Ergebnis}
|
||||||
|
\label{#1-result}
|
||||||
|
\end{subfigure}
|
||||||
|
}
|
||||||
|
% General caption:
|
||||||
|
\caption{#4}
|
||||||
|
\label{#1}
|
||||||
|
\end{figure}
|
||||||
|
}
|
||||||
|
|
||||||
% Quotes (\enquote)
|
|
||||||
\usepackage{csquotes}
|
|
||||||
|
|
||||||
% Icons
|
|
||||||
\usepackage{fontawesome5}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user