%% %% This is file `schooldocs.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% schooldocs.dtx (with options: `package') %% %% This is a generated file. %% %% Copyright (C) 2020-2021 by Antoine Missier %% %% This file 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}[2005/12/01] \ProvidesPackage{schooldocs} [2021/09/18 v1.1 .dtx schooldocs file] \ProvidesPackage{schooldocs} \NeedsTeXFormat{LaTeX2e} \RequirePackage{geometry} \let\footruleskip\relax % because memoir class uses it \RequirePackage{fancyhdr} \RequirePackage{ifthen} \RequirePackage{lastpage} \RequirePackage{fancybox} \RequirePackage{xcolor} \RequirePackage{translations} \geometry{scale=0.75,vmarginratio=3:4,heightrounded} \DeclareTranslationFallback{schooldocs-pagename}{page} \DeclareTranslationFallback{schooldocs-correct}{Correct version} \DeclareTranslationFallback{schooldocs-name}{Name:} \DeclareTranslationFallback{schooldocs-forename}{Forename:} \DeclareTranslation{english}{schooldocs-pagename}{page} \DeclareTranslation{english}{schooldocs-correct}{Correct version} \DeclareTranslation{english}{schooldocs-name}{Name:} \DeclareTranslation{english}{schooldocs-forename}{Forename:} \DeclareTranslation{french}{schooldocs-pagename}{page} \DeclareTranslation{french}{schooldocs-correct}{Corrigé} \DeclareTranslation{french}{schooldocs-name}{Nom :} \DeclareTranslation{french}{schooldocs-forename}{Prénom :} \DeclareTranslation{german}{schooldocs-pagename}{Seite} \DeclareTranslation{german}{schooldocs-correct}{Musterlösung} \DeclareTranslation{german}{schooldocs-name}{Name:} \DeclareTranslation{german}{schooldocs-forename}{Vorname:} \DeclareTranslation{spanish}{schooldocs-pagename}{página} \DeclareTranslation{spanish}{schooldocs-correct}{Correccion} \DeclareTranslation{spanish}{schooldocs-name}{Apellido:} \DeclareTranslation{spanish}{schooldocs-forename}{Nombre:} \DeclareTranslation{italian}{schooldocs-pagename}{pagina} \DeclareTranslation{italian}{schooldocs-correct}{Corretto} \DeclareTranslation{italian}{schooldocs-name}{Nome:} \DeclareTranslation{italian}{schooldocs-forename}{Conome:} \DeclareTranslation{portuges}{schooldocs-pagename}{página} \DeclareTranslation{portuges}{schooldocs-correct}{Corrigiu} \DeclareTranslation{portuges}{schooldocs-name}{Nome:} \DeclareTranslation{portuges}{schooldocs-forename}{Primeiro nome:} \newcommand*\pagename{\GetTranslation{schooldocs-pagename}} \newcommand*\correctname{\GetTranslation{schooldocs-correct}} \newcommand*\identityname{\GetTranslation{schooldocs-name}} \newcommand*\identityforename{\GetTranslation{schooldocs-forename}} \renewcommand{\title}[2][]{\long\def\@title{#2} \ifthenelse{\equal{#1}{}}{\def\@headtitle{#2}}{\def\@headtitle{#1}} \@ifpackageloaded{hyperref}{\hypersetup{pdftitle={\@headtitle}}}{} } \title{} \author{} \newcommand\school[1]{\long\def\@school{#1} \@ifpackageloaded{hyperref}{ \hypersetup{pdfauthor={\@author\ (\@school)}}}{} } \school{} \newcommand{\institute}{\school} \let\subject\relax \newcommand{\subject}[2][]{\long\def\@subject{#2} \ifthenelse{\equal{#1}{}}{\def\@headsubject{#2}}{\def\@headsubject{#1}} \@ifpackageloaded{hyperref}{\hypersetup{pdfsubject={\@headsubject}}}{} } \def\@subject{} \def\@headsubject{} \definecolor{titlecolor}{named}{black} \newcommand{\titlestyle}{\LARGE\sffamily\bfseries} \newcommand{\subjectstyle}{\large} \newcommand{\datestyle}{\large} \newcommand{\smalltitledatestyle}{\large\slshape} \newcommand{\titleflush}{center} \newlength{\titletopskip} \setlength{\titletopskip}{-1.32cm} \newlength{\titlesep} \setlength{\titlesep}{2\medskipamount} \newlength{\titlebottomskip} \setlength{\titlebottomskip}{\medskipamount} \newlength{\seprulewidth} \setlength{\seprulewidth}{0.3pt} \newlength{\seprulelength} \setlength{\seprulelength}{2.5cm} \newcommand{\boxedshape}[1]{% \color{gray} % no effect \setlength{\fboxsep}{4.5pt} \setlength{\shadowsize}{3pt} \shadowbox{\quad\textcolor{titlecolor}{\rule{0pt}{2ex}#1}\quad} } \definecolor{headingcolor}{named}{black} \newcommand{\headstyle}{\small\color{headingcolor}} \newcommand{\footstyle}{\small\color{headingcolor}} \newcommand{\headtitlestyle}{\scshape} \newcommand{\headsubjectstyle}{\scshape} \newcommand{\schoolstyle}{\scshape} \newcommand{\headdatestyle}{\textnormal} \newcommand{\authorstyle}{\textnormal} \newcommand{\pagenamestyle}{\textnormal} \setlength{\headheight}{\baselineskip} \renewcommand{\headrule}{\ifthenelse{\thepage=1}% {\vspace{-2ex}\rule{\headwidth}{0pt}}% {\vspace{-2ex}\rule{\headwidth}{\headrulewidth}} } \renewcommand{\maketitle}[1][\seprulelength]{ \mbox{}\par\vspace{\titletopskip} \begin{\titleflush} {\color{titlecolor} {\titlestyle{\@title}} \ifx\@subject\@empty\else \par\vspace{\titlesep}\subjectstyle\@subject \fi \ifthenelse{\equal{\@date}{}}{}{% \par\vspace{0.5\titlesep} \datestyle\@date} \par\vspace{0.5\titlesep} } \ifthenelse{\lengthtest{#1 > 0cm}}{\rule{#1}{\seprulewidth}}{} \end{\titleflush} \vspace{\titlebottomskip} } \newcommand{\makesmalltitle}{ \mbox{}\par\vspace{1.5\titletopskip} \begin{center} {\color{titlecolor} {\titlestyle{\@title}} \hfill \subjectstyle\@subject \ifthenelse{\equal{\@date}{}}{}{% \enskip --\enskip \smalltitledatestyle\@date} } \rule{\linewidth}{\seprulewidth} \end{center} \vspace{\titlebottomskip} } \newcommand\correct{% \let\@originalheadtitle\@headtitle \def\@headtitle{\@originalheadtitle ~--~\correctname} \@ifpackageloaded{hyperref}{% \AtBeginDocument{\hypersetup{pdftitle={\@headtitle}}}}{} \let\@originaltitle\@title \def\@title{\@originaltitle ~--~\correctname} } \newcommand{\seprule}[1][\seprulelength]{\begin{center} \raisebox{0.25\baselineskip}{\rule{#1}{\seprulewidth}}\end{center}} \fancypagestyle{classic}{% \renewcommand{\headrulewidth}{0pt} \addtolength{\headheight}{\baselineskip} \lhead{\headstyle\ifthenelse{\thepage=1}{\schoolstyle\@school\mbox{}\\ \headsubjectstyle\@subject}{\headtitlestyle\@headtitle} } \rhead{\headstyle\ifthenelse{\thepage=1}{\authorstyle\@author\mbox{}\\ \headdatestyle\@date}{\headsubjectstyle\@headsubject}} \cfoot{\footstyle \thepage /\pageref{LastPage}} \setlength{\titletopskip}{-0.67cm} \renewcommand{\maketitle}[1][\seprulelength]{% \mbox{}\par\vspace{\titletopskip} \begin{\titleflush} {\color{titlecolor}\titlestyle{\@title}} \par\vspace{0.5\titlesep} \ifthenelse{\lengthtest{##1>0cm}}{\rule{##1}{\seprulewidth}}{} \end{\titleflush} \vspace{\titlebottomskip} } } \fancypagestyle{elegant}{% \renewcommand{\headrulewidth}{0pt} \lhead{\headstyle \ifthenelse{\thepage=1}{}{\headtitlestyle\@headtitle}} \rhead{\headstyle \ifthenelse{\thepage=1}{}{% \pagenamestyle\pagename~\thepage /\pageref{LastPage}}} \lfoot{\ifthenelse{\thepage=1}{\footstyle\schoolstyle\@school}{}} \cfoot{} \rfoot{\ifthenelse{\thepage=1}{\footstyle\authorstyle\@author}{}} } \fancypagestyle{modern}{% \lhead{\headstyle \ifthenelse{\thepage=1}{}{\headtitlestyle\@headtitle}} \rhead{\headstyle \ifthenelse{\thepage=1}{}{\headsubjectstyle\@headsubject}} \lfoot{\ifthenelse{\thepage=1}{\footstyle\schoolstyle\@school}{}} \cfoot{\ifthenelse{\thepage=1}{}{ \footstyle\thepage /\pageref{LastPage}}} \rfoot{\footstyle\ifthenelse{\thepage=1}{% \authorstyle\@author \ifx\@author\empty\else\\ \fi \headdatestyle\@date\ignorespaces}{} } \renewcommand{\maketitle}[1][\seprulelength]{% \mbox{}\par\vspace{\titletopskip} \begin{\titleflush} {\color{titlecolor} {\titlestyle{\@title}} \ifx\@subject\@empty\else \par\vspace{\titlesep}\subjectstyle\@subject \fi \par\vspace{0.5\titlesep} } \ifthenelse{\lengthtest{##1>0cm}}{\rule{##1}{\seprulewidth}}{} \end{\titleflush} \vspace{\titlebottomskip} } } \fancypagestyle{soft}{% \lhead{\headstyle \ifthenelse{\thepage=1}{}{\headtitlestyle\@headtitle}} \rhead{\headstyle \ifthenelse{\thepage=1}{}{% \pagenamestyle\pagename~\thepage /\pageref{LastPage}}} \lfoot{\footstyle{\schoolstyle\@school} \ifthenelse{\thepage=1}{\ifx\@author\empty\else\\ \fi \authorstyle\@author}{} } \cfoot{} \rfoot{\footstyle{\headsubjectstyle\@headsubject} \ifthenelse{\thepage=1}{\ifx\@date\empty\else\\ \fi \headdatestyle\@date\ignorespaces}{} } \setlength{\titletopskip}{-0.67cm} \renewcommand{\maketitle}[1][\seprulelength]{% \mbox{}\par\vspace{\titletopskip} \begin{\titleflush} {\color{titlecolor}\titlestyle{\@title}} \par\vspace{0.5\titlesep} \ifthenelse{\lengthtest{##1>0cm}}{\rule{##1}{\seprulewidth}}{} \end{\titleflush} \vspace{\titlebottomskip} } } \fancypagestyle{identity}{% \lhead{\headstyle\headtitlestyle \identityname} \chead{\headstyle\headtitlestyle \identityforename} \rhead{} } \fancypagestyle{exam}{% \let\subtitle\relax % because KOMA-Script uses it \newcommand\subtitle[1]{\long\def\@subtitle{##1}} \subtitle{} \renewcommand{\headtitlestyle}{\MakeUppercase} \lhead{\headstyle \ifthenelse{\thepage=1}{}{\headtitlestyle{\@headtitle}}} \rhead{\headstyle \ifthenelse{\thepage=1}{}{\headsubjectstyle\@headsubject}} \lfoot{\footstyle \authorstyle\@author \ifx\@author\empty\else\\ \fi \schoolstyle\@school } \cfoot{} \rfoot{\footstyle \pagenamestyle\pagename~\thepage/\pageref{LastPage}} \setlength{\titletopskip}{0.67cm} \setlength{\titlesep}{2\bigskipamount} \renewcommand{\titlestyle}{\LARGE\MakeUppercase} \renewcommand{\subjectstyle}{\Large\bfseries} \newcommand{\subtitlestyle}{\large\slshape} \newcommand*{\titlecorrectstyle}{\color{red}\large\scshape} \renewcommand\correct{% \let\@originalheadtitle\@headtitle \def\@headtitle{\@originalheadtitle ~--~\correctname} \@ifpackageloaded{hyperref}{% \AtBeginDocument{\hypersetup{pdftitle={\@headtitle}}}}{} \renewcommand{\subtitlestyle}{\titlecorrectstyle} \subtitle{\correctname} } \renewcommand{\maketitle}[1][\seprulelength]{% \mbox{}\par\vspace{\titletopskip} \begin{center} {\color{titlecolor} {\titlestyle{\@title}} \par\vspace{\titlesep}{\subjectstyle \@subject} \par\vspace{\titlesep} \ifthenelse{\equal{\@date}{}}{}{% \datestyle\@date\par\vspace{0.5\titlesep}} \ifthenelse{\equal{\@subtitle}{}}{}{% \subtitlestyle\@subtitle\par\vspace{0.5\titlesep} } } \ifthenelse{\lengthtest{##1>0cm}}{\rule{##1}{\seprulewidth}}{} \end{center} \vspace{\titlebottomskip} } } \fancypagestyle{collection}{% \renewcommand{\headtitlestyle}{\MakeUppercase} \lhead{\headstyle\headtitlestyle\@headtitle} \AtBeginDocument{\renewcommand{\sectionmark}[1]{\markboth{##1}{}}} \rhead{\headstyle\headsubjectstyle\leftmark} %\@section \lfoot{\footstyle\schoolstyle \@school} \cfoot{} \rfoot{\footstyle\thepage} \setlength{\titletopskip}{0.67cm} \setlength{\titlesep}{2\bigskipamount} \renewcommand{\titlestyle}{\LARGE\MakeUppercase} \renewcommand{\subjectstyle}{\Large\bfseries} \renewcommand{\authorstyle}{\Large} \renewcommand{\datestyle}{\Large} \renewcommand{\maketitle}[1][\seprulelength]{% \thispagestyle{empty} \mbox{}\par\vspace{\titletopskip} \begin{center} {\color{titlecolor} {\titlestyle{\@title}} \par\vspace{\titlesep} {\subjectstyle{\@subject}} \par\vspace{\titlesep} \ifx\@author\empty \else \authorstyle \begin{tabular}[t]{c}\@author\end{tabular} \ifx\@school\empty\else\par\vspace{1ex} \@school\fi \par\vspace{0.5\titlesep} \fi \ifthenelse{\equal{\@date}{}}{}{% \datestyle\@date \par\vspace{0.5\titlesep}} } \ifthenelse{\lengthtest{##1>0cm}}{\rule{##1}{\seprulewidth}}{} \end{center} \vspace{\titlebottomskip} } } \endinput %% %% End of file `schooldocs.sty'.