summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/se2thesis/se2thesis.tex
blob: 6035c60e18347ad33a8085394a4ebe33adb13215 (plain)
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
\iffalse meta-comment

File: se2thesis.tex Copyright (C) 2022--2023 Stephan Lukasczyk

It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
license or (at your option) any later version.  The latest version
of this license is in the file

   https://www.latex-project.org/lppl.txt

This file is part of the "se2thesis bundle" (The Work in LPPL)
and all files in that bundle must be distributed together.

The released version of this bundle is available from CTAN.

---------------------------------------------------------------------

The development version of the bundle can be found at

   https://github.com/se2p/se2thesis

for those people who are interested.

---------------------------------------------------------------------

\fi

\documentclass{l3doc}

% The next line is needed so that \GetFileInfo will be able to pick up
% version data.
\usepackage{se2colors}

%
% Commands for this document, taken from Joseph Wright's siunitx
% documentation:
\ExplSyntaxOn
\makeatletter
\NewDocumentCommand \acro { m }
  {
    \textsc
      {
        \exp_args:NV \tl_if_head_eq_charcode:nNTF \f@series { m }
        { \text_lowercase:n }
        { \use:n }
          {#1}
      }
  }
\makeatother
\ExplSyntaxOff
\NewDocumentCommand{\email}{m}{\href{mailto:#1}{\nolinkurl{#1}}}
\NewDocumentCommand{\ext}{m}{\texttt.#1}
\NewDocumentCommand{\opt}{m}{\texttt{#1}}
% Tidy up the above in bookmarks
\makeatletter
\pdfstringdefDisableCommands{%
  \let\acro\@firstofone
  \let\ext\@firstofone
  \let\opt\@firstofone
}
\makeatother

% For creating code demonstration, taken from Joseph Wright's siunitx
% documentation:
\usepackage{listings}
\makeatletter
\lst@RequireAspects{writefile}
\newsavebox\LaTeXdemo@box
\lstnewenvironment{LaTeXdemo}[1][code and example]
  {%
    \global\let\lst@intname\@empty
    \edef\LaTeXdemo@end{%
      \expandafter\noexpand\csname LaTeXdemo@@#1@end\endcsname
    }%
    \@nameuse{LaTeXdemo@@#1}%
  }
  {\LaTeXdemo@end}
\newcommand\LaTeXdemo@new[3]{%
  \@namedef{LaTeXdemo@@#1}{#2}
  \@namedef{LaTeXdemo@@#1@end}{#3}%
}
\newcommand*\LaTeXdemo@common{%
  \setkeys{lst}
    {%
      basicstyle       = \small\ttfamily,
      breaklines       = true,
      basewidth        = 0.51em,
      captionpos       = t,
      extendedchars    = true,
      frame            = single,
      gobble           = 2,
      keywordstyle     = \color{blue}\bfseries,
      language         = [LaTeX]{TeX},
      showspaces       = false,
      showstringspaces = false,
      showtabs         = false,
      tabsize          = 2,
    }%
}
\newcount\LaTeXdemo@count
\newcommand*\LaTeXdemo@input{%
  \catcode`\^^M = 10\relax
  \input{\jobname-\number\LaTeXdemo@count.tmp}%
}
\LaTeXdemo@new{code and example}{%
  \setbox\LaTeXdemo@box=\hbox\bgroup
    \global\advance\LaTeXdemo@count by 1 %
    \lst@BeginAlsoWriteFile{\jobname-\number\LaTeXdemo@count.tmp}%
    \LaTeXdemo@common
}{%
    \lst@EndWriteFile
  \egroup
  \begin{center}
    \ifdim\wd\LaTeXdemo@box > 0.48\linewidth
      \begin{minipage}{\linewidth}
        \usebox\LaTeXdemo@box
      \end{minipage}%
      \par
      \begin{minipage}{\linewidth}
        \LaTeXdemo@input
      \end{minipage}
    \else
      \begin{minipage}{0.48\linewidth}
        \LaTeXdemo@input
      \end{minipage}%
      \hspace{\fill}%
      \begin{minipage}{0.48\linewidth}
        \usebox\LaTeXdemo@box
      \end{minipage}%
    \fi
  \end{center}
}
\LaTeXdemo@new{code and float}{%
  \global\advance\LaTeXdemo@count by 1 %
  \lst@BeginAlsoWriteFile{\jobname-\number\LaTeXdemo@count.tmp}%
  \LaTeXdemo@common
}{%
  \lst@EndWriteFile
  \LaTeXdemo@input
}
\LaTeXdemo@new{code only}{\LaTeXdemo@common}{}
\makeatother

\usepackage[UKenglish]{babel}
\usepackage{fontspec}
\usepackage{hvlogos}

% Taken from xcolor.dtx
\makeatletter
\def\testclr#1#{\@testclr{#1}}
\def\@testclr#1#2{{\fboxsep\z@\fbox{\colorbox#1{#2}{\phantom{XX}}}}}
\makeatother

\usepackage{hvfloat}
\hypersetup{%
  allcolors=UPSE2-Blue,%
  pdftitle={se2thesis -- A Thesis Class for the Chair of Software Engineering II
  at the University of Passau, Germany},%
  pdfauthor={Stephan Lukasczyk},
}
\usepackage[capitalise]{cleveref}

\begin{document}

\GetFileInfo{se2colors.sty}

\title{%
  \pkg{se2thesis} -- A Thesis Class for the Chair of Software
  Engineering~II at the University of Passau, Germany%
  \thanks{This file describes \fileversion,
    last revised \filedate.}%
}

\author{%
  Stephan Lukasczyk%
  \thanks{%
    E-mail: \href{mailto:tex@lukasczyk.me}{tex@lukasczyk.me}%
  }%
}

\date{Released \filedate}

\pagenumbering{roman}

\maketitle

\begin{abstract}
  One can choose from a wide variety of templates to write a thesis.
  Many universities provide very rigorous style guides and force their
  students to obey to those guides, even though they might be questionable
  from a typographics point of view.
  Other universities do not provide such guides and leave it to their students
  to choose or come up with a template.
  The latter is causing very differently-looking theses.

  To avoid such a situation in the future this bundle combines several
  \LaTeX{} packages and classes for the use at the Chair of Software
  Engineering~II at the University of Passau.
  We provide, among others, a document class for theses that shall be
  used by our students.
  The bundle is designed in a way that one can use the basic components as
  standalone packages to allow their reuse for other projects.
\end{abstract}

\tableofcontents
\clearpage
\pagenumbering{arabic}

% Make the separate source files into a single whole, format-wise
\RenewDocumentCommand{\maketitle}{}{%
  \clearpage
}
\DeclareExpandableDocumentCommand{\thanks}{m}{}

\let\DelayPrintIndex\PrintIndex
\RenewDocumentCommand{\PrintIndex}{}{}

\DisableImplementation

\part{User Documentation}\label{sec:doc}

The first part of this file provides the documentation for the user
of the \pkg{se2thesis} bundle.
We provide the implementation in the second part of this document,
starting at page~\pageref{sec:impl}, for those who are curious.

% Load the source files in order
\DocInput{se2thesis.dtx}
\DocInput{se2colors.dtx}
\DocInput{se2fonts.dtx}

\EnableImplementation
\DisableDocumentation

\part{Implementation}\label{sec:impl}

The second part of this file provides the implementation of the package
for a better understanding of what is happening.

\DocInputAgain

\DelayPrintIndex

\end{document}