-
Notifications
You must be signed in to change notification settings - Fork 1
/
boxexample.tex
195 lines (164 loc) · 7.29 KB
/
boxexample.tex
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
% This file is just a little showcase for the various info boxes
% that you can use within this template. To compile it,
% you must be in the main directory, otherwise the style files cannot
% be loaded properly. The colors of the boxes are defined in the preamble.tex
% and the boxes itself are defined in styles/modernbox.sty
%
% The base environment is myboxenv which takes 3 arguments:
% 1. The highlight color of the border and the icon
% 2. The icon shape, such as \faIcon{language} (from the fontawesome package)
% 3. The head of the info box
% All boxes shown in this little showcase are just extensions of this myboxenv.
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\documentclass[11pt,a4paper]{book}
\newif\ifprint
\printfalse
\usepackage{styles/customfields}
\input{preamble.tex}
%\usepackage{pgffor}
\makeatletter
\newcommand*\committeemembers{}
\newcommand*\committeemember[2]
{\ifx\committeemembers\empty
\def\committeemembers{{#1}/{#2}}%
\else
\g@addto@macro\committeemembers{, {#1}/{#2}}%
\fi}
\newcommand\committeetable[1]{%
\def\committeetabledata{}%
\foreach \position/\member in #1{
\protected@xappto\committeetabledata{\position & \member \\}
}%
\begin{tabular}{rl}
\committeetabledata
\end{tabular}
}
\makeatother
\committeemember{Chairperson}{Andre}
\committeemember{Supervisor}{Andre}
\committeemember{Supervisor}{Andre}
\committeemember{Adviser}{Andre}
\begin{document}
\committeetable{\committeemembers}
\setcounter{chapter}{1}
\section{Showcase of Info Boxes}
This file is a little showcase of the information boxes that are available in this template. The colors are defined in the preamble file in the main directory of the repo.
\begin{thesisobjectivebox}
Your thesis objective
\end{thesisobjectivebox}
\begin{researchtaskbox}{Research Tasks Box}
\begin{enumerate}[label=\textbf{\Roman*}, labelsep=1em]
\setlength\itemsep{0.25em}
\item\label{rt:I} Your first research task.
\item\label{rt:II} And the second task.
\item\label{rt:III} And the well known third task.
\item\label{rt:IV} The often overlooked forth task.
\item\label{rt:V} And the nonsense fifth task nobody cares about.
\end{enumerate}
\end{researchtaskbox}
\begin{infobox}{Small Icon Info Box}
With additional infos.
\end{infobox}
\begin{examplebox}{Example Box}
With an example
\end{examplebox}
\begin{examplebox}{Single Line Info Box: \normalfont\mdseries With normal font following.}
\vspace*{-0.165cm}
\end{examplebox}
A paper/publication box:
\paperbox{Www20-frontpage.jpg}{%
\textit{``Discovering Mathematical Objects of Interest --- A Study of Mathematical Notations''} by \textbf{Andr\'{e} Greiner-Petter}, Moritz Schubotz, Fabien M\"{u}ller, Corinna Bretinger, Howard S.~Cohl, Akiko Aizawa, and Bela Gipp. \textbf{In:} \textit{Proceedings of the Web Conference} (WWW), 2020.%
}{Chapter~3 --- [1]}
% In your real document, you want to add references here, like:
% Chapter~\ref{ch:related-work} --- \cite{GreinerPetterSMB20}
The \verb|paperbox| has three arguments:
\begin{enumerate}
\item The file name of the image that will be shown to the left (must be in the images folder).
\item The text block to the right.
\item And a reference text to the bottom right of the box. For example to show in which chapter this paper was reused.
\end{enumerate}
\begin{definitionbox}{Definition Box}[def:caption]
A nice definition box.
\end{definitionbox}
You can also define a caption anchor with an optional argument and reference to the definition. Such as here:~\ref{def:caption}.
\begin{translationbox}{Translation Box}
Usually you want nice code box inside, see the next box as an example.
\end{translationbox}
\begin{translationbox}{Translation Box with Code}
\begin{code}[mytex]
P_n^{(\alpha,\beta)}(z) = \frac{(\alpha+1)_n}{n!} {}_2F_1\left(-n,1+\alpha+\beta+n;\alpha+1;\tfrac{1}{2}(1-z)\right)
\end{code}
\end{translationbox}
\begin{translationbox}{Translation Box with Custom Code}
\begin{customcode}[language=maple, mathescape=false]
diff( exp(z^2)*erfc(z), [z$(n)] ) = (-1)^(n)*(2)^(n)*factorial(n)*exp(z^2)*erfc(n, z)
\end{customcode} %$ %fool editor that the equation is "closed"
\vspace{-0.2cm}
\begin{footnotesize}
\vspace{-0.15cm}
\hfill Redundant parentheses removed to improve readability.
\end{footnotesize}
\end{translationbox}
You can use two different code boxes:
\begin{itemize}
\item \verb|code| for normal code that allows you to specify the language with an optional argument
\item \verb|customcode| for code that allows you to specify any additional arguments to lstset. For example, the language, mathescape, text sizes, etc.
\end{itemize}
The template pre-defines some additional syntax highlights. The additional languages in this template are:
\begin{itemize}
\item \verb|json|: For JSON
\item \verb|MathML|: For MathML highlighting
\item \verb|isabelle|: For the theorem prover Isabelle.
\item \verb|mytex|: An extension of the standard \TeX{} highlighting.
\item \verb|mymathematica|: For the computer algebra system Mathematica.
\item \verb|maple|: For the computer algebra system Maple.
\end{itemize}
Here is a more sophisticated example with custom with custom arguments for the custom code box.
\begin{translationbox}{Translation of Bailey’s Transformation of Very-Well-Poised ${}_{8}\phi_{7}$}
\begin{customcode}[language=mymathematica, basicstyle=\LSTfont, numbers=none, stepnumber=1, numbersep=6pt]
QHypergeometricPFQ[{a, q*(a)^(Divide[1,2]),-q*(a)^(Divide[1,2]),b,c,d,e,f},{(a)^(Divide[1,2]), -(a)^(Divide[1,2]),a*q/b,a*q/c,a*q/d,a*q/e,a*q/f},q, Divide[(a)^(2)*(q)^(2),b*c*d*e*f]]
== Divide[Product[QPochhammer[Part[{a*q,a*q/(d*e),a*q/(d*f),a*q/(e*f)},i],q, Infinity],{i,1, Length[{a*q,a*q/(d*e),a*q/(d*f),a*q/(e*f)}]}], Product[QPochhammer[Part[{a*q/d,a*q/e,a*q/f,a*q/(d*e*f)},i],q, Infinity],{i,1, Length[{a*q/d,a*q/e,a*q/f,a*q/(d*e*f)}]}]]* QHypergeometricPFQ[{a*q/(b*c),d,e,f},{a*q/b,a*q/c,d*e*f/a},q,q]
+ Divide[Product[QPochhammer[Part[{a*q,a*q/(b*c),d,e,f,(a)^(2)*(q)^(2)/(b*d*e*f),(a)^(2)*(q)^(2)/(c*d*e*f)},i],q, Infinity],{i,1, Length[{a*q,a*q/(b*c),d,e,f,(a)^(2)*(q)^(2)/(b*d*e*f),(a)^(2)*(q)^(2)/(c*d*e*f)}]}], Product[QPochhammer[Part[{a*q/b,a*q/c,a*q/d,a*q/e,a*q/f,(a)^(2)*(q)^(2)/(b*c*d*e*f),d*e*f/(a*q)},i],q, Infinity],{i,1, Length[{a*q/b,a*q/c,a*q/d,a*q/e, a*q/f,(a)^(2)*(q)^(2)/(b*c*d*e*f),d*e*f/(a*q)}]}]]
* QHypergeometricPFQ[{a*q/(d*e),a*q/(d*f), a*q/(e*f),(a)^(2)*(q)^(2)/(b*c*d*e*f)},{(a)^(2)*(q)^(2)/(b*d*e*f),(a)^(2)*(q)^(2)/(c*d*e*f), a*(q)^(2)/(d*e*f)},q,q]
\end{customcode}
\vspace{-0.35cm}
\begin{footnotesize}
\hfill\rule{0.4\textwidth}{.4pt}
\vspace{-0.15cm}
\hfill Linebreaks are manually added to improve readability.
\end{footnotesize}
\end{translationbox}
And there is also a general code box:
\begin{codebox}{A Code Box}
\begin{code}[MathML]
<mrow>
<msub>
<mi>P</mi>
<mi>n</mi>
</msub>
<mo>
<!-- Invisible
Funct. Appl.
Unicode U+2061 -->
</mo>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>)</mo>
</mrow>
</mrow>
\end{code}
\end{codebox}
This codebox has three optional arguments:
\begin{enumerate}
\item A caption text.
\item The caption anchor (label) for references, e.g., here~\ref{code:caption}.
\item The width of the title text. This allows to squeeze codebox next to each other and avoid over/underfull warnings.
\end{enumerate}
\begin{codebox}{A Code Box With Caption}[With Caption Text][code:caption]
\begin{code}[MathML]
<mrow></mrow>
\end{code}
\end{codebox}
\end{document}