% This is  l2kurz.tex - LaTeX2e Kurzbeschreibung v3.0
% Siehe https://github.com/texdoc/l2kurz
% arara: pdflatex: {synctex: true}
% arara: bibtex
% arara: pdflatex: {synctex: true}
% arara: pdflatex: {synctex: true}
\newcommand{\lkver}{3.0}               % laufende Versionsnummer ...
\newcommand{\lkdate}{15.\ November\ 2012}   % ... und Datum

\typeout{   LaTeX2e-Kurzbeschreibung}
\typeout{   Copyright 2012 Marco Daniel, Patrick Gundlach   }
\typeout{   Copyright 1998--2003 W.Schmidt, J.Knappen, H.Partl, I.Hyna   }
\typeout{   Copyright 1994, 1995 J.Knappen, H.Partl, E.Schlegl, I.Hyna   }
\typeout{   Copyright 1987 H.Partl, E.Schlegl, I.Hyna                    }

%: Start Header
\documentclass[11pt,a4paper]{article} % ergaenze `twoside', wenn gewuenscht!
\NeedsTeXFormat{LaTeX2e}[1998/06/01]  % wegen \mathring und Textsymbolen

% Seitenlayout:
\usepackage{geometry}
 \geometry{%
  textheight=46\baselineskip,
  textwidth=5.2in,
  outer=0.5\dimexpr297mm-5.2in-2in\relax,
 }

% für die Bearbeitung ist ein großer rechter Rand von Vorteil
%\geometry{%
% textheight=46\baselineskip,
% textwidth=5.2in,
% left=1cm,
% marginpar=5cm,
%}

\usepackage[USenglish,ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{dtklogos}
\usepackage{textcomp,ragged2e,csquotes}
\usepackage{latexsym}
\usepackage{graphicx}
\usepackage[ngerman]{varioref}
\usepackage{array,longtable,tabularx,booktabs}
\usepackage{enumitem}

\usepackage{amsmath}

\usepackage{caption}
\makeatletter
\def\midrule{%
 \noalign{\ifnum0=`}\fi
 \penalty\@M%
  \@aboverulesep=\aboverulesep
  \global\@belowrulesep=\belowrulesep
  \global\@thisruleclass=\@ne
  \@ifnextchar[{\@BTrule}{\@BTrule[\lightrulewidth]}}

\def\arraystretch{1.5}
\makeatother

\usepackage[normalem]{ulem}

\usepackage{showexpl}
\makeatletter
\let\LTXexample\@undefined
\let\endLTXexample\@undefined
\let\LTXexample@\@undefined

\lstnewenvironment{LTXexample}[1][]
{%
  \@temptokena{#1}%
  \begingroup
    \advance\c@ltxexample\@ne \advance\c@lstlisting\@ne
    \expandafter\lstset\expandafter{\SX@explpreset,#1}%
    \edef\x{\endgroup
      \def\noexpand\SX@codefile{\SX@codefile}%
      \def\noexpand\SX@graphicname{\SX@graphicname}%
      \def\noexpand\SX@graphicparam{\SX@graphicparam}}%
  \x
  \xdef\SX@@explpreset{\the\@temptokena,codefile=\SX@codefile,
    graphic={[\SX@graphicparam]{\SX@graphicname}}}%
  \setbox\@tempboxa=\hbox\bgroup% Warum noetig?
  \def\lst@literate{}%
  \lstset{extendedchars=true,inputencoding=latin1}%
  \lst@BeginWriteFile{\SX@codefile}%
}
{%
  \lst@EndWriteFile\egroup
  \inputencoding{utf8}%
  \lstset{extendedchars=true,inputencoding=utf8}%
  \SX@put@code@result
}
\makeatother

\usepackage{xcolor}
% für todo-notes, kann später raus
\colorlet{done}{green!40}

\lstset{%
%Sprachdefinition
  language=[LaTeX]TeX,
%Definition fuer das Paket showexpl,
  pos=i,
  hsep=1cm,
  width=6cm,
  rframe={},
  explpreset={},
  numbers=none,
%Definition für listings
  basicstyle=\ttfamily\small,%
  texcsstyle=*\bfseries,
  columns=fullflexible,%
  fontadjust=true,%
  basewidth=0.65em,%
  extendedchars=true,
  inputencoding={utf8},
  upquote=true,
%Mit Farbe:
 keywordstyle=\color{blue!70!black}\bfseries,
 texcsstyle=*\color{blue!70!black}\bfseries,
 moretexcs={part,maketitle,SelectInputMappings,tableofcontents,subsection,subsubsection,chapter,mathcal,midrule,toprule,bottomrule,text,includegraphics},
% keywordsprefix={\  },
 literate=
          {\{}{\textcolor{red!70!black}{\{}}1
          {\}}{\textcolor{red!70!black}{\}}}1
          {]}{\textcolor{red!70!black}{]}}1
          {[}{\textcolor{red!70!black}{[}}1
          {Ö}{{\"O}}1
          {Ä}{{\"A}}1
          {Ü}{{\"U}}1
          {ß}{{\ss}}1
          {ü}{{\"u}}1
          {ä}{{\"a}}1
          {ö}{{\"o}}1,
}

\lstnewenvironment{example}[1][]
{\lstset{xleftmargin=2cm,xrightmargin=2cm,frame=lines,belowcaptionskip=\bigskipamount,#1}}
{}


% \usepackage[textsize=footnotesize]{todonotes}

% Zum Schluss laden:
\usepackage[pdfpagelabels,pageanchor=false]{hyperref}

\hypersetup{%
  pdftitle={LaTeX2e-Kurzbeschreibung},
  pdfauthor={Marco Daniel, Patrick Gundlach, Walter Schmidt et al.}}




%
% Seitenzahlen oben, aber keine Kopfzeile
%
\pagestyle{myheadings}
\markboth{}{}

% Make float placement easier
\renewcommand{\textfraction}{.1}      
\renewcommand{\floatpagefraction}{.7}

\makeatletter
% LaTeXe-Symbol fuer cmss/sbc mit groesserem Absstand L-a und 
% halbfettem Epsilon
\DeclareRobustCommand{\sbLaTeXe}{{\fontseries{sbc}\selectfont\boldmath%
        L\kern-.25em% -.36
        {\sbox\z@ T%
         \vbox to\ht\z@{\hbox{\check@mathfonts
                              \fontsize\sf@size\z@
                              \math@fontsfalse\selectfont
                              A}%
                        \vss}%
        }%
        \kern-.15em%
        \TeX\kern.15em2$_{\textstyle\varepsilon}$}}
        
\makeatother
\newcommand{\cs}[1]{\texttt{\textbackslash #1}}
\newcommand\exa{\nopagebreak \begin{flushleft}\smallskip \nopagebreak
                \begin{minipage}[t]{6cm}\sloppy}
\newcommand\exb{\end{minipage}\kern 1cm\begin{minipage}[t]{8cm}\sloppy }
\newcommand\exc{\end{minipage}\kern -3cm \smallskip\end{flushleft}}

\newenvironment{beispiel}{\begin{verse}}{\end{verse}}

\newenvironment{lminipage}[1]{%
 \begin{center}\begin{minipage}{#1}\noindent\hrule\medskip}%
 {\par\noindent\hrule \end{minipage}\end{center}}
 
\newenvironment{ttdescription}{%
  \renewcommand{\descriptionlabel}[1]{%
    \hspace{\labelsep}\texttt{##1}}%
  \begin{description}%
}{%
  \end{description}%
}

\newcommand{\manual}{\emph{\LaTeX-Handbuch}~\cite{manual}}
\newcommand{\local}{\emph{Local Guide}~\cite{local}}

\newenvironment{symbols}{%
   \begin{tabbing}
   \hspace{1cm}\=\hspace{3.5cm}\=  \hspace{1cm}\=\hspace{3.5cm}\=
   \hspace{1cm}\=\hspace{3.5cm}\=  \kill
   }{%
   \end{tabbing}}

\newcommand{\nfrac}[2]{\leavevmode\kern.1em%
  \raise.5ex\hbox{\scriptsize #1}%
  \kern-.1em/\kern-.15em%
  \lower.25ex\hbox{\scriptsize #2}}

%: begin document
\begin{document}
\pagenumbering{Roman}
\nonfrenchspacing      % babel sets frenchspacing automatically.
%  However, some examples are pointless with frenchspacing in action. 
%  Besides, the larger space after a sentence make the text more readable.
%: Einleitung
\input{einleitung}

\clearpage
\pagenumbering{arabic}
\tableofcontents

\clearpage

%: Allgemeines 
\input{allgemeines}
\input{eingabefile}
\clearpage
%: Textsatz
\input{textsatz}
\clearpage
 %: Mathematik
\input{mathematik}
\clearpage
 %: Bilder
\input{bilder}
%: Seitenaufbau
\input{seitenaufbau}
\clearpage
%: Schriften
\input{schriften}
\clearpage
%: Spezialitäten 
\input{spezialitaeten}
\clearpage
%: Anhang
\input{anhang}

\clearpage
%: Literaturverzeichnis
\phantomsection
\addcontentsline{toc}{section}{\refname}
\bibliographystyle{unsrtdin}
{\RaggedRight
\bibliography{l2kurz}}

\end{document}
\endinput
