-
Notifications
You must be signed in to change notification settings - Fork 0
/
hdathesis.sty
141 lines (128 loc) · 6.05 KB
/
hdathesis.sty
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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{hdathesis}[2015/01/22 v0.2 Typographic Style for an h_da thesis]
\RequirePackage{ifthen}
\newboolean{@exam} % exam-version includes exam-questions - default is "false"
\newboolean{@big} % short version does not include paper-appendix - default ist "true"
\newboolean{@abbrev} % automaticaly generate acronyms
\newboolean{@index} % automaticaly generate index
%\newboolean{@english} % use englich version
\newboolean{@wiwi} % use special version for Wirtschaftsingenieure
\newboolean{@doublespacing} % use 1.5 times line spacing
\newboolean{@lockflag} % thesis has a lock flag
\newboolean{@master} % a master thesis
\newboolean{@bacholor} % a bachelor thesis - not used!
\RequirePackage{iflang}
%*******************************************************************************
% Options
%*******************************************************************************
\DeclareOption{exam}{\setboolean{@exam}{true}}
\DeclareOption{big}{\setboolean{@big}{true}}
\DeclareOption{abbrev}{\setboolean{@abbrev}{true}}
\DeclareOption{index}{\setboolean{@index}{true}}
%\DeclareOption{english}{\setboolean{@english}{true}}
\DeclareOption{wiwi}{\setboolean{@wiwi}{true}}
\DeclareOption{doublespacing}{\setboolean{@doublespacing}{true}}
\DeclareOption{lockflag}{\setboolean{@lockflag}{true}}
\DeclareOption{master}{\setboolean{@master}{true}}
\DeclareOption{bachelor}{\setboolean{@bachelor}{false}}
\ProcessOptions\relax
%*******************************************************************************
% Commands for EXAM, BIG, ABREV, INDEX, ENGLISH, WIWI and DOUBLESPACING options
%*******************************************************************************
\newcommand{\condBIG}[1]{\ifthenelse{\boolean{@big}}{#1}{}}
\newcommand{\condEXAM}[1]{\ifthenelse{\boolean{@exam}}{#1}{}}
\newcommand{\condWIWI}[2]{\ifthenelse{\boolean{@wiwi}}{#1}{#2}}
%\newcommand{\condENGLISH}[1]{\ifthenelse{\boolean{@english}}{#1}{}}
\newcommand{\condDOUBLESPACING}[1]{\ifthenelse{\boolean{@doublespacing}}{#1}{}}
\newcommand{\condTWOSIDE}[1]{\ifthenelse{\boolean{@twoside}}{#1}{}}
\newcommand{\condLOCK}[1]{\ifthenelse{\boolean{@lockflag}}{#1}{}}
\newcommand{\condMASTER}[1]{\ifthenelse{\boolean{@master}}{#1}{}}
\newcommand{\condBACHELOR}[1]{\ifthenelse{\boolean{@bachelor}}{#1}{}}
\newcommand{\condENGLISH}[2]{\IfLanguageName{ngerman}{#2}{#1}}
%*******************************************************************************
% Theorems, Lemmas, Corollaries, and Proofs
%*******************************************************************************
\RequirePackage{amsmath}
\RequirePackage{amssymb}
\RequirePackage{theorem}
\theoremstyle{plain} {
\newtheorem{Theorem}{Theorem}
\newtheorem{Proposition}{Proposition}
\newtheorem{Lemma}{Lemma}
\newtheorem{Corollary}{Corollary}
}
\theoremstyle{plain} {{\theorembodyfont{\normalfont}
\newtheorem{Definition}{Definition}}
\newcommand{\qed}{\hfill \mbox{\raggedright \rule{.07in}{.1in}}}
\newenvironment{proof}{\vspace{1ex}\noindent{\textbf Proof}\hspace{0.5em}}
{\hfill\qed\vspace{2ex}}
%*******************************************************************************
% Double spacing between lines
%*******************************************************************************
\ifthenelse{\boolean{@doublespacing}}{%
\RequirePackage[]{setspace}
}
{\relax}
%*******************************************************************************
% Acronyms - TODO: english version
%*******************************************************************************
\ifthenelse{\boolean{@abbrev}}%
{%
\RequirePackage[intoc]{nomencl}
\let\abbrev\nomenclature
\renewcommand{\nomname}{Abkürzungsverzeichnis}
\setlength{\nomlabelwidth}{.25\hsize}
\renewcommand{\nomlabel}[1]{#1 \dotfill}
\setlength{\nomitemsep}{-\parsep}
}%
{%
\relax
}%
%*******************************************************************************
% Tabularx - Spalten
%*******************************************************************************
\RequirePackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X} % zentrierte Spalten mit optimaler Breite
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} % zentrierte Spalten mit Breitenangabe
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}} % rechtsbündig mit Breitenangabe
%*******************************************************************************
% Indices
%*******************************************************************************
\ifthenelse{\boolean{@index}}{%
\RequirePackage{makeidx}%
\newcommand{\Index}[1]{#1\index{#1}}}
{\relax}
%*******************************************************************************
% Colors
%*******************************************************************************
\RequirePackage{color}
\definecolor{shadecolor}{rgb}{1,1,.8}
\definecolor{framecolor}{rgb}{.1,.1,.1}
%*******************************************************************************
% Fancy, colored frames
%*******************************************************************************
\RequirePackage{color}
\RequirePackage{framed}
% general colored frame environment
\newenvironment{fshaded}{%
\def\FrameCommand{\fcolorbox{framecolor}{shadecolor}}%
\MakeFramed {\advance\hsize-\width \FrameRestore}}%
{\endMakeFramed}
% new colored itemize environment
\newenvironment{fitemize}{%
\definecolor{shadecolor}{rgb}{1,1,.8}%
\definecolor{framecolor}{rgb}{.1,.1,.1}%
\begin{fshaded}\vspace{2mm}\begin{minipage}{0.9\textwidth}\begin{itemize}}%
{\end{itemize}\end{minipage}\vspace{2mm}\end{fshaded}}
% new colored assignment environment
\newenvironment{fassignment}{%
\definecolor{shadecolor}{rgb}{1,1,.8}%
\definecolor{framecolor}{rgb}{.1,.1,.1}%
\graffito{\vspace{4.0mm}\newline\includegraphics[width=15mm]{gfx/baustelle}}%
\begin{fshaded}\vspace{2mm}\begin{minipage}{0.9\textwidth}}%
{\end{minipage}\vspace{2mm}\end{fshaded}}
%*******************************************************
% Add additional packages
%*******************************************************
\RequirePackage{pdfpages}
\RequirePackage{chngpage}