| 1 |
% \iffalse |
| 2 |
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 3 |
% Documentation Builder |
| 4 |
%<*doc> |
| 5 |
\documentclass[a4paper]{ltxdoc} |
| 6 |
|
| 7 |
\usepackage{hsrstud} |
| 8 |
\usepackage[ |
| 9 |
type={CC}, |
| 10 |
modifier={by-sa}, |
| 11 |
version={4.0}, |
| 12 |
]{doclicense} |
| 13 |
\usepackage[ |
| 14 |
margin=3.5cm, |
| 15 |
left=4cm |
| 16 |
]{geometry} |
| 17 |
|
| 18 |
\usepackage{booktabs} |
| 19 |
\usepackage{enumitem} |
| 20 |
|
| 21 |
\CodelineIndex |
| 22 |
\EnableCrossrefs |
| 23 |
\RecordChanges |
| 24 |
|
| 25 |
%% Metadata |
| 26 |
\title{\textcolor{hsr-blue}{HSR}--Stud Document Classes} |
| 27 |
\author{Naoki Pross \texttt{<[email protected]>}} |
| 28 |
\date{\today} |
| 29 |
|
| 30 |
\begin{document} |
| 31 |
\DocInput{\jobname.dtx} |
| 32 |
|
| 33 |
\end{document} |
| 34 |
%</doc> |
| 35 |
% \fi |
| 36 |
|
| 37 |
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 38 |
%^^A Classes Documentation |
| 39 |
% |
| 40 |
% \maketitle |
| 41 |
% \tableofcontents |
| 42 |
% |
| 43 |
% \section{Purpose of these document classes} |
| 44 |
% The following document classes were made by and for the HSR-Stud organization. |
| 45 |
% These classes are intended to be used to create beautiful summaries and cheat |
| 46 |
% sheets. Available classes are: |
| 47 |
% \begin{description}[align=right] |
| 48 |
% \item[|hsrzf|] For summaries (Zusammenfassung) |
| 49 |
% \item[|hsrbericht|] For reports (Bericht) |
| 50 |
% \end{description} |
| 51 |
% |
| 52 |
% |
| 53 |
% \section{Class Options} |
| 54 |
% \begin{description}[align=right] |
| 55 |
% \item[\tt sans] Use Sans-Serif fonts (|cmbright| and |hfbright|). |
| 56 |
% \item[\tt slab] Use Slab-Serif fonts (|bitter| and |eulervm|). |
| 57 |
% \item[\tt margin=<size>] Sets up margins to reasonable size. |
| 58 |
% \item[\tt *] Any other given option is passed to the underlying class (article). |
| 59 |
% \end{description} |
| 60 |
% |
| 61 |
% \begin{table}\centering |
| 62 |
% \begin{tabular}{l r r l r r} |
| 63 |
% \toprule |
| 64 |
% Size & H & V & Size & H & V \\ |
| 65 |
% \midrule |
| 66 |
% huge & 45 & 40 & small & 20 & 20 \\ |
| 67 |
% large & 35 & 35 & tiny & 10 & 20 \\ |
| 68 |
% big & 30 & 30 & minimal & 5 & 20 \\ |
| 69 |
% normal & 25 & 30 \\ |
| 70 |
% \bottomrule |
| 71 |
% \end{tabular} |
| 72 |
% \caption{Sizes for the {\tt margin} option. All sizes are in millimeters} |
| 73 |
% \end{table} |
| 74 |
% |
| 75 |
% |
| 76 |
% \section{Extra Metadata} |
| 77 |
% Thanks to the {\tt titling} package, normal metadata informations are available |
| 78 |
% throug the following commands: \cs{theauthor}, \cs{thedate}, \cs{thetitle}. |
| 79 |
% Additionally, more metadata variables have been created for this class, to |
| 80 |
% conserve informations related to the university course. |
| 81 |
% \begin{description}[align=right] |
| 82 |
% \item[\cs{course}] The degree programme of the discussed subject. |
| 83 |
% Example: |Elektrotechnik| |
| 84 |
% \item[\cs{module}] Short name of the module according to the class |
| 85 |
% schedule. Example: |ComEng1| |
| 86 |
% \item[\cs{semester}] Semester during which the summarized subject was |
| 87 |
% taught. Example: |FS20| |
| 88 |
% \item[\cs{institute}] Internal institute in which the module was taught. |
| 89 |
% This field is optional. |
| 90 |
% \item[\cs{authoremail}] Email of the author. This field is optional. |
| 91 |
% \item[\cs{maintainer}] Name of the person maintaining the work. This |
| 92 |
% field is optional. |
| 93 |
% \item[\cs{contributors}] List of names of those who have contributed to |
| 94 |
% the document. This field is optional. |
| 95 |
% \end{description} |
| 96 |
% Like \cs{date}, \cs{title}, etc. these fields have too an accessor macro |
| 97 |
% \cs{the<metadata>}. For example: \cs{thecourse}, \cs{themodule}, and so on. |
| 98 |
% |
| 99 |
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 100 |
%^^A Zusammenfassung Class Documentation |
| 101 |
% \section{Zusammenfassung \texttt{hsrzf} class} |
| 102 |
% This class is intended to be used to write short summaries. |
| 103 |
% |
| 104 |
% \subsection{Class options} |
| 105 |
% \begin{description}[align=right] |
| 106 |
% \item[\tt header] Use the HSR--Stud standard header. The option |
| 107 |
% {\tt noheader} disables the header. |
| 108 |
% \end{description} |
| 109 |
% |
| 110 |
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 111 |
%^^A Bericht Class Documentation |
| 112 |
% \section{Bericht \texttt{hsrbericht} class} |
| 113 |
% This class tries to conform to the indications given by the communication |
| 114 |
% department of the HSR. The specifications are found in the ``Werkzeugkastens |
| 115 |
% Technische Berichte''. |
| 116 |
% |
| 117 |
% \subsection{Metadata} |
| 118 |
% In addition to the metadata described in the previous section. This class |
| 119 |
% requires: |
| 120 |
% \begin{description}[align=right] |
| 121 |
% \item[\cs{subtitle}] Pretty self explanatory. |
| 122 |
% \item[\cs{category}] Category assigned to the project. |
| 123 |
% This field is optional. |
| 124 |
% \item[\cs{project}] Name or reference to your project. |
| 125 |
% \item[\cs{topic}] You chosen topic in the category. |
| 126 |
% \item[\cs{instructor}] Name of the instructor / academic that is |
| 127 |
% following or has assigned your work. |
| 128 |
% \item[\cs{startdate}] Date when you started the project. |
| 129 |
% \item[\cs{finishdate}] Date when you finished the project (can be set to |
| 130 |
% \cs{today} to keep automatically updated. |
| 131 |
% \item[\cs{address}] Address or place where your work is produced. |
| 132 |
% This field is optional. |
| 133 |
% \item[\cs{matriculationnr}] Your matriculation number. |
| 134 |
% \item[\cs{logo}] Code to insert your logo. |
| 135 |
% \item[\cs{clientlogo}] Code to insert the logo of the client / research |
| 136 |
% department / \dots . |
| 137 |
% \end{description} |
| 138 |
% |
| 139 |
% \section{Minimal working examples} |
| 140 |
% |
| 141 |
% ^^A TODO: fix this with `%' |
| 142 |
% \begin{lstlisting} |
| 143 |
% \documentclass[margin=normal]{hsrzf} |
| 144 |
% |
| 145 |
% % Packages |
| 146 |
% %% the HSRStud package |
| 147 |
% \usepackage{hsrstud} |
| 148 |
% |
| 149 |
% % Metadata |
| 150 |
% \course{Elektrotechnik} |
| 151 |
% \module{ModAbk} |
| 152 |
% \semester{Herbstsemester 2020} |
| 153 |
% |
| 154 |
% \authoremail{[email protected]} |
| 155 |
% \author{\textsl{Vorname Name} -- \texttt{\theauthoremail}} |
| 156 |
% |
| 157 |
% \title{\texttt{\themodule} Zusammenfassung} |
| 158 |
% \date{\thesemester} |
| 159 |
% |
| 160 |
% % document |
| 161 |
% \begin{document} |
| 162 |
% \maketitle |
| 163 |
% \tableofcontents |
| 164 |
% \section{Introduction} |
| 165 |
% \[ |
| 166 |
% i\hbar \partial_t \left| \psi(t) \right\rangle |
| 167 |
% = \hat{H} \left| \psi(t) \right\rangle |
| 168 |
% \] |
| 169 |
% |
| 170 |
% \end{document}\end{lstlisting} |
| 171 |
% |
| 172 |
% \section{License} |
| 173 |
% \doclicenseThis |
| 174 |
% |
| 175 |
% \PrintChanges |
| 176 |
% \PrintIndex |
| 177 |
% |
| 178 |
% \section{Implementation} |
| 179 |
% \begin{macrocode} |
| 180 |
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 181 |
%^^A Class Headers |
| 182 |
|
| 183 |
%<*hsrzf> |
| 184 |
\NeedsTeXFormat{LaTeX2e} |
| 185 |
\ProvidesClass{hsrzf}[2020/04/05 v0.1 HSRStud Summary class] |
| 186 |
%</hsrzf> |
| 187 |
|
| 188 |
%<*hsrbericht> |
| 189 |
\NeedsTeXFormat{LaTeX2e} |
| 190 |
\ProvidesClass{hsrbericht}[2020/05/05 v0.1 HSRStud Report class] |
| 191 |
%</hsrbericht> |
| 192 |
|
| 193 |
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 194 |
%^^A Implementation |
| 195 |
% |
| 196 |
%<*hsrzf|hsrbericht> |
| 197 |
|
| 198 |
%% Coding Packages (Dependencies) |
| 199 |
\RequirePackage{iftex} |
| 200 |
\RequirePackage{kvoptions} |
| 201 |
\RequirePackage{etoolbox} |
| 202 |
|
| 203 |
%% Default font |
| 204 |
\RequirePackage{lmodern} |
| 205 |
|
| 206 |
%% Class options |
| 207 |
\SetupKeyvalOptions{ |
| 208 |
family=hsr, |
| 209 |
prefix=hsr@ |
| 210 |
} |
| 211 |
|
| 212 |
%% Use header and footer |
| 213 |
\DeclareBoolOption[false]{header} |
| 214 |
\DeclareComplementaryOption{noheader}{header} |
| 215 |
|
| 216 |
%% Use a sans-serif slab-serif or concrete font |
| 217 |
\DeclareBoolOption[false]{sans} |
| 218 |
\DeclareBoolOption[false]{slab} |
| 219 |
\DeclareBoolOption[false]{concrete} |
| 220 |
|
| 221 |
%% Configures the geometry package |
| 222 |
%% |
| 223 |
%% Possible values: |
| 224 |
%% - huge (45mm, 40mm) |
| 225 |
%% - large (35mm, 35mm) |
| 226 |
%% - big (30mm, 30mm) |
| 227 |
%% - normal (25mm, 30mm) |
| 228 |
%% - small (20mm, 20mm) |
| 229 |
%% - tiny (10mm, 20mm) |
| 230 |
%% - minimal ( 5mm, 20mm) |
| 231 |
\DeclareStringOption{margin}[huge] |
| 232 |
|
| 233 |
%% Configures the polyglossia package |
| 234 |
% \DeclareStringOption[]{lang}[german] |
| 235 |
|
| 236 |
|
| 237 |
%% Pass other options to the class |
| 238 |
\DeclareDefaultOption{% |
| 239 |
\ifx\CurrentOptionValue\relax |
| 240 |
\PackageWarningNoLine{\@currname}{% |
| 241 |
Unknown option ``\CurrentOption''\MessageBreak |
| 242 |
is passed to class ``article''% |
| 243 |
}% |
| 244 |
% Pass the option to package color. |
| 245 |
% Again it is better to expand \CurrentOption. |
| 246 |
\expandafter\PassOptionsToClass |
| 247 |
\expandafter{\CurrentOption}{article} |
| 248 |
\else |
| 249 |
% Package color does not take options with values. |
| 250 |
% We provide the standard LaTeX error. |
| 251 |
\@unknownoptionerror |
| 252 |
\fi |
| 253 |
} |
| 254 |
|
| 255 |
\ProcessKeyvalOptions{hsr} |
| 256 |
|
| 257 |
|
| 258 |
%% Create new metadata fields |
| 259 |
|
| 260 |
%% Required fields |
| 261 |
\newcommand\course[1]{\gdef\hsr@course{#1}} |
| 262 |
\newcommand\hsr@course{\ClassError{hsrzf}{no \noexpand\course given}{}} |
| 263 |
\newcommand\thecourse{\hsr@course} |
| 264 |
|
| 265 |
\newcommand\module[1]{\gdef\hsr@module{#1}} |
| 266 |
\newcommand\hsr@module{\ClassError{hsrzf}{no \noexpand\module given}{}} |
| 267 |
\newcommand\themodule{\hsr@module} |
| 268 |
|
| 269 |
\newcommand\semester[1]{\gdef\hsr@semester{#1}} |
| 270 |
\newcommand\hsr@semester{\ClassError{hsrzf}{no \noexpand\semester given}{}} |
| 271 |
\newcommand\thesemester{\hsr@semester} |
| 272 |
|
| 273 |
%% Optional fields |
| 274 |
\newcommand\institute[1]{\gdef\hsr@institute{#1}} |
| 275 |
\newcommand\hsr@institute{\ClassWarning{hsrzf}{no \noexpand\institute given}{}} |
| 276 |
\newcommand\theinstitute{\hsr@institute} |
| 277 |
|
| 278 |
\newcommand\authoremail[1]{\gdef\hsr@authoremail{#1}} |
| 279 |
\newcommand\hsr@authoremail{\ClassWarning{hsrzf}{no \noexpand\authoremail given}{}} |
| 280 |
\newcommand\theauthoremail{\hsr@authoremail} |
| 281 |
|
| 282 |
\newcommand\maintainer[1]{\gdef\hsr@maintainer{#1}} |
| 283 |
\newcommand\hsr@maintainer{\ClassWarning{hsrzf}{no \noexpand\maintainer given}{}} |
| 284 |
\newcommand\themaintainer{\hsr@maintainer} |
| 285 |
|
| 286 |
\newcommand\contributors[1]{\gdef\hsr@contributors{#1}} |
| 287 |
\newcommand\hsr@contributors{\ClassWarning{hsrzf}{no \noexpand\contributors given}{}} |
| 288 |
\newcommand\thecontributors{\hsr@contributors} |
| 289 |
%</hsrzf|hsrbericht> |
| 290 |
%<*hsrbericht> |
| 291 |
%% The report class has some extra metadata |
| 292 |
|
| 293 |
%% Extra title informations |
| 294 |
\newcommand\subtitle[1]{\gdef\hsr@subtitle{#1}} |
| 295 |
\newcommand\hsr@subtitle{\ClassError{hsrbericht}{no \noexpand\subtitle given}{}} |
| 296 |
\newcommand\thesubtitle{\hsr@subtitle} |
| 297 |
|
| 298 |
%% Project informations |
| 299 |
\newcommand\category[1]{\gdef\hsr@category{#1}} |
| 300 |
\newcommand\hsr@category{\ClassWarning{hsrbericht}{no \noexpand\category given}{}} |
| 301 |
\newcommand\thecategory{\hsr@category} |
| 302 |
|
| 303 |
\newcommand\project[1]{\gdef\hsr@project{#1}} |
| 304 |
\newcommand\hsr@project{\ClassError{hsrbericht}{no \noexpand\project given}{}} |
| 305 |
\newcommand\theproject{\hsr@project} |
| 306 |
|
| 307 |
\newcommand\topic[1]{\gdef\hsr@topic{#1}} |
| 308 |
\newcommand\hsr@topic{\ClassError{hsrbericht}{no \noexpand\topic given}{}} |
| 309 |
\newcommand\thetopic{\hsr@topic} |
| 310 |
|
| 311 |
\newcommand\version[1]{\gdef\hsr@version{#1}} |
| 312 |
\newcommand\hsr@version{\ClassError{hsrbericht}{no \noexpand\version given}{}} |
| 313 |
\newcommand\theversion{\hsr@version} |
| 314 |
|
| 315 |
\newcommand\instructor[1]{\gdef\hsr@instructor{#1}} |
| 316 |
\newcommand\hsr@instructor{\ClassError{hsrbericht}{no \noexpand\instructor given}{}} |
| 317 |
\newcommand\theinstructor{\hsr@instructor} |
| 318 |
|
| 319 |
\newcommand\startdate[1]{\gdef\hsr@startdate{#1}} |
| 320 |
\newcommand\hsr@startdate{\ClassError{hsrbericht}{no \noexpand\startdate given}{}} |
| 321 |
\newcommand\thestartdate{\hsr@startdate} |
| 322 |
|
| 323 |
\newcommand\finishdate[1]{\gdef\hsr@finishdate{#1}} |
| 324 |
\newcommand\hsr@finishdate{\ClassError{hsrbericht}{no \noexpand\finishdate given}{}} |
| 325 |
\newcommand\thefinishdate{\hsr@finishdate} |
| 326 |
|
| 327 |
%% Author informations |
| 328 |
\newcommand\address[1]{\gdef\hsr@address{#1}} |
| 329 |
\newcommand\hsr@address{\ClassWarning{hsrbericht}{no \noexpand\address given}{}} |
| 330 |
\newcommand\theaddress{\hsr@address} |
| 331 |
|
| 332 |
\newcommand\matriculationnr[1]{\gdef\hsr@matriculationnr{#1}} |
| 333 |
\newcommand\hsr@matriculationnr{\ClassError{hsrbericht}{no \noexpand\matriculationnr given}{}} |
| 334 |
\newcommand\thematriculationnr{\hsr@matriculationnr} |
| 335 |
|
| 336 |
%% Logos informations |
| 337 |
\newcommand\logo[1]{\gdef\hsr@logo{#1}} |
| 338 |
\newcommand\hsr@logo{\ClassWarning{hsrbericht}{no \noexpand\logo given}{}} |
| 339 |
\newcommand\thelogo{\hsr@logo} |
| 340 |
|
| 341 |
\newcommand\clientlogo[1]{\gdef\hsr@clientlogo{#1}} |
| 342 |
\newcommand\hsr@clientlogo{\ClassWarning{hsrbericht}{no \noexpand\clientlogo given}{}} |
| 343 |
\newcommand\theclientlogo{\hsr@clientlogo} |
| 344 |
%</hsrbericht> |
| 345 |
%<*hsrzf|hsrbericht> |
| 346 |
|
| 347 |
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 348 |
%^^A Setup base class |
| 349 |
\LoadClass[a4paper]{article} |
| 350 |
|
| 351 |
%% Style deps |
| 352 |
\RequirePackage{geometry} |
| 353 |
\RequirePackage{fancyhdr} |
| 354 |
\RequirePackage{titling} |
| 355 |
\RequirePackage{totpages} |
| 356 |
\RequirePackage{array} |
| 357 |
|
| 358 |
%% Insert metadata in the pdf |
| 359 |
\PassOptionsToPackage{plainpages=false, pdfpagelabels, pdfusetitle}{hyperref} |
| 360 |
\RequirePackage{hyperref} |
| 361 |
|
| 362 |
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 363 |
%^^A Setup Style |
| 364 |
% |
| 365 |
|
| 366 |
|
| 367 |
%% Configure Sans-Serif font |
| 368 |
\ifhsr@sans |
| 369 |
\ifhsr@slab |
| 370 |
\PackageError{hsrzf}{% |
| 371 |
sans ans slab options cannot be used at the same time |
| 372 |
} |
| 373 |
\fi |
| 374 |
\ifhsr@concrete{hsrzf}{% |
| 375 |
sans and concrete options cannot be used at the same time |
| 376 |
} |
| 377 |
\fi |
| 378 |
|
| 379 |
\PassOptionsToPackage{T1}{fontenc} |
| 380 |
\RequirePackage{fontenc} |
| 381 |
\RequirePackage{cmbright} |
| 382 |
\RequirePackage{sfmath} |
| 383 |
\fi |
| 384 |
|
| 385 |
%% Configure Slab-Serif font |
| 386 |
\ifhsr@slab |
| 387 |
\ifhsr@sans |
| 388 |
\PackageError{hsrzf}{% |
| 389 |
slab and sans options cannot be used at the same time |
| 390 |
} |
| 391 |
\fi |
| 392 |
\ifhsr@concrete{hsrzf}{% |
| 393 |
slab and concrete options cannot be used at the same time |
| 394 |
} |
| 395 |
\fi |
| 396 |
|
| 397 |
\PassOptionsToPackage{T1}{fontenc} |
| 398 |
\RequirePackage{fontenc} |
| 399 |
\PassOptionsToPackage{rm,light}{roboto} |
| 400 |
\RequirePackage{roboto} |
| 401 |
\fi |
| 402 |
|
| 403 |
%% Configure (secret) concrete font |
| 404 |
\ifhsr@concrete |
| 405 |
\ifhsr@sans{hsrzf}{% |
| 406 |
concrete and sans options cannot be used at the same time |
| 407 |
} |
| 408 |
\fi |
| 409 |
\ifhsr@slab |
| 410 |
\PackageError{hsrzf}{% |
| 411 |
concrete ans slab options cannot be used at the same time |
| 412 |
} |
| 413 |
\fi |
| 414 |
|
| 415 |
\PassOptionsToPackage{boldsans,amssymb}{concmath} |
| 416 |
\RequirePackage{concmath} |
| 417 |
\PassOptionsToPackage{T1}{fontenc} |
| 418 |
\RequirePackage{fontenc} |
| 419 |
\fi |
| 420 |
|
| 421 |
%% configure geometry |
| 422 |
%% defaults to big |
| 423 |
\newlength{\hsr@hmarginwidth} |
| 424 |
\newlength{\hsr@vmarginheight} |
| 425 |
|
| 426 |
\ifx\hsr@margin\@empty |
| 427 |
\setlength\hsr@hmarginwidth{30mm} |
| 428 |
\setlength\hsr@vmarginheight{30mm} |
| 429 |
\else |
| 430 |
\expandafter\ifstrequal\expandafter{\hsr@margin}{huge}{ |
| 431 |
\setlength\hsr@hmarginwidth{45mm} |
| 432 |
\setlength\hsr@vmarginheight{40mm}}{} |
| 433 |
%% |
| 434 |
\expandafter\ifstrequal\expandafter{\hsr@margin}{large}{ |
| 435 |
\setlength\hsr@hmarginwidth{35mm} |
| 436 |
\setlength\hsr@vmarginheight{35mm}}{} |
| 437 |
%% |
| 438 |
\expandafter\ifstrequal\expandafter{\hsr@margin}{big}{ |
| 439 |
\setlength\hsr@hmarginwidth{30mm} |
| 440 |
\setlength\hsr@vmarginheight{30mm}}{} |
| 441 |
%% |
| 442 |
\expandafter\ifstrequal\expandafter{\hsr@margin}{normal}{ |
| 443 |
\setlength\hsr@hmarginwidth{25mm} |
| 444 |
\setlength\hsr@vmarginheight{30mm}}{} |
| 445 |
%% |
| 446 |
\expandafter\ifstrequal\expandafter{\hsr@margin}{small}{ |
| 447 |
\setlength\hsr@hmarginwidth{20mm} |
| 448 |
\setlength\hsr@vmarginheight{20mm}}{} |
| 449 |
%% |
| 450 |
\expandafter\ifstrequal\expandafter{\hsr@margin}{tiny}{ |
| 451 |
\setlength\hsr@hmarginwidth{10mm} |
| 452 |
\setlength\hsr@vmarginheight{20mm}}{} |
| 453 |
%% |
| 454 |
\expandafter\ifstrequal\expandafter{\hsr@margin}{minimal}{ |
| 455 |
\setlength\hsr@hmarginwidth{ 5mm} |
| 456 |
\setlength\hsr@vmarginheight{20mm}}{} |
| 457 |
%% |
| 458 |
% TODO: fix this |
| 459 |
% \ClassError{hsrzf}{Invalid margin size} |
| 460 |
% \setlength\hsr@hmarginwidth{30mm} |
| 461 |
% \setlength\hsr@vmarginheight{30mm} |
| 462 |
\fi |
| 463 |
|
| 464 |
%</hsrzf|hsrbericht> |
| 465 |
|
| 466 |
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 467 |
%^^A HSR ZF specific |
| 468 |
%<*hsrzf> |
| 469 |
%% TODO: change vmarginheight if header is on |
| 470 |
\newgeometry{ |
| 471 |
hmargin=\hsr@hmarginwidth, |
| 472 |
vmargin=\hsr@vmarginheight, |
| 473 |
marginparsep=0pt, |
| 474 |
marginpar=0pt, |
| 475 |
} |
| 476 |
|
| 477 |
\fancypagestyle{hsrzf}{% |
| 478 |
\fancyhf{} % clear |
| 479 |
\fancyhead[L]{\leftmark} |
| 480 |
\fancyhead[C]{\themodule} |
| 481 |
\fancyhead[R]{\@date} |
| 482 |
|
| 483 |
\fancyfoot[L]{\href{https://github.com/HSR-Stud/}{\texttt{HSR-Stud}}} |
| 484 |
\fancyfoot[C]{\texttt{CC BY-NC-SA}} |
| 485 |
\fancyfoot[R]{\thepage ~/ \pageref{TotPages}} |
| 486 |
|
| 487 |
\renewcommand{\headrulewidth}{.5pt} |
| 488 |
\renewcommand{\footrulewidth}{.5pt} |
| 489 |
} |
| 490 |
|
| 491 |
\fancypagestyle{hsrzf-norulers}{% |
| 492 |
\fancyhf{} % clear |
| 493 |
\fancyhead[L]{\leftmark} |
| 494 |
\fancyhead[C]{\themodule} |
| 495 |
\fancyhead[R]{\@date} |
| 496 |
|
| 497 |
\fancyfoot[L]{\href{https://github.com/HSR-Stud/}{\texttt{HSR-Stud}}} |
| 498 |
\fancyfoot[C]{\texttt{CC BY-NC-SA}} |
| 499 |
\fancyfoot[R]{\thepage ~/ \pageref{TotPages}} |
| 500 |
|
| 501 |
\renewcommand{\headrulewidth}{0pt} |
| 502 |
\renewcommand{\footrulewidth}{0pt} |
| 503 |
} |
| 504 |
|
| 505 |
\ifhsr@header |
| 506 |
\pagestyle{hsrzf} |
| 507 |
\fi |
| 508 |
%</hsrzf> |
| 509 |
|
| 510 |
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 511 |
%^^A HSR Bericht specific |
| 512 |
%<*hsrbericht> |
| 513 |
|
| 514 |
%% Redefine title and abstract |
| 515 |
\renewcommand\maketitle{% |
| 516 |
\begin{titlepage} |
| 517 |
\thispagestyle{hsrbericht} |
| 518 |
\begin{center} |
| 519 |
\vspace*{6cm} |
| 520 |
\textbf{\fontsize{48}{60}\selectfont \@title} |
| 521 |
\vspace{1.5cm} \\ |
| 522 |
\textbf{\fontsize{24}{48}\selectfont \hsr@subtitle} |
| 523 |
\vspace{1cm} \\ |
| 524 |
\textbf{\fontsize{22}{48}\selectfont \hsr@category} |
| 525 |
\vspace{0.5cm} \\ |
| 526 |
\begin{tabular}{rl} |
| 527 |
\textbf{Version:} & \hsr@version \\ |
| 528 |
\end{tabular} |
| 529 |
\vspace{4cm} \\ |
| 530 |
\begin{tabular}{rl p{1.5cm} rl} |
| 531 |
\textbf{Autor:} & \textbf{\@author} && Dozent: & \hsr@instructor \\ |
| 532 |
E-Mail: & \texttt{\hsr@authoremail} && Themengebiet: & \hsr@topic \\ |
| 533 |
Matrikelnummer: & \hsr@matriculationnr && Studiengang: & \hsr@course \\ |
| 534 |
Adresse: & \hsr@address && & \\ |
| 535 |
\end{tabular}{} |
| 536 |
\vspace{2cm} \\ |
| 537 |
\begin{tabular}{rl} |
| 538 |
\textbf{Erstellt am:} & \textbf{\hsr@startdate} \\ |
| 539 |
\textbf{Letze Änderung am:} & \textbf{\hsr@finishdate} \\ |
| 540 |
\end{tabular} |
| 541 |
\end{center} |
| 542 |
\end{titlepage}} |
| 543 |
|
| 544 |
\renewenvironment{abstract}{% |
| 545 |
\section*{Abstract}% |
| 546 |
\newcommand\problem{\paragraph{Problem}} |
| 547 |
\newcommand\goal{\paragraph{Ziel}} |
| 548 |
\newcommand\method{\paragraph{Method / Vorgehen}} |
| 549 |
\newcommand\results{\paragraph{Wesentliche Ergebnisse}} |
| 550 |
\newcommand\suggestions{\paragraph{Empfehlungen}} |
| 551 |
\newcommand\keywords{\paragraph{Schl\"usselw\"orter}} |
| 552 |
}{} |
| 553 |
|
| 554 |
%% TODO: twoside / book support |
| 555 |
%% Debug: |
| 556 |
%% \RequirePackage{showframe} |
| 557 |
|
| 558 |
\newgeometry{ |
| 559 |
hmargin=\hsr@hmarginwidth, |
| 560 |
vmargin=\hsr@vmarginheight, |
| 561 |
marginparsep=0pt, |
| 562 |
marginpar=0pt, |
| 563 |
} |
| 564 |
|
| 565 |
%% Configure headers |
| 566 |
\fancypagestyle{hsrbericht}{% |
| 567 |
\fancyhf{} % clear |
| 568 |
\fancyhead[C]{\@title} |
| 569 |
\fancyhead[R]{\hsr@clientlogo} |
| 570 |
\fancyhead[L]{\hsr@logo} |
| 571 |
\fancyfoot[R]{\thepage / \pageref{TotPages} } |
| 572 |
\fancyfoot[L]{Dockument: \jobname \\ Druck: \finishdate} |
| 573 |
\renewcommand{\headrulewidth}{.5pt} |
| 574 |
\renewcommand{\footrulewidth}{.5pt} |
| 575 |
} |
| 576 |
|
| 577 |
\fancypagestyle{plain}{% |
| 578 |
\fancyhf{} % clear |
| 579 |
\fancyhead[C]{\@title} |
| 580 |
\fancyhead[R]{\hsr@clientlogo} |
| 581 |
\fancyhead[L]{\hsr@logo} |
| 582 |
\fancyfoot[R]{\thepage / \pageref{TotPages} } |
| 583 |
\fancyfoot[L]{Dockument: \jobname \\ Druck: \finishdate} |
| 584 |
\renewcommand{\headrulewidth}{.5pt} |
| 585 |
\renewcommand{\footrulewidth}{.5pt} |
| 586 |
} |
| 587 |
|
| 588 |
\pagestyle{hsrbericht} |
| 589 |
|
| 590 |
%</hsrbericht> |
| 591 |
% \end{macrocode} |
| 592 |
% |
| 593 |
% \Finale |
| 594 |
%^^A vim:set tw=80 sw=2 ts=2 et: |