-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathifathesis.cls
executable file
·827 lines (750 loc) · 35.5 KB
/
ifathesis.cls
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
%!TEX root = example.tex
%*******************************************************************************
% * Copyright (c) 2006-2013
% * Institute of Automation, Dresden University of Technology
% *
% * All rights reserved. This program and the accompanying materials
% * are made available under the terms of the Eclipse Public License v1.0
% * which accompanies this distribution, and is available at
% * http://www.eclipse.org/legal/epl-v10.html
% *
% * Contributors:
% * Institute of Automation - TU Dresden, Germany
% * - initial API and implementation
% ******************************************************************************/
\def\fileversion{0.1}
\def\filedate{2013/07/05}
\def\filename{ifathesis}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{\filename}[\filedate DA/SA-Klasse des Instituts fuer Automatisierungstechnik, (c) by Stefan Hennig, Arne Sonnenburg, Matthias Freund, Christopher Martin]
\typeout{Class: '\filename' Version \fileversion, Standard DA/SA-Klasse des Instituts fuer Automatisierungstechnik.}
\newif\if@useListOfFigures\@useListOfFiguresfalse
\DeclareOption{listoffigures}{\@useListOfFigurestrue}
\newif\if@useListOfTables\@useListOfTablesfalse
\DeclareOption{listoftables}{\@useListOfTablestrue}
\newif\if@useListOfListings\@useListOfListingsfalse
\DeclareOption{listoflistings}{\@useListOfListingstrue}
\newif\if@useAbbrevations\@useAbbrevationsfalse
\DeclareOption{abbrevations}{\@useAbbrevationstrue}
\newif\if@isReadyForPrint\@isReadyForPrinttrue
\DeclareOption{print}{\@isReadyForPrinttrue}
\DeclareOption{screen}{\@isReadyForPrintfalse}
\newif\if@isIfaLogo\@isIfaLogotrue
\DeclareOption{noIfaLogo}{\@isIfaLogofalse}
\newif\if@isAFivePaper\@isAFivePaperfalse
\DeclareOption{a5paper}{\@isAFivePapertrue}
\newcommand*{\@ifaThesisLanguage}{de}
\DeclareOption{langDE}{\renewcommand*{\@ifaThesisLanguage}{de}}
\DeclareOption{langEN}{\renewcommand*{\@ifaThesisLanguage}{en}}
\newcommand*{\@ifaBibliographyStyle}{}
\DeclareOption{bibIfa}{\renewcommand*{\@ifaBibliographyStyle}{authoryear-comp}}
\DeclareOption{bibHarvard}{\renewcommand*{\@ifaBibliographyStyle}{alphabetic}}
\DeclareOption{bibNumeric}{\renewcommand*{\@ifaBibliographyStyle}{numeric-comp}}
\newcommand*{\@ifaBibliographyBackend}{bibtex8}
\DeclareOption{bibtex}{\renewcommand*{\@ifaBibliographyBackend}{bibtex}}
\DeclareOption{bibtex8}{\renewcommand*{\@ifaBibliographyBackend}{bibtex8}}
\DeclareOption{biber}{\renewcommand*{\@ifaBibliographyBackend}{biber}}
\ProcessOptions\relax
% Lade Basisklasse der Vorlage
\PassOptionsToPackage{%
\if@isAFivePaper paper=a5\else paper=a4\fi, % Papiergröße
headinclude=true, % Gehört Kopfzeile eher zur Seite oder zum Rand?
footinclude=false, % Gehört Fußzeile eher zur Seite oder zum Rand?
pagesize % Schreibt die Seitengröße ins Seitenregister,
% sodass DVI- und PDF-Seiten die richtige Größe haben.
}{typearea}
\PassOptionsToPackage{svgnames}{xcolor} % Namensraum für xcolor Paket
\PassOptionsToPackage{fleqn}{amsmath}
% Grundschriftgröße
\newcommand{\FONT}{
\if@isAFivePaper 9pt\else 12pt\fi
}
% Binderandgröße
\newcommand{\BCOR}{%
\if@isReadyForPrint%
\if@isAFivePaper 10mm\else 15mm\fi
\else%
0mm
\fi
}
% Teil der Seite, der als Seitenrand berücksichtigt wird (auch =calc mgl.):
% Z.B. DIV=10: Randbreite Oben und Mitte 1/10, Unten und Außen 2/10 der Seite.
% Regel: 60 bis 70 Zeichen pro Zeile, weniger ist besser, niemals mehr als 80!
\newcommand{\DIV}{%
\if@isReadyForPrint%
\if@isAFivePaper 13\else 10\fi
\else%
\if@isAFivePaper 11\else 9\fi
\fi
}
\LoadClass[
fontsize=\FONT, % Grundschriftgröße
BCOR=\BCOR, % Binderandgröße
DIV=\DIV, % Seitenaufteilung
captions=tableheading, % Tabellenabstände für TabellenÜBERschriften optimieren
\if@isReadyForPrint twoside=true\else twoside=false\fi, % Dokument zweiseitig?
headings=small, % Relative Größe der Überschriften, small ist besser lesbar und erzeugt weniger Zweizeiligs
fleqn, % Formeln linksbündig
bibliography=totoc, % Literaturverzeichnis im Inhaltsverzeichnis referenziert
numbers=noenddot % Punkte nach Abschnittsnummern? (Weglassen = Automatik)
% Nach Duden im vorliegenden Bsp. falsch, da auch Buchstaben in Gliederung (Anhang), sieht aber besser aus.
]{scrbook} % Basisklasse der Vorlage: Koma-Skrip Klasse analog zur book-Klasse.
\addtokomafont{chapterprefix}{\mdseries}
\if@isAFivePaper
\setkomafont{chapterprefix}{\huge}
\setkomafont{chapter}{\Huge}
\fi
% ==============================================================
% = Definiere mögliche Parameter zur Konfiguration der Vorlage =
% ==============================================================
%%%%%
% Jetzt müssen zunächst die variablen Angaben geladen werden
\newcommand*{\@ifaThesis}{Diplomarbeit} % Type of the thesis
\newcommand*{\@ifaDissertationStage}{Gutachten} % Only used in 'Dissertation' mode to indicate the stage of the work ('Gutachten' oder 'Pflichtexemplare')
\newcommand*{\@ifaAuthor}{Max Mustermann}
\newcommand*{\@ifaAuthorBirthday}{01.01.1970}
\newcommand*{\@ifaAuthorBirthplace}{Dresden}
\newcommand*{\@ifaAuthorCourse}{Informationssystemtechnik}
\newcommand*{\@ifaAuthorYearOfMatriculation}{2000}
\newcommand*{\@ifaKeywords}{Komma-separierte, Liste, mit, Schlagwörtern, zum Thema, der Arbeit}
\newcommand*{\@ifaTitleDE}{Titel der Arbeit}
\newcommand*{\@ifaTitleEN}{Thesis' title goes here}
\newcommand*{\@ifaChair}{} % Wird nur im Modus 'Dissertation' zur Angabe des Vorsitzenden der Prüfungskommission verwendet
\newcommand*{\@ifaSupervisorA}{}
\newcommand*{\@ifaSupervisorB}{}
\newcommand*{\@ifaSupervisorC}{}
\newcommand*{\@ifaSupervisorD}{}
\newcommand*{\@ifaSupervisorE}{}
\newcommand*{\@ifaProfessor}{Titel der Arbeit}
\newcommand*{\@ifaDayOfSubmission}{\today}
\newcommand*{\@ifaDayOfDefense}{} % Wird nur im Modus 'Dissertation' zur Angabe des Tags der Verteidigung verwendet
\newcommand*{\@ifaTopicDescriptionPDF}{he0ohDie}
\newcommand*{\@ifaAppendix}{GoHaigh2}
\newcommand*{\@ifaAbstractDE}{GoHaigh2}
\newcommand*{\@ifaAbstractEN}{GoHaigh2}
\newcommand*{\@ifaReferences}{IPhei0Ox}
\newcommand*{\@ifaAbbrev}{00_Abbrev}
\newcommand*{\@ifaUserListings}{}
\newcommand*{\@ifaAcknowledgements}{}
\newcommand*{\@ifaBibliographyBeforeAppendix}{true}
\newcommand*{\@ifaAdditionalContributors}{}
\newcommand*{\@ifaCV}{cv}
\newcommand*{\@ifaIncludeBeforeTitlePage}{} % Can be used for 'Dissertations' to include additional content before the title page (e.g. for a bastard title or an impressum)
\newcommand*{\@ifaIncludeAfterTitlePage}{} % Can be used for 'Dissertations' to include additional content between the title page and abstract (e.g. for an impressum)
\newcommand*{\@ifaIncludeAtEndOfDocument}{} % Can be used for 'Dissertations' to include additional content at the end of the document (e.g. to achieve an even number of pages)
\newcommand*{\ifaThesis}[1]{\renewcommand*{\@ifaThesis}{#1}}
\newcommand*{\ifaDissertationStage}[1]{\renewcommand*{\@ifaDissertationStage}{#1}}
\newcommand*{\ifaAuthor}[1]{\renewcommand*{\@ifaAuthor}{#1}}
\newcommand*{\ifaAuthorBirthday}[1]{\renewcommand*{\@ifaAuthorBirthday}{#1}}
\newcommand*{\ifaAuthorBirthplace}[1]{\renewcommand*{\@ifaAuthorBirthplace}{#1}}
\newcommand*{\ifaAuthorCourse}[1]{\renewcommand*{\@ifaAuthorCourse}{#1}}
\newcommand*{\ifaAuthorYearOfMatriculation}[1]{\renewcommand*{\@ifaAuthorYearOfMatriculation}{#1}}
\newcommand*{\ifaKeywords}[1]{\renewcommand*{\@ifaKeywords}{#1}}
\newcommand*{\ifaTitleDE}[1]{\renewcommand*{\@ifaTitleDE}{#1}}
\newcommand*{\ifaTitleEN}[1]{\renewcommand*{\@ifaTitleEN}{#1}}
\newcommand*{\ifaChair}[1]{\renewcommand*{\@ifaChair}{#1}}
\newcommand*{\ifaSupervisorA}[1]{\renewcommand*{\@ifaSupervisorA}{#1}}
\newcommand*{\ifaSupervisorB}[1]{\renewcommand*{\@ifaSupervisorB}{#1}}
\newcommand*{\ifaSupervisorC}[1]{\renewcommand*{\@ifaSupervisorC}{#1}}
\newcommand*{\ifaSupervisorD}[1]{\renewcommand*{\@ifaSupervisorD}{#1}}
\newcommand*{\ifaSupervisorE}[1]{\renewcommand*{\@ifaSupervisorE}{#1}}
\newcommand*{\ifaProfessor}[1]{\renewcommand*{\@ifaProfessor}{#1}}
\newcommand*{\ifaDayOfSubmission}[1]{\renewcommand*{\@ifaDayOfSubmission}{#1}}
\newcommand*{\ifaDayOfDefense}[1]{\renewcommand*{\@ifaDayOfDefense}{#1}}
\newcommand*{\ifaTopicDescriptionPDF}[1]{\renewcommand*{\@ifaTopicDescriptionPDF}{#1}}
\newcommand*{\ifaAppendix}[1]{\renewcommand*{\@ifaAppendix}{#1}}
\newcommand*{\ifaAbstractDE}[1]{\renewcommand*{\@ifaAbstractDE}{#1}}
\newcommand*{\ifaAbstractEN}[1]{\renewcommand*{\@ifaAbstractEN}{#1}}
\newcommand*{\ifaReferences}[1]{\renewcommand*{\@ifaReferences}{#1}}
\newcommand*{\ifaAcknowledgements}[1]{\renewcommand*{\@ifaAcknowledgements}{#1}}
\newcommand*{\ifaAbbrev}[1]{\renewcommand*{\@ifaAbbrev}{#1}}
\newcommand*{\ifaUserListings}[1]{\renewcommand*{\@ifaUserListings}{#1}}
\newcommand*{\ifaBibliographyBeforeAppendix}[1]{\renewcommand*{\@ifaBibliographyBeforeAppendix}{#1}}
\newcommand*{\ifaAdditionalContributors}[1]{\renewcommand*{\@ifaAdditionalContributors}{#1}}
\newcommand*{\ifaCV}[1]{\renewcommand*{\@ifaCV}{#1}}
\newcommand*{\ifaIncludeBeforeTitlePage}[1]{\renewcommand*{\@ifaIncludeBeforeTitlePage}{#1}}
\newcommand*{\ifaIncludeAfterTitlePage}[1]{\renewcommand*{\@ifaIncludeAfterTitlePage}{#1}}
\newcommand*{\ifaIncludeAtEndOfDocument}[1]{\renewcommand*{\@ifaIncludeAtEndOfDocument}{#1}}
% Not required any longer in order to enable students that do not own the TUD fonts to use the class file...
% % Schriftspezifische Definitionen
% \DeclareFixedFont{\univLightIX}{T1}{aun}{l}{n}{\if@isAFivePaper 7\else 9\fi}
% \DeclareFixedFont{\univBoldIX}{T1}{aun}{b}{n}{\if@isAFivePaper 7\else 9\fi}
%-------------------------------------------------------------------------
\RequirePackage{ifthen}
% Paket für einfache Realisation von String-Vergleichen, die hier in der Vorlage verwendet werden
\RequirePackage{xstring}
% Absatznummerierung fuer 4 Ebenen (z.B. 2.3.2.1) gemaess IfA Richtlinie einschalten.
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\RequirePackage{scrhack} %Zur Herstellung der Kompabilitaet mit Paketen, die nicht kompatibel zum KOMA-Script sind.
% Muss 'atEndOfClass' geladen werden, da es sonst zu Problemen kommt (bibtex/biber meldet, es könnten Verweise nicht aufgelöst werden, obwohl dies nicht der Fall ist)
\AtEndOfClass{
\RequirePackage[ % Verwendung von biblatex für das Literaturverzeichnis
style=\@ifaBibliographyStyle,
backend=\@ifaBibliographyBackend,
maxbibnames=1,
backref=true,
natbib=true
]{biblatex}
% Erlaube URL-Linebreaks
\setcounter{biburlnumpenalty}{6000}% Penalty für Zahlenumbruch
\setcounter{biburlucpenalty}{3000} % Penalty für Umbruch an Großbuchstaben
\setcounter{biburllcpenalty}{9000} % Penalty für Umbruch an Kleinbuchstaben
\interfootnotelinepenalty=9999 % Verhindert, dass Fußnoten auf zwei Seiten verteilt werden
}
% Lade weitere benötigte Pakete
\include{packages}
% definiere Farben
\definecolor{TUDBLAU}{rgb}{0.0,0.348,0.637}
\definecolor{OSGREEN}{rgb}{0,0.75,0.25}
% Kläre zunächst einige Dinge, die von der Sprache abhängen
\ifthenelse{\equal{\@ifaThesisLanguage}{de}}{
% Deutsche Pakete
\RequirePackage[ngerman]{babel} % Silbentrennung nach neuer deutscher Rechtschreibung.
\RequirePackage[german]{nomencl}
% Deutsche Begrifflichkeiten
\newcommand{\@conTitle}{Inhaltsverzeichnis}
\newcommand{\@bibTitle}{Literaturverzeichnis}
\newcommand{\@appTitle}{Anhang}
\renewcommand{\@pdftitle}{\@ifaTitleDE}
\renewcommand{\nomname}{Abkürzungs- und Symbolverzeichnis}
\renewcommand{\lstlistlistingname}{Quelltextverzeichnis}
}{
% Englische Pakete
\RequirePackage[english]{babel} % Silbentrennung nach englischer Rechtschreibung.
\RequirePackage[english]{nomencl}
% Englische Begrifflichkeiten
\newcommand{\@conTitle}{Contents}
\newcommand{\@bibTitle}{References}
\newcommand{\@appTitle}{Appendix}
\renewcommand{\@pdftitle}{\@ifaTitleEN}
\renewcommand{\nomname}{Nomenclature}
\renewcommand{\lstlistlistingname}{List of Listings}
}
%-------------------------------------------------------------------------
% Inserts the typical IfA header including the TU and IfA logo as well as
% the faculty and institute name
%-------------------------------------------------------------------------
\newcommand{\@ifaPrintHeader}{%
\begin{center}
\vspace*{\if@isAFivePaper -18.83mm\else -26.63mm\fi} % height of the logo (16.73mm) + skip below the logo (3.75mm) + one line (approx. 6.15mm)
\begin{tabular*}{\textwidth}[b]{@{}p{\textwidth}@{}}%@{\extracolsep\fill}
% TUD-Logo
\hspace*{\if@isAFivePaper -13.44mm\else -19mm\fi}\includegraphics[height=\if@isAFivePaper 11.83mm\else 16.73mm\fi]{TU_Logo_SW}% width=57mm
\hfill
% IfA-Logo
\ifthenelse{\not\equal{\@ifaThesis}{Dissertation}}{ % According to Frau Wermuth, there must only be the TU logo on the title page of a dissertation
\if@isIfaLogo \includegraphics[height=\if@isAFivePaper 11.83mm\else 16.73mm\fi]{IfA_Logo_SW}\fi
}{}
\\[\if@isAFivePaper 2.65mm\else 3.75mm\fi]
\hline%
\newcommand{\IfAHeaderHeight}{\if@isAFivePaper 11pt\else 13pt\fi}
%
% Include a PDF that prints the 'faculty' and 'institute' name so that we do depend on the TUD fonts...
\parbox[c][\IfAHeaderHeight][c]{\textwidth}{\includegraphics[width=.9\textwidth]{IfA_Header}}
%
% ..., however, if these are available, we could generate the header without relying on the PDF file
% \rule[-1.2mm]{1mm}{\if@isAFivePaper 11pt\else 13pt\fi}
% % Einrichtungsname
% \rule[-1.2mm]{0mm}{IfAHeaderHeight}\univBoldIX Fakult{\"a}t Elektrotechnik und Informationstechnik%
% % Institut
% \ \univLightIX Institut f{\"u}r Automatisierungstechnik%
\\
\hline
\end{tabular*}%
\end{center}
}
%-------------------------------------------------------------------------
% Macht im Anhang aus "A Quellcode" -> "Anhang A Quellcode"
%-------------------------------------------------------------------------
\newcommand*{\appendixmore}{%
\renewcommand*{\chapterformat}{%
\appendixname~\thechapter\autodot:\enskip}
\renewcommand*{\chaptermarkformat}{%
\appendixname~\thechapter\autodot:\enskip}
}
%-------------------------------------------------------------------------
% Veränderung der Bildunterschriften und Tabellenüberschriften:
\addtokomafont{caption}{\small} % Kleinere Schriftgröße für Captions
\setkomafont{captionlabel}{\sffamily\bfseries} % Caption-Label fett und serifenlos
\setcapindent{1em} % 2. Zeile der Caption mit hängendem Einzug
%-------------------------------------------------------------------------
% Anpassung des Literaturverzeichnisses
%-------------------------------------------------------------------------
\AtEndOfClass{ % muss 'atEndOfClass' ausgeführt werden, da das 'biblatex'-Paket erst dann geladen wird (s.o.)
\setlength{\bibitemsep}{10pt}
\defbibheading{bibliography}{
\chapter*{\@bibTitle}
\addcontentsline{toc}{chapter}{\@bibTitle}
}
% Notwendig für Autovervollständigung der Zitate im Texnic Center
\renewcommand*{\bibliography}[1]{\addbibresource{#1.bib}}
% Anpassung für eckige Klammern bei 'authoryear-comp'
\ifthenelse{\equal{\@ifaBibliographyStyle}{authoryear-comp}}{\renewcommand*{\citep}[2][]{\mkbibbrackets{\cite[#1]{#2}}}}{}
}
%-------------------------------------------------------------------------
% Löst Probleme mit deutschen Umlauten in Listings
%-------------------------------------------------------------------------
\lstset{literate=%
{Ö}{{\"O}}1
{Ä}{{\"A}}1
{Ü}{{\"U}}1
{ß}{{\ss}}2
{ü}{{\"u}}1
{ä}{{\"a}}1
{ö}{{\"o}}1
}
%-------------------------------------------------------------------------
% Integriert Listings und baut diese als Gleitobjekt aus, wenn gewünscht
%-------------------------------------------------------------------------
% Usage: \listing{<Caption>}{<Label>}{<[Dialect]Language>}{<Pfad>}{<float?>}
\newcommand*{\ifalisting}[6]{
\renewcommand{\lstlistingname}{\hspace{-0.6cm}Listing}
\ifthenelse{\equal{#6}{true}}{
\ifalistingFloat{#1}{#2}{#3}{#4}{#5}
}{
\ifalistingNoFloat{#1}{#2}{#3}{#4}{#5}
}
\vspace{4.5mm}
}
\newcommand*{\ifalistingFloat}[5]{%
\begin{minipage}{0.96\textwidth}
\lstset{belowcaptionskip=2mm} % Abstand unterhalb der Beschriftung
\ifalistingRaw{#1}{#2}{#3}{#4}{#5}
\end{minipage}
}
% Thanks to Matthias Freund who provided the code to enables listings which are longer than one page.
%
\newcommand*{\ifalistingNoFloat}[5]{%
\begin{addmargin}[4mm]{1.5mm} % verändert den Abstand ohne Verwendung einer Minipage
\lstset{belowcaptionskip=2mm} % Abstand unterhalb der Beschriftung
\ifalistingRaw{#1}{#2}{#3}{#4}{#5}
\vspace{-1mm}
\begin{flushright}
\scriptsize
Listing \ref{#2}
\end{flushright}
\end{addmargin}
}
\newcommand*{\ifalistingRaw}[5]{
\lstinputlisting[
caption={#1},
label={#2},
language={#3},
keywordstyle=\color{blue},
identifierstyle=\color{black},
stringstyle=\itshape\color{red},
basicstyle=\ttfamily\color{darkgray}\footnotesize,% Schriftschnitt des Codes
showstringspaces=false, % Leerzeichen nicht markieren
commentstyle=\ttfamily\color{teal}, % Schriftschnitt der Kommentare
tabsize=2, % Tabulatorengröße in Leerzeichen
breaklines=true, % zu lange Zeilen umbrechen
frame=tb, % Rahmen um das Listing
abovecaptionskip=3mm, % Abstand oberhalb der Beschriftung
captionpos=t, % Position der Beschriftung (b=bottom, t=top)
numbers=#4,
numbersep=5pt
]{#5}
}
% Erlaubt das Einfügen eines automatischen Symbolverzeichnisses
% Definiere die richtige Sprache (bspw. für Silbentrennung, ...)
% [Die entsprechenden Pakete wurden bereits eingefügt]
\makenomenclature
% Jetzt geht es los...
\AtBeginDocument{%
% colorlinks: Farbige Verweise statt Umrahmung
% Verhalten von hyperef Ändern: Farbe für Bildschirm, SW für Druck
% ...color: Farbe verschiedener Verweise nach Farbpalette svgnames
% pdf...: Setzten von Variablen die in den Eigenschaften der PDF-Datei angzeigt werden
% Weitere Optionen möglich - siehe Dokumentation des Paktes hyperref
\hypersetup{
linkcolor=\if@isReadyForPrint black\else TUDBLAU\fi,%
urlcolor=\if@isReadyForPrint black\else TUDBLAU\fi,%
citecolor=\if@isReadyForPrint black\else OSGREEN\fi,%
pdftitle=\@pdftitle,%
pdfauthor=\@ifaAuthor,%
pdfsubject=\@pdftitle,%
pdfkeywords={\@ifaKeywords}%,%
}
\ifthenelse{\not\equal{\@ifaThesis}{Dissertation}}{%
\if@isAFivePaper %
\ClassWarning{ifathesis}{%
Klassenoption 'a5paper' sollte nur bei Dissertationen gewählt werden. Studienarbeiten, Diplomarbeiten, etc. sind grundsätzliche auf A4 zu drucken!
}%
\fi%
}{
% Show chapter prefixes if in 'Pflichtexemplare' mode:
% % 'Kapitel 1\nKapitelname' instead of '1. Kapitelname'?
\ifthenelse{\equal{\@ifaDissertationStage}{Pflichtexemplare}}{\KOMAoption{chapterprefix}{true}}{}
}
\frontmatter
% ================================================
% = Bastard title, etc. (only for dissertations) =
% ================= ==============================
\ifthenelse{\equal{\@ifaThesis}{Dissertation}}{
\ifthenelse{\equal{\@ifaDissertationStage}{Pflichtexemplare}}{
\IfFileExists{\@ifaIncludeBeforeTitlePage}{
\pagestyle{empty}
\input{\@ifaIncludeBeforeTitlePage}
\cleardoublepage
}{}
}{}
}{}
% =================
% = Titelseite(n) =
% =================
\begin{titlepage}
\@ifaPrintHeader
% A dissertation will get a different titlepage
\ifthenelse{\not\equal{\@ifaThesis}{Dissertation}}{
% ===============================
% = Diplom-, Studienarbeit etc. =
% ===============================
\begin{center}
\vfill
\vfill
{\huge\textsc{\@ifaThesis}}\\[0.5cm]
zum Thema \\[0.5cm]
{\large \IfStrEq{\@ifaThesisLanguage}{de}{\@ifaTitleDE}{\@ifaTitleEN}}\\
\vfill
\begin{tabular}{rl}
vorgelegt von & \@ifaAuthor \\
im Studiengang & \@ifaAuthorCourse,\:Jg.\:\@ifaAuthorYearOfMatriculation \\
geboren am & \@ifaAuthorBirthday\:in\:\@ifaAuthorBirthplace\\
\end{tabular}
\vfill
\ifthenelse{\equal{\@ifaThesis}{Diplomarbeit}}{
{\large zur Erlangung des akademischen Grades eines} \\[0.2cm]
{\Large Diplomingenieurs\\[0.2cm](Dipl.-Ing.)}
\vfill
}{
\vfill
\vfill
}
\begin{tabular}{rl}
Betreuer: \ifthenelse{\equal{\@ifaSupervisorA}{}}{}{&\@ifaSupervisorA\\ \ifthenelse{\equal{\@ifaSupervisorB}{}}{}{&\@ifaSupervisorB\\ \ifthenelse{\equal{\@ifaSupervisorC}{}}{}{&\@ifaSupervisorC\\\ifthenelse{\equal{\@ifaSupervisorD}{}}{}{&\@ifaSupervisorD\\ \ifthenelse{\equal{\@ifaSupervisorE}{}}{}{&\@ifaSupervisorE\\}}}}}
Verantwortlicher Hochschullehrer: & \@ifaProfessor \\
Tag der Einreichung: & \@ifaDayOfSubmission \\
\end{tabular}
\end{center}
}{
% ================
% = Dissertation =
% ================
\begin{center}
\vfill
\vfill
\setstretch{1.7}
% The german title always needs to be the 'main' title (disregarding the actual language of the dissertation).
{\if@isAFivePaper \LARGE\else \Large\fi {\bfseries\@ifaTitleDE}}
% However, if the language of the dissertation is english, we also add the english title as 'secondary' title.
\IfStrEq{\@ifaThesisLanguage}{de}{}{%
\\[5mm]
{\if@isAFivePaper \LARGE\else \Large\fi \@ifaTitleEN}
}
\\[5mm]
\setstretch{1}
\vfill
{\if@isAFivePaper \Large\else \large\fi\bfseries\@ifaAuthor}
\vfill
\vfill
\ifthenelse{\equal{\@ifaDissertationStage}{Pflichtexemplare}}{von }{}der Fakultät Elektrotechnik und Informationstechnik\\
der Technischen Universität Dresden\\[5mm]
zur Erlangung des akademischen Grades eines\\[2mm]
{\if@isAFivePaper \LARGE\else \Large\fi{\bfseries Doktoringenieurs}\\[0.2cm](Dr.-Ing.)}\\[5mm]
\ifthenelse{\equal{\@ifaDissertationStage}{Pflichtexemplare}}{genehmigte }{vorgelegte }Dissertation\\[5mm]
------ \ding{91} ------
\vfill
\begin{tabular}{rl}
% Only print the 'Vorsitzender', 'Gutachter', and 'Tag der Verteidigung' during the 'Pflichtexemplare' stage
\ifthenelse{\equal{\@ifaDissertationStage}{Gutachten}}{}{%
\ifthenelse{\equal{\@ifaChair}{}}{%
\ClassWarning{ifathesis}{%
Kein(e) Vorsitzende(r) der Promotionskommission angegeben. Dies ist fuer die Pflichtexemplare der Dissertation unbedingt erforderlich.
}%
}{%
Vorsitzender: & \@ifaChair \vspace*{.7em}\\%
}%
}%
\ifthenelse{\equal{\@ifaDissertationStage}{Gutachten}}{}{%
\ifthenelse{\equal{\@ifaSupervisorA}{}}{\ClassWarning{ifathesis}{Kein(e) erste(r) Gutachter(in) angegeben. Dies ist fuer die Pflichtexemplare der Dissertation unbedingt erforderlich.}}{}%
\ifthenelse{\equal{\@ifaSupervisorB}{}}{\ClassWarning{ifathesis}{Kein(e) zweite(r) Gutachter(in) angegeben. Dies ist fuer die Pflichtexemplare der Dissertation unbedingt erforderlich.}}{}%
Gutachter: \ifthenelse{\equal{\@ifaSupervisorA}{}}{}{&\@ifaSupervisorA\vspace*{.1em}\ifthenelse{\equal{\@ifaSupervisorB}{}}{}{\\&\@ifaSupervisorB\vspace*{.1em}\ifthenelse{\equal{\@ifaSupervisorC}{}}{}{\\&\@ifaSupervisorC\vspace*{.1em}\ifthenelse{\equal{\@ifaSupervisorD}{}}{}{\\&\@ifaSupervisorD\vspace*{.1em}\ifthenelse{\equal{\@ifaSupervisorE}{}}{}{\\&\@ifaSupervisorE\vspace*{.1em}}}}}}\vspace*{.6em}\\%
}
Tag der Einreichung: & \@ifaDayOfSubmission\vspace*{.7em}\\
\ifthenelse{\equal{\@ifaDissertationStage}{Gutachten}}{}{%
\ifthenelse{\equal{\@ifaDayOfDefense}{}}{%
\ClassWarning{ifathesis}{%
Kein Tag der Verteidigung angegeben. Dies ist fuer die Pflichtexemplare der Dissertation unbedingt erforderlich.
}%
}{%
Tag der Verteidigung: & \@ifaDayOfDefense \\%
}%
}%
\end{tabular}
\end{center}
}
\end{titlepage}
% ================================================
% = Impressum, etc. (only for dissertations) =
% ================= ==============================
\ifthenelse{\equal{\@ifaThesis}{Dissertation}}{
\ifthenelse{\equal{\@ifaDissertationStage}{Pflichtexemplare}}{
\clearpage
\IfFileExists{\@ifaIncludeAfterTitlePage}{
\pagestyle{empty}
\input{\@ifaIncludeAfterTitlePage}
}{}
}{}
}{}
\cleardoublepage
\begingroup
\ifthenelse{\not\equal{\@ifaThesis}{Dissertation}}{
% Im Vorspann nur Seiten ohne Kopf- und Fußzeile (außer Abschnittsbeginn)
\pagestyle{empty}
% Auch Abschnittsbeginn ohne Kopf- und Fußzeile
\renewcommand*{\chapterpagestyle}{empty}
}{
% Im Vorspann werden kleine römische Seitenzahlen genutzt
\pagestyle{scrheadings}
}
% Aufgabenstellung
\IfFileExists{\@ifaTopicDescriptionPDF} {
\includepdf{\@ifaTopicDescriptionPDF}
\cleardoublepage
}{
\ifthenelse{\not\equal{\@ifaThesis}{Dissertation}}{
\ClassWarning{ifathesis}{Es wurde keine Aufgabenstellung angegeben.}
}{}
}
% Danksagung
\IfFileExists{\@ifaAcknowledgements}{
\chapter*{\IfStrEq{\@ifaThesisLanguage}{de}{Danksagung}{Acknowledgements}}
\input{\@ifaAcknowledgements}
\cleardoublepage
}{}
% Kurzfassungen
\IfFileExists{\@ifaAbstractDE}{
\ifthenelse{\not\equal{\@ifaThesis}{Dissertation}}{
\@ifaPrintHeader
\vfill
\section*{\@ifaTitleDE}
\input{\@ifaAbstractDE}
\vfill
\begin{flushleft}
\scriptsize
\begin{tabular}{ll}
Betreuer: \ifthenelse{\equal{\@ifaSupervisorA}{}}{}{&\@ifaSupervisorA\\ \ifthenelse{\equal{\@ifaSupervisorB}{}}{}{&\@ifaSupervisorB\\ \ifthenelse{\equal{\@ifaSupervisorC}{}}{}{&\@ifaSupervisorC\\ \ifthenelse{\equal{\@ifaSupervisorD}{}}{}{&\@ifaSupervisorD\\ \ifthenelse{\equal{\@ifaSupervisorE}{}}{}{&\@ifaSupervisorE\\}}}}}Hochschullehrer: &\@ifaProfessor\\Tag der Einreichung: &\@ifaDayOfSubmission \\
\end{tabular}
\hfill
\hrule
\vspace{.2cm}\normalsize
\ifthenelse{\equal{\@ifaThesis}{Diplomarbeit}}{DIPLOMARBEIT}{}
\ifthenelse{\equal{\@ifaThesis}{Masterarbeit}}{MASTERARBEIT}{}
\ifthenelse{\equal{\@ifaThesis}{Bachelorarbeit}}{BACHELORARBEIT}{}
\ifthenelse{\equal{\@ifaThesis}{Studienarbeit}}{STUDIENARBEIT}{}
\ifthenelse{\equal{\@ifaThesis}{Final Project}}{FINAL PROJECT}{}
\ifthenelse{\equal{\@ifaThesis}{Forschungspraktikum}}{FORSCHUNGSPRAKTIKUM}{}
\hfill Bearbeiter: \@ifaAuthor
\end{flushleft}
}{
\thispagestyle{\chapterpagestyle}
\chapter*{Kurzfassung}
\addcontentsline{toc}{chapter}{Kurzfassung}%
\input{\@ifaAbstractDE}
}
\cleardoublepage
}{
% no german abstract found
\ifthenelse{\equal{\@ifaThesis}{Dissertation}}{
\ifthenelse{\equal{\@ifaDissertationStage}{Gutachten}}{}{%
\ClassWarning{ifathesis}{%
Konnte die deutsche Kurzfassung nicht finden. Diese ist fuer die Pflichtexemplare der Dissertation unbedingt
erforderlich.
}
}
}{
\ClassWarning{ifathesis}{
Konnte die deutsche Kurzfassung nicht finden. Diese ist fuer Arbeiten am Institut fuer
Automatisierungstechnik unbedingt erforderlich. Sollte die Vorlage anderswo verwendet,
dann kann diese Warnung ignoriert werden.
}
}
}
% Englische Kurzfassung
\IfFileExists{\@ifaAbstractEN}{
\ifthenelse{\not\equal{\@ifaThesis}{Dissertation}}{
\@ifaPrintHeader
\vfill
\section*{\@ifaTitleEN}
\input{\@ifaAbstractEN}
\vfill
\begin{flushleft}
\scriptsize
\begin{tabular}{ll}
Tutor: \ifthenelse{\equal{\@ifaSupervisorA}{}}{}{&\@ifaSupervisorA\\ \ifthenelse{\equal{\@ifaSupervisorB}{}}{}{&\@ifaSupervisorB\\ \ifthenelse{\equal{\@ifaSupervisorC}{}}{}{&\@ifaSupervisorC\\ \ifthenelse{\equal{\@ifaSupervisorD}{}}{}{&\@ifaSupervisorD\\ \ifthenelse{\equal{\@ifaSupervisorE}{}}{}{&\@ifaSupervisorE\\}}}}}Supervisor: &\@ifaProfessor\\Day of Submission: &\@ifaDayOfSubmission \\
\end{tabular}
\hfill
\hrule
\vspace{.2cm}\normalsize
\ifthenelse{\equal{\@ifaThesis}{Diplomarbeit}}{DIPLOMA THESIS}{STUDENT RESEARCH THESIS}
\hfill Author: \@ifaAuthor
\end{flushleft}
}{
{
\thispagestyle{\chapterpagestyle}
\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}%
\input{\@ifaAbstractEN}
}
}
\cleardoublepage
}{
% no english abstract found
\ifthenelse{\equal{\@ifaThesis}{Dissertation}}{
\ifthenelse{\equal{\@ifaDissertationStage}{Gutachten}}{}{%
\ClassWarning{ifathesis}{%
Konnte die englische Kurzfassung nicht finden. Diese ist fuer die Pflichtexemplare der Dissertation unbedingt
erforderlich.
}
}
}{
\ClassWarning{ifathesis}{
Konnte die englische Kurzfassung nicht finden. Diese ist fuer Arbeiten am Institut fuer
Automatisierungstechnik unbedingt erforderlich. Sollte die Vorlage anderswo verwendet,
dann kann diese Warnung ignoriert werden.
}
}
}
% Verzeichnisse
\ifthenelse{\not\equal{\@ifaThesis}{Dissertation}}{
\pdfbookmark[0]{\@conTitle}{toc}
}{
% Da für Dissertationen Kurzfassung, Abstract, LOF, etc. ins Inhaltsverzeichnis aufgenommen werden, sollte der Vollständigkeit halber auch das Inhaltsverzeichnis selbst aufgenommen werden (ansonsten entsteht eine 'Lücke')
\setuptoc{toc}{totoc}
}
\tableofcontents
\clearpage
\if@useListOfFigures
\listoffigures
\cleardoublepage
\fi
\if@useListOfTables
\listoftables
\cleardoublepage
\fi
\if@useListOfListings
\lstlistoflistings
\cleardoublepage
\fi
\IfFileExists{\@ifaUserListings}{
\input{\@ifaUserListings}
\cleardoublepage
}{}
\if@useAbbrevations
\IfFileExists{\@ifaAbbrev}{
\input{\@ifaAbbrev}
\cleardoublepage
}{}
\fi
\endgroup
\mainmatter
\pagestyle{scrheadings}
}
% ...und gleich ist Schluss!
\AtEndDocument{
\cleardoublepage
% Auch Abschnittsbeginn ohne Kopf- und Fußzeile
%\renewcommand*{\chapterpagestyle}{empty}
% Literaturverzeichnis vor dem Anhang
\ifthenelse{\equal{\@ifaBibliographyBeforeAppendix}{true}}{
\if@isReadyForPrint
\markboth{\@bibTitle}{}
\else
\markright{\@bibTitle}
\fi
\printbibliography
\cleardoublepage
\automark[section]{chapter}
}{}
% Anhänge
\IfFileExists{\@ifaAppendix}{
\renewcommand{\appendixpagename}{\@appTitle}
% Zuerst die Titelseite
\begin{center}
\thispagestyle{empty}
\vspace*{\fill}
{\sffamily\bfseries\if@isAFivePaper\Huge\else\huge\fi\appendixpagename}
\vspace{\fill}
\cleardoublepage
\end{center}
% Nun die Anhänge, ohne Titelseite (siehe \RequirePackage --> ohne page-Option)
\begin{appendices}
\ifthenelse{\equal{\@ifaBibliographyBeforeAppendix}{true}}{
\pagenumbering{Roman} % römische Nummerierung im Anhang
\setcounter{page}{1} % beginne wieder mit Seitenzahl 1
}{}
\input{\@ifaAppendix}
\cleardoublepage
\end{appendices}
}{}
% Literaturverzeichnis nach dem Anhang
\ifthenelse{\equal{\@ifaBibliographyBeforeAppendix}{false}}{
\if@isReadyForPrint
\markboth{\@bibTitle}{}
\else
\markright{\@bibTitle}
\fi
\printbibliography
\cleardoublepage
\automark[section]{chapter}
}{}
\backmatter
% Im Abspann nur Seiten ohne Kopf- und Fußzeile (außer Abschnittsbeginn)
\pagestyle{empty}
% Auch Abschnittsbeginn ohne Kopf- und Fußzeile
\renewcommand*{\chapterpagestyle}{empty}
\ifthenelse{\not\equal{\@ifaThesis}{Dissertation}}{
% Selbständigkeitserklärung (nicht bei Dissertationen)
\vspace*{\fill} %4cm}
\section*{Selbstständigkeitserklärung}
Hiermit versichere ich, \@ifaAuthor, geboren am \@ifaAuthorBirthday~in
\@ifaAuthorBirthplace, dass ich \ifthenelse{\not\equal{\@ifaThesis}{Forschungspraktikum}}{die vorliegende \@ifaThesis}{das vorliegende \@ifaThesis}~zum Thema
\begin{quote}
\begin{center}
\emph{\@ifaTitleDE}
\end{center}
\end{quote}
ohne unzulässige Hilfe Dritter und ohne Benutzung anderer als der angegebenen Hilfsmittel angefertigt habe;
die aus fremden Quellen direkt oder indirekt übernommenen Gedanken sind als
solche kenntlich gemacht. Bei der Auswahl und Auswertung des Materials sowie
bei der Herstellung des Manuskripts habe ich Unterstützungsleistungen von folgenden Personen erhalten:
\begin{center}
\emph{\@ifaSupervisorA\IfStrEq{\@ifaSupervisorB}{}{}{, \@ifaSupervisorB}\IfStrEq{\@ifaSupervisorC}{}{}{, \@ifaSupervisorC}\IfStrEq{\@ifaSupervisorD}{}{}{, \@ifaSupervisorD}\IfStrEq{\@ifaSupervisorE}{}{}{, \@ifaSupervisorE}\IfStrEq{\@ifaAdditionalContributors}{}{}{, \@ifaAdditionalContributors}}
\end{center}
Weitere Personen waren an der geistigen Herstellung \ifthenelse{\not\equal{\@ifaThesis}{Forschungspraktikum}}{der vorliegenden \@ifaThesis}{des vorliegenden \@ifaThesis s}~nicht beteiligt. Mir ist bekannt, dass die Nichteinhaltung dieser Erklärung zum nachträglichen Entzug des Diplomabschlusses (Masterabschlusses) führen kann.
\vspace{2cm}
\begin{flushright}
Dresden, den \@ifaDayOfSubmission \hfill \dotfill\\
Unterschrift
\end{flushright}
\vfill
}{
% CV (falls gewünscht, nur bei Dissertationen)
\IfFileExists{\@ifaCV}{
\includepdf{\@ifaCV}
}{}
}
% ================================================
% = Final content at the end of the file =
% ================= ==============================
\ifthenelse{\equal{\@ifaThesis}{Dissertation}}{
\ifthenelse{\equal{\@ifaDissertationStage}{Pflichtexemplare}}{
\clearpage
\IfFileExists{\@ifaIncludeAtEndOfDocument}{
\pagestyle{empty}
\input{\@ifaIncludeAtEndOfDocument}
}{}
}{}
}{}
}%EOF