Browse Source

MRTthesis compilable (still unfinished); protect mathaccentV; added logos

master
Jonathan Spratte 2 years ago
parent
commit
187c7efbb7

+ 9
- 0
.gitignore View File

@@ -0,0 +1,9 @@
1
+*.aux
2
+*.bcf
3
+*.glo
4
+*.idx
5
+*.log
6
+*.out
7
+Doc/doc_MRTbundle.pdf
8
+*.run.xml
9
+*.toc

+ 117
- 0
Doc/doc_MRTbundle.tex View File

@@ -0,0 +1,117 @@
1
+\documentclass[oneside]{MRTthesis}
2
+
3
+\usepackage{collcell}
4
+
5
+\MRTthesisSetup{stretches=1,stretch tab=1.408}
6
+
7
+% documentation macros >>>
8
+\newcommand*\pkg[1]{\textrm{#1}}
9
+\newcommand*\cls[1]{\textrm{#1}}
10
+\newcommand*\env[1]{\texttt{#1}}
11
+\long\def\eatspace#1 #2{#1#2}
12
+\newcommand*\cs{\texorpdfstring{\csTeXString}{\csPDFString}}
13
+\protected\def\csTeXString#1%>>>
14
+  {%
15
+    \texttt{\expandafter\eatspace\string\ \detokenize{#1}}%
16
+  }%<<<
17
+\def\csPDFString#1{(macro #1)}
18
+\protected\def\meta#1{\texttt{$\langle$\textit{#1}$\rangle$}}
19
+\newcommand*\metaEnclosed[3]{\texttt{#1}\meta{#2}\texttt{#3}}
20
+\newcommand*\marg[1]{\metaEnclosed{\{}{#1}{\}}}
21
+\newcommand*\oarg[1]{\metaEnclosed{[}{#1}{]}}
22
+\newcommand*\barg[1]{\metaEnclosed{(}{#1}{)}}
23
+\newcommand*\carg[2]{\texttt{(}\meta{#1},\meta{#2}\texttt{)}}
24
+% <<<
25
+
26
+\begin{document}
27
+\tableofcontents
28
+\mainpart
29
+\chapter{Introduction}
30
+I feel guilty distributing this bundle without saying the following: I'm not
31
+responsible for the overall look of this. I tried to match the Word template of
32
+the institution where possible and as a result, this is non-optimal typography.
33
+
34
+Of course this documentation is created with one of the provided classes, namely
35
+\cls{MRTthesis}, in use.
36
+
37
+\chapter{The \cls{MRTthesis} class}
38
+\chapter{The \cls{MRTbeam} class}
39
+\chapter{The \pkg{MRTif} package}
40
+\chapter{The \pkg{MRTsfacc} package}
41
+This package is provided to remedy an issue related with sans serif maths, to be
42
+more precise to fix the placement of \cs{mathaccentV}, which is internally used
43
+by macros such as \cs{hat} and \cs{dot}. It is therefore loaded by both,
44
+\cls{MRTthesis} and \cls{MRTbeam}. The \cls{beamer} class provides a fix for the
45
+same issue which is unfortunately only working for \cls{beamer}'s default font
46
+by fixing the font metrics.
47
+
48
+\cls{MRTsfacc} has a different approach by patching \cs{mathaccentV} to move the
49
+accent horizontally depending on the height of the accented character.
50
+Furthermore it is tested whether the character is an alphabetic one by checking
51
+the category code. If it is not an alphabetic character the shift isn't applied.
52
+
53
+One can use \texttt{*} to enforce the shift and \texttt{!} to enforce the
54
+omitting of that shift. Consider the following example:
55
+\verb$\hat!{m}$ produces $\hat!{m}$, \verb$\hat*{m}$ produces $\hat*{m}$, and
56
+\verb$\hat{m}$ produces $\hat{m}$, which is the same as \verb$\hat*{m}$ since
57
+\texttt{m} has by default the category code of an alphabetic character.
58
+
59
+The tokens \texttt{*} and \texttt{!} must not be enclosed by braces if you want
60
+to specify the behaviour of \cs{mathaccentV}, so \verb$\hat{*}\hat{!}$ results
61
+in $\hat{*}\hat{!}$.
62
+
63
+\begin{table}
64
+  \centering
65
+  \setstretch{1.408}%
66
+  \newcommand\hatex[1]{$\hat!{#1}$}%
67
+  \newcommand\hatst[1]{$\hat*{#1}$}%
68
+  \begin{tabular}
69
+    {%
70
+      *2{>{\collectcell\hatex}c<{\endcollectcell}}
71
+      *2{>{\collectcell\hatst}c<{\endcollectcell}}
72
+    }
73
+    \hline
74
+    \rowcolor{tablegray}
75
+    \multicolumn{2}{c}{original} & \multicolumn{2}{c}{shifted} \\ 
76
+    \hline
77
+    a & A & a & A \\
78
+    b & B & b & B \\
79
+    c & C & c & C \\
80
+    d & D & d & D \\
81
+    e & E & e & E \\
82
+    f & F & f & F \\
83
+    g & G & g & G \\
84
+    h & H & h & H \\
85
+    i & I & i & I \\
86
+    j & J & j & J \\
87
+    k & K & k & K \\
88
+    l & L & l & L \\
89
+    m & M & m & M \\
90
+    n & N & n & N \\
91
+    o & O & o & O \\
92
+    p & P & p & P \\
93
+    q & Q & q & Q \\
94
+    r & R & r & R \\
95
+    s & S & s & S \\
96
+    t & T & t & T \\
97
+    u & U & u & U \\
98
+    v & V & v & V \\
99
+    w & W & w & W \\
100
+    x & X & x & X \\
101
+    y & Y & y & Y \\
102
+    z & Z & z & Z \\
103
+    \hline
104
+  \end{tabular}
105
+  \caption{Comparison of shifted accents against original placement}
106
+  \label{tab:sfacc}
107
+\end{table}
108
+
109
+The resulting \cs{mathaccentV} macro is not expandable and therefore created
110
+\cs{protected}. You can take a look at the results at table \ref{tab:sfacc}.
111
+
112
+\chapter{Bug reports}
113
+You can report bugs if you find some via email:
114
+\href{mailto:mrt_depp@yahoo.de?subject=MRTbundle -- bug report}
115
+  {mrt\_depp@yahoo.de}
116
+
117
+\end{document}

+ 1
- 1
MRTsfacc/MRTsfacc.sty View File

@@ -8,7 +8,7 @@
8 8
 \newcommand*\MRTsfacc@patch@mathaccentV
9 9
   {%
10 10
     \let\mathaccentV@orig\mathaccentV
11
-    \renewcommand*\mathaccentV[4]% >>>
11
+    \protected\long\def\mathaccentV##1##2##3##4% >>>
12 12
       {%
13 13
         \def\mathaccentV@args{{##1}{##2}{##3}{##4}}%
14 14
         \futurelet\next\mathaccentV@a

+ 662
- 15
MRTthesis/MRTthesis.cls View File

@@ -3,25 +3,50 @@
3 3
 \RequirePackage{expl3,xparse,MRTif,MRTsfacc} % absolutely necessary packages
4 4
 \ProvidesExplClass
5 5
   {MRTthesis} {2018/04/22}
6
-  {v0.1}      {thesis template for MRT - University of Bayreuth}
6
+  {0.1}       {thesis template for MRT - University of Bayreuth}
7 7
 
8 8
 
9
-%% Class options and loading scrreprt >>>
9
+%% variables >>>
10 10
 %%=============================================================================
11
+% boxes >>>
12
+\newbox\MRTthesis@TestBoxA
13
+\newbox\MRTthesis@TestBoxB
14
+\newbox\MRTthesis@TestBoxC
15
+% <<<
16
+% dimens >>>
17
+\newdimen\MRTthesis@pageheadOffset
18
+% <<<
19
+% counts >>>
20
+\newcount\MRTthesis@countA
21
+\newcount\MRTthesis@countB
22
+\newcount\MRTthesis@authorcount
23
+\newcount\MRTthesis@authorpos
24
+% <<<
25
+% ifs >>>
11 26
 \newif\ifMRTthesis@minimal@
12 27
 \newif\ifMRTthesis@longtabs@
13 28
 \newif\ifMRTthesis@mathsizes@
14
-\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrreprt}}
29
+\newif\ifMRTthesis@tikzuline@
30
+\newif\ifMRTbibliography
31
+% <<<
32
+%%==========================================================================<<<
33
+
34
+%% Class options and loading scrreprt >>>
35
+%%=============================================================================
15 36
 \DeclareOption{minimal}{\MRTthesis@minimal@true}
16 37
 \DeclareOption{longtabs}{\MRTthesis@longtabs@true}
17 38
 \DeclareOption{mathsizes}{\MRTthesis@mathsizes@true}
39
+\DeclareOption{tikzunderline}{\MRTthesis@tikzuline@true}
40
+\DeclareOption{tUline}{\ExecuteOption{tikzunderline}}
41
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrreprt}}
18 42
 \PassOptionsToClass
19 43
   {twoside,fontsize=11pt,paper=a4,toc=listof,toc=bib,fleqn,ngerman}
44
+  {scrreprt}
20 45
 \ProcessOptions\relax
21 46
 \LoadClass{scrreprt}
22 47
 %%==========================================================================<<<
23 48
 
24
-%% Additional packages to achieve template formatting >>>
49
+%% additional packages to achieve template formatting >>>
25 50
 %%=============================================================================
26 51
 \bool_if:nTF { \sys_if_engine_luatex_p: || \sys_if_engine_xetex_p: }
27 52
   {
@@ -39,7 +64,7 @@
39 64
 \RequirePackage[ngerman]{babel}
40 65
 \RequirePackage{scrlayer-scrpage}
41 66
 \RequirePackage[left=25mm,right=25mm,top=8.4mm,bottom=10.7mm%
42
-    ,includeheadfoot,headsep=15.4mm,marginparwidth=18mm,marginparsep=4mm]%
67
+    ,includeheadfoot,headsep=15.4mm,marginparwidth=18mm,marginparsep=4mm]
43 68
     {geometry}
44 69
 \RequirePackage{setspace}
45 70
 \RequirePackage[normalem]{ulem}
@@ -69,12 +94,6 @@
69 94
   }%
70 95
   \RequirePackage[% I don't know yet how they want me to cite correctly...
71 96
       backend=biber%
72
-      %,style=authoryear%
73
-      %,sortlocale=de_DE%
74
-      %,natbib=true%
75
-      %,url=false%
76
-      %,doi=true%
77
-      %,eprint=false%
78 97
       ,natbib=true%
79 98
       ,citestyle=numeric%
80 99
       ,bibstyle=numeric%
@@ -86,6 +105,115 @@
86 105
 \fi
87 106
 %%==========================================================================<<<
88 107
 
108
+%% setup options >>>
109
+%%=============================================================================
110
+\keys_define:nn { MRTthesis/setup }% >>>
111
+  {
112
+    ,advisor         .tl_set:N   = \l_MRTthesis_advisor_tl
113
+    ,author          .code:n     = \MRTthesis_parse_author:n { #1 }
114
+    ,degree          .tl_set:N   = \l_MRTthesis_degree_tl
115
+    ,caption~above   .multichoice:% >>>
116
+    ,caption~above/true  .code:n  =
117
+      {% >>>
118
+        \KOMAoptions{captions=tableheading}
119
+        \bool_set_true:N \l_MRTthesis_caption_above_bool
120
+      }% <<<
121
+    ,caption~above/false .code:n  =
122
+      {% >>>
123
+        \KOMAoptions{captions=tablesignature}
124
+        \bool_set_false:N \l_MRTthesis_caption_above_bool
125
+      }% <<<
126
+    % <<<
127
+    ,examinor        .tl_set:N   = \l_MRTthesis_examinor_tl
128
+    ,logoL           .tl_set:N   = \l_MRTthesis_logoL_tl
129
+    ,logoL~height    .dim_set:N  = \l_MRTthesis_logoL_height_dim
130
+    ,logoR           .tl_set:N   = \l_MRTthesis_logoR_tl
131
+    ,logoR~height    .dim_set:N  = \l_MRTthesis_logoR_height_dim
132
+    ,no~advisor      .bool_set:N = \l_MRTthesis_no_advisor_bool
133
+    ,no~advisor      .default:n  = { true }
134
+    ,no~degree       .bool_set:N = \l_MRTthesis_no_degree_bool
135
+    ,no~degree       .default:n  = { true }
136
+    ,no~thesis       .bool_set:N = \l_MRTthesis_no_thesis_bool
137
+    ,no~thesis       .default:n  = { true }
138
+    ,number          .tl_set:N   = \l_MRTthesis_number_tl
139
+    ,pos~figure      .tl_set:N   = \fps@figure
140
+    ,pos~float       .meta:n     = { pos~figure, pos~table }
141
+    ,pos~MRTtab      .tl_set:N   = \l_MRTthesis_MRTtab_pos_tl
142
+    ,pos~table       .tl_set:N   = \fps@table
143
+    ,short~advisor   .tl_set:N   = \l_MRTthesis_s_advisor_tl
144
+    ,sadvisor        .meta:n     = { short~advisor }
145
+    ,short~author    .tl_set:N   = \l_MRTthesis_s_author_tl
146
+    ,sauthor         .meta:n     = { short~author }
147
+    ,short~examinor  .tl_set:N   = \l_MRTthesis_s_examinor_tl
148
+    ,sexaminor       .meta:n     = { short~examinor }
149
+    ,sign~height     .dim_set:N  = \l_MRTthesis_sign_height_dim
150
+    ,sign~seperation .dim_set:N  = \l_MRTthesis_sign_seperation_dim
151
+    ,sign~sep        .meta:n     = { sign~seperation }
152
+    ,sign~width~max  .dim_set:N  = \l_MRTthesis_sign_width_max_dim
153
+    ,sign~width~min  .dim_set:N  = \l_MRTthesis_sign_width_min_dim
154
+    ,stretch~caption .code:n     =
155
+      {% >>>
156
+        \setkomafont { caption }      { \setstretch { #1 } \normalfont }
157
+        \setkomafont { captionlabel } { \setstretch { #1 } \normalfont }
158
+      }% <<<
159
+    ,stretch~cap     .meta:n     = { stretch~caption }
160
+    ,stretch~tabular .tl_set:N   = \l_MRTthesis_stretch_tabular_tl
161
+    ,stretch~tab     .meta:n     = { stretch~tabular }
162
+    ,stretch~text    .code:n     = 
163
+      {% >>>
164
+        \dimen0=-4.08541473pt
165
+        \MRTthesis@pageheadOffset=#1\dimen0\relax
166
+        \advance\MRTthesis@pageheadOffset by -1.78452093pt\relax
167
+        \setkomafont{pageheadfoot}
168
+          {
169
+            \setstretch{1.408}
170
+            \mbox{}\vspace{\MRTthesis@pageheadOffset}
171
+            \selectfont\normalfont\small
172
+          }
173
+        \setstretch{#1}
174
+      }% <<<
175
+    ,stretches       .meta:n     = { stretch~cap, stretch~tab, stretch~text }
176
+    ,table~spacing   .bool_set:N = \l_MRTthesis_table_spacing_bool
177
+    ,thesis          .tl_set:N   = \l_MRTthesis_thesis_tl
178
+    ,title           .tl_set:N   = \l_MRTthesis_title_tl
179
+    ,toc~ChapIndent  .tl_set:N   = \l_MRTthesis_toc_chapter_indent_tl
180
+    ,toc~SecIndent   .tl_set:N   = \l_MRTthesis_toc_section_indent_tl
181
+    ,toc~sSecIndent  .tl_set:N   = \l_MRTthesis_toc_subsection_indent_tl
182
+    ,toc~ssSecIndent .tl_set:N   = \l_MRTthesis_toc_subsubsection_indent_tl
183
+  }% <<<
184
+% defaults >>>
185
+\keys_set:nn { MRTthesis/setup }% >>>
186
+  {
187
+    ,advisor = {\textcolor{blue}{Mein~Betreuer}}
188
+    ,examinor = {Univ.-Professor~Dr.-Ing.~Gerhard~Fischerauer}
189
+    ,pos~float = {tbp}
190
+    ,number = {\textcolor{blue}{XX-00-00-0}}
191
+    ,sadvisor = {\textcolor{blue}{M.~Betreuer}}
192
+    ,sauthor  = {\textcolor{blue}{A.~Student}}
193
+    ,sexaminor = {G.~Fischerauer}
194
+    ,stretch~cap = 1.408
195
+    ,stretch~tab = 1.408
196
+    ,stretch~text = 1.408
197
+    ,thesis = {\textcolor{blue}{Meine~Arbeit}}
198
+    ,title  = {\textcolor{blue}{UNTERSUCHUNG~ZU ...}}
199
+    ,caption~above = false
200
+    ,table~spacing = false
201
+    ,toc~ChapIndent = 0.01em
202
+    ,toc~SecIndent  = 1.32em
203
+    ,toc~sSecIndent = 3.38em
204
+    ,toc~ssSecIndent = 6.38em
205
+    ,sign~height = 9mm
206
+    ,sign~width~min = 7cm
207
+    ,sign~width~max = 0pt
208
+    %,sign~sep = 2em
209
+    ,logoL = {MRTthesis_logo_UBT2.pdf}
210
+    ,logoR = {MRTthesis_logo_MRT2.pdf}
211
+    ,logoL~height = 10.85mm
212
+    ,logoR~height = 11.9mm
213
+  }% <<<
214
+% <<<
215
+%%==========================================================================<<<
216
+
89 217
 %% messages >>>
90 218
 %%=============================================================================
91 219
 \msg_new:nnnn { MRTthesis } { afterafterhyperref }
@@ -98,12 +226,46 @@
98 226
 
99 227
 %% macros >>>
100 228
 %%=============================================================================
229
+\definecolor{tablegray}{gray}{0.85}
230
+% auxiliary like>>>
231
+\long\def\@firstofthree#1#2#3{#1}
232
+\long\def\@secondofthree#1#2#3{#2}
233
+\long\def\@thirdofthree#1#2#3{#3}
234
+\newcommand{\ifNoWidthTF}[1]% >>>
235
+  {%
236
+    \bgroup
237
+    \setbox\MRTTestBoxA\hbox{#1}%
238
+    \ifdim\wd\MRTTestBoxA=0pt
239
+      \egroup
240
+      \expandafter\@firstoftwo
241
+    \else
242
+      \egroup
243
+      \expandafter\@secondoftwo
244
+    \fi
245
+  }% <<<
246
+\newcommand\multfill[2][v]% >>>
247
+  {%
248
+    \bgroup
249
+      \MRTthesis@countA=#2
250
+      \MRTthesis@countB=0
251
+      \expandafter\let\expandafter\@multfillcmd\csname #1fill\endcsname
252
+      \loop\ifnum\MRTthesis@countA>\MRTthesis@countB\relax
253
+        \advance\MRTthesis@countB by 1
254
+        \@multfillcmd
255
+      \repeat
256
+    \egroup
257
+  }% <<<
258
+\newcommand*\MRTthesis@display@logo[2]% >>>
259
+  {%
260
+    \MRTIfEmptyNF{#2}{\includegraphics[height=#1]{#2}}%
261
+  }% <<<
262
+% <<<
101 263
 % \MRTafterhyperref >>>
102
-\NewDocumentCommand \MRTafterhyperref { +m }%>>>
264
+\NewDocumentCommand \MRTafterhyperref { +m }% >>>
103 265
   {
104 266
     \xdef \MRTthesis@after@hyperref 
105 267
       { \unexpanded \expandafter { \MRTthesis@after@hyperref #1 } }
106
-  }%<<<
268
+  }% <<<
107 269
 \newcommand*\MRTthesis@after@hyperref{}
108 270
 \MRTafterhyperref% redefine itself after hyperref to throw an error >>>
109 271
   {
@@ -111,7 +273,166 @@
111 273
       { \msg_error:nn { MRTthesis } { afterafterhyperref } }
112 274
   }% <<<
113 275
 % <<<
114
-\newcommand*{\MRTthesis@fntsel}[2]{\fontsize{##1bp}{##2bp}\selectfont}%
276
+\newcommand*\MRTthesis@fntsel[2]{\fontsize{##1bp}{##2bp}\selectfont}
277
+% ToC related >>>
278
+\newcommand*\DeclareTOCStyleEntryMRTSectionLike% >>>
279
+  [2][\l_MRTthesis_toc_section_indent_tl]
280
+  {%
281
+    \expandafter\DeclareTOCStyleEntry\expandafter
282
+      [%
283
+        \MRTthesis@toc@default@section
284
+        ,indent=#1%
285
+      ]
286
+      {tocline}{#2}%
287
+  }% <<<
288
+\newcommand*\DeclareTOCStyleEntryMRTChapterLike% >>>
289
+  [2][\l_MRTthesis_toc_chapter_indent_tl]
290
+  {%
291
+    \expandafter\DeclareTOCStyleEntry\expandafter
292
+      [%
293
+        \MRTthesis@toc@default@chapter
294
+        ,indent=#1%
295
+      ]
296
+      {tocline}{#2}%
297
+  }% <<<
298
+% <<<
299
+% \WUline >>>
300
+\ifMRTthesis@tikzuline@% >>>
301
+  \RequirePackage{tikz}
302
+  \usetikzlibrary{calc}
303
+  \RequirePackage{tikzpagenodes}
304
+  \newcommand*\MRTthesis@tUline@width{0.185ex}
305
+  \newlength\MRTthesis@tUline@length
306
+  \newcount\MRTthesis@tUline@count
307
+  \newcommand*\MRTthesis@gettikzxy[3]% >>>
308
+    % https://tex.stackexchange.com/a/58590/121799
309
+    {%
310
+      \tikz@scan@one@point\pgfutil@firstofone#1\relax
311
+      \xdef#2{\the\pgf@x}%
312
+      \xdef#3{\the\pgf@y}%
313
+    }% <<<
314
+  \tikzset{MRTthesis@tUline/.style={line width=\MRTthesis@tUline@width}}
315
+  \newcommand*\MRTthesis@EmptyOProcessor[2]% >>>
316
+    {%
317
+      \MRTIfEmptyTF{#2}%
318
+        {\def\ProcessedArgument{#1}}%
319
+        {\def\ProcessedArgument{#2}}%
320
+    }% <<<
321
+  \NewDocumentCommand{\tUline}% >>>
322
+    {
323
+      >{\MRTthesis@EmptyOProcessor{-0.35ex}}O{} % height
324
+      >{\MRTthesis@EmptyOProcessor{0pt}}O{}     % overhang
325
+      >{\MRTthesis@EmptyOProcessor{0.185ex}}O{} % line width
326
+      +m
327
+    }
328
+    {%
329
+      \def\MRTthesis@tUline@width{#3}%
330
+      \tikz[remember picture,overlay, baseline=(Begin.base)]
331
+        {%
332
+          \node[anchor=base,inner sep=0pt,outer sep=0pt,xshift=-#2]
333
+            (Begin) {\strut};
334
+          \gettikzxy{($(Begin.base)-(current page.south west)$)}
335
+            {\tUline@bx}{\tUline@by}%
336
+        }%
337
+      #4%
338
+      \tikz[remember picture,overlay, baseline=(End.base)]
339
+        {%
340
+          \node[anchor=base,inner sep=0pt,outer sep=0pt,xshift=+#2]
341
+            (End) {\strut};%
342
+          \gettikzxy{($(End.base)-(current page.south west)$)}
343
+            {\tUline@ex}{\tUline@ey}%
344
+        }%
345
+      \begin{tikzpicture}[overlay,remember picture]
346
+        \ifdim\dimexpr\tUline@ey-\tUline@by = 0pt
347
+          % one line
348
+          \draw[MRTthesis@tUline] ($(Begin.base)+(0,#1)$)
349
+            -- ($(End.base)+(0,#1)$);%
350
+        \else
351
+          % multiple lines
352
+          \draw
353
+            ($(current page text area.west)-(#2,0)$) node(WestLine){};
354
+          \draw
355
+            ($(current page text area.east)+(#2,0)$) node(EastLine){};
356
+          \tUline@drawBtoE{#1}
357
+          \ifdim\dimexpr\tUline@by-\tUline@ey>\baselineskip
358
+            % more than two lines
359
+            \bgroup
360
+            \tUline@drawMultipleLines{#1}{\baselineskip}
361
+            \egroup
362
+          \fi
363
+        \fi
364
+      \end{tikzpicture}%
365
+    }% <<<
366
+  \newcommand*\tUline@drawMultipleLines[2]% >>>
367
+    {%
368
+      \MRTthesis@tUline@length=#2
369
+      \MRTthesis@tUline@count=1
370
+      \loop\ifdim
371
+        \dimexpr\tUline@by-\MRTthesis@tUline@count\MRTthesis@tUline@length\relax
372
+        >\tUline@ey
373
+      \draw[MRTthesis@tUline]
374
+        ($(Begin.base -| WestLine)+(0,#1)-
375
+          (0,\MRTthesis@tUline@count\MRTthesis@tUline@length)$) --
376
+        ($(Begin.base -| EastLine)+(0,#1)-
377
+          (0,\MRTthesis@tUline@count\MRTthesis@tUline@length)$);
378
+      \advance\MRTthesis@tUline@count by 1
379
+      \repeat
380
+    }% <<<
381
+  \newcommand*\tUline@drawBtoE[1]% >>>
382
+    {%
383
+      \draw[MRTthesis@tUline]
384
+        ($(Begin.base)+(0,#1)$) -- ($(Begin.base -| EastLine)+(0,#1)$)
385
+        ($(End.base)+(0,#1)$) -- ($(End.base -| WestLine)+(0,#1)$);%
386
+    }% <<<
387
+\fi% <<<
388
+\def\MRTthesis@HeadingsUline{\WUline}
389
+\newcommand*\WUline{\@ifstar\MRTthesis@star@WUline\MRTthesis@nostar@WUline}%
390
+\NewExpandableDocumentCommand{\MRTthesis@star@WUline}{ o m }% >>>
391
+  {%
392
+    \IfNoValueTF{#1}%
393
+      {\MRTthesis@nostar@WUline{#2}}%
394
+      {%
395
+        \MRTthesis@WUline@setheight
396
+        \bgroup
397
+          \def\MRTthesis@WUline@phantomp% >>>
398
+            {%
399
+              \makebox[0pt][l]{\phantom{\text{#1}}}%
400
+            }% <<<
401
+          \MRTthesis@typeout@WUline{\MRTthesis@WUline@phantomp#2}%
402
+        \egroup
403
+      }%
404
+  }% <<<
405
+\newcommand*\MRTthesis@nostar@WUline[2][]% >>>
406
+  {%
407
+    \MRTIfEmptyTF{#1}
408
+      {\MRTthesis@WUline@setheight}
409
+      {\MRTthesis@WUline@height=#1}%
410
+    \MRTthesis@typeout@WUline{\MRTthesis@WUline@phantomp#2}%
411
+  }% <<<
412
+\newcommand*\MRTthesis@typeout@WUline% >>>
413
+  {%
414
+    \bgroup\markoverwith{\rule[\MRTthesis@WUline@height]{0.25ex}{0.185ex}}\ULon
415
+  }% <<<
416
+\edef\MRTthesis@WUline@phantomp% >>>
417
+  {%
418
+    \noexpand\makebox[0pt][l]{\noexpand\phantom{\text{p}}}%
419
+  }% <<<
420
+\newdimen\MRTthesis@WUline@height%
421
+\newcommand*\MRTthesis@WUline@setheight
422
+  {% >>>
423
+    \relax\ifmmode
424
+      \MRTthesis@WUline@height=\MRTthesis@WUline@mathheight\relax
425
+    \else
426
+      \MRTthesis@WUline@height=\MRTthesis@WUline@normalheight\relax
427
+    \fi
428
+  }% <<<
429
+\newcommand*\MRTthesis@WUline@mathheight{-0.37ex}%
430
+\newcommand*\MRTthesis@WUline@normalheight{-0.42ex}%
431
+% <<<
432
+\NewDocumentCommand \MRTthesisSetup { +m }%>>>
433
+  {
434
+    \keys_set:nn { MRTthesis/setup } { #1 }
435
+  }%<<<
115 436
 %%==========================================================================<<<
116 437
 
117 438
 %% labels and other ngerman stuff >>>
@@ -141,7 +462,7 @@
141 462
     \textup{\maketag@@@{\ignorespaces\ref{#1}\unskip\@@italiccorr}}%
142 463
   }% <<<
143 464
 %% Ugly stuff which resembles the word template
144
-\renewcommand*\captionformat{\normalfont:\ }% no bold colon
465
+\renewcommand*\captionformat{\normalfont :\ }% no bold colon
145 466
 \setcapindent{0pt}% no indent in captions beneath the label
146 467
 \setcapdynwidth[c]{0.905\textwidth}% reduce the maximum width of captions
147 468
 %%==========================================================================<<<
@@ -163,6 +484,332 @@
163 484
 \setlist[enumerate]{itemsep=-0pt, parsep=2pt plus .2pt minus .1pt}
164 485
 %%==========================================================================<<<
165 486
 
487
+%% sectioning commands >>>
488
+%%=============================================================================
489
+\RedeclareSectionCommand[% chapter >>>
490
+    ,beforeskip=-1.2em plus -1pt minus -1pt%
491
+    ,afterskip=0.1em plus 1pt minus 1pt%
492
+]{chapter}% <<<
493
+\RedeclareSectionCommand[% section >>>
494
+    ,beforeskip=-0.57em plus -1pt minus -1pt%
495
+    ,afterskip=0.045em plus 1pt minus 1pt%
496
+]{section}% <<<
497
+\RedeclareSectionCommand[% subsection >>>
498
+    ,beforeskip=-0.57em plus -1pt minus -1pt%
499
+    ,afterskip=0.045em plus 1pt minus 1pt%
500
+]{subsection}% <<<
501
+\RedeclareSectionCommand[% subsubsection >>>
502
+    ,beforeskip=-0.57em plus -1pt minus -1pt%
503
+    ,afterskip=0.045em plus 1pt minus 1pt%
504
+]{subsubsection}% <<<
505
+\RedeclareSectionCommand[% paragraph >>>
506
+    ,beforeskip=-0.57em plus -1pt minus -1pt%
507
+    ,afterskip=1sp plus -1sp minus 1sp%0.045em plus 1pt minus 1pt%
508
+]{paragraph}% <<<
509
+\RedeclareSectionCommand[% subparagraph >>>
510
+    ,beforeskip=-0.57em plus -1pt minus -1pt%
511
+    ,afterskip=1sp plus -1sp minus 1sp%0.045em plus 1pt minus 1pt%
512
+    ,indent=0pt%
513
+]{subparagraph}% <<<
514
+\renewcommand\chapterlinesformat[3]% >>>
515
+  {%
516
+    \setbox\MRTthesis@TestBoxA\hbox{\MRTthesis@HeadingsUline{#2}}%
517
+    \usebox\MRTthesis@TestBoxA
518
+    \parbox[t]{\dimexpr\textwidth-\wd\MRTthesis@TestBoxA}
519
+      {%
520
+        \MRTthesis@HeadingsUline{#3}%
521
+      }%
522
+  }
523
+% <<<
524
+\renewcommand\sectionlinesformat[4]% >>>
525
+  {%
526
+    \bgroup
527
+    \ifstr{#1}{paragraph}
528
+      {%
529
+        \let\MRTthesis@HeadingsUline\relax
530
+      }
531
+      {%
532
+        \ifstr{#1}{subparagraph}%
533
+          {%
534
+            \let\MRTthesis@HeadingsUline\relax
535
+          }
536
+          {}%
537
+      }%
538
+    \@hangfrom{\hskip #2\MRTthesis@HeadingsUline{#3}}%
539
+    {#4}%
540
+    \egroup
541
+  }
542
+% <<<
543
+% sectioning fonts >>>
544
+\setkomafont{chapter}{\large\sffamily\bfseries}
545
+\setkomafont{section}{\sffamily\bfseries}
546
+\setkomafont{subsection}{\sffamily\bfseries}
547
+\setkomafont{subsubsection}{\sffamily\bfseries}
548
+\setkomafont{paragraph}{\sffamily\bfseries}
549
+\setkomafont{subparagraph}{\normalfont\sffamily\itshape}
550
+% <<<
551
+% Sectionformat >>>
552
+\AtBeginDocument{\renewcommand*\Sectionformat[2]{\MRTthesis@HeadingsUline{#1}}}
553
+% <<<
554
+%%==========================================================================<<<
555
+
556
+%% page layout from beginning >>>
557
+%%=============================================================================
558
+\pagenumbering{Roman}
559
+\KOMAoptions{% >>>
560
+    ,numbers=noendperiod%
561
+    ,headsepline=0.5pt% line below pagehead
562
+}% <<<
563
+\ihead*{\headmark}%\headmark at the inner side of the page
564
+\chead*{}%empty middle
565
+\ohead*{\pagemark}%page numbers at the outer side
566
+\ifoot*{}%empty foot
567
+\cfoot*{}%empty foot
568
+\ofoot*{}%empty foot
569
+\automark[chapter]{chapter}%both right and left chapters
570
+\automark*[section]{}%if there is a section right head containing section
571
+\pagestyle{scrheadings}%use the aforesaid definition for the headers
572
+\renewcommand*{\chapterpagestyle}{scrheadings}%first side of chapters, too
573
+%%==========================================================================<<<
574
+
575
+%% formatting switches for other parts >>>
576
+%%=============================================================================
577
+\renewcommand*\appendix% >>>
578
+  {%
579
+    \automark[chapter]{chapter}% from here on use chapters in headmark
580
+    \renewcommand*{\thesection}{\Alph{section}}%
581
+    \pgfkeys
582
+      {%
583
+        /MRTarbeit/MRTtab/default/.add style = {}{%
584
+          nofloat,%
585
+        }%
586
+      }%
587
+    \@addtoreset{figure}{section}%
588
+    \@addtoreset{table}{section}%
589
+    \@addtoreset{equation}{section}%
590
+    \renewcommand*\thefigure{\hbox{\thesection-\arabic{figure}}}%
591
+    \renewcommand*\thetable{\hbox{\thesection-\arabic{table}}}%
592
+    \renewcommand*\theequation{\hbox{(\thesection-\arabic{equation})}}%
593
+    \addtokomafont{section}{\large}%
594
+  }% <<<
595
+\newcommand*\mainpart% >>>
596
+  {%
597
+    \cleardoublepage
598
+    \pagenumbering{arabic}%
599
+  }% <<<
600
+%%==========================================================================<<<
601
+
602
+%% bibliography >>>
603
+%%=============================================================================
604
+\ifMRTthesis@minimal@% >>>
605
+  \MRTbibliographyfalse% <<<
606
+\else% >>>
607
+  \MRTbibliographytrue
608
+  \renewcommand*{\newunitpunct}{, }% between each unit in one bib-entry
609
+  \DefineBibliographyStrings{ngerman}
610
+    {%
611
+      ,bibliography={Literaturverzeichnis}%
612
+      ,in={}% removes 'In:' infront of journal name
613
+      ,andothers={et\,al\adddot}%
614
+    }
615
+  %\if@mrtarbeit@bibfileused\else%
616
+      %\def\@mrtarbeit@bibfile{works-cited.bib;}%
617
+  %\fi%
618
+  %\MRTIfEmptyNF\@mrtarbeit@bibfile{
619
+      %\expandafter\@mrtarbeit@parsebibfiles\@mrtarbeit@bibfile;
620
+  %}
621
+  % changing the order of units in article-entries. >>>
622
+  % The definitions are taken from standard.bbx and altered
623
+  \DeclareBibliographyDriver{article}% >>>
624
+    {%
625
+      \usebibmacro{bibindex}%
626
+      \usebibmacro{begentry}%
627
+      \usebibmacro{author/translator+others}%
628
+      \setunit{\printdelim{nametitledelim}}\newblock
629
+      \usebibmacro{title}%
630
+      \newunit
631
+      \printlist{language}%
632
+      \newunit\newblock
633
+      \usebibmacro{byauthor}%
634
+      \newunit\newblock
635
+      \usebibmacro{bytranslator+others}%
636
+      \newunit\newblock
637
+      \printfield{version}%
638
+      \newunit\newblock
639
+      \usebibmacro{in:}%
640
+      \usebibmacro{MRT+journal+issuetitle}%
641
+      \newunit
642
+      \usebibmacro{byeditor+others}%
643
+      \newunit
644
+      \usebibmacro{date}%
645
+      \newunit
646
+      \usebibmacro{note+pages}%
647
+      \newunit\newblock
648
+      \iftoggle{bbx:isbn}
649
+        {\printfield{issn}}
650
+        {}%
651
+      \newunit\newblock
652
+      \usebibmacro{doi+eprint+url}%
653
+      \newunit\newblock
654
+      \usebibmacro{addendum+pubstate}%
655
+      \setunit{\bibpagerefpunct}\newblock
656
+      \usebibmacro{pageref}%
657
+      \newunit\newblock
658
+      \iftoggle{bbx:related}
659
+          {\usebibmacro{related:init}%
660
+              \usebibmacro{related}}
661
+          {}%
662
+      \usebibmacro{finentry}%
663
+    }% <<<
664
+  \newbibmacro*{MRT+journal+issuetitle}% >>>
665
+    {%
666
+      \usebibmacro{journal}%
667
+      \setunit*{\addspace}%
668
+      \iffieldundef{series}
669
+          {}
670
+          {\newunit
671
+              \printfield{series}%
672
+              \setunit{\addspace}}%
673
+      \usebibmacro{volume+number+eid}%
674
+      \setunit{\addspace}%
675
+      \usebibmacro{MRT+issue}%
676
+      \setunit{\addcolon\space}%
677
+      \usebibmacro{issue}%
678
+      \newunit
679
+    }% <<<
680
+  \newbibmacro*{MRT+issue}% >>>
681
+    {%
682
+      \iffieldundef{issue}
683
+        {}
684
+        {%
685
+          \printtext[parens]
686
+            {%
687
+              {\printfield{issue}}%
688
+              \newunit
689
+            }
690
+        }%
691
+    }% <<<
692
+  % <<<
693
+\fi% <<<
694
+%%==========================================================================<<<
695
+
696
+%% tableofcontents/listof... formatting >>>
697
+%%=============================================================================
698
+\setcounter{tocdepth}{3}
699
+\setcounter{secnumdepth}{3}
700
+\AtBeginDocument% >>>
701
+  {%
702
+    \addtoeachtocfile{\mbox{}\hfill Seite\par}%
703
+  }% <<<
704
+\AtAddToTocList% >>>
705
+  {%
706
+    \setuptoc{\@currext}{totoc}%
707
+  }% <<<
708
+%\DeclareTOCStyleEntry[<options>]{<style>}{<section-layer>}
709
+\newcommand*\MRTthesis@chapter@dotfill% >>>
710
+  {%
711
+    \def\@dotsep{0.072}\TOCLineLeaderFill[\textbf{.}]%
712
+  }% <<<
713
+\newcommand*\MRTthesis@section@dotfill% >>>
714
+  {%
715
+    \def\@dotsep{0.072}\TOCLineLeaderFill
716
+  }% <<<
717
+\newcommand*\MRTthesis@toc@default@all% >>>
718
+  {%
719
+    pagenumberbox=\makebox%
720
+    ,dynnumwidth=true%
721
+    ,numsep=0.29em%
722
+    ,numwidth=0pt%
723
+  }% <<<
724
+\edef\MRTthesis@toc@default@section% >>>
725
+  {%
726
+    \unexpanded\expandafter{\MRTthesis@toc@default@all}%
727
+    ,linefill=\noexpand\MRTthesis@section@dotfill
728
+    ,beforeskip=0pt plus .2pt%
729
+  }% <<<
730
+\edef\MRTthesis@toc@default@chapter% >>>
731
+  {%
732
+    \unexpanded\expandafter{\MRTthesis@toc@default@all}%
733
+    ,linefill=\noexpand\MRTthesis@chapter@dotfill
734
+    ,beforeskip=1.16em plus 1pt%
735
+  }% <<<
736
+\DeclareTOCStyleEntryMRTChapterLike{chapter}
737
+\DeclareTOCStyleEntryMRTSectionLike{section}
738
+\DeclareTOCStyleEntryMRTSectionLike[\l_MRTthesis_toc_subsection_indent_tl]
739
+  {subsection}
740
+\DeclareTOCStyleEntryMRTSectionLike[\l_MRTthesis_toc_subsubsection_indent_tl]
741
+  {subsubsection}
742
+\DeclareTOCStyleEntryMRTSectionLike{table}
743
+\DeclareTOCStyleEntryMRTSectionLike{figure}
744
+%%==========================================================================<<<
745
+
746
+%% affidavit >>>
747
+%%=============================================================================
748
+\ExplSyntaxOff
749
+\newcommand*{\affidavittext}{% >>>
750
+Hiermit versichere ich an Eides statt, dass ich die vorliegende Arbeit
751
+selbständig und unter Angabe aller Hilfsmittel und Referenzen angefertigt habe.
752
+Eine Ausnahme bilden die persönlichen Mitteilungen der Betreuer der Arbeit, die
753
+ständig eingeflossen sind und daher nicht im Einzelnen nachgewiesen werden.
754
+
755
+Der Universität Bayreuth, vertreten durch den Lehrstuhl für Mess- und
756
+Regeltechnik (Prof. Dr.-Ing. Fischerauer), habe ich das Nutzungs- und
757
+Verwertungsrecht an dieser Arbeit zu Zwecken der Lehre und Forschung, für
758
+Gutachten und Publikationen erteilt. Bei einer Veröffentlichung von Inhalten
759
+oder Auszügen der Arbeit ist in angemessener Weise auf meinen Beitrag
760
+hinzuweisen. Mit der Veröffentlichung meines Namens und des Themas der Arbeit
761
+in der Liste der am Lehrstuhl angefertigten Arbeiten bin ich einverstanden. Ich
762
+erkläre ferner, dass ich die Inhalte der Arbeit meinerseits nicht ohne
763
+Zustimmung des Lehrstuhls publizieren werde.
764
+
765
+\if@mrtarbeit@nodegree\else
766
+    Hiermit erkläre ich, dass ich die vorliegende Arbeit mit dem Thema
767
+    „\@mrtarbeit@title“ noch nicht anderweitig zur Erlangung eines akademischen
768
+    Grades eingereicht habe.
769
+\fi
770
+}% <<<
771
+\newcommand*{\affidavit}{% >>>
772
+    \clearpage%
773
+    \chapter*{Eidesstattliche Erklärung}%
774
+    \sethead{Eidesstattliche Erklärung}%
775
+    \strut%\par
776
+    %\vspace{-2.5pt}
777
+    \noindent\affidavittext%
778
+    \par%
779
+    \vspace{2.38cm}%
780
+    \noindent%
781
+    \setbox\MRTTestBoxA\hbox{Bayreuth, den \@date}%
782
+    \ifdim\MRT@signatureMaxWidth=0pt%
783
+        \MRT@signatureMaxWidth=\dimexpr\textwidth-\wd\MRTTestBoxA-\MRT@signatureSep\relax%
784
+    \else\ifdim\MRT@signatureMaxWidth<\MRT@signaturewidth\relax%
785
+        \MRT@signaturewidth=\MRT@signatureMaxWidth\relax%
786
+    \fi\fi%
787
+    \unhbox\MRTTestBoxA%
788
+    \MRTthesis@rewindauthors%
789
+    \loop%
790
+        \setbox\MRTTestBoxA\hbox{\footnotesize\getauthor}%
791
+        \ifdim\wd\MRTTestBoxA>\MRT@signatureMaxWidth\relax%
792
+            \global\MRT@signaturewidth=\MRT@signatureMaxWidth\relax%
793
+        \else\ifdim\wd\MRTTestBoxA>\MRT@signaturewidth\relax%
794
+            \global\MRT@signaturewidth=\wd\MRTTestBoxA\relax%
795
+        \fi\fi%
796
+        \ifMRTthesis@otherauthor@%
797
+    \repeat%
798
+    \MRTthesis@rewindauthors%
799
+    \loop%
800
+        \hfill\parbox[t]{\MRT@signaturewidth}{%
801
+            \vskip0.4pt\rule{\MRT@signaturewidth}{0.4pt}%
802
+            \vskip -1em%
803
+            \hfill\parbox[t]{\MRT@signaturewidth}{%
804
+                \footnotesize\setstretch{1}\getauthor\hfill%
805
+            }%
806
+        }%
807
+        \ifMRTthesis@otherauthor@%
808
+        \vskip\MRT@signatureheight%
809
+    \repeat}
810
+% <<<
811
+\ExplSyntaxOn
812
+%%==========================================================================<<<
166 813
 
167 814
 \endinput
168 815
 

BIN
MRTthesis/MRTthesis_imgs/MRTthesis_logo_MRT.pdf View File


BIN
MRTthesis/MRTthesis_imgs/MRTthesis_logo_MRT2.pdf View File


BIN
MRTthesis/MRTthesis_imgs/MRTthesis_logo_MRT_w_Prof.pdf View File


BIN
MRTthesis/MRTthesis_imgs/MRTthesis_logo_UBT.pdf View File


BIN
MRTthesis/MRTthesis_imgs/MRTthesis_logo_UBT2.pdf View File


+ 2
- 2
README.md View File

@@ -1,10 +1,10 @@
1 1
 ### About ###
2 2
 
3
-This TeX bundle contains two classes, one for thesis and the like, one for
3
+This TeX bundle contains two classes, one for thesises and the like, one for
4 4
 presentations. Both classes aim to recreate the corresponding MS Office
5 5
 templates in use at the institute Mess- und Regeltechnik (MRT) of the University
6 6
 of Bayreuth. Along those classes there are several other small packages
7
-contained, which provide shared macros, used by both of the classes, or are
7
+contained, which provide shared macros used by both of the classes, or are
8 8
 interesting on their own.
9 9
 
10 10
 Furthermore there are small example projects included, which show a basic usage

Loading…
Cancel
Save