Debian Codegraph @

texmf-dist/source/latex/rutitlepage/rutitlepage.dtx

raw
1 % \iffalse meta-comment
2 %
3 % rutitlepage - A Radboud University titlepage
4 % Copyright 2017-2022 Mart Lubbers ([email protected])
5 %
6 % This work may be distributed and/or modified under the
7 % conditions of the LaTeX Project Public License, either version 1.3
8 % of this license or (at your option) any later version.
9 % The latest version of this license is in
10 % http://www.latex-project.org/lppl.txt
11 % and version 1.3 or later is part of all distributions of LaTeX
12 % version 2005/12/01 or later.
13 %
14 %<*driver>
15 % \fi
16 \ProvidesFile{rutitlepage.dtx}[2022/02/21 v3.0 Radboud University Titlepage]
17 % \iffalse
18 \documentclass{ltxdoc}
19 \usepackage{rutitlepage}
20 \usepackage{booktabs}
21 \usepackage{url}
22 \GetFileInfo{rutitlepage.dtx}
23
24 \urlstyle{tt}
25 \def\thetitle{A Radboud University titlepage}
26 \title{\thetitle}
27 \date{\filedate{}}
28 \author{Mart Lubbers}
29
30 \begin{document}
31 \DocInput{\filename}
32 \PrintChanges{}
33 \end{document}
34 %</driver>
35 % \fi
36 %
37 % \changes{v3}{2022/02/21}{Add twentytwo layout}
38 % \changes{v2.3}{2019/05/08}{Minor patches and typos}
39 % \changes{v2.2}{2019/05/08}{Fixed packaging, copyright year}
40 % \changes{v2.1}{2018/11/10}{Fix bug for default layout in manual, rename images}
41 % \changes{v2.0}{2018/10/16}{New layout following the guidelines}
42 % \changes{v1.0}{2017/05/30}{Initial package}
43 % \maketitle
44 %
45 % \section{Introduction}
46 % \texttt{rutitlepage} is an unofficial \LaTeX{} package to generate titlepages
47 % for Radboud University. It uses official vector logos by the university. The
48 % package depends on \texttt{geometry}, \texttt{graphicx}, \texttt{ifpdf},
49 % \texttt{keyval} and \texttt{iflang}. The logo changes when
50 % \texttt{babel-dutch} is loaded; this package does not depend on it.
51 %
52 % \subsection{Contributors}
53 % \texttt{rutitlepage} is currently maintained by Mart Lubbers but work has also been done by
54 % (in order of date of contribution): Camil Staps\footnote{\url{https://github.com/camilstaps}}, Daan Sprenkels\footnote{\url{https://github.com/dsprenkels}}, and Chris Kamphuis\footnote{\url{https://github.com/chriskamphuis}}.
55 %
56 % Previously, this titlepage flew around on the university for at least several
57 % years in many forms. I'm not sure who created it first but credits to them!
58 %
59 % \section{Usage}
60 % \DescribeMacro\maketitleru
61 % This macro creates the actual titlepage.
62 % It has several options that can be passed in a \texttt{keyval} manner (see the examples below).
63 % All options are optional. The available options are:
64 %
65 % \medskip
66 % \begin{tabular}{lp{.5\linewidth}lp{.15\linewidth}}
67 % \toprule
68 % Option & Description & Layouts\footnotemark & Default\\
69 % \midrule
70 % \texttt{authors}
71 % & The name(s) of the primary author(s).
72 % & \texttt{t}, \texttt{17}, \texttt{22} & \texttt{\textbackslash{}@author}\\
73 % \texttt{authorstext}
74 % & A text describing the author(s).
75 % & \texttt{t} & \texttt{Author:}\\
76 % \texttt{colour}
77 % & Gives the logo colours. No value needed.
78 % & \texttt{17}, \texttt{22}\\
79 % \texttt{course}
80 % & The name of the course.
81 % & \texttt{t}, \texttt{22}\\
82 % \texttt{date}
83 % & The date.
84 % & \texttt{t}, \texttt{17}, \texttt{22} & \texttt{\textbackslash{}@date}\\
85 % \texttt{institution}
86 % & The institution the document was written at.
87 % & \texttt{t} & Radboud University Nijmegen\footnotemark\\
88 % \texttt{layout}
89 % & The layout: \texttt{traditional} or \texttt{seventeen}.
90 % See the examples below.
91 % & \texttt{t}, \texttt{17}, \texttt{22} & \texttt{seventeen}\\
92 % \texttt{nextpagenr}
93 % & The page number of the next page.
94 % & \texttt{t}, \texttt{17}, \texttt{22} & \texttt{\textbackslash{}thepage+1}\\
95 % \texttt{others}
96 % & Groups of other important people, besides the author(s).
97 % The syntax is: \texttt{\{Header\}\{Names\}}.
98 % For more than one group, use: \texttt{\{\{\dots\}\{\dots\},\{\dots\}\{\dots\}\}}.
99 % & \texttt{t}, \texttt{17}, \texttt{22}\\
100 % \texttt{subtitle}
101 % & The italic text under the title.
102 % & \texttt{t}, \texttt{17}, \texttt{22}\\
103 % \texttt{title}
104 % & The main document title.
105 % & \texttt{t}, \texttt{17}, \texttt{22} & \texttt{\textbackslash{}@title}\\
106 % \bottomrule
107 % \end{tabular}
108 % \addtocounter{footnote}{-1}
109 % \footnotetext{Describes in which layouts the key is applicable.
110 % \texttt{t} stands for `traditional'; \texttt{17} for `seventeen'; \texttt{22} for `twentytwo`.
111 % See the \texttt{layout} option and the examples below.}
112 % \addtocounter{footnote}{1}
113 %
114 % \section{Examples}
115 % The following code generates the three titlepages below:
116 %
117 % \medskip
118 % \noindent{\tt\textbackslash{}maketitleru[\\
119 % \null\qquad layout=traditional,\\
120 % \null\qquad authors=\{John Doe\},\\
121 % \null\qquad date=\{Tomorrow\},\\
122 % \null\qquad others=\{\{Supervisor:\}\{Jane Doe\},\{Second reader:\}\{Joanne Dune\}\},\\
123 % \null\qquad course=\{Master's Thesis\},\\
124 % \null\qquad title=\{The `traditional' layout\},\\
125 % \null\qquad subtitle=\{Simple elegance\}]}
126 %
127 % \medskip
128 % \noindent{\tt\textbackslash{}maketitleru[\\
129 % \null\qquad layout=seventeen,\\
130 % \null\qquad authors=\{John Doe\},\\
131 % \null\qquad date=\{Tomorrow\},\\
132 % \null\qquad others=\{\{Supervisor:\}\{Jane Doe\},\{Second reader:\}\{Joanne Dune\}\},\\
133 % \null\qquad title=\{The `seventeen' layout\},\\
134 % \null\qquad subtitle=\{Based on the latest corporate identity guidelines\}]}
135 %
136 % \medskip
137 % \noindent{\tt\textbackslash{}maketitleru[\\
138 % \null\qquad authors=\{John Doe\},\\
139 % \null\qquad date=\{Tomorrow\},\\
140 % \null\qquad others=\{\{Supervisor:\}\{Jane Doe\},\{Second reader:\}\{Joanne Dune\}\},\\
141 % \null\qquad course=\{Master's Thesis\},\\
142 % \null\qquad title=\{The `twentytwo' layout\},\\
143 % \null\qquad subtitle=\{Slightly modified `seventeen` including course information\}]}
144 %
145 % \maketitleru[
146 % authors={John Doe},
147 % date={Tomorrow},
148 % others={{Supervisor:}{Jane Doe},{Second reader:}{Joanne Dune}},
149 % course={Master's Thesis},
150 % layout=traditional,
151 % title={The `traditional' layout},
152 % subtitle={Simple elegance}]
153 % \maketitleru[
154 % layout=seventeen,
155 % authors={John Doe},
156 % date={Tomorrow},
157 % others={{Supervisor:}{Jane Doe},{Second reader:}{Joanne Dune}},
158 % title={The `seventeen' layout},
159 % subtitle={Based on the latest corporate identity guidelines}]
160 % \maketitleru[
161 % layout=twentytwo,
162 % authors={John Doe},
163 % date={Tomorrow},
164 % others={{Supervisor:}{Jane Doe},{Second reader:}{Joanne Dune}},
165 % title={The `twentytwo' layout},
166 % subtitle={Slightly modified `seventeen` including course information}]
167 %\endinput
168 \NeedsTeXFormat{LaTeX2e}
169 \ProvidesPackage{rutitlepage}[2022/02/21 Mart Lubbers]
170 \RequirePackage{geometry,graphicx,ifpdf,keyval,iflang}
171 \def\@rutitleauthors{\@author}
172 \def\@rutitleauthorstext{Aut\IfLanguageName{dutch}{eu}{ho}r:}
173 \def\@rutitledate{\@date}
174 \def\@rutitleinst{Radboud Universit\IfLanguageName{dutch}{eit}{y} Nijmegen}
175 \def\@rutitletitle{\@title}
176 \def\@rutitlelayout{twentytwo}
177 \newif\if@rutitlecolour\@rutitlecolourfalse
178 \define@key{maketitleru}{authors}{\def\@rutitleauthors{#1}}
179 \define@key{maketitleru}{authorstext}{\def\@rutitleauthorstext{#1}}
180 \define@key{maketitleru}{colour}[true]{\@rutitlecolourtrue}
181 \define@key{maketitleru}{course}{\def\@rutitlecourse{#1}}
182 \define@key{maketitleru}{date}{\def\@rutitledate{#1}}
183 \define@key{maketitleru}{institution}{\def\@rutitleinst{#1}}
184 \define@key{maketitleru}{layout}{\def\@rutitlelayout{#1}}
185 \define@key{maketitleru}{nextpagenr}{\def\@rutitlenextpagenr{#1}}
186 \define@key{maketitleru}{others}{\def\@rutitleothers{#1}}
187 \define@key{maketitleru}{subtitle}{\def\@rutitlesubtitle{#1}}
188 \define@key{maketitleru}{title}{\def\@rutitletitle{#1}}
189 \newcommand*{\rutitlepage@printothers}[2]{\textit{#1}\\#2}
190 \newcommand*{\rutitlepage@sepothers}{\\[\baselineskip]}
191 \newcommand*{\rutitlepage@others}[2]{%
192 \rutitlepage@printothers{#1}{#2}%
193 \kernel@ifnextchar,{\rutitlepage@sepothers\rutitlepage@otherslist@}\relax}
194 \newcommand*{\rutitlepage@otherslist}[1]{%
195 \expandafter\rutitlepage@others#1}
196 \def\rutitlepage@otherslist@,#1{\rutitlepage@otherslist{{#1}}}
197 \newcommand{\rutitle@layout@twentytwo}[0]{
198 \newgeometry{left=25mm,top=25mm,right=15mm,bottom=10mm,hmarginratio=1:1}
199 \begin{titlepage}%
200 \null\vfill%
201 \parindent0pt
202 \ifdefined\@rutitlecourse\textsc{\LARGE\@rutitlecourse}\\[1.5cm]\fi
203 {\Huge\bfseries\@rutitletitle}%
204 \ifdefined\@rutitlesubtitle{\\[2\baselineskip]\large\itshape\@rutitlesubtitle\/}\fi\\[4\baselineskip]
205 {\Large\scshape\@rutitleauthors}\\[\baselineskip]
206 {\large\@rutitledate}
207 \vfill
208
209 \ifdefined\@rutitleothers\rutitlepage@otherslist\@rutitleothers\fi
210 \vfill
211
212 \hfill
213 \ifpdf\includegraphics[width=80mm]{rutitlepage-logo-\IfLanguageName{dutch}{nl-}{}\if@rutitlecolour cmyk\else bw\fi.pdf}\\
214 \else\includegraphics[width=80mm]{rutitlepage-logo-\IfLanguageName{dutch}{nl-}{}\if@rutitlecolour cmyk\else bw\fi.eps}\\
215 \fi
216 \end{titlepage}
217 \restoregeometry%
218 }
219 \newcommand{\rutitle@layout@seventeen}[0]{
220 \newgeometry{left=25mm,top=25mm,right=15mm,bottom=10mm,hmarginratio=1:1}
221 \begin{titlepage}%
222 \null\vfill%
223 \parindent0pt
224 {\Huge\bfseries\@rutitletitle}%
225 \ifdefined\@rutitlesubtitle{\\[2\baselineskip]\large\itshape\@rutitlesubtitle\/}\fi\\[4\baselineskip]
226 {\Large\scshape\@rutitleauthors}\\[\baselineskip]
227 {\large\@rutitledate}
228 \vfill
229
230 \ifdefined\@rutitleothers\rutitlepage@otherslist\@rutitleothers\fi
231 \vfill
232
233 \hfill
234 \ifpdf\includegraphics[width=80mm]{rutitlepage-logo-\IfLanguageName{dutch}{nl-}{}\if@rutitlecolour cmyk\else bw\fi.pdf}\\
235 \else\includegraphics[width=80mm]{rutitlepage-logo-\IfLanguageName{dutch}{nl-}{}\if@rutitlecolour cmyk\else bw\fi.eps}\\
236 \fi
237 \end{titlepage}
238 \restoregeometry%
239 }
240 \newcommand{\rutitle@layout@traditional}[0]{
241 \newgeometry{hmarginratio=1:1}
242 \begin{titlepage}
243 \begin{center}
244 \ifdefined\@rutitlecourse\textsc{\LARGE\@rutitlecourse}\\[1.5cm]\fi
245 \ifpdf\includegraphics[height=150pt]{rutitlepage-logo.pdf}\\
246 \else\includegraphics[height=150pt]{rutitlepage-logo.eps}\\
247 \fi
248 \vspace{0.4cm}
249 \textsc{\Large\@rutitleinst}\\[1cm]
250 \hrule
251 \vspace{0.4cm}
252 \textbf{\large\@rutitletitle}\\[0.4cm]
253 \hrule
254 \ifdefined\@rutitlesubtitle
255 \vspace{0.4cm}
256 \textit{\@rutitlesubtitle}\\[1cm]
257 \else
258 \vspace{2cm}
259 \fi
260 \begin{minipage}[t]{0.45\textwidth}
261 \begin{flushleft}\large
262 \textit{\@rutitleauthorstext}\\
263 \@rutitleauthors{}
264 \end{flushleft}
265 \end{minipage}
266 \begin{minipage}[t]{0.45\textwidth}
267 \begin{flushright}\large
268 \ifdefined\@rutitleothers
269 \renewcommand{\rutitlepage@printothers}[2]{\textit{##1}\\##2}
270 \renewcommand{\rutitlepage@sepothers}[0]{
271
272 \vspace{8mm}}
273 \rutitlepage@otherslist\@rutitleothers
274 \fi
275 \end{flushright}
276 \end{minipage}
277 \vfill
278 {\large\@rutitledate}
279 \end{center}
280 \end{titlepage}
281 \restoregeometry%
282 }
283 \newcommand{\maketitleru}[1][]{
284 \setkeys{maketitleru}{#1}
285 \ifcsname%
286 rutitle@layout@\@rutitlelayout\endcsname
287 \expandafter\csname rutitle@layout@\@rutitlelayout\endcsname
288 \else
289 \PackageError{rutitlepage}
290 {Unknown layout `\@rutitlelayout'.}
291 {The `layout' key of \maketitleru\space contained an unknown layout.\MessageBreak{}
292 Check the package documentation for the possible layouts.}
293 \fi
294 \ifdefined\@rutitlenextpagenr\setcounter{page}{\@rutitlenextpagenr}\fi%
295 }