%% Copyright (C) 2003-2018 Achim D. Brucker, https://www.brucker.ch
%%
%% License:
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1.3c of the License, or (at your opinion) any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause
\NeedsTeXFormat{LaTeX2e}\relax
\ProvidesPackage{llncsconf}
[2020/05/10 v1.1.0 %
Tweaks for the llncs class.]
%
\RequirePackage{ifthen}
\RequirePackage{hyperref}
%
\newboolean{rcsinfo}
\newboolean{svninfo}
\newboolean{accepted}
\newboolean{submitted}
\newboolean{intended}
\newboolean{llncs}
\newboolean{crop}
\newboolean{proceedings}
%
\DeclareOption{crop}{\setboolean{crop}{true}}
\DeclareOption{rcsinfo}{\setboolean{rcsinfo}{true}}
\DeclareOption{svninfo}{\setboolean{svninfo}{true}}
\DeclareOption{accepted}{\setboolean{accepted}{true}}
\DeclareOption{submitted}{\setboolean{submitted}{true}}
\DeclareOption{intended}{\setboolean{intended}{true}}
\DeclareOption{llncs}{\setboolean{llncs}{true}}
\DeclareOption{proceedings}{\setboolean{proceedings}{true}}
%%%
\ProcessOptions\relax
%%
\AtEndDocument{\label{LastPage}}
\def\conference#1{\gdef\@conference{#1}}
\def\llncs#1#2{\gdef\@llncs{#1}\ifthenelse{\boolean{llncs} \OR \boolean{proceedings}}{\setcounter{page}{#2}}{}}
\gdef\@llncsdoi{UNKNOWN}
\def\llncsdoi#1{\gdef\@llncsdoi{#1}{}}
%
\ifthenelse{\boolean{crop}}{%
\@ifclasswith{llncs}{a4paper}{%
\pdfpagesattr{/CropBox [92 114 523 780]}%
}{%
\pdfpagesattr{/CropBox [92 65 523 731]}% LNCS page: 152x235 mm
}%
}{}
%
\def\ps@svninfofirst{\let\@mkboth\@gobbletwo\let\@oddhead\@empty\let\@evenhead\@empty
\def\@oddfoot{\reset@font\scriptsize
\vbox to\z@{\parindent=\z@\vss
\textsf{\small Revision: \svnInfoRevision \quad Date: \svnInfoDate
\quad Time: \svnInfoTime \quad File: \svnInfoFile\\}}
}\let\@evenfoot\@oddfoot}
\def\ps@svninfo{\let\@mkboth\@gobbletwo
\def\@oddfoot{\reset@font\scriptsize
\vbox to\z@{\parindent=\z@\vss
\textsf{\small Revision: \svnInfoRevision \quad Date: \svnInfoDate
\quad Time: \svnInfoTime \quad File: \svnInfoFile\\}}
}\let\@evenfoot\@oddfoot}
%
\def\ps@rcsinfofirst{\let\@mkboth\@gobbletwo\let\@oddhead\@empty\let\@evenhead\@empty
\def\@oddfoot{\reset@font\scriptsize
\vbox to\z@{\parindent=\z@\vss
\textsf{\small Revision: \rcsInfoRevision \quad Date: \rcsInfoDate
\quad Time: \rcsInfoTime \quad File: \rcsInfoFile\\}}
}\let\@evenfoot\@oddfoot}
\def\ps@rcsinfo{\let\@mkboth\@gobbletwo
\def\@oddfoot{\reset@font\scriptsize
\vbox to\z@{\parindent=\z@\vss
\textsf{\small Revision: \rcsInfoRevision \quad Date: \rcsInfoDate
\quad Time: \rcsInfoTime \quad File: \rcsInfoFile\\}}
}\let\@evenfoot\@oddfoot}
%
\def\ps@acceptedfirst{\let\@mkboth\@gobbletwo\let\@oddhead\@empty\let\@evenhead\@empty
\def\@oddfoot{\reset@font\scriptsize
\vbox to\z@{\parindent=\z@\vss
Accepted for publication at \@conference.
}}\let\@evenfoot\@oddfoot}
%
\def\ps@submitted{\let\@mkboth\@gobbletwo
\def\@oddfoot{\reset@font\scriptsize
\vbox to\z@{\parindent=\z@\vss
Submitted to \@conference, please do \emph{not} distribute.\\
\copyright\ \number\year, \@author
}}\let\@evenfoot\@oddfoot}
\def\ps@submittedfirst{\let\@mkboth\@gobbletwo\let\@oddhead\@empty\let\@evenhead\@empty
\def\@oddfoot{\reset@font\scriptsize
\vbox to\z@{\parindent=\z@\vss
Submitted to \@conference, please do \emph{not} distribute.\\
\copyright\ \number\year, \@author
}}\let\@evenfoot\@oddfoot}
%
\def\ps@intended{\let\@mkboth\@gobbletwo
\def\@oddfoot{\reset@font\scriptsize
\vbox to\z@{\parindent=\z@\vss
Intended for submission to \@conference, please do \emph{not} distribute.
}}\let\@evenfoot\@oddfoot}
\def\ps@intendedfirst{\let\@mkboth\@gobbletwo\let\@oddhead\@empty\let\@evenhead\@empty
\def\@oddfoot{\reset@font\scriptsize
\vbox to\z@{\parindent=\z@\vss
Intended for submission to \@conference, please do \emph{not} distribute.
}}\let\@evenfoot\@oddfoot}
%
\def\ps@llncs{\let\@mkboth\@gobbletwo\let\@oddhead\@empty\let\@evenhead\@empty
\def\@oddfoot{\reset@font\scriptsize
\vbox to\z@{\parindent=\z@\vss
\@llncs
\unskip, pp.~\thepage--\pageref{LastPage}, \number\year.\\
The final publication is available at Springer via \url{https://doi.org/\@llncsdoi}.
}}\let\@evenfoot\@oddfoot}
\def\ps@proceedings{\let\@mkboth\@gobbletwo\let\@oddhead\@empty\let\@evenhead\@empty
\def\@oddfoot{\reset@font\scriptsize
\vbox to\z@{\parindent=\z@\vss
\@llncs
\unskip, pp.~\thepage--\pageref{LastPage}, \number\year.
}}\let\@evenfoot\@oddfoot}
%
\ifthenelse{\boolean{rcsinfo}}{%
\RequirePackage{rcsinfo}
\pagestyle{rcsinfo}%
\let\old@mkttl=\maketitle%
\def\maketitle{\old@mkttl\thispagestyle{rcsinfofirst}}%
}{}
%
%
\ifthenelse{\boolean{svninfo}}{%
\RequirePackage{svninfo}
\RequirePackage{eso-pic}
\AddToShipoutPicture{%
\setlength{\unitlength}{1mm}%
\put(38,28){\tiny\svnInfoFile\quad\svnInfoRevision\quad\svnInfoDate%
\quad\svnInfoTime\quad\svnInfoOwner}%
}%
%\pagestyle{svninfo}%
%\let\old@mkttl=\maketitle%
%\def\maketitle{\old@mkttl\thispagestyle{svninfofirst}}%
}{}
%
%
\ifthenelse{\boolean{accepted}}{%
\let\old@mkttl=\maketitle%
\def\maketitle{\old@mkttl\thispagestyle{acceptedfirst}}%
}{}
%
%
\ifthenelse{\boolean{intended}}{%
% \pagestyle{intended}%
\let\old@mkttl=\maketitle%
\def\maketitle{\old@mkttl\thispagestyle{intendedfirst}}%
}{}
%
%
\ifthenelse{\boolean{submitted}}{%
\pagestyle{submitted}%
\let\old@mkttl=\maketitle%
\def\maketitle{\old@mkttl\thispagestyle{submittedfirst}}%
}{}
%
%
\ifthenelse{\boolean{llncs}}{%
\let\old@mkttl=\maketitle%
\def\maketitle{\old@mkttl\thispagestyle{llncs}}%
}{}
%
\ifthenelse{\boolean{proceedings}}{%
\let\old@mkttl=\maketitle%
\def\maketitle{\old@mkttl\thispagestyle{proceedings}}%
}{}
\setcounter{tocdepth}{2}
\let\clearheadinfo\relax
\hypersetup{%
draft = false,
bookmarksopen = true,
bookmarksnumbered= true,
pdfauthor = {\@author},
pdftitle = {\@title},
}
%\renewcommand{\chapter}[1]{#1}
%
\providecommand*{\toclevel@title}{0}
\providecommand*{\toclevel@author}{0}
\endinput