summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/schooldocs
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-07-14 21:04:17 +0000
committerKarl Berry <karl@freefriends.org>2020-07-14 21:04:17 +0000
commit3bbc7ded38062ef61515ee8e969677964d3d7563 (patch)
tree53ce65ced5353527ee72bb40dad9f4a29b9cac99 /Master/texmf-dist/tex/latex/schooldocs
parent6b943c4e55386a1fd4f9d3905942e52ff997d7e3 (diff)
schooldocs (14jul20)
git-svn-id: svn://tug.org/texlive/trunk@55838 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/schooldocs')
-rw-r--r--Master/texmf-dist/tex/latex/schooldocs/schooldocs.sty360
1 files changed, 360 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/schooldocs/schooldocs.sty b/Master/texmf-dist/tex/latex/schooldocs/schooldocs.sty
new file mode 100644
index 00000000000..3b1e3158819
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/schooldocs/schooldocs.sty
@@ -0,0 +1,360 @@
+%%
+%% 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 by Antoine Missier <antoine.missier@ac-toulouse.fr>
+%%
+%% 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}
+ [2020/07/13 v1.0 .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}
+
+\geometry{scale=0.75,vmarginratio=3:4,heightrounded}
+
+\providecommand{\pagename}{page}
+\def\correctname{Correct version}
+\def\identityname{Name:}
+\def\identityforename{Forename:}
+
+\newcommand\schooldocstranslate{%
+ \@ifpackageloaded{babel}{%
+ \addto\captionsfrench{%
+ \def\correctname{Corrig\'e}
+ \def\identityname{Nom :}
+ \def\identityforename{Pr\'enom :}
+ }
+ \addto\captionsgerman{%
+ \def\pagename{Seite}
+ \def\correctname{Musterl\"osung}
+ \def\identityname{Name :}
+ \def\identityforename{Vorname :}
+ }
+ \addto\captionsspanish{%
+ \def\pagename{p\'agina}
+ \def\correctname{Correccion}
+ \def\identityname{Apellido:}
+ \def\identityforename{Nombre:}
+ }
+ \addto\captionsitalian{%
+ \def\pagename{Seite}
+ \def\correctname{Corretto}
+ \def\identityname{Nome :}
+ \def\identityforename{Conome :}
+ }
+ \addto\captionsportuges{%
+ \def\pagename{p\'agina}
+ \def\correctname{Corrigiu}
+ \def\identityname{Nome :}
+ \def\identityforename{Primeiro nome :}
+ }
+ }{}
+ }
+
+\AtBeginDocument{\schooldocstranslate} % if loaded before babel
+\schooldocstranslate % necessary when loaded after babel
+
+\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'.