summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/rutitlepage/rutitlepage.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/rutitlepage/rutitlepage.dtx')
-rw-r--r--Master/texmf-dist/source/latex/rutitlepage/rutitlepage.dtx271
1 files changed, 163 insertions, 108 deletions
diff --git a/Master/texmf-dist/source/latex/rutitlepage/rutitlepage.dtx b/Master/texmf-dist/source/latex/rutitlepage/rutitlepage.dtx
index 0daa71812a8..fdd4bb949ce 100644
--- a/Master/texmf-dist/source/latex/rutitlepage/rutitlepage.dtx
+++ b/Master/texmf-dist/source/latex/rutitlepage/rutitlepage.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% rutitlepage - A Radboud University titlepage
-% Copyright 2017 Mart Lubbers (mart@martlubbers.net)
+% Copyright 2017-2018 Mart Lubbers (mart@martlubbers.net)
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -13,36 +13,37 @@
%
%<*driver>
% \fi
-\ProvidesFile{rutitlepage.dtx}[2017/05/30 v1.0 Initial package]
+\ProvidesFile{rutitlepage.dtx}[2018/10/16 v2.0 Initial package]
% \iffalse
\documentclass{ltxdoc}
\usepackage{rutitlepage}
-\usepackage{verbatim}
\usepackage{booktabs}
\usepackage{url}
\GetFileInfo{rutitlepage.dtx}
\urlstyle{tt}
-\title{A Radboud University titlepage}
+\def\thetitle{A Radboud University titlepage}
+\title{\thetitle}
\date{\filedate{}}
\author{Mart Lubbers}
\begin{document}
-\maketitle
\DocInput{\filename}
- \PrintChanges
+ \PrintChanges{}
\end{document}
%</driver>
% \fi
%
+% \changes{v2.0}{2018/10/16}{New layout following the guidelines}
% \changes{v1.0}{2017/05/30}{Initial package}
+% \maketitle
%
% \section{Introduction}
% \texttt{rutitlepage} is an unofficial \LaTeX{} package to generate titlepages
-% for the Radboud University. It uses official vector logos from the
-% university. The package depends on: \texttt{geometry}, \texttt{graphicx},
-% \texttt{ifpdf}, \texttt{keyval} and \texttt{iflang}. \texttt{babel-dutch}
-% (optional).
+% for Radboud University. It uses official vector logos by the university. The
+% package depends on \texttt{geometry}, \texttt{graphicx}, \texttt{ifpdf},
+% \texttt{keyval} and \texttt{iflang}. The logo changes when
+% \texttt{babel-dutch} is loaded; this package does not depend on it.
%
% \subsection{Contributors}
% \texttt{rutitlepage} is maintained by Mart Lubbers but work has been done by
@@ -53,108 +54,158 @@
% \item Chris Kamphuis\footnote{\url{https://github.com/chriskamphuis}}
% \end{itemize}
%
-% Previously this titlepage originally flew around on the university for at
-% least several years in many forms. I'm not sure who created it first but
-% credits to them!
-%
-% \subsection{Issues}
-% \begin{itemize}
-% \item No issues\ldots
-% \end{itemize}
+% Previously, this titlepage flew around on the university for at least several
+% years in many forms. I'm not sure who created it first but credits to them!
%
% \section{Usage}
% \DescribeMacro\maketitleru
-% This macro creates the actual titlepage and has the following options
-% available. Note that all options are optional.
+% This macro creates the actual titlepage.
+% It has several options that can be passed in a \texttt{keyval} manner (see the examples below).
+% All options are optional. The available options are:
%
-% \begin{tabular}{lp{.5\linewidth}l}
+% \medskip
+% \begin{tabular}{lp{.5\linewidth}lp{.15\linewidth}}
% \toprule
-% Option & Description & Default\\
+% Option & Description & Layouts\footnotemark & Default\\
% \midrule
-% \texttt{authorstext} & The left column header.
-% & \texttt{Author:}\\
-% \texttt{authors} & The left column.
-% & \texttt{\textbackslash{}author}\\
-% \texttt{course} & The top middle text.\\
-% \texttt{date} & The date.
-% & \texttt{\textbackslash{}date}\\
-% \texttt{institute} & The text under the logo.
-% & Radboud University Nijmegen\\
-% \texttt{pagenr} & The page number of the page, this might be required to
-% set to e.g.\ $1$ for some document classes.\\
-% \texttt{righttextheader} & The right column.\\
-% \texttt{righttext} & The right column header.\\
-% \texttt{righttextBheader} & The right bottom column header.\\
-% \texttt{righttextB} & The right bottom column.\\
-% \texttt{subtitle} & The text under the title.\\
-% \texttt{title} & The text between the lines.
-% & \texttt{\textbackslash{}title}\\
+% \texttt{authors}
+% & The name(s) of the primary author(s).
+% & \texttt{t}, \texttt{17} & \texttt{\textbackslash{}@author}\\
+% \texttt{authorstext}
+% & A text describing the author(s).
+% & \texttt{t} & \texttt{Author:}\\
+% \texttt{colour}
+% & Gives the logo colours. No value needed.
+% & \texttt{17}\\
+% \texttt{course}
+% & The name of the course.
+% & \texttt{t}\\
+% \texttt{date}
+% & The date.
+% & \texttt{t}, \texttt{17} & \texttt{\textbackslash{}@date}\\
+% \texttt{institution}
+% & The institution the document was written at.
+% & \texttt{t} & Radboud University Nijmegen\footnotemark\\
+% \texttt{layout}
+% & The layout: \texttt{traditional} or \texttt{seventeen}.
+% See the examples below.
+% & \texttt{t}, \texttt{17} & \texttt{seventeen}\\
+% \texttt{nextpagenr}
+% & The page number of the next page.
+% & \texttt{t}, \texttt{17} & \texttt{\textbackslash{}thepage+1}\\
+% \texttt{others}
+% & Groups of other important people, besides the author(s).
+% The syntax is: \texttt{\{Header\}\{Names\}}.
+% For more than one group, use: \texttt{\{\{\dots\}\{\dots\},\{\dots\}\{\dots\}\}}.
+% & \texttt{t}, \texttt{17}\\
+% \texttt{subtitle}
+% & The italic text under the title.
+% & \texttt{t}, \texttt{17}\\
+% \texttt{title}
+% & The main document title.
+% & \texttt{t}, \texttt{17} & \texttt{\textbackslash{}@title}\\
% \bottomrule
% \end{tabular}
+% \addtocounter{footnote}{-1}
+% \footnotetext{Describes in which layouts the key is applicable.
+% \texttt{t} stands for `traditional'; \texttt{17} for `seventeen'.
+% See the \texttt{layout} option and the examples below.}
+% \addtocounter{footnote}{1}
+% \footnotetext{When \texttt{babel-dutch} is loaded,
+% `Radboud Universiteit Nijmegen'.}
%
-% \section{Example}
-% The following fully equipped code generates the next page:
-%
-% \begin{tabular}{rl}
-% \texttt{\textbackslash{}maketitleru[}
-% & \texttt{authors=\{John Doe\},}\\
-% & \texttt{authorstext=\{Author:\},}\\
-% & \texttt{course=\{Master Thesis\},}\\
-% & \texttt{date=\{Tomorrow\},}\\
-% & \texttt{institute=\{Radboud University Nijmegen\},}\\
-% & \texttt{righttext=\{Jane Doe\},}\\
-% & \texttt{righttextB=\{Joanne Dune\},}\\
-% & \texttt{righttextBheader=\{Second reader:\},}\\
-% & \texttt{righttextheader=\{Supervisors:\},}\\
-% & \texttt{subtitle=\{A cool subtitle for your report\},}\\
-% & \texttt{title=\{Some interesting title\}]}\\
-% \end{tabular}
-%\maketitleru[
-% title={Some interesting title},
-% date={Tomorrow},
-% course={Master Thesis},
-% institute={Radboud University Nijmegen},
-% authorstext={Author:},
-% authors={John Doe},
-% righttextheader={Supervisors:},
-% righttext={Jane Doe},
-% righttextBheader={Second reader:},
-% righttextB={Joanne Dune},
-% subtitle={A cool subtitle for your report}]
+% \section{Examples}
+% The following code generates the two titlepages below:
+%
+% \medskip
+% \noindent{\tt\textbackslash{}maketitleru[\\
+% \null\qquad authors=\{John Doe\},\\
+% \null\qquad date=\{Tomorrow\},\\
+% \null\qquad others=\{\{Supervisor:\}\{Jane Doe\},\{Second reader:\}\{Joanne Dune\}\},\\
+% \null\qquad course=\{Master's Thesis\},\\
+% \null\qquad title=\{The `traditional' layout\},\\
+% \null\qquad subtitle=\{Simple elegance\}]}
+%
+% \medskip
+% \noindent{\tt\textbackslash{}maketitleru[\\
+% \null\qquad layout=seventeen,\\
+% \null\qquad authors=\{John Doe\},\\
+% \null\qquad date=\{Tomorrow\},\\
+% \null\qquad others=\{\{Supervisor:\}\{Jane Doe\},\{Second reader:\}\{Joanne Dune\}\},\\
+% \null\qquad title=\{The `seventeen' layout\},\\
+% \null\qquad subtitle=\{Based on the latest corporate identity guidelines\}]}\\
+%
+% \maketitleru[
+% authors={John Doe},
+% date={Tomorrow},
+% others={{Supervisor:}{Jane Doe},{Second reader:}{Joanne Dune}},
+% course={Master's Thesis},
+% title={The `traditional' layout},
+% subtitle={Simple elegance}]
+%
+% \maketitleru[
+% layout=seventeen,
+% authors={John Doe},
+% date={Tomorrow},
+% others={{Supervisor:}{Jane Doe},{Second reader:}{Joanne Dune}},
+% title={The `seventeen' layout},
+% subtitle={Based on the latest corporate identity guidelines}]
%\endinput
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{rutitlepage}[2017/05/30 Mart Lubbers]
+\ProvidesPackage{rutitlepage}[2017/09/07 Mart Lubbers]
\RequirePackage{geometry,graphicx,ifpdf,keyval,iflang}
-\def\@rutitletitle{\@title}
-\def\@rutitledate{\@date}
\def\@rutitleauthors{\@author}
-\def\@rutitlepagenr{\thepage}
-\define@key{maketitleru}{authorstext}{\def\@rutitleauthorstext{#1}}
+\def\@rutitleauthorstext{Aut\IfLanguageName{dutch}{eu}{ho}r:}
+\def\@rutitledate{\@date}
+\def\@rutitleinst{Radboud Universit\IfLanguageName{dutch}{eit}{y} Nijmegen}
+\def\@rutitletitle{\@title}
+\def\@rutitlelayout{seventeen}
+\newif\if@rutitlecolour\@rutitlecolourfalse
\define@key{maketitleru}{authors}{\def\@rutitleauthors{#1}}
+\define@key{maketitleru}{authorstext}{\def\@rutitleauthorstext{#1}}
+\define@key{maketitleru}{colour}[true]{\@rutitlecolourtrue}
\define@key{maketitleru}{course}{\def\@rutitlecourse{#1}}
\define@key{maketitleru}{date}{\def\@rutitledate{#1}}
-\define@key{maketitleru}{institute}{\def\@rutitleinst{#1}}
-\define@key{maketitleru}{pagenr}{\def\@rutitlepagenr{#1}}
-\define@key{maketitleru}{righttextBheader}{\def\@rutitlerighttextbheader{#1}}
-\define@key{maketitleru}{righttextB}{\def\@rutitlerighttextb{#1}}
-\define@key{maketitleru}{righttextheader}{\def\@rutitlerighttextheader{#1}}
-\define@key{maketitleru}{righttext}{\def\@rutitlerighttext{#1}}
+\define@key{maketitleru}{institution}{\def\@rutitleinst{#1}}
+\define@key{maketitleru}{layout}{\def\@rutitlelayout{#1}}
+\define@key{maketitleru}{nextpagenr}{\def\@rutitlenextpagenr{#1}}
+\define@key{maketitleru}{others}{\def\@rutitleothers{#1}}
\define@key{maketitleru}{subtitle}{\def\@rutitlesubtitle{#1}}
\define@key{maketitleru}{title}{\def\@rutitletitle{#1}}
-\setkeys{maketitleru}{%
- course={},
- institute={Radboud Universit\IfLanguageName{dutch}{eit}{y} Nijmegen},
- authorstext={\IfLanguageName{dutch}{Auteurs: }{Authors:}},
- righttextheader={},
- righttext={}
-}
-\newcommand{\maketitleru}[1][]{
- \setkeys{maketitleru}{#1}
+\newcommand*{\rutitlepage@printothers}[2]{\textit{#1}\\#2}
+\newcommand*{\rutitlepage@sepothers}{\\[\baselineskip]}
+\newcommand*{\rutitlepage@others}[2]{%
+ \rutitlepage@printothers{#1}{#2}%
+ \kernel@ifnextchar,{\rutitlepage@sepothers\rutitlepage@otherslist@}\relax}
+\newcommand*{\rutitlepage@otherslist}[1]{%
+ \expandafter\rutitlepage@others#1}
+\def\rutitlepage@otherslist@,#1{\rutitlepage@otherslist{{#1}}}
+\newcommand{\rutitle@layout@seventeen}[0]{
+ \newgeometry{left=25mm,top=25mm,right=15mm,bottom=10mm,hmarginratio=1:1}
+ \begin{titlepage}%
+ \null\vfill%
+ \parindent0pt
+ {\Huge\bfseries\@rutitletitle}%
+ \ifdefined\@rutitlesubtitle{\\[2\baselineskip]\large\it\@rutitlesubtitle}\fi\\[4\baselineskip]
+ {\Large\sc\@rutitleauthors}\\[\baselineskip]
+ {\large\@rutitledate}
+ \vfill
+
+ \ifdefined\@rutitleothers\rutitlepage@otherslist\@rutitleothers\fi
+ \vfill
+
+ \hfill
+ \ifpdf\includegraphics[width=80mm]{logo-\IfLanguageName{dutch}{nl-}{}\if@rutitlecolour cmyk\else bw\fi.pdf}\\
+ \else\includegraphics[width=80mm]{logo-\IfLanguageName{dutch}{nl-}{}\if@rutitlecolour cmyk\else bw\fi.eps}\\
+ \fi
+ \end{titlepage}
+ \restoregeometry%
+}
+\newcommand{\rutitle@layout@traditional}[0]{
\newgeometry{hmarginratio=1:1}
\begin{titlepage}
- \setcounter{page}{\@rutitlepagenr}
\begin{center}
- \textsc{\LARGE\@rutitlecourse}\\[1.5cm]
+ \ifdefined\@rutitlecourse\textsc{\LARGE\@rutitlecourse}\\[1.5cm]\fi
\ifpdf\includegraphics[height=150pt]{logo.pdf}\\
\else\includegraphics[height=150pt]{logo.eps}\\
\fi
@@ -168,7 +219,7 @@
\vspace{0.4cm}
\textit{\@rutitlesubtitle}\\[1cm]
\else
- \vspace{2cm}
+ \vspace{2cm}
\fi
\begin{minipage}[t]{0.45\textwidth}
\begin{flushleft}\large
@@ -178,26 +229,30 @@
\end{minipage}
\begin{minipage}[t]{0.45\textwidth}
\begin{flushright}\large
- \textit{\@rutitlerighttextheader}\\
- \@rutitlerighttext%
+ \ifdefined\@rutitleothers
+ \renewcommand{\rutitlepage@printothers}[2]{\textit{##1}\\##2}
+ \renewcommand{\rutitlepage@sepothers}[0]{
+
+ \vspace{8mm}}
+ \rutitlepage@otherslist\@rutitleothers
+ \fi
\end{flushright}
\end{minipage}
-
- \vspace{1cm}
- \ifdefined\@rutitlerighttextb
- \begin{minipage}[t]{0.45\textwidth}
- ~
- \end{minipage}
- \begin{minipage}[t]{0.45\textwidth}
- \begin{flushright}\large
- \textit{\@rutitlerighttextbheader}\\
- \@rutitlerighttextb%
- \end{flushright}
- \end{minipage}
- \fi
\vfill
{\large\@rutitledate}
\end{center}
\end{titlepage}
- \restoregeometry{}
+ \restoregeometry%
+}
+\newcommand{\maketitleru}[1][]{
+ \setkeys{maketitleru}{#1}
+ \ifcsname rutitle@layout@\@rutitlelayout\endcsname
+ \expandafter\csname rutitle@layout@\@rutitlelayout\endcsname
+ \else
+ \PackageError{rutitlepage}
+ {Unknown layout `\@rutitlelayout'.}
+ {The `layout' key of \maketitleru\space contained an unknown layout.\MessageBreak{}
+ Check the package documentation for the possible layouts.}
+ \fi
+ \ifdefined\@rutitlenextpagenr\setcounter{page}{\@rutitlenextpagenr}\fi%
}