\NeedsTeXFormat{LaTeX2e}%
\ProvidesPackage{scdpgarchive}%
\newif\ifsc@Notes\sc@Notesfalse
\DeclareOption{notes}{\sc@Notestrue}%
\ProcessOptions
\renewcommand\normalsize{\fontsize{8}{9.5}\selectfont}%
\pagenumbering{arabic}%
\def\@listi{\setlength\leftmargin{1.5em}%
          \setlength\labelsep{.5em}%
          \setlength\labelwidth{\leftmargin}%
          \addtolength\labelwidth{-\labelsep}%
          \parsep3\p@\@plus2\p@\@minus\p@%
          \topsep6\p@\@plus2\p@\@minus3\p@%
          \itemsep3\p@\@plus2\p@\@minus\p@}%
\newcommand\labelitemi{\textbullet}%
\lineskiplimit0pt%
\abovedisplayskip0pt%
\belowdisplayskip\abovedisplayskip
\abovedisplayshortskip\abovedisplayskip
\belowdisplayshortskip\abovedisplayskip
\parindent0em%
\parskip0ex%
\RequirePackage[english,ngerman]{babel}%
\RequirePackage{multicol}%
\RequirePackage{exscale}%
\RequirePackage{amsmath}%
\RequirePackage{amssymb}%
\RequirePackage{marvosym}%
\RequirePackage{graphics}%
\RequirePackage{lscape}%
\RequirePackage{eso-pic}%
\RequirePackage{ifthen}%
\usepackage[a4paper]{geometry}%
\geometry{top=0mm,bottom=17mm,outer=11mm,textwidth=188mm,%
          headheight=10mm,headsep=5mm,%
          nofoot,includeheadfoot}%
\renewcommand{\@oddhead}{\makebox[0pt][l]{\rule[-1mm]{188mm}{0.1mm}}\scHeadlineSize\bfseries\hfil\rightmark}%
\renewcommand{\@evenhead}{\@oddhead}%
\renewcommand{\@oddfoot}{\hfil\raisebox{-10mm}[0pt][0pt]{\scPartInfoSize\thepage}\hfil}%
\renewcommand{\@evenfoot}{\@oddfoot}%
\newcommand\scAbstractHeadSize{\fontsize{9}{11}\selectfont}%
\newcommand\scAbstractInfoSize{\fontsize{14}{18}\selectfont}%
\newcommand\scSessionTimeLocationSize{\fontsize{10}{12}\selectfont}%
\newcommand\scSessionNameSize{\fontsize{12}{14}\selectfont}%
\newcommand\scPartMainHeadingSize{\fontsize{14}{18}\selectfont}%
\newcommand\scPartHeadingSize{\fontsize{12}{14}\selectfont}%
\newcommand\scPartInfoSize{\fontsize{10}{12}\selectfont}%
\newcommand\scHeadlineSize{\fontsize{10}{12}\selectfont}%
\newcommand\scIndexSize{\fontsize{7}{7.7}\selectfont}%
\setlength\columnsep{6mm}%
\setlength\columnseprule{0.1mm}%
\setlength\premulticols{50mm}%
\setcounter{columnbadness}{9999}%
\newcounter{sc@AuthorCount}%
\newcounter{sc@AuthorLoop}%
\newcounter{sc@AffiliationCount}%
\newcounter{sc@AffiliationLoop}%
\newcounter{sc@InfoCount}%
\newcounter{sc@InfoColumn}%
\newcounter{sc@InfoLoop}%
\newcounter{sc@CollaborationsCount}%
\newsavebox{\sc@InfoBox}%
\newlength\sc@InfoLength%
\newlength\sc@InfoWidthI%
\newlength\sc@InfoWidthII%
\newlength\sc@InfoWidthIII%
\newlength\sc@InfoWidthIV%
\newlength\sc@InfoWidthV%
\newif\ifInOpening\InOpeningfalse
\def\sc@LanguageEn{en}%
\def\sc@LanguageDe{de}%
\def\sc@LanguageNone{None}%
\def\sc@PVSession{PV}%
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}%
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}%
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}%
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}%
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}%
\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}%
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}%
\newcommand\scBookLanguage[1]{%
  \gdef\sc@BookLanguage{#1}%
  \ifx\sc@BookLanguage\sc@LanguageEn
    \selectlanguage{english}%
  \fi
  \ifx\sc@BookLanguage\sc@LanguageDe
    \selectlanguage{ngerman}%
  \fi
  \gdef\sc@ContributionTypeTalkEN{Talk}%
  \gdef\sc@ContributionTypeTalkDE{Vortrag}%
  \gdef\sc@ContributionTypePoster{Poster}%
}%
\newcommand\scConference[1]{\gdef\sc@Conference{#1}}%
\newcommand\scLanguage[1]{\gdef\sc@Language{#1}}%
\newcommand\scTitle[1]{\gdef\sc@Title{#1}}%
\newcommand\scCollaborationName[1]{\gdef\sc@CollaborationName{#1}}%
\newcommand\sc@ShowLink[1]{}%
\newcommand\scAuthor[4]{%
  \stepcounter{sc@AuthorCount}%
  \global\@namedef{sc@Author\Roman{sc@AuthorCount}}%
                  {\def\tmp{#1}\if\tmp\@empty\else{$\bullet$}\fi
                   #2 #3\sc@ShowLink{$^{#4}$}}%
  \global\@namedef{sc@PresentingAuthor\Roman{sc@AuthorCount}}%
                  {\def\tmp{#1}\if\tmp\@empty\else$\bullet$#2 #3\fi}%
}%
\newcommand\scAffiliation[2]{%
  \stepcounter{sc@AffiliationCount}%
  \global\@namedef{sc@Affiliation\Roman{sc@AffiliationCount}}%
                  {\sc@ShowLink{$^{#1}$}#2}%
}
\long\def\scBeginText#1\scEndText{%
  \gdef\sc@Text{#1}
}%
\newcommand\scCite[2]{\par\noindent{[#1]~#2}}%
\newcommand\scPart[1]{\gdef\sc@Part{#1}}%
\newcommand\scContributionType[1]{\gdef\sc@ContributionType{#1}}%
\newcommand\scTopic[1]{\gdef\sc@Topic{#1}}%
\newcommand\scEmail[1]{\gdef\sc@Email{#1}}%
\newcommand\scCountry[1]{\gdef\sc@Country{#1}}%
\newcommand\scSubmitTime[1]{\gdef\sc@SubmitTime{#1}}%
\newcommand\scChangeTime[1]{\gdef\sc@ChangeTime{#1}}%
\newcommand\scAbstractPart[1]{\gdef\sc@AbstractPart{#1}}
\newcommand\scAbstractPartNumber[1]{\gdef\sc@AbstractPartNumber{#1}}
\newcommand\scAbstractSession[1]{\gdef\sc@AbstractSession{#1}}
\newcommand\scAbstractSessionNumber[1]{\gdef\sc@AbstractSessionNumber{#1}}
\newcommand\scAbstractStart[1]{\gdef\sc@AbstractStart{#1}}
\newcommand\scAbstractEnd[1]{\gdef\sc@AbstractEnd{#1}}
\newcommand\scAbstractDay[1]{\gdef\sc@AbstractDay{#1}}
\newcommand\scAbstractLocation[1]{\gdef\sc@AbstractLocation{#1}}
\newcommand\scAbstractFormat[1]{\gdef\sc@AbstractFormat{#1}}
\newcommand\scSessionPart[1]{\gdef\sc@SessionPart{#1}}
\newcommand\scSessionKey[1]{\gdef\sc@SessionKey{#1}}
\newcommand\scSessionTitle[1]{\gdef\sc@SessionTitle{#1}}
\newcommand\scSessionChair[1]{\gdef\sc@SessionChair{#1}}
\newcommand\scSessionDay[1]{\gdef\sc@SessionDay{#1}}
\newcommand\scSessionBeginTime[1]{\gdef\sc@SessionBeginTime{#1}}
\newcommand\scSessionEndTime[1]{\gdef\sc@SessionEndTime{#1}}
\newcommand\scSessionLocation[1]{\gdef\sc@SessionLocation{#1}}
\newcommand\scSessionFormat[1]{}
\newcommand\scShowAuthors
{%
  \renewcommand\sc@ShowLink[1]{}%
  \ifnum\value{sc@AuthorCount}>1\relax
    \ifnum\value{sc@AffiliationCount}>1\relax
      \renewcommand\sc@ShowLink[1]{##1}%
    \fi
  \fi
  \setcounter{sc@AuthorLoop}{0}%
  \loop
    \stepcounter{sc@AuthorLoop}%
    \ifnum\value{sc@AuthorLoop}>1\relax
      \ifnum\value{sc@AuthorLoop}=\value{sc@AuthorCount}\relax
        \ifx\sc@Language\sc@LanguageEn
          \ifnum\value{sc@AuthorCount}>2\relax
            {, and }%
          \else
            { and }%
          \fi
        \fi
        \ifx\sc@Language\sc@LanguageDe
          { und }%
        \fi
      \else
          {, }%
      \fi
    \fi
    \textsc{\@nameuse{sc@Author\Roman{sc@AuthorLoop}}}%
    \ifnum\value{sc@AuthorLoop}<\value{sc@AuthorCount}\relax
  \repeat
}%
\newcommand\scShowPresentingAuthor
{%
  \renewcommand\sc@ShowLink[1]{}%
  \ifnum\value{sc@AuthorCount}>1\relax
    \ifnum\value{sc@AffiliationCount}>1\relax
      \renewcommand\sc@ShowLink[1]{##1}%
    \fi
  \fi
  \setcounter{sc@AuthorLoop}{0}%
  \loop
    \stepcounter{sc@AuthorLoop}%
    \textsc{\@nameuse{sc@PresentingAuthor\Roman{sc@AuthorLoop}}}%
    \ifnum\value{sc@AuthorLoop}<\value{sc@AuthorCount}\relax
  \repeat
}%
\newcommand\scShowAffiliations
{%
  \setcounter{sc@AffiliationLoop}{0}%
  \loop
    \stepcounter{sc@AffiliationLoop}%
    { --- }%
    \@nameuse{sc@Affiliation\Roman{sc@AffiliationLoop}}%
    \ifnum\value{sc@AffiliationLoop}<\value{sc@AffiliationCount}\relax
  \repeat
}%
\newenvironment{scAbstract}{%
  \setcounter{sc@AuthorCount}{0}%
  \setcounter{sc@AffiliationCount}{0}%
  \gdef\sc@CollaborationName{}%
  \gdef\sc@AbstractPart{}%
  \gdef\sc@AbstractPartNumber{}%
  \gdef\sc@AbstractSession{}%
  \gdef\sc@AbstractSessionNumber{}%
  \gdef\sc@AbstractStart{}%
  \gdef\sc@AbstractEnd{}%
  \gdef\sc@AbstractDay{}%
  \gdef\sc@AbstractLocation{}%
  \gdef\sc@ChangeTime{}%
  \gdef\sc@SubmitTime{}%
}{%
  \ifx\sc@Language\sc@LanguageNone\begin{otherlanguage*}{english}\fi
  \ifx\sc@Language\sc@LanguageEn\begin{otherlanguage*}{english}\fi
  \ifx\sc@Language\sc@LanguageDe\begin{otherlanguage*}{ngerman}\fi
  \ifthenelse{\equal{\sc@AbstractFormat}{title}\OR\equal{\sc@AbstractFormat}{author}\OR\equal{\sc@AbstractFormat}{abstract}}{%
    {%
      \scAbstractHeadSize
      \ifx\sc@ContributionType\sc@ContributionTypeTalkEN\else
      \ifx\sc@ContributionType\sc@ContributionTypeTalkDE\else
        \ifx\sc@ContributionType\sc@ContributionTypePoster\else
          \textbf{\sc@ContributionType}
        \fi
        \fi
      \fi
      \hfill
      \sc@SessionKey.\sc@AbstractSessionNumber\quad
      \sc@AbstractDay{} \sc@AbstractStart\quad
      \sc@AbstractLocation
      \par
    }%
    \vspace{0.2ex}%
  \textbf{\sc@Title}%
  { --- }%
  \ifthenelse{\equal{\sc@AbstractFormat}{title}}{\scShowPresentingAuthor}{%
  \scShowAuthors
  \ifx\sc@CollaborationName\@empty\else
    \ifx\sc@Language\sc@LanguageEn{ for the \sc@CollaborationName-Collaboration}\fi
    \ifx\sc@Language\sc@LanguageDe{ f\"ur die \sc@CollaborationName-Kollaboration}\fi
  \fi
  \scShowAffiliations
  \par
  \ifthenelse{\equal{\sc@AbstractFormat}{abstract}}{%
  \vspace{0.8ex}%
  {\setlength\parindent{1em}\noindent\sc@Text\par}}{}%
  }}{}%
  \par
  \vspace{2ex}%
  \end{otherlanguage*}
}%
\newcommand\scBreak[1]{\vspace{1ex}{\bfseries\scAbstractHeadSize#1\par}\vspace{2ex}}%
\newcommand\scSessionHead[1]{\vspace{#1}\vspace{#1}%
                             {\centering\scSessionNameSize\bfseries\sffamily\sc@SessionTitle\par}%
                             \ifx\sc@SessionChair\@empty\else
                               \def\tmp{ST}\ifx\sc@SessionPart\tmp{\centering\scSessionTimeLocationSize\sffamily Chair: \sc@SessionChair\par}\fi%
                               \def\tmp{T}\ifx\sc@SessionPart\tmp{\centering\scSessionTimeLocationSize\sffamily Convenor: \sc@SessionChair\par}\fi%
                             \fi
                             \vspace{2ex}%
                             \vspace{#1}%
                             {\scSessionTimeLocationSize
                             \ifx\sc@BookLanguage\sc@LanguageEn Time: \fi
                             \ifx\sc@BookLanguage\sc@LanguageDe Zeit: \fi
                             \sc@SessionDay{} \sc@SessionBeginTime--\sc@SessionEndTime\hfill
                             \ifx\sc@BookLanguage\sc@LanguageEn Location: \fi
                             \ifx\sc@BookLanguage\sc@LanguageDe Raum: \fi
                             \sc@SessionLocation\par}%
                             \markright{\sc@SessionDay}%
                             \vspace{#1}}
\newenvironment{scSession}[1][0pt]{%
  \ifsc@Notes\scSessionHead{#1}\par\else\begin{multicols}{2}[\scSessionHead{#1}]\fi
}%
{%
  \ifsc@Notes\else\end{multicols}\vspace{3ex}\fi
  \scSessionChair{}%
}%
\newenvironment{scSessions}{%
  \ifsc@Notes
  \list{}{\setlength\leftmargin{0em}\setlength\rightmargin{97mm}}%
  \item\relax
  \fi
}%
{%
  \ifsc@Notes\endlist\fi
}%
\newenvironment{scCollaborations}{%
  \setcounter{sc@CollaborationsCount}{0}%
  \markboth{\ifx\sc@BookLanguage\sc@LanguageEn Collaborations (Coll)\fi
            \ifx\sc@BookLanguage\sc@LanguageDe Kollaborationen (Koll)\fi}{}%
  \begin{multicols}{2}%
}%
{%
  \end{multicols}%
}%
\newenvironment{scBreakSession}[1][0pt]{%
  \scSessionHead{#1}\par
}%
{%
  \vspace{4mm}%
}%
\newenvironment{scIndex}{%
  \markboth{\ifx\sc@BookLanguage\sc@LanguageEn Author Index\fi
            \ifx\sc@BookLanguage\sc@LanguageDe Autorenverzeichnis\fi}{}%
  \sffamily\scIndexSize\flushleft
  \begin{multicols}{4}%
}%
{%
  \end{multicols}%
}%
\newcommand\scIndexItem[2]%
{%
  \hangafter=1\hangindent2em%
  #1\hspace{1em}\dotfill\nobreak#2\hfill\par
}%
\newcommand\scIndexEntry[2]{%
  \hangafter=1\hangindent1em#1%
  \hspace{1em}\dotfill\nobreak#2\hfill\par
}%
\newcommand\scIndexColEntry[2]{%
  \hangafter=1\hangindent1em#1%
  \ifx\sc@BookLanguage\sc@LanguageEn-Collaboration\fi
  \ifx\sc@BookLanguage\sc@LanguageDe-Kollaboration\fi
  \hspace{1em}\dotfill\nobreak#2\hfill\par
}%
\newcommand\scIndexReference[5]{%
  \def\tmp{#1}\ifx\tmp\@empty\else{$\bullet$}\fi
  \def\tmp{#2}%
  \ifx\tmp\sc@PVSession
    PV~\uppercase\expandafter{\romannumeral#3}%
  \else
    #2~#3.#4%
  \fi
}%
\newcommand\scIndexReferenceCollaboration[1]{Koll~#1}%
\newcommand\scIndexReferenceSeparator{, }%
\renewcommand\cite[1]{\ClassError{scdpg}{citation labeling not available}{instead of \string\cite{label} and \string\bibitem{label} use [1] and \string\scCite{1}{reference}}}%
\renewcommand\label[1]{\ClassError{scdpg}{don't use labels}{use the numbers directly}}%
\renewcommand\ref[1]{\ClassError{scdpg}{don't use labels}{use the numbers directly}}%
\newcommand\scNoUseTeX{\ClassError{scdpg}{submission system not in LaTeX mode}{you can't use LaTeX to process such a submission directly}}%
\tolerance=500%
\emergencystretch=20pt%
