summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/rutitlepage/rutitlepage.dtx
blob: 0daa71812a8c886bdb9eeb73af206028ead05675 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
% \iffalse meta-comment
%
% rutitlepage - A Radboud University titlepage
% Copyright 2017 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
% 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.
%
%<*driver>
% \fi
\ProvidesFile{rutitlepage.dtx}[2017/05/30 v1.0 Initial package]
% \iffalse
\documentclass{ltxdoc}
\usepackage{rutitlepage}
\usepackage{verbatim}
\usepackage{booktabs}
\usepackage{url}
\GetFileInfo{rutitlepage.dtx}

\urlstyle{tt}
\title{A Radboud University titlepage}
\date{\filedate{}}
\author{Mart Lubbers}

\begin{document}
\maketitle
 \DocInput{\filename}
 \PrintChanges
\end{document}
%</driver>
% \fi
%
% \changes{v1.0}{2017/05/30}{Initial package}
%
% \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).
%
% \subsection{Contributors}
% \texttt{rutitlepage} is maintained by Mart Lubbers but work has been done by
% (in order of date of contribution):
% \begin{itemize}
% 	\item Camil Staps\footnote{\url{https://github.com/camilstaps}}
% 	\item Daan Sprenkels\footnote{\url{https://github.com/dsprenkels}}
% 	\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}
%
% \section{Usage}
% \DescribeMacro\maketitleru
% This macro creates the actual titlepage and has the following options
% available. Note that all options are optional.
%
% \begin{tabular}{lp{.5\linewidth}l} 
% 	\toprule
%	Option & Description & 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}\\
% 	\bottomrule
% \end{tabular}
%
% \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}]
%\endinput
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{rutitlepage}[2017/05/30 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}}
\define@key{maketitleru}{authors}{\def\@rutitleauthors{#1}}
\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}{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}
	\newgeometry{hmarginratio=1:1}
	\begin{titlepage}
		\setcounter{page}{\@rutitlepagenr}
		\begin{center}
			\textsc{\LARGE\@rutitlecourse}\\[1.5cm]
			\ifpdf\includegraphics[height=150pt]{logo.pdf}\\
			\else\includegraphics[height=150pt]{logo.eps}\\
			\fi
			\vspace{0.4cm}
			\textsc{\Large\@rutitleinst}\\[1cm]
			\hrule
			\vspace{0.4cm}
			\textbf{\large\@rutitletitle}\\[0.4cm]
			\hrule
			\ifdefined\@rutitlesubtitle
				\vspace{0.4cm}
				\textit{\@rutitlesubtitle}\\[1cm]
			\else
				\vspace{2cm}			
			\fi
			\begin{minipage}[t]{0.45\textwidth}
				\begin{flushleft}\large
					\textit{\@rutitleauthorstext}\\
					\@rutitleauthors{}
				\end{flushleft}
			\end{minipage}
			\begin{minipage}[t]{0.45\textwidth}
				\begin{flushright}\large
					\textit{\@rutitlerighttextheader}\\
					\@rutitlerighttext%
				\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{}
}