Debian Codegraph @

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

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (c) 2013 Johannes Rosenberger
4 %
5 % This work may be distributed and/or modified under the
6 % conditions of a BSD Style License (see file 'LICENSE').
7 %
8 % This work consists of the files wsemclassic.dtx and wsemclassic.ins
9 % and the derived file wsemclassic.cls.
10 %
11 % \fi
12 %
13 % \iffalse
14 %
15 %<*cls>
16 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
17 \ProvidesClass{wsemclassic}
18 [2013/08/27 v1.0.1 document class for bavarian school w-seminar papers, based on report]
19 %</cls>
20 %
21 %<driver>\ProvidesFile{wsemclassic.drv}
22 %
23 %<*driver>
24 \documentclass[a4paper,11pt]{ltxdoc}
25 \EnableCrossrefs
26 \CodelineIndex
27 \RecordChanges
28 %\OnlyDescription
29
30 \usepackage[noindex]{dox}
31 \usepackage{hypdoc,colordoc}
32 \usepackage{hologo}
33 \usepackage[left=30ex, top=3cm, bottom=3cm]{geometry}
34
35 \usepackage{marginnote}
36 \let\marginpar=\marginnote
37
38 \newcommand{\wsemclassic}{\textsf{wsemclassic}}
39 \newcommand{\report}{\textsf{report}}
40
41 \doxitem{Package}{ttpackage}{Packages Used}
42 \doxitem{Option}{option}{Options}
43
44 \newcommand{\describeoption}[3]{
45 \noindent
46 \\
47 \hypertarget{udoc.opt.#1}{\DescribeOption[noindex=false]{#1 \textrm{\itshape #2}}}
48 \marginpar{\\ \texttt{#3}}
49 \hspace{-1.1ex}%
50 }
51
52 \newenvironment{hyperopt}[1]{
53 \hypertarget{impl.opt.#1}{\option[noindex=false]{#1}}
54 }{
55 \endoption
56 }
57
58 \newenvironment{indmacro}[1]{\macro[noindex=false]{#1}}{\endmacro}
59
60 \newenvironment{package}[1]{
61 \ttpackage[noprint, noindex=false]{#1}
62 \marginpar{\textsf{#1}}
63 }{
64 \endttpackage
65 }
66 \newenvironment{noindpackage}[1]{
67 \ttpackage[noprint, noindex=true]{#1}
68 \marginpar{\textsf{#1}}
69 }{
70 \endttpackage
71 }
72
73 \begin{document}
74 \DocInput{wsemclassic.dtx}
75 \end{document}
76 %</driver>
77 %
78 % \fi
79 %
80 % \CheckSum{480}
81 %% \CharacterTable
82 %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
83 %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
84 %% Digits \0\1\2\3\4\5\6\7\8\9
85 %% Exclamation \! Double quote \" Hash (number) \#
86 %% Dollar \$ Percent \% Ampersand \&
87 %% Acute accent \' Left paren \( Right paren \)
88 %% Asterisk \* Plus \+ Comma \,
89 %% Minus \- Point \. Solidus \/
90 %% Colon \: Semicolon \; Less than \<
91 %% Equals \= Greater than \> Question mark \?
92 %% Commercial at \@ Left bracket \[ Backslash \\
93 %% Right bracket \] Circumflex \^ Underscore \_
94 %% Grave accent \` Left brace \{ Vertical bar \|
95 %% Right brace \} Tilde \~}
96 %
97 %
98 % \changes{v1.0}{2013/08/27}{Initial version.}
99 % \changes{v1.0.1}{2013/08/27}{ctan package building bugfixes.}
100
101 %
102 % \GetFileInfo{wsemclassic.cls}
103 %
104 %
105 % \title{The \wsemclassic\ Document Class (\textsf{v1.0.1})}
106 % \author{Johannes Rosenberger \\
107 % \href{mailto:[email protected]}{\texttt{<[email protected]>}}}
108 % \date{2013/08/27}
109 % \maketitle
110 %
111 % \begin{abstract}
112 % This package provides a \hologo{LaTeXe} document class named \wsemclassic\
113 % for typesetting Bavarian school w-seminar papers.
114 % \end{abstract}
115 %
116 % \tableofcontents
117 %
118 % \input{user-doc}
119 %
120 % \StopEventually{\PrintChanges}
121 %
122 % \part{Implementation}
123 %
124 % \parindent0pt
125 % \begin{indmacro}{\report}
126 % is set to the name of the parent class. So it can be changed later easier.
127 % \begin{macrocode}
128 \newcommand{\report}{report}
129 % \end{macrocode}
130 % \end{indmacro}
131 %
132 %
133 % \section{Option processing}
134 %
135 % \begin{package}{kvoptions}
136 % is needed to parse key-value options:
137 % \begin{macrocode}
138 \RequirePackage{kvoptions}
139
140 \SetupKeyvalOptions{
141 prefix = ws@
142 }
143 % \end{macrocode}
144 % \end{package}
145 %
146 %
147 % Now we parse the key-value options.
148 % They are specified in the format \\
149 %
150 % |\Declare|\meta{Type}|Option|\oarg{default value}\marg{option name}. \\
151 %
152 % \subsection{Strictness}
153 % \begin{hyperopt}{strict}
154 % First the strictness options.
155 % \begin{macrocode}
156 \DeclareBoolOption[false]{strict}
157 \DeclareComplementaryOption{nostrict}{strict}
158 % \end{macrocode}
159 % \end{hyperopt}
160 % \begin{hyperopt}{stricttitle}
161 % \begin{macrocode}
162 \DeclareBoolOption[false]{stricttitle}
163 \DeclareComplementaryOption{nostricttitle}{stricttitle}
164 % \end{macrocode}
165 % \end{hyperopt}
166 % \begin{hyperopt}{frenchspacing}
167 % \begin{macrocode}
168 \DeclareBoolOption[false]{frenchspacing}
169 \DeclareComplementaryOption{nofrenchspacing}{frenchspacing}
170 % \end{macrocode}
171 % \end{hyperopt}
172 %
173 %
174 % \subsection{Format and Language}
175 %
176 % \begin{hyperopt}{fontsize}
177 % \begin{macrocode}
178 \DeclareStringOption[12]{fontsize}
179 % \end{macrocode}
180 % \end{hyperopt}
181 % \begin{hyperopt}{paper}
182 % \begin{macrocode}
183 \DeclareStringOption[a4]{paper}
184 % \end{macrocode}
185 % \end{hyperopt}
186 % \begin{hyperopt}{lang}
187 % \begin{macrocode}
188 \DeclareStringOption[german]{lang}
189 % \end{macrocode}
190 % \end{hyperopt}
191 % \begin{hyperopt}{plxtex}
192 % \begin{macrocode}
193 \DeclareBoolOption[true]{plxtex}
194 \DeclareComplementaryOption{noplxtex}{plxtex}
195 % \end{macrocode}
196 % \end{hyperopt}
197 %
198 %
199 % \subsection{Bibliography}
200 % \begin{hyperopt}{bib}
201 % \begin{macrocode}
202 \DeclareBoolOption[true]{bib}
203 \DeclareComplementaryOption{nobib}{bib}
204 % \end{macrocode}
205 % \end{hyperopt}
206 % \begin{hyperopt}{bibfile}
207 % \begin{macrocode}
208 \DeclareStringOption[\jobname]{bibfile}
209 % \end{macrocode}
210 % \end{hyperopt}
211 %
212 %
213 % \subsection{Options Related to Used Packages}
214 %
215 % \subsubsection{\textsf{fontspec}}
216 %
217 % \begin{hyperopt}{fontspecargs}
218 % \begin{macrocode}
219 \DeclareStringOption[quiet]{fontspecargs}
220 % \end{macrocode}
221 % \end{hyperopt}
222 % \begin{hyperopt}{defaultfontfeatures}
223 % \begin{macrocode}
224 \DeclareStringOption[Ligatures={TeX, Common},
225 Fractions=On]{defaultfontfeatures}
226 % \end{macrocode}
227 % \end{hyperopt}
228 % \begin{hyperopt}{mainfont}
229 % \begin{macrocode}
230 \DeclareStringOption[CMU Serif]{mainfont}
231 % \end{macrocode}
232 % \end{hyperopt}
233 % \begin{hyperopt}{sansfont}
234 % \begin{macrocode}
235 \DeclareStringOption[CMU Sans Serif]{sansfont}
236 % \end{macrocode}
237 % \end{hyperopt}
238 % \begin{hyperopt}{monofont}
239 % \begin{macrocode}
240 \DeclareStringOption[CMU Typewriter Text]{monofont}
241 % \end{macrocode}
242 % \end{hyperopt}
243 %
244 %
245 % \subsubsection{\textsf{hyperref} and \textsf{natbib}}
246 %
247 % \begin{hyperopt}{hyperref}
248 % \begin{macrocode}
249 \DeclareBoolOption[true]{hyperref}
250 \DeclareComplementaryOption{nohyperref}{hyperref}
251 % \end{macrocode}
252 % \end{hyperopt}
253 % \begin{hyperopt}{hyperrefargs}
254 % \begin{macrocode}
255 \DeclareStringOption[unicode]{hyperrefargs}
256 % \end{macrocode}
257 % \end{hyperopt}
258 %
259 %
260 % \begin{hyperopt}{natbib}
261 % \begin{macrocode}
262 \DeclareBoolOption[true]{natbib}
263 \DeclareComplementaryOption{nonatbib}{natbib}
264 % \end{macrocode}
265 % \end{hyperopt}
266 % \begin{hyperopt}{natbibargs}
267 % \begin{macrocode}
268 \DeclareStringOption[round]{natbibargs}
269 % \end{macrocode}
270 % \end{hyperopt}
271 % \begin{hyperopt}{bibstyle}
272 % \begin{macrocode}
273 \DeclareStringOption[natdin]{bibstyle}
274 % \end{macrocode}
275 % \end{hyperopt}
276 %
277 %
278 % \subsubsection{Other Packages which Can Get Args}
279 %
280 % \begin{hyperopt}{microtypeargs}
281 % Access to microtypographic features in \hologo{pdfTeX}, \hologo{XeTeX}
282 % and \hologo{LuaTeX}.
283 % \begin{macrocode}
284 \DeclareStringOption[babel]{microtypeargs}
285 % \end{macrocode}
286 % \end{hyperopt}
287 %
288 % \begin{hyperopt}{amsmathargs}
289 % Enhanced math.
290 % \begin{macrocode}
291 \DeclareStringOption{amsmathargs}
292 % \end{macrocode}
293 % \end{hyperopt}
294 %
295 % \begin{hyperopt}{titlesecargs}
296 % Better control over sectioning title appearance.
297 % \begin{macrocode}
298 \DeclareStringOption[small]{titlesecargs}
299 % \end{macrocode}
300 % \end{hyperopt}
301 %
302 % \begin{hyperopt}{geometryargs}
303 % Better page layout.
304 % \begin{macrocode}
305 \DeclareStringOption{geometryargs}
306 % \end{macrocode}
307 % \end{hyperopt}
308 %
309 % \begin{hyperopt}{fancyhdrargs}
310 % Easier headers and footers.
311 % \begin{macrocode}
312 \DeclareStringOption{fancyhdrargs}
313 % \end{macrocode}
314 % \end{hyperopt}
315 %
316 % \begin{hyperopt}{tocbibindargs}
317 % Makes a toc entry for the bibliography.
318 % \begin{macrocode}
319 \DeclareStringOption[nottoc]{tocbibindargs}
320 % \end{macrocode}
321 % \end{hyperopt}
322 %
323 %
324 % \subsection{Options Passed to Parent Class (\report) and Option Processing}
325 %
326 % All options not declared above are set to be passed to class \report,
327 % then options are processed.
328 %
329 % \begin{macrocode}
330 \DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\report}}
331
332 \ProcessKeyvalOptions*\relax
333 % \end{macrocode}
334 %
335 %
336 % Now the |strict|(\hyperlink{udoc.opt.strict}{doc},\hyperlink{impl.opt.strict}{impl})
337 % option sets other related options.
338 %
339 %
340 % \subsection{Making other Options \texttt{strict}}
341 %
342 % The |strict| (\hyperlink{udoc.opt.strict}{doc},\hyperlink{impl.opt.strict}{impl}) option sets other
343 % options to certain values, ignoring their custom values.
344 % \begin{macrocode}
345 \ifws@strict
346 \renewcommand{\ws@fontsize}{12}
347 \renewcommand{\ws@paper}{a4}
348 \renewcommand{\ws@lang}{german}
349 \ws@frenchspacingtrue
350 \ws@stricttitletrue
351 \ws@bibtrue
352 \fi
353 % \end{macrocode}
354 %
355 % And then the fontsize (\hyperlink{udoc.opt.fontsize}{doc},\hyperlink{impl.opt.fontsize}{impl}),
356 % the language (\hyperlink{udoc.opt.lang}{doc},\hyperlink{impl.opt.lang}{impl})
357 % and the paper size (\hyperlink{udoc.opt.paper}{doc},\hyperlink{impl.opt.paper}{impl}) are set.
358 %
359 % If the paper size is |custom| it is not passed to \report.
360 %
361 % \begin{macrocode}
362 \PassOptionsToClass{\ws@fontsize pt, \ws@lang}{\report}
363 \ifx \ws@paper custom \else
364 \PassOptionsToClass{\ws@paper paper}{\report}
365 \fi
366 % \end{macrocode}
367 %
368 % Now the \report class (parent class) is loaded.
369 % \begin{macrocode}
370 \LoadClass{\report}
371 % \end{macrocode}
372 %
373 %
374 % \section{Package Loading and Settings}
375 %
376 % \begin{indmacro}{\babellang}
377 % When using \textsf{babel}, |ngerman| should be used instead of |german|.
378 % So we use this macro for \textsf{babel}.
379 % \begin{macrocode}
380 \newcommand{\babellang}{
381 \ifx \ws@lang german
382 ngerman
383 \else
384 \ws@lang
385 \fi
386 }
387 % \end{macrocode}
388 % \end{indmacro}
389 %
390 %
391 % \subsection{\hologo{TeX} Engine Dependent Settings}
392 %
393 % \begin{package}{iftex}
394 % is needed to determine which \hologo{TeX} engine we are running.
395 % \begin{macrocode}
396 \RequirePackage{iftex}
397 % \end{macrocode}
398 % \end{package}
399 %
400 %
401 % \begin{package}{inputenx}
402 % \begin{package}{fontenc}
403 % |\ifPDFTeX| only means `if not \hologo{XeTeX}/\hologo{LuaTeX}'.
404 % If this is true, we need \textsf{inputenx} for UTF-8 support
405 % and \textsf{fontenc} for T1 font support.
406 %
407 % \begin{package}{babel}
408 % \begin{package}{polyglossia}
409 % \textsf{babel} is used if we are not running \hologo{XeTeX} for which \textsf{polyglossia}
410 % is recommended.
411 %
412 % \begin{package}{fontspec}
413 % If we are running \hologo{XeTeX} or \hologo{LuaTeX} then we use the \textsf{fontspec} package.
414 % \begin{macrocode}
415 \ifPDFTeX
416 \RequirePackage[utf8x]{inputenx}
417 \RequirePackage[T1]{fontenc}
418
419 \RequirePackage[\babellang]{babel}
420 \RequirePackage[fixlanguage]{babelbib}
421
422 \else % if luatex or xelatex
423 \ifXeTeX
424 \RequirePackage{polyglossia}
425 \setdefaultlanguage[babelshorthands, spelling=new]{german}
426 \else
427 \RequirePackage[\babellang]{babel}
428 \RequirePackage[fixlanguage]{babelbib}
429 \fi
430
431 \RequirePackage[\ws@fontspecargs]{fontspec}
432 \defaultfontfeatures{\ws@defaultfontfeatures}
433 \fi
434 % \end{macrocode}
435 % \end{package}
436 % \end{package}
437 % \end{package}
438 % \end{package}
439 % \end{package}
440 %
441 % \subsection{Loading Styling Packages}
442 %
443 %
444 % \begin{package}{hyperref} is used to use PDF features.
445 % \begin{macrocode}
446 \ifws@hyperref
447 \RequirePackage[\ws@hyperrefargs]{hyperref}
448 \fi
449 % \end{macrocode}
450 % \end{package}
451 %
452 % \begin{package}{microtype} is used to use microtypographic features
453 % of \hologo{pdfTeX}/\hologo{XeTeX}/\hologo{LuaTeX}.
454 % \begin{macrocode}
455 \ifws@plxtex
456 \RequirePackage[\ws@microtypeargs]{microtype}
457 \fi
458 % \end{macrocode}
459 % \end{package}
460 %
461 % \begin{package}{amsmath}
462 % \begin{package}{amsthm}
463 % \begin{package}{amssymb}
464 % Use better mathematical formatting.
465 % \begin{macrocode}
466 \RequirePackage[\ws@amsmathargs]{amsmath}
467 \RequirePackage{amsthm,amssymb}
468 % \end{macrocode}
469 % \end{package}
470 % \end{package}
471 % \end{package}
472 %
473 % \begin{package}{titlesec} is used to change title formatting.
474 % \begin{macrocode}
475 \RequirePackage[\ws@titlesecargs]{titlesec}
476 % \end{macrocode}
477 % \end{package}
478 %
479 % \begin{package}{natbib} is needed for DIN conform bibliographies.
480 % \begin{macrocode}
481 \ifws@natbib
482 \RequirePackage[\ws@natbibargs]{natbib}
483 \fi
484 % \end{macrocode}
485 % \end{package}
486 %
487 % \begin{package}{setspace} is needed for better setting of linespacing.
488 % \begin{macrocode}
489 \RequirePackage{setspace}
490 \onehalfspacing
491 % \end{macrocode}
492 % \end{package}
493 %
494 % \begin{package}{geometry} is needed for setting the page layout.
495 % \begin{macrocode}
496 \RequirePackage[\ws@geometryargs]{geometry}
497 \newcommand{\setgeometry}[1]{\geometry{#1}}
498 \ifx \ws@paper custom \else
499 \setgeometry{\ws@paper paper, scale=0.75, centering}
500 \fi
501 % \end{macrocode}
502 % \end{package}
503 %
504 % \begin{package}{fancyhdr} is used for easier setting of the header/footer.
505 % \begin{macrocode}
506 \RequirePackage{fancyhdr}
507 \pagestyle{fancy}
508 \renewcommand{\headwidth}{\textwidth}
509 % \end{macrocode}
510 % Now a pagestyle which displays chapters, sections and subsections in the header
511 % and the page number in the footer is constructed.
512 % \begin{macrocode}
513 \fancypagestyle{wsfancy}{
514 \fancyhead{}
515
516 \newif\iffirstsection
517 \firstsectiontrue
518
519 \def\setchaptermark##1{
520 \firstsectiontrue
521 \edef\mark@chapter{##1}
522 \rhead{\mark@chapter}
523 }
524 \def\setsectionmark##1{
525 \edef\mark@section{##1}
526 \lhead{\mark@section}
527 }
528 \def\setsubsectionmark##1{
529 \iffirstsection
530 \firstsectionfalse
531 \edef\mark@section{##1}
532 \lhead{\mark@section\\\mark@section}
533 \fi
534 }
535
536 \renewcommand{\chaptermark}[1]{\setchaptermark{\chaptername~\thechapter.~~##1}}
537 \renewcommand{\sectionmark}[1]{\setsectionmark{\thesection~~##1}}
538 \renewcommand{\subsectionmark}[1]{\setsubsectionmark{\thesubsection~~##1}}
539 }
540 % \end{macrocode}
541 % \end{package}
542 %
543 % \begin{package}{tocbibind} is needed for having a toc entry for the bibliography.
544 % \begin{macrocode}
545 \RequirePackage[\ws@tocbibindargs]{tocbibind}
546 % \end{macrocode}
547 % \end{package}
548 %
549 %
550 % \subsection{Making the Document Strict}
551 %
552 % \begin{option}{strict}
553 % Now that the necessary packages are loaded we can make the document |strict|.
554 % \begin{macrocode}
555 \ifws@strict
556 \setgeometry{top=2cm, bottom=2cm, left=2.5cm, right=2.5cm, a4paper}
557 \titleformat{\chapter}{\normalfont\Large\bfseries}{\thechapter}{1em}{}{}
558
559 \fancypagestyle{plain}{
560 \fancyhf{}
561 \chead{\thepage}
562 \renewcommand{\headrulewidth}{0pt}
563 \renewcommand{\footrulewidth}{0pt}
564 }
565 \pagestyle{plain}
566 \addtocontents{toc}{\protect\thispagestyle{empty}}
567 \else
568 % \end{macrocode}
569 % Or we make it fancy.
570 % \begin{macrocode}
571 \pagestyle{wsfancy}
572 \fi
573 % \end{macrocode}
574 % \end{option}
575 %
576 % \begin{option}{frenchspacing}
577 % Set frenchspacing if needed.
578 % \begin{macrocode}
579 \ifws@frenchspacing
580 \frenchspacing
581 \fi
582 % \end{macrocode}
583 % \end{option}
584 %
585 %
586 % \section{The Titlepage}
587 %
588 % \subsection{The Caption Styles}
589 %
590 % \begin{option}{plxtex}
591 % If |true| use \textsf{microtype} for tracking(letter spacing),
592 % else use the \textsf{soulutf8} package.
593 % \begin{noindpackage}{microtype}
594 % \begin{package}{soulutf8}
595 % \begin{macrocode}
596 \ifws@plxtex
597 \newcommand{\spaced}[1]{%
598 \textls[250]{\ifPDFTeX\else\addfontfeatures{Renderer=Basic}\fi#1}}
599 \newcommand{\mainstyle}[1]{\Large\bfseries\textsc{\spaced{#1}}}
600 \else
601 \RequirePackage{soulutf8}
602 \newcommand{\spaced}[1]{\so{#1}}
603 \newcommand{\spaced}[1]{
604 {
605 \def\text{#1~}
606 \so\text
607 }
608 }
609 \newcommand{\mainstyle}[1]{\Large\bfseries\textsc{\spaced{#1\,}}}
610 \fi
611 % \end{macrocode}
612 % \end{package}
613 % \end{noindpackage}
614 % \end{option}
615 %
616 % Now we set the other caption styles for the title page.
617 % \begin{macrocode}
618 \newcommand{\submainstyle}[1]{#1}
619 \newcommand{\subjectstyle}[1]{\textit{#1}}
620 \newcommand{\titlestyle}[1]{\large\textit{#1}}
621 % \end{macrocode}
622 %
623 % \begin{option}{stricttitle}
624 % If |true|, make the main title uppercase and the title of the paper smaller.
625 % \begin{macrocode}
626 \ifws@stricttitle
627 \renewcommand{\mainstyle}[1]{\large\bfseries\MakeUppercase{\spaced{#1}}}
628 \renewcommand{\titlestyle}[1]{\textit{#1}}
629 \fi
630 % \end{macrocode}
631 % \end{option}
632 %
633 % \subsection{The Meta Information}
634 %
635 % \begin{indmacro}{\onlyhypermeta}
636 % This macro does sets PDF meta info or, if hyperref is not used, does nothing.
637 % \begin{macrocode}
638 \ifws@hyperref
639 \newcommand{\onlyhypermeta}[2]{
640 \hypersetup{
641 pdf#1=#2
642 }
643 }
644 \else
645 \newcommand{\onlyhypermeta}[2]{}
646 \fi
647 % \end{macrocode}
648 % \end{indmacro}
649 %
650 % \begin{indmacro}{\setmeta}
651 % This macro sets the \hologo{TeX} meta info.
652 % \begin{macrocode}
653 \newcommand{\setmeta}[2]{
654 {
655 \def\@metaname{@#1}
656 \expandafter\gdef\csname\@metaname\endcsname{#2}
657 }
658 }
659 % \end{macrocode}
660 % \end{indmacro}
661 %
662 % \begin{indmacro}{\sethypermeta}
663 % This macro sets the PDF and \hologo{TeX} meta info via the
664 % |\onlyhypermeta| and |\setmeta| macros.
665 % \begin{macrocode}
666 \newcommand{\sethypermeta}[2]{
667 \setmeta{#1}{#2}
668 \onlyhypermeta{#1}{#2}
669 }
670 % \end{macrocode}
671 % \end{indmacro}
672 %
673 % These macros store the
674 % \begin{indmacro}{\@author} author name,
675 % \begin{macrocode}
676 \renewcommand{\@author}{Author}
677 % \end{macrocode}
678 % \end{indmacro}
679 % \begin{indmacro}{\@title} title of the paper,
680 % \begin{macrocode}
681 \renewcommand{\@title}{Title}
682 % \end{macrocode}
683 % \end{indmacro}
684 % \begin{indmacro}{\@date} year of the abitur,
685 % \begin{macrocode}
686 \renewcommand{\@date}{Date}
687 % \end{macrocode}
688 % \end{indmacro}
689 % \begin{indmacro}{\@subject} subject of the paper,
690 % \begin{macrocode}
691 \newcommand{\@subject}{Subject}
692 % \end{macrocode}
693 % \end{indmacro}
694 % \begin{indmacro}{\@school} school,
695 % \begin{macrocode}
696 \newcommand{\@school}{School}
697 % \end{macrocode}
698 % \end{indmacro}
699 % \begin{indmacro}{\@major} major subject (`Leitfach'),
700 % \begin{macrocode}
701 \newcommand{\@major}{Major}
702 % \end{macrocode}
703 % \end{indmacro}
704 % \begin{indmacro}{\@teacher} teacher name,
705 % \begin{macrocode}
706 \newcommand{\@teacher}{Teacher Name}
707 % \end{macrocode}
708 % \end{indmacro}
709 % \begin{indmacro}{\@place} place where you write your thesis.
710 % \begin{macrocode}
711 \newcommand{\@place}{Place}
712 % \end{macrocode}
713 % \end{indmacro}
714 %
715 % The default values are only descriptions so that compiliation does not
716 % fail if one information is not specified.
717 %
718 % \begin{indmacro}{\author}
719 % \begin{indmacro}{\title}
720 % \begin{indmacro}{\date}
721 % \begin{indmacro}{\subject}
722 % \begin{indmacro}{\school}
723 % \begin{indmacro}{\major}
724 % \begin{indmacro}{\teacher}
725 % \begin{indmacro}{\place} These Macros can be used to set the meta info.
726 % \begin{macrocode}
727 \renewcommand{\author}[1]{\sethypermeta{author}{#1}}
728 \renewcommand{\title}[1]{\sethypermeta{title}{#1}}
729 \renewcommand{\date}[1]{\setmeta{date}{#1}}
730 \newcommand{\subject}[1]{\sethypermeta{subject}{#1}}
731 \newcommand{\school}[1]{\setmeta{school}{#1}}
732 \newcommand{\major}[1]{\setmeta{major}{#1}}
733 \newcommand{\teacher}[1]{\setmeta{teacher}{#1}}
734 \newcommand{\place}[1]{\setmeta{place}{#1}}
735 % \end{macrocode}
736 % \end{indmacro}
737 % \end{indmacro}
738 % \end{indmacro}
739 % \end{indmacro}
740 % \end{indmacro}
741 % \end{indmacro}
742 % \end{indmacro}
743 % \end{indmacro}
744 %
745 %
746 % \subsection{Set Captions}
747 %
748 % \begin{indmacro}{\newcaption} can be used to set a caption in a certain
749 % language.
750 %
751 % \emph{Only some of the captions on the title page use this yet!
752 % are only german!}
753 %
754 % \begin{macrocode}
755 \newcommand{\newcaption}[3]{
756 {
757 \def\@capname{caption@#1@#2}
758 \def\@dcapname##1{caption@##1@#2}
759 \expandafter\gdef\csname\@capname\endcsname{#3}
760 \expandafter\xdef\csname#2\endcsname{\csname\@dcapname{\ws@lang}\endcsname}
761 }
762 }
763 % \end{macrocode}
764 %
765 % Examples used here are:
766 % \begin{macrocode}
767 \newcaption{german}{qpname}{Qualifikationsphase}
768 \newcaption{german}{mainname}{Seminararbeit}
769 \newcaption{german}{submainname}{im Wissenschaftsprop\"adeutischen Seminar}
770 \newcaption{german}{authorname}{Verfasser}
771 \newcaption{german}{majorname}{Leitfach}
772 \newcaption{german}{teachername}{Seminarleiter}
773 \newcaption{german}{closingname}{Selbstst\"andigkeitserkl\"arung}
774 % \end{macrocode}
775 % \end{indmacro}
776 %
777 %
778 % \subsection{Building the Title Page}
779 %
780 % \begin{indmacro}{\placeholder} is a placeholder/form field to fill in things
781 % after printing.
782 % \begin{macrocode}
783 \newcommand{\placeholder}{\rule[-.5ex]{5cm}{.4pt}}
784 % \end{macrocode}
785 % \end{indmacro}
786 %
787 %
788 % \begin{indmacro}{\maketitle} is now changed to print our title page.
789 % \begin{macrocode}
790 \renewcommand{\maketitle}{
791 \begin{titlepage}
792 \ifws@strict \else
793 \newgeometry{left=2.5cm, right=2.5cm}
794 \fi
795 \setlength{\parindent}{\z@}
796 \setlength{\parfillskip}{\z@\@plus1fil}
797 %\setparsizes{\z@}{\z@}{\z@\@plus1fil}\par@updaterelative
798 \singlespacing
799 {\@school\hfill\@date\par}
800 {\qpname\par}
801 \vskip 7em
802 \begin{center}
803 {\mainstyle{\mainname}\par}
804 \vskip .5em
805 {\submainstyle{\submainname}\par}
806 \vskip .5em
807 {\subjectstyle{\@subject}\par}
808 \vskip .5em
809 {\titlestyle{\@title}\par}
810 \end{center}
811 \vskip 10em
812 \doublespacing
813 \begin{tabular}{rl}
814 \authorname: & \@author \\
815 \majorname: & \@major \\
816 \teachername: & \@teacher \\
817 Abgabetermin: & \placeholder \\[1em]
818 Note Seminararbeit: & \placeholder \\
819 Punkte Seminararbeit (einfache Wertung): & \placeholder \\
820 Punkte Pr\"asentation: & \placeholder \\
821 Gesamtleistung (doppelte Wertung): & \placeholder \\
822 Eintrag des Ergebnisses: & \placeholder \\[1em]
823 Unterschrift des Seminarleiters: & \placeholder
824 \end{tabular}
825 \ifws@strict \else
826 \restoregeometry
827 \fi
828 \end{titlepage}
829 \stepcounter{page}
830 }
831 % \end{macrocode}
832 % \end{indmacro}
833 %
834 %
835 % \section{The Bibliography}
836 %
837 % \begin{indmacro}{\makebib}
838 % \begin{option}{bibstyle}
839 % \begin{option}{bibfile}
840 % The bibliography is made using |\nobib{*}| so all entries in the bibliography
841 % file are printed.
842 % \begin{macrocode}
843 \newcommand{\makebib}{
844 \ifws@bib
845 \nocite{*}
846 \bibliographystyle{\ws@bibstyle}
847 \bibliography{\ws@bibfile}
848 \fi
849 }
850 % \end{macrocode}
851 % \end{option}
852 % \end{option}
853 % \end{indmacro}
854 %
855 %
856 % \section{The Closing}
857 %
858 % For Bavarian W-Seminar papers it is required that they contain a certain
859 % closing.
860 % \begin{indmacro}{\makeclosing}
861 % This closing is constructed here.
862 % \begin{macrocode}
863 \newcommand{\makeclosing}{
864 \newpage
865
866 \setlength{\parindent}{\z@}
867 \setlength{\parfillskip}{\z@\@plus1fil}
868 %\setparsizes{\z@}{\z@}{\z@\@plus1fil}\par@updaterelative
869 \chapter*{\protect\closingname}
870 \addcontentsline{toc}{chapter}{\protect\closingname}
871 {Ich erkl\"are, dass ich die Seminararbeit ohne fremde Hilfe angefertigt
872 und nur die im Literaturverzeichnis angef\"uhrten Quellen und Hilfsmittel
873 benutzt habe.\par}
874 \vskip 2em
875 {\@place, den \today\hfill\placeholder\par}
876 }
877 % \end{macrocode}
878 % \end{indmacro}
879 %
880 %
881 % \section{\ttfamily\char92{}At\emph{(Begin\textbar{}End)}Document}
882 %
883 % \begin{indmacro}{\AtBeginDocument}
884 % \begin{indmacro}{\AtEndDocument}
885 % \begin{macrocode}
886 \AtBeginDocument{\maketitle\tableofcontents}
887 \AtEndDocument{\makebib\makeclosing}
888 % \end{macrocode}
889 % \end{indmacro}
890 % \end{indmacro}
891 %
892 % \Finale
893 % \endinput
894 %
895 % vim: filetype=tex shiftwidth=2 tabstop=2 expandtab