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

\errorcontextlines=100 %

\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{ptbposter}
    [2015/03/16 v0.2a PTB-Poster-Klasse (RN)]

\PassOptionsToPackage{paper=a0paper}{geometry}

\newdimen\PTB@topmargin
\newdimen\PTB@leftmargin
\newdimen\PTB@default@fsize \setlength\PTB@default@fsize{41pt}
\newdimen\PTB@textsep \setlength\PTB@textsep{.5\PTB@default@fsize}

\newcommand\PTB@tempa{}
\newcommand\PTB@tempb{}
\newcommand\PTB@tempc{}

\DeclareOption{portrait}{%
  \setlength\PTB@leftmargin{0.5\dimexpr 841mm-780mm}
  \setlength\PTB@topmargin{228mm}
  \edef\PTB@tempa{\noexpand\PassOptionsToPackage{portrait,
    textwidth=\the\dimexpr780mm-2\PTB@textsep,
    textheight=\the\dimexpr880mm-2\PTB@textsep,hcentering,
    top=\the\dimexpr\PTB@topmargin-\PTB@textsep}{geometry}}
  \PTB@tempa
}
\DeclareOption{landscape}{% TODO: überarbeiten
  \setlength\PTB@leftmargin{0.5\dimexpr 1189mm-1130mm}
  \setlength\PTB@topmargin{228mm}% ???
  \PassOptionsToPackage{landscape,textwidth=1130mm,textheight=550mm,
    left=\PTB@leftmargin,top=\PTB@topmargin}{geometry}
}

\DeclareOption{sanserif}{% TODO!
  %\AtBeginDocument{\renewcommand\familydefault{\sfdefault}}
}
\DeclareOption{serif}{% TODO!
  %\AtBeginDocument{\renewcommand\familydefault{\rmdefault}}
}

\PassOptionsToClass{fontsize=\the\PTB@default@fsize}{scrartcl}

\ExecuteOptions{portrait,ngerman,serif}
\ProcessOptions\relax
\LoadClass{scrartcl}

\RequirePackage[
,columnsep=3em
]{geometry}

\RequirePackage[svgnames]{xcolor}
\RequirePackage[newcommands,newparameters]{ragged2e}% ???
\RequirePackage{multicol,graphicx}
\RequirePackage[
,factor=1500
,protrusion=true
,expansion=true
,verbose=true
,final=true
,letterspace=100
,babel=true
]{microtype}

% TODO: Optionen serif/sanserif
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
\RequirePackage{textcomp}
\RequirePackage{lmodern}
\RequirePackage{tgpagella,qpxmath}
\RequirePackage{tgheros}

\RequirePackage{babel}

\def\reserved@a{%
  \shorthandon{"}%
    \defineshorthand{"`}{\guillemotright}%
    \defineshorthand{"'}{\guillemotleft}%
  \shorthandoff{"}%
}

\iflanguage{ngerman}{\reserved@a}{%
  \iflanguage{german}{\reserved@a}{}%
}

\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}}

\definecolor{PTBcolor}{rgb}{0,0.67451,0.87451}

\RequirePackage[texcoord]{eso-pic}
\RequirePackage{pict2e,picture,ifdraft,qrcode,booktabs}

\AddToShipoutPictureBG{%  TODO: Evtl. besser auf untere Blattkante beziehen.
  \put(\PTB@leftmargin,-95.4mm){\includegraphics[width=477mm]{ptbposter-logo.pdf}}%
  % TODO: Besser so \DeclareFixedFont{\Big}{\encodingdefault}{\sfdefault}{m}{n}{10}
  \put(\PTB@leftmargin,-160mm){\sffamily\Huge\@title}%
  \put(\PTB@leftmargin,-190mm){\sffamily\large\@author}%
  \put(\PTB@leftmargin,-105mm){%
    \linethickness{2mm}\color{PTBcolor}\line(1,0){\dimexpr\paperwidth-2\PTB@leftmargin}}
  \linethickness{2mm}
  \AtTextLowerLeft{%
    \color{PTBcolor}%
    \put(-\PTB@textsep,-\PTB@textsep){\framebox(\dimexpr\textwidth+2\PTB@textsep,
      \dimexpr\textheight+2\PTB@textsep){}}
  }%
  \linethickness{.5mm}%
  \put(\PTB@leftmargin-.5\@wholewidth,-1144mm){%
    \raisebox{19mm}{\qrcode[height=47mm,tight]{\PTB@qrcode}}%
    \color{PTBcolor}%
    \hspace{2mm}\raisebox{-.5mm}{\rule{47mm}{47mm}}%
    \hspace{2mm}\framebox(46mm,46mm){}%
    %\circle*{1mm}%
    \color{black}%
    \hspace{2mm}\raisebox{41mm}{{\parbox[t][47mm]{155mm}{%
      \tiny\sffamily
      Physikalisch-Technische Bundesanstalt \\
      Braunschweig und Berlin \par\vspace{1em}
      \textbf{\@author} \\
      \PTB@department \\
      \PTB@workingGroup
      %\rule{\linewidth}{5mm}%
    }}}%
    \hspace{12mm}\raisebox{41mm}{{\parbox[t][47mm]{125mm}{%
      \tiny\sffamily
      \begin{tabular}[t]{@{}ll@{}}
        \ifx\PTB@street\@empty\else\PTB@street\\ \fi
        \ifx\PTB@location\@empty\else\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:&\PTB@email\\ \fi
        www.ptb.de
      \end{tabular}%
      %\rule{\linewidth}{5mm}%
    }}}%
    \hspace{12mm}\raisebox{41mm}{{\parbox[t][47mm]{175mm}{%
      \tiny\sffamily{}
      % TODO: Siehe Lösung für abstracts
      %%%$^{1}$Physikalisch-Technische Bundesanstalt \\
      %%%$^{2}$Muster Universität Forschungsstadt
      %\rule{\linewidth}{5mm}%
    }}}%
  }
}

%% Werte auf 41pt bezogen
\edef\large{\noexpand\@setfontsize\noexpand\large
  {\the\dimexpr1.3\PTB@default@fsize}{\the\dimexpr1.56\PTB@default@fsize}}
%% vorher: 1.2 * \PTB@default@fsize / 1.2 * 1.2 * \PTB@default@fsize
\edef\Huge{\noexpand\@setfontsize\noexpand\Huge
  {\the\dimexpr2.6\PTB@default@fsize}{\the\dimexpr3.12\PTB@default@fsize}}
%% vorher: 2.49 * \PTB@default@fsize / 2.49 * 1.2 * \PTB@default@fsize

\setcounter{secnumdepth}{-2}
\renewcommand*\maketitle[1][1]{}
\renewcommand*\tableofcontents{}
\pagestyle{empty}

\endinput