Commit 4b5646a8 authored by Lennart Klebl's avatar Lennart Klebl
Browse files

preamble in latex.tex

parent 92d09781
\documentclass[a4paper,german,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{polyglossia}
\setmainlanguage{german}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage{xcolor}
......
\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}
......@@ -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}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment