%%
%% This is file `exfserm.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% exframe.dtx  (with options: `samplemultimain')
%% 
%% Copyright (C) 2011-2020 Niklas Beisert
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%% 
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\ProvidesFile{exfserm.tex}[2020/02/24 v3.4 multipart sample for exframe]
\input{childdoc.def}
\childdocmain{exfserm}

\ifchilddoc
\providecommand{\printsol}{y}
\else
\providecommand{\printsol}{n}
\fi
\providecommand{\draftver}{y}
\newif\ifdraft\if\draftver y\drafttrue\else\draftfalse\fi

\documentclass[12pt]{article}

\RequirePackage{graphicx}

\PassOptionsToPackage{bookmarks=\ifchilddoc false\else true\fi}{hyperref}
\PassOptionsToPackage{bookmarksopen=true}{hyperref}
\RequirePackage{hyperref}

\ifdraft
\PassOptionsToPackage{draft}{metastr}
\fi
\IfFileExists{hyperxmp.sty}{}{\PassOptionsToPackage{hyperxmp=false}{metastr}}
\RequirePackage[course]{metastr}
\metaset[aux]{writepdf}{}
\metaset[rights]{writepdf}{}

\RequirePackage[extdata,extstyle]{exframe}

\if\printsol n
\exercisesetup{solutions=false}
\exercisesetup{twoside=true}
\else
\exercisesetup{solutions=true}
\exercisesetup{twoside=false}
\ifdraft
\exercisesetup{solutionbuf=false}
\fi
\fi

%%\if\printsol n\else\showprobleminfo{author,source,recycle}\fi

\exercisesetup{autolabelproblem}
\exercisestyle{contents,solutionsep}
\ifchilddocmanual\else
\exercisestyle{pagebysheet,problembysheet,equationbysheet,sheetequation}
\fi
\exercisestyle{solutionbelow={problem}}
\ifchilddoc\ifchilddocmanual\else\exercisesetup{pdfdata=sheet}\fi\fi

\metasetlang{en-GB}

\metasetterm[en]{sheet}{sheet}
\metasetterm[en]{sheets}{sample sheets}
\metasetterm[en]{solution}{Solution}
\metasetterm[en]{solutions}{solutions}

\RequirePackage[a4paper,margin=2.5cm]{geometry}
\pagestyle{plain}
\setlength\parindent{0pt}
\setlength\parskip{\smallskipamount}
\setlength\overfullrule{5pt}
\newcommand{\turnover}{\ifsolutions\else\vfill%
  \hfill{\mathversion{bold}$\longrightarrow$}\newpage\fi}

\exercisestyle{plainheader}
\exerciseconfig{composeheaderbelowright}
 {\sheetdataempty{editdate}{}{version: \getsheetdata{editdate}}}
\ifchilddoc\ifsolutions\else
 \exerciseconfig{composeheaderbelowright}
  {\sheetdataempty{due}{}{due: \getsheetdata{due}}}
\fi\fi

\def\lorem{Lorem ipsum dolor sit amet, consectetur adipisici elit,
  sed eiusmod tempor incidunt ut labore et dolore magna aliqua.
  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
  nisi ut aliquid ex ea commodi consequat.
  Quis aute iure reprehenderit in voluptate velit esse
  cillum dolore eu fugiat nulla pariatur.
  Excepteur sint obcaecat cupiditat non proident,
  sunt in culpa qui officia deserunt mollit anim id est laborum.\par}

\IfFileExists{mpostinl.sty}{\RequirePackage{mpostinl}}{}
\ifdefined\mpostsetup

\mpostsetup{checksum}
\ifchilddoc\ifdraft\mpostsetup{now,nowall}\fi\fi
\ifchilddocmanual\else\mpostsetup{numberwithin={sheet}}\fi

\mpostsetup{globaldef=true}
\begin{mposttex}
\def\figure{figure}
\end{mposttex}
\begin{mpostdef}
path paths[];
newinternal numeric xu;
xu:=1cm;
def pensize(expr s)=withpen pencircle scaled s enddef;
def fillshape(expr p,c)=
  fill p withcolor c;
  draw p
enddef;
\end{mpostdef}
\mpostsetup{globaldef=false}

\fi

\metaset{course}{exframe package samples}
\metaset{instructor}{N.\ Beisert}
\metaset{author}{Niklas Beisert, \metapick[#1]{institution}}
\metaset{institution}{exframe academy}
\metaset{period}{spring 2019}
\metaset{copyrightdate}{2019--2020}

\metaset{material}{\metatranslate[#1]{sheets}}
\exerciseconfig{composetitlesheet}[2]{\exerciseifempty{#2}%
  {\ifsolutions\metaterm{solutions}\else%
   \metaterm{sheet}\fi\ #1}%
  {\ifsolutions\metaterm{solutions} \fi #2}}

\ifchilddoc
\metaset{partof}{\metatranslate[#1]{sheets} \metapick[#1]{course}}
\fi

\metaset[sep]{draft}{ -- }
\metaset[sep]{subtitle}{, }
\metaset{subtitle}{\ifsolutions\metatranslate[#1]{solutions} \fi%
  \metaif[use]{sheettitle}{\metapick[#1]{sheettitle}}{\metapick[#1]{material}}}
\metaset{subject}{Lecture Series,
  \metapick[#1]{institution}, \metapick[#1]{period}}

\metaset{copyrightowner}{\metapick[#1]{author}}
\ifchilddoc
\metacopyright{doc}
\else
\metacopyright{doc-parts}
\fi
\metaset{licenseprovider}{of \metapick[#1]{institution}}
\metalicense{consent}

\ifsolutions\else\ifdraft\else
\metalicensecc{by-sa}
\fi\fi

\begin{document}

\def\tmp{}
\ifchilddocmanual
\def\tmp{\end{document}}
\input{\childdocname}
\fi\tmp

\setcounter{section}{-1}
\begingroup\ifchilddoc\else
\renewcommand{\thepage}{\arabic{page}}

\pdfbookmark[1]{\metaterm{title}}{title}
\thispagestyle{empty}
\vspace*{\fill}
\begin{center}
\metapick[course]{titletext}
\end{center}
\vspace*{\fill}\vspace*{\fill}
\newpage

\phantomsection\pdfbookmark[1]{\metaterm{copyright}}{copyright}
\thispagestyle{empty}
\vspace*{\fill}\vspace*{\fill}
\begin{center}\begin{minipage}{11cm}\raggedright
\metapick[print]{rightstext}
\end{minipage}\end{center}
\vspace*{\fill}\vspace*{\fill}\vspace*{\fill}
\newpage

\makeatletter\renewcommand\@pnumwidth{2.4em}\makeatother
\setcounter{tocdepth}{2}
\phantomsection\pdfbookmark[1]{\metaterm{contents}}{contents}
{\parskip0pt\tableofcontents}
\exercisecleardoublepage\setcounter{page}{1}

\fi\endgroup

\include{exfser01}
\include{exfser02}
\include{exfser03}

\def\jobnameunused{exfseraa}
\ifx\childdocname\jobnameunused\include{\jobnameunused}\fi

\end{document}
\endinput
%%
%% End of file `exfserm.tex'.
