Skip to content
Snippets Groups Projects
ptbposter.cls 18 KiB
Newer Older
% Rolf Niepraschk, Rolf.Niepraschk@ptb.de

\setcounter{errorcontextlines}{100}  \listfiles

\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{ptbposter}[2019/05/12 v0.8a PTB-Poster (RN)]
    
\newif\ifPTB@useCMYK \PTB@useCMYKfalse % vorerst
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\newdimen\PTB@topmargin      % Abstand zum Rahmen
\newdimen\PTB@leftmargin     % Abstand zum Rahmen
\newdimen\PTB@default@fsize@base % Bezugsgröße für Standardschriftgröße im Textbereich
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\newdimen\PTB@default@fsize  % Standardschriftgröße im Textbereich (\normalsize)
\newdimen\PTB@default@tfsize % Standardschriftgröße für den Titel
\newdimen\PTB@default@afsize % Standardschriftgröße für die Autoren
\newdimen\PTB@default@ffsize % Standardschriftgröße im Fußbereich
\newdimen\PTB@texthsep       % Abstand Textbereich zum blauen Rahmen
\newdimen\PTB@textvsep       % Abstand Textbereich zum blauen Rahmen
\newdimen\PTB@framewidth     % Breite des blauen Rahmens
\newdimen\PTB@frameheight    % Höhe des blauen Rahmens
\newdimen\PTB@framethickness % Dicke des blauen Rahmens
\newdimen\PTB@scale@base     % Bezugsgröße für papierabhängige Größenberechnung
\newdimen\PTB@maxtitleheight % Maximale Höhe des Titels
\newcommand*\authorFontSize{}
\newcommand*\footFontSize{}
\newcommand*\titleFontSize{}
\newcommand*\backgroundContent{}
\newcommand\PTB@tempa{}
\newcommand\PTB@tempb{}
\newcommand\PTB@tempc{}
\newcommand\PTB@tempd{}
\newcommand\PTB@tempe{}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\newcommand\PTB@tempf{}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\let\PTB@tempdima=\@ovxx
\let\PTB@tempdimb=\@ovyy
\let\PTB@tempdimc=\@ovdx

\newcounter{PTB@tempcnta}
\newcounter{PTB@tempcntb}
Rolf Niepraschk's avatar
Rolf Niepraschk committed

\newif\ifPTB@landscape \PTB@landscapefalse
\newif\ifPTB@XeOrLua \PTB@XeOrLuafalse
\newif\ifPTB@serif \PTB@seriffalse

\RequirePackage{ifluatex,ifxetex}
\ifxetex\PTB@XeOrLuatrue\else\ifluatex\PTB@XeOrLuatrue\fi\fi
\PassOptionsToPackage{pagesize=false}{typearea}
\PassOptionsToPackage{paper=a0paper,onecolumn,portrait}{geometry}

\newcommand*\PTB@title@justification{\relax}
\newcommand*\PTB@authors@justification{\relax}
\newcommand*\PTB@title@series{\relax}

\DeclareOption{sanserif}{% noch experimentell! Besser: LuaTeX/XeTeX + OTF
  \PTB@seriffalse
\DeclareOption{serif}{%
  \PTB@seriftrue
\DeclareOption{boldTitel}{%
  \global\let\PTB@title@series=\bfseries
}
\DeclareOption{centerTitel}{%
  \global\let\PTB@title@justification=\centering
}
\DeclareOption{centerAuthors}{%
  \global\let\PTB@authors@justification=\centering
}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{geometry}}
\ExecuteOptions{serif}
\ProcessOptions\relax
\RequirePackage{hyphsubst}% Trennregeln austauschen
\HyphSubstIfExists{ngerman-x-latest}{%
  \HyphSubstLet{ngerman}{ngerman-x-latest}}{}
\HyphSubstIfExists{german-x-latest}{%
  \HyphSubstLet{german}{german-x-latest}}{}

Rolf Niepraschk's avatar
Rolf Niepraschk committed
\RequirePackage{etoolbox}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
% Ohne Sprachangabe "deutsch" verwenden. Bessere Lösung?

\LoadClass{scrartcl}

\usepackage[verbose]{geometry}%
\@ifundefined{changefontsizes}{%
  \ClassError{ptbposter}{%
    Deine Version von KOMA-Script ist ungeeignet (vermutlich stark veraltet)!
  }{%
    Installiere die aktuelle Version von KOMA-Script.
  }%
}{}

\RequirePackage{amsmath}

\ifPTB@XeOrLua
  \input{ptbposter-new-engines.clo}
  \input{ptbposter-old-engines.clo}

\ifdim\paperheight>\paperwidth
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  \setlength\PTB@scale@base{\paperheight}
  \PTB@landscapefalse
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  \setlength\PTB@scale@base{\paperwidth}
  \PTB@landscapetrue
\setlength\PTB@default@fsize@base{0.0130170299199\PTB@scale@base}% 11pt bei A4
\setlength\PTB@default@afsize{0.0157550946737\PTB@scale@base}%   53.3pt bei A0
\setlength\PTB@default@tfsize{0.0315101893474\PTB@scale@base}%  106.6pt bei A0
\setlength\PTB@default@ffsize{0.00567538119577\PTB@scale@base}%  19.2pt bei A0
\newcommand*\scaleFontSizes[1]{%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  \global\PTB@default@fsize=#1\PTB@default@fsize@base
\newcommand*\PTB@scaleTitleFontSize[1]{%
  \PTB@tempdima=\PTB@default@tfsize
  \PTB@tempdima=#1\PTB@tempdima
  \PTB@tempdimb=1.14\PTB@tempdima
  \xdef\titleFontSize{\noexpand\@setfontsize
    \noexpand\titleFontSize{\the\PTB@tempdima}{\the\PTB@tempdimb}}%
}

Rolf Niepraschk's avatar
Rolf Niepraschk committed
\scaleFontSizes{1}%     wird ggf. in Präambel noch mal geändert.
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\edef\authorFontSize{\noexpand\@setfontsize\noexpand\authorFontSize{%
  \the\PTB@default@afsize}{\the\dimexpr1.2\PTB@default@afsize}}
\edef\footFontSize{\noexpand\@setfontsize\noexpand\footFontSize{%
  \the\PTB@default@ffsize}{\the\dimexpr1.2\PTB@default@ffsize}}

\RequirePackage[dvipsnames,svgnames,x11names]{xcolor}
\RequirePackage{multicol,graphicx}

\ifxetex\else
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\RequirePackage[%
,factor=1500
,protrusion=true
,expansion=true
,verbose=true
,final=true
,letterspace=100
,babel=true
]{microtype}
\providecommand*\microtypesetup[1]{}

\RequirePackage{babel}    
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\AtEndOfClass{%
  \shorthandon{"}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  \@tempswafalse
  \iflanguage{ngerman}{\@tempswatrue}{%
    \iflanguage{german}{\@tempswatrue}{}%
  }
  \if@tempswa
    \defineshorthand{"`}{\guillemotright}%
    \defineshorthand{"'}{\guillemotleft}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  \fi
  \RequirePackage[final,pdfpagelabels=false,%
    plainpages=false,hypertexnames=true,hyperfootnotes=false]{hyperref}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\RequirePackage
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  [autostyle=true,german=guillemets,maxlevel=3]{csquotes}%
\newcommand*\PTB@qrcode{}
\newcommand*\QRcode[1]{\gdef\PTB@qrcode{#1}}
\newcommand*\PTB@location{38116~Braunschweig}
\newcommand*\location[1]{\gdef\PTB@location{#1}}
\newcommand*\PTB@street{Bundesallee~100}
\newcommand*\street[1]{\gdef\PTB@street{#1}}
\newcommand*\PTB@workingGroup{Arbeitsgruppe}
\newcommand*\workingGroup[1]{\gdef\PTB@workingGroup{#1}}
\newcommand*\PTB@department{Fachbereich}
\newcommand*\department[1]{\gdef\PTB@department{#1}}
\newcommand*\PTB@phone{}
\newcommand*\phone[1]{\gdef\PTB@phone{#1}}
\newcommand*\PTB@email{}
\newcommand*\email[1]{\gdef\PTB@email{#1}}
\newcommand*\PTB@fax{}
\newcommand*\fax[1]{\gdef\PTB@fax{#1}}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\newcommand*\PTB@logo{}
\newcommand*\logo[1]{\gdef\PTB@logo{#1}}
\ifPTB@useCMYK
  \definecolor{PTBcolor}{cmyk}{1,0.32549,0.12549,0.12549}
% icc:model: Europe ISO Coated FOGRA27
\else
%%%\definecolor{PTBcolor}{rgb}{0,0.67451,0.87451}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  %%%\definecolor{PTBcolor}{HTML}{00ACDF}
  \definecolor{PTBcolor}{RGB}{0,155,206}% 2019

\RequirePackage[texcoord]{eso-pic}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\RequirePackage{grffile,pict2e,picture,ifdraft,booktabs}
\RequirePackage{varwidth,qrcode}
\AddToShipoutPictureBG*{% Kopf (relativ zur oberen Blattkante)
  \PTB@tempdima=-0.077\PTB@scale@base
  \put(\PTB@leftmargin,\PTB@tempdima){%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
    \parbox[b]{\PTB@framewidth}{% TODO: vereinfachen?
      \parbox[b]{.401\PTB@scale@base}{%
        \textcolor{PTBcolor}{% TODO: Tikz-Grafik erzeugen (autom.?) und verwenden
          \includegraphics[height=.055\PTB@scale@base]{ptbposter-logo-A.mps}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
        }%    1,58365758755
        \hfill
        \raisebox{.0025\PTB@scale@base}{% 
          %\includegraphics[width=.612\linewidth]{ptbposter-logo-B.mps}%
          \resizebox{.61\linewidth}{!}{%
            \hspace{-.2ex}% 
            \begin{varwidth}[b]{\linewidth}%
              \LogoFont\bfseries
              Physikalisch-Technische Bundesanstalt\\
              Braunschweig und Berlin\\
              \mdseries
              Nationales Metrologieinstitut
            \end{varwidth}%
          }%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      \hfill
      \ifx\PTB@logo\@empty\else
        \includegraphics[height=.055\PTB@scale@base]{\PTB@logo}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      \fi
    }
  \def\PTB@tempa{\parbox[c]{\PTB@framewidth}{% Komplette Titeldefinition
    \PTB@title@justification\PTB@title@series\sffamily\titleFontSize
    \microtypesetup{protrusion=false}\@title}}%
  \@tempcnta=\@ne \@tempcntb=10499 %
  \loop\ifnum\@tempcnta<25 % Finden der ersten passenden titleFontSize
    \multiply\@tempcntb 10000 \divide\@tempcntb by 10500 % jeweils um 5% kleiner
    \PTB@scaleTitleFontSize{0.\the\@tempcntb}% 1:0.9999, 2:0.9522, 3:0.9068, ...
    %\typeout{\the\@tempcnta\space XXX: \titleFontSize, 0.\the\@tempcntb}%
    \ifdim\dimexpr\ht\z@+\dp\z@>\PTB@maxtitleheight
      \advance\@tempcnta\@ne % weiter, wenn zu gross
      \@tempcnta=999 % Abbruch
  \PTB@tempdima=-0.127\PTB@scale@base
  \put(\PTB@leftmargin,\PTB@tempdima){\PTB@tempa}% Titel
  \PTB@tempdima=-0.172\PTB@scale@base
  \def\and{, }%
  \put(\PTB@leftmargin,\PTB@tempdima){\parbox[b]{\PTB@framewidth}{% Autoren
    \PTB@authors@justification\sffamily\authorFontSize\@author}}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  % hier wird \@thanks gefüllt
  \linethickness{\PTB@framethickness}\color{PTBcolor}%\color{PTBcolor}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  \PTB@tempdima=-0.0883095039717\PTB@scale@base
  \put(\PTB@leftmargin,\PTB@tempdima){%
    \line(1,0){\dimexpr\paperwidth-2\PTB@leftmargin}}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  % blauer Rahmen
  \put(\PTB@leftmargin,\dimexpr-\textheight-2\PTB@textvsep-\PTB@topmargin)%
    {\framebox(\dimexpr\textwidth+2\PTB@texthsep,%
     \dimexpr\textheight+2\PTB@textvsep){\backgroundContent}}%
\AddToShipoutPictureFG*{% Fuß (relativ zur unteren Kante des Textbereichs)
    \put(-\PTB@texthsep,-\PTB@textvsep){%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      \PTB@tempdimb=0.000420521447484\PTB@scale@base
      \linethickness{\PTB@tempdimb}\normalcolor
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      \PTB@tempdima=-0.0420521447484\PTB@scale@base
      \put(-.5\@wholewidth,\PTB@tempdima){%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
        \PTB@tempdima=0.0386879731686\PTB@scale@base
        \PTB@tempdimb=0.00168208578994\PTB@scale@base
        \ifx\PTB@qrcode\@empty
          \color{PTBcolor}\framebox(\PTB@tempdima,\PTB@tempdima){}%
          \sbox\@tempboxa{\qrcode[height=\PTB@tempdima,tight]{\PTB@qrcode}}%
          \raisebox{\dp\@tempboxa}{\usebox\@tempboxa}%
        \fi
        \color{PTBcolor}
        \hspace{\PTB@tempdimb}\raisebox{-\@wholewidth}{%
          \rule{\dimexpr\PTB@tempdima+2\@wholewidth}%
            {\dimexpr\PTB@tempdima+2\@wholewidth}}%
        \hspace{\PTB@tempdimb}\framebox(\PTB@tempdima,\PTB@tempdima){}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      \PTB@tempdimb=-0.00841042894969\PTB@scale@base
      \footFontSize\sffamily\normalcolor
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      \PTB@tempdima=0.122792262665\PTB@scale@base
      \put(\PTB@tempdima,\PTB@tempdimb){%
        \begin{tabular}[t]{@{}l@{}}
          Physikalisch-Technische Bundesanstalt \\
          Braunschweig und Berlin \\[\f@baselineskip]
          \ifx\first@author\@empty\else \textbf{\first@author}\\\fi
          \ifx\PTB@department\@empty\else \PTB@department\\\fi
          \ifx\PTB@workingGroup\@empty\else \PTB@workingGroup\\\fi
        \end{tabular}%
      }
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      \PTB@tempdima=0.263246426125\PTB@scale@base
      \put(\PTB@tempdima,\PTB@tempdimb){%
        \begin{tabular}[t]{@{}ll@{}}
          \ifx\PTB@street\@empty\else\multicolumn{2}{@{}l@{}}{\PTB@street}\\\fi
          \ifx\PTB@location\@empty\else\multicolumn{2}{@{}l@{}}{\PTB@location}\\\fi
          \ifx\PTB@phone\@empty\else Telefon:&\PTB@phone\\\fi
          \ifx\PTB@fax\@empty\else Fax:&\PTB@fax\\\fi
          \ifx\PTB@email\@empty\else E-Mail:&\href{mailto:\PTB@email}{\PTB@email}\\\fi
          \multicolumn{2}{@{}l@{}}{\href{http://www.ptb.de/}{www.ptb.de}}
        \end{tabular}%
      }
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      \PTB@tempdima=0.378469302736\PTB@scale@base
      \put(\PTB@tempdima,\PTB@tempdimb){%
        \begin{tabular}[t]{@{}l@{}}
          \@thanks % wurde bei der Ausführung von \@author gefüllt.
        \end{tabular}%
      }
% ===== Behandlung der Autoren (siehe ptb-abstracts.sty ) =====

\newcommand*\first@author{}
\def\author#1{}
\def\@author{}

\renewcommand\footnotetext[2][]{%
  \textsuperscript{#1}\,#2\\
}

\newcommand\PTB@dec@footnotemark[1][]{%
  \addtocounter{footnote}{-1}%
  \begingroup
    \edef\PTB@tempa{#1}%
    \ifx\PTB@tempa\@empty\footnotemark\else\footnotemark[#1]\fi
  \endgroup
}

\newcommand\PTB@fnmark[1]{%
  \begingroup
    \unrestored@protected@xdef\@thefnmark{#1}%
  \endgroup
  %\show\@thefnmark
  \@footnotemark}

\newcommand\Author{%
  \begingroup
    \@ifstar{\@tempswatrue\@Author}{\@tempswafalse\@Author}}

Rolf Niepraschk's avatar
Rolf Niepraschk committed
\newcommand\@Author[2][]{%     \PTB@tempf=[!],\PTB@tempb={Firstname}
  \def\PTB@tempf{#1}\def\PTB@tempb{#2}% TODO: ggf. weiterer Optionen in #1
\newcommand\@@Author[2][]{%    \PTB@tempc=[alt. Firstname],\PTB@tempd={Surname}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  \def\PTB@tempc{#1}\def\PTB@tempd{#2}% TODO: \PTB@tempc unsinnig, oder?
\newcommand\@@@Author[1][]{%   \PTB@tempe=[Address]
    \def\PTB@tempe{#1}%
    \ifx\PTB@tempd\@empty
      % Empty Surname = Addition to the previous author
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      \g@addto@macro\@author{\PTB@fnmark{,}}% TODO: ???
    \else
      \ifx\@author\@empty
        \xdef\@author{\PTB@tempb~\PTB@tempd}%
        \xdef\first@author{\PTB@tempb~\PTB@tempd}%
      \else
        \expandafter\g@addto@macro\expandafter\@author
          \expandafter{\expandafter\and\PTB@tempb~}%
        \expandafter\g@addto@macro\expandafter\@author
          \expandafter{\PTB@tempd}% I like it ;-(
      \fi
    \fi
    \if@tempswa
      %                --> \Author*
      \g@addto@macro\@author{\PTB@dec@footnotemark}%
    \fi
Rolf Niepraschk's avatar
Rolf Niepraschk committed
    \def\reserved@a{!}%
    \ifx\PTB@tempf\reserved@a
      \xdef\first@author{\PTB@tempb~\PTB@tempd}% alternat. first author
    \fi
    \ifx\PTB@tempa\@empty\else
      \expandafter\g@addto@macro\expandafter\@author
        \expandafter{\expandafter\PTB@fnmark\expandafter{\PTB@tempa}}%
    \ifx\PTB@tempe\@empty\else
      \if@tempswa
        \g@addto@macro\@author{\PTB@fnmark{,}}%
      \fi
      \expandafter\g@addto@macro\expandafter\@author
        \expandafter{\expandafter\thanks\expandafter{\PTB@tempe}}%
    \fi
  \endgroup
}

\let\PTB@thanks\thanks
\renewcommand\thanks[2][]{%
  \begingroup
    \def\PTB@tempa{#2}%
    \ifx\PTB@tempa\@empty
      \footnotemark[\value{footnote}]%
    \else
      \PTB@thanks{#2}%
    \fi
  \endgroup
}%

\renewcommand*\labelitemi{$\m@th\circ$}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\renewcommand*\labelitemii{\textbullet}
\renewcommand*\labelitemiii{$\m@th\diamond$}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\renewcommand*\labelitemiv{$\m@th\triangleright$}%
  % Skalierungen in der Präambel sind passiert.
  \changefontsizes{\the\PTB@default@fsize}%
  \KOMAoptions{headings=normal,parskip=half}
  \normalsize
  \setlength\PTB@texthsep{.75em}%
  \setlength\PTB@textvsep{.75em}%
  \setlength\PTB@maxtitleheight{0.057\PTB@scale@base}% 
  \setlength\PTB@framethickness{0.00168208578994\PTB@scale@base}%
  \setlength\fboxsep{0.00355\PTB@scale@base}   %   3pt bei A4
  \setlength\fboxrule{0.0004722\PTB@scale@base}% 0.4pt bei A4
  \ifx\@author\@empty
    \setlength\PTB@topmargin{0.152\PTB@scale@base}%
  \else
    \setlength\PTB@topmargin{0.180824222418\PTB@scale@base}%
  \fi
  \ifPTB@landscape
Rolf Niepraschk's avatar
Rolf Niepraschk committed
    \setlength\PTB@framewidth{0.950378471315\PTB@scale@base}%  3215pt (1130mm) bei A0
    \ifx\@author\@empty
      \setlength\PTB@frameheight{0.490824222418\PTB@scale@base}% 1565pt  (550mm) bei A0
      \setlength\PTB@frameheight{0.462\PTB@scale@base}% 1565pt  (550mm) bei A0
Rolf Niepraschk's avatar
Rolf Niepraschk committed
    \setlength\PTB@framewidth{0.656013458076\PTB@scale@base}%  2219pt  (780mm) bei A0
    \ifx\@author\@empty
      \setlength\PTB@frameheight{0.769\PTB@scale@base}% 2504pt  (880mm) bei A0
    \else
      \setlength\PTB@frameheight{0.740117747573\PTB@scale@base}% 2504pt  (880mm) bei A0
    \fi
  \setlength\PTB@leftmargin{0.5\dimexpr\paperwidth-\PTB@framewidth}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  \iftrue
    \@tempdima=\dimexpr\PTB@leftmargin+\PTB@texthsep %
    \geometry{%
      verbose,
      top=\dimexpr\PTB@topmargin+\PTB@textvsep,%
      left=\@tempdima,
      right=\@tempdima,
      textheight=\dimexpr\PTB@frameheight-2\PTB@textvsep,%
      columnsep=1.5em,hcentering}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  \else
    \paperwidth=2392.87701pt %
    \paperheight=3383.03302pt %
    \textwidth=2153.24045pt %
    \textheight=2437.77531pt %
    \oddsidemargin=47.5483pt %
    \evensidemargin=47.5483pt %
    \topmargin=535.06322pt %
Rolf Niepraschk's avatar
Rolf Niepraschk committed
    \headheight=17.0pt %
    \headsep=20.40001pt %
    \topskip=11.0pt %
    \footskip=47.6pt %
Rolf Niepraschk's avatar
Rolf Niepraschk committed
    \marginparsep=12.8401pt %
    \columnsep=66.04904pt %
    \hoffset=0.0pt %
    \voffset=0.0pt %
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  \fi

  \setlength\emergencystretch{3em}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed

  \@ifpackageloaded{multicol}{%
    \def\setemergencystretch#1#2{}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed

  \RequirePackage{paralist}
  \newcommand*\PTB@begin@list[1]{%
    \@nameuse{#1}%
  }
  \def\enumerate{%
    \PTB@begin@list{compactenum}%
  }
  \def\itemize{%
    \PTB@begin@list{compactitem}%
  }
  \def\description{%
    \PTB@begin@list{compactdesc}%
  }
  \let\enditemize\endcompactitem
  \let\endenumerate\endcompactenum
  \let\enddescription\endcompactdesc
  \pltopsep=\medskipamount
  \plitemsep=\medskipamount
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  \setlength\leftmargini{1.5em}
  \setlength\leftmarginii{1.1em}
  \setlength\leftmarginiii{1.1em}
  \setlength\leftmarginiv{1.1em}
  \setlength\labelsep{.5em}
\KOMAoptions{captions=oneline}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\newcommand*\ptb@figure{%
  \trivlist\item\relax
Rolf Niepraschk's avatar
Rolf Niepraschk committed
    \minipage{\linewidth}%
      \def\@captype{figure}%
}
\newcommand*\ptb@table{%
  \trivlist\item\relax
Rolf Niepraschk's avatar
Rolf Niepraschk committed
    \minipage{\linewidth}%
      \def\@captype{table}%
}

\newcommand*\ptb@endfigtab{%
    \endminipage
  \endtrivlist
}

\renewenvironment{figure}[1][]{%
  \ptb@figure
}{\ptb@endfigtab}
\renewenvironment{figure*}[1][]{%
  \ptb@figure
}{\ptb@endfigtab}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\renewenvironment{table}[1][]{%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  \ptb@table
}{\ptb@endfigtab}
\renewenvironment{table*}[1][]{%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  \ptb@table
}{\ptb@endfigtab}
\addtokomafont{caption}{\small}
\addtokomafont{captionlabel}{\sffamily\bfseries}
\setcapindent{1em}
%\setcapwidth[l]{\linewidth}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\AtBeginDocument{%
\RedeclareSectionCommand[%
  style=section,%
  level=1,%
  indent=\z@,%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  beforeskip=-2ex \@plus -1ex \@minus -.2ex,%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  afterskip=0.4ex \@plus.2ex,%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  tocindent=0pt,%
  tocnumwidth=1.5em%
]{section}
\RedeclareSectionCommand[%
  style=section,%
  level=2,%
  indent=\z@,%
  beforeskip=-1.2ex\@plus -1ex \@minus -.2ex,%
  afterskip=0.1ex \@plus .2ex,%
  tocindent=1.5em,%
  tocnumwidth=2.3em%
]{subsection}
\RedeclareSectionCommand[%
  style=section,%
  level=3,%
  indent=\z@,%
  beforeskip=-1.2ex\@plus -1ex \@minus -.2ex,%
  afterskip=0.1ex \@plus .2ex,%
  tocindent=3.8em,%
  tocnumwidth=3.2em%
]{subsubsection}
\RedeclareSectionCommand[%
  style=section,%
  level=4,%
  indent=\z@,%
  beforeskip=1.2ex \@plus1ex \@minus.2ex,%
  afterskip=-1em,%
  tocindent=7.0em,%
  tocnumwidth=4.1em%
]{paragraph}
\RedeclareSectionCommand[%
  style=section,%
  level=5,%
  indent=\scr@parindent,%
  beforeskip=1.2ex \@plus1ex \@minus .2ex,%
  afterskip=-1em,%
  tocindent=10em,%
  tocnumwidth=5em%
]{subparagraph}
}

\setcounter{secnumdepth}{-2}
\renewcommand*\maketitle[1][1]{}
\renewcommand*\tableofcontents{}
\pagestyle{empty}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\raggedbottom