%% Copyright (c) 2019-2022 University of Exeter
%%               2018-2022 University of Paris-Saclay
%%               2018-2019 The University of Sheffield
%%
%% 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 option) any later version.
%%   OR
%%   The 2-clause BSD-style license.
%%
%%   SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause

%% Warning: Do Not Edit!
%% =====================
%% This is the root file for the Isabelle/DOF using the eptcs class. 
%% Note that eptcs cannot be distributed as part of Isabelle/DOF; you need
%% to download eptcs.cls from http://eptcs.web.cse.unsw.edu.au/style.shtml
%% and add it manually to the praemble.tex and the ROOT file. 
%%  
%% All customization and/or additional packages should be added to the file 
%% preamble.tex. 

\documentclass[submission,copyright,creativecommons]{eptcs}

\usepackage{DOF-core}
\bibliographystyle{eptcs}% the mandatory bibstyle

\usepackage[numbers, sort&compress, sectionbib]{natbib}
\newcommand{\subtitle}[1]{%
  \PackageError{DOF-eptcs-UNSUPPORTED}
               {The LaTeX class eptcs does not support subtitles.}
               {}\stop%
}%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% provide an alternative definition of 
% begin: scholarly_paper.author
\newcommand{\dofeptcsinstitute}[1]{\mbox{}\\\protect\scriptsize%
  \protect\begin{tabular}[t]{@{\protect\footnotesize}c@{}}%
    #1%
  \protect\end{tabular}%
}

\makeatletter
\newisadof{text.scholarly_paper.author}%
[label=,type=%
,scholarly_paper.author.email=%
,scholarly_paper.author.affiliation=%
,scholarly_paper.author.orcid=%
,scholarly_paper.author.http_site=%
][1]{%
  \protected@write\@auxout{}{%
  \string\protect\string\addauthor{%
   #1 %
    \string\mbox{}\string\dofeptcsinstitute{\commandkey{scholarly_paper.author.affiliation}} %
    \string\mbox{}\string\email{\commandkey{scholarly_paper.author.email}} %
  }
  }
}
\makeatother
% end: scholarly_paper.author
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{document}
\maketitle
\IfFileExists{dof_session.tex}{\input{dof_session}}{\input{session}}
% optional bibliography
\IfFileExists{root.bib}{%
    \bibliography{root}
}{}
\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
