LATEX Thesis Template Documentation PDF
LATEX Thesis Template Documentation PDF
Documentation
Version 3.2.4
Matthias Pospiech
May 8, 2016
Acknowledgements
Thanks to all who helped in the creation of this template by answering my question
on LaTeX and TeX programming, documentation of code and pgfplots issues mostly on
tex.stackexchange.com and groups.google.de/group/de.comp.text.tex/topics, especially (in
no particular order): Markus Kohm, Axel Sommerfeldt, egreg, esdd, Heiko Oberdiek,
Joseph Wright, Stefan Kottwitz, David Carlisle, Marco Daniel, Martin Scharrer, Jake,
lockstep, Peter Grill, Ulrike Fischer, Werner, Christian Feuersnger, cmhughes, Mico,
Martin Schrder, cgnieder, percusse, Schweinebacke, Herbert, Gonzalo Medina, Philipp
Lehman, Herbert Voss, Ulrich Diez, Sebastian Schubert.
Contributors to the template are welcome. Currently there is no direct input (suggestions,
bug fixing, documentation, new features) except from the maintainer himself.
Source
The source code is hosted at
https://github.com/pospiech/latex/tree/master/latexthesistemplate.
Downloads on www.matthiaspospiech.de contain only the user code including this docu-
mentation. The full source is available via the source code repository.
Legal Notes
The LATEX Thesis Template with all files in the bundle including this documentation
are released under the LATEX Project Public License. These files are provided as is and
without warranty of any kind.
Contents
I User documentation 1
1 Introduction 3
1.1 Changes in the latest release . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Target Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Features of the template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.1 Template features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Separation between function and layout . . . . . . . . . . . . . . . . 4
Documentation of the code . . . . . . . . . . . . . . . . . . . . . . . 5
Extensive options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Comprehensive documentation . . . . . . . . . . . . . . . . . . . . . 5
Solving Incompatibilities and fixing bugs . . . . . . . . . . . . . . . . 5
1.3.2 Document features . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.3 Speed of compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4 Tutorial - how to start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4.1 Configure Editor and System Settings . . . . . . . . . . . . . . . . . 10
1.4.2 Configure the document . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4.3 Start Writing your content . . . . . . . . . . . . . . . . . . . . . . . . 10
i
ii Contents
3 Known problems 21
3.1 Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.1.1 biblatex: No file filename.bbl . . . . . . . . . . . . . . . . . . . . . 21
3.1.2 tocstyle: This is an alpha version . . . . . . . . . . . . . . . . . . . . 21
3.1.3 hypennat: You have used the htt option . . . . . . . . . . . . . . . . 21
3.1.4 pageslts: Package pdfpages detected. . . . . . . . . . . . . . . . . . . 22
3.2 Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.2.1 No room for new write . . . . . . . . . . . . . . . . . . . . . . . . . . 22
II LaTeX Examples 41
5 Template demonstration 43
5.1 Text markup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.1.1 LATEX standard commands . . . . . . . . . . . . . . . . . . . . . . . . 43
5.1.2 package: soul . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.1.3 package: ulem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.1.4 package: url . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.2 Quotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.2.1 quote . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.2.2 enquote and blockquote (csquotes) . . . . . . . . . . . . . . . . . . . 45
5.3 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.3.1 variable references using vref . . . . . . . . . . . . . . . . . . . . . . 46
5.3.2 variable references with the cleveref package . . . . . . . . . . . . . . 46
Contents iii
Tablestyles package . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
5.8.2 Column types and column specifiers . . . . . . . . . . . . . . . . . . 71
Simple table (only alignment) . . . . . . . . . . . . . . . . . . . . . . 71
Column types: p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Column types: p, m, b . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Column types: X (tabularx) . . . . . . . . . . . . . . . . . . . . . . . 73
Custom column types: L, C, R . . . . . . . . . . . . . . . . . . . . . 74
Custom column types: W, Y, Z . . . . . . . . . . . . . . . . . . . . . 75
Usage of special column specifiers (>{...}, !{...}) . . . . . . . . . . . 76
Alignment of numbers (siunitx, S-column) . . . . . . . . . . . . . . . 76
5.8.3 Multicolumn and multirow cells . . . . . . . . . . . . . . . . . . . . . 77
Multicolumn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Multirow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Multirow and multicolumn combined . . . . . . . . . . . . . . . . . . 78
Multirow usage in a complex example . . . . . . . . . . . . . . . . . 79
5.8.4 Item lists inside tabular cells . . . . . . . . . . . . . . . . . . . . . . . 79
5.8.5 Footnotes in tables (tablefootnote) . . . . . . . . . . . . . . . . . . . 81
5.8.6 Colors in tables: rowcolor(s) . . . . . . . . . . . . . . . . . . . . . . . 81
5.8.7 Tables with the tabu package . . . . . . . . . . . . . . . . . . . . . . 81
Simple table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
X columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
X columns (multiples) . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Vertical and horizontal alignment . . . . . . . . . . . . . . . . . . . . 83
Colors in tabu tables . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Item lists inside tabu tables . . . . . . . . . . . . . . . . . . . . . . . 85
5.8.8 Large tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Longtable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
longtabu (tabu package) . . . . . . . . . . . . . . . . . . . . . . . . . 89
Wide tables (addmargin) . . . . . . . . . . . . . . . . . . . . . . . . . 92
landscape orientated tables (sideways) . . . . . . . . . . . . . . . . . 92
landscape orientated tables (sidewaystable) . . . . . . . . . . . . . . 95
5.9 Math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
5.9.1 Math formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
5.9.2 Multiline equations (align) . . . . . . . . . . . . . . . . . . . . . . . . 97
5.9.3 Multiline equations with only one number (aligned) . . . . . . . . . . 98
5.9.4 Multiline equations with multiple alignments (alignat) . . . . . . . . 98
5.9.5 special environments: cases . . . . . . . . . . . . . . . . . . . . . . . 98
5.9.6 special environments: matrices . . . . . . . . . . . . . . . . . . . . . 99
5.9.7 special commands: braket . . . . . . . . . . . . . . . . . . . . . . . . 99
5.9.8 special commands: cancel . . . . . . . . . . . . . . . . . . . . . . . . 100
5.9.9 special commands: empheq . . . . . . . . . . . . . . . . . . . . . . . 100
5.9.10 Double stroke math font (mathbb) . . . . . . . . . . . . . . . . . . . 100
5.9.11 Double stroke math font (mathds) . . . . . . . . . . . . . . . . . . . 100
5.9.12 Euler script symbols in math mode (mathcal) . . . . . . . . . . . . . 101
Contents v
Bibliography 233
Appendix 241
Index 255
Part I
User documentation
1
Contents
1 Introduction 3
1.1 Changes in the latest release . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Target Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Features of the template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Tutorial - how to start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 Known problems 21
3.1 Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2 Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2
CHAPTER 1
Introduction
This chapter gives a general introduction to the usage of this template and enables the
user to start with the actual work. In the subsequent chapters and other parts of this
documentation you will find a wide variety of further information. However, there is no
need to read them all. Instead you might find it useful to look at individual sections later,
when you are looking specifically for a solution to a problem.
The latest changes in the template are shortly presented in the first section 1.1. The full
history can be found in appendix B.
In the second section 1.2 you find a general discussion on the typical user of this template
followed by a tutorial (section 1.4) on how to start working with this template. The chapter
ends with the introduction of magic comments in section 2.2.
In the next chapter 2 you will find a list of typical questions and answers that are specific
for this template followed by a list of known problems in this template (chapter 3). For
those who want to change the font in the template there is a short overview on fonts
provided in chapter 4.
3
4 Chapter 1 Introduction
Beginners have the advantage of a ready to use template that covers all major topics. They
do not have to load packages therefore and do not need to fiddle with the preamble.
This especially saves a lot of time. If the rare case should happen that a modification
is necessary the preamble is very well documented. Typical configurations are listed
in section 1.4.2.
The other aspect very valuable for beginners is the large list of example codes in
part II.
Advanced LATEX users benefit from all aspects that are listed above for beginners. Fur-
thermore they can make use of all functions and documentation of this template for
simple up to extensive modifications. Section 1.3 provides useful information for a
start.
Complete different layouts created by significant changes in preamble/style.tex
and subsequent files could be send to the maintainer of this template for a review
and possibly an integration into the template. The same applies for users, who add
new functionality to the template that might also be of interest for other users.
Package authors can also benefit from this template. The development has shown that it
is a valuable project for finding incompatibilities between different packages and for
testing of packages in general in a large and complex, but yet realistic project.
This template and its predecessor has been used under the supervision of the maintainer
by very early beginners and also advanced LATEX users. The experience was that beginners
as well as advanced users are more productive with it because it just works, while the
more advanced users additionally know that they can find all options for later modifications
because of the code documentation. And some even find bugs . . . .
Extensive options
Many packages provide a large number of options. This often means that one has to check
the documentation several times for all modifications of the package configuration. To
simplify this process this template tries to include all options of a package with a minimal
description for each option. This itself is somehow a minimal documentation of a package.
Comprehensive documentation
The documentation of this template is very comprehensive. The code itself is documented
as much as possible and necessary. Furthermore this documentation document provides
an overview of the features and configuration possibilities (part I), a large collection of
LATEX application examples (part II) and a complete printout of the code of the template
(part III).
General
Automatic detection of document encoding (selinput).
Support for files with multiple dots, special characters and other pitfalls (grffile).
6 Chapter 1 Introduction
Text typesetting
Multi language support with automatic hyphenation (babel)
Customizable item and enumeration lists (enumitem)
Multiple highlighting possibilities (ulem, soul)
Correct and save display of urls and file path (url)
References
Enhanced cross-referencing with automatical determination of the type (equation,
section, etc.) (cleveref, varioref)
Tables
Tables with the ability to create them with a professional design (booktabs, tabu,
xcolor),
Table columns with variable width (so called X columns) and line break support
(tabularx, tabu),
Multi page tables (tabu, ltxtable),
1.3 Features of the template 7
Layout
Most aspects of the layout can be modified due the base classes from koma-script.
The line spacing can be adjusted in one-half, double or custom spacing (setspace).
Head and Foot have automatic generated content which can be customized together
with the layout of the header and footer (scrpage2).
The Heading can be fully customized. In this template by default the chapter layout
is changed with the provided functions of KOMA-script.
The page size can be calculated automatically (typearea) or defined in every tiny
detail (geometry).
Many further items can be modified with commands provided by LATEX itself or
any of the packages loaded. All customizations of the layout are done in the file
preamble/style.tex.
PDF Features
Inclusion of complete or partial pdf documents as full pages (pdfpages).
hyperlinks for all references and citations with backlinks (hyperref).
Bookmarks in the pdf document (bookmark).
8 Chapter 1 Introduction
1 Measured on a Windows System (7, 64 bit) with Intel i5 processor and the file system on a SSD. The
times for a standard magnetic hard disk should not differ much, since the files are in the memory cache
anyway.
1.3 Features of the template 9
The demand of sections as the main level means that neither a book or report like
document is intended, but instead an article like document with only few pages that
do not require a substantial differentiation with chapters.
This is realized by changing the document class to scrartcl (main file at the
\documentclass definition). The default class in this template is scrbook, which
should not be changed for documents such as bachelor, master and phd thesis.
The language of the text is chosen in the options of the documentclass. The default
language is english. The setting for new German orthography is ngerman. Other
language options are documented in the babel documentation: babel.pdf
The double vs. single side printing is a bit more hidden in the file preamble/style.
tex under the section Page Layout Options. To change to single side printing change
the option twoside from true to false.
Other configurations of LATEX are listed in chapter 2. Section 2.1 lists most of the
settings with their according options and locations in the template files. Some are further
explained, for example the setting of the line spacing in section 2.10.
1.4.3 Start Writing your content
At the beginning, the documents in the front and the end should be adapted to the
documents content. For example the users name, institution, title can be inserted in
1.4 Tutorial - how to start 11
content/0-title. This file comes with other content files before the actual document
start with the front pages (frontmatter):
content/Z-GlossaryEntries.tex
content/0-title,
content/0-Abstract
content/Z-Declaration.tex.
Next the main files should be renamed according to the chapter organization of the
document. The following files are preconfigured for the main content (mainmatter).
content/0-Introduction
content/1-Theory
content/2-Experiments
content/3-Results
content/4-Summery
If certain automatic generated lists such as the index, a glossary or others are not needed
these should be disabled in the main file. And at the end of the document files are included
that belong to the appendix.
content/Z-Appendix.tex
content/Z-Publications.tex
content/Z-CV.tex
content/Z-Thanks.tex
The naming scheme of these files and their loading mechanism is further explained in
section 2.17.
From this point on there is not much more to be done, except writing down the content
for the project this template is supposed to be used for.
CHAPTER 2
Settings, locations, questions and solutions
This chapter contains all sorts of answers to typical questions, locations of settings and
general solutions with LATEX. Further examples of the possibilities of this template are
shown with code and examples in part II.
13
14 Chapter 2 Settings, locations, questions and solutions
Some of the options shown in the previous tables are further discussed in the following
sections.
All these comments have in common that they have to be put in the beginning of each file
and have to begin with % !TeX.
Defines the main file for typesetting (often called the master file). This enables a very
basic project management by defining the master file for each file of the project.
2.2.2 Program
Chooses the engine for compilation. Possible values are pdflatex, LuaLaTeX, XeTeX, LaTeX
(and possibly others). Note that the engine name inserted is case-insensitive.
Unless your code is set up for a different engine and the selection of packages and fonts
loaded is adapted for that engine the default should be kept as pdflatex.
16 Chapter 2 Settings, locations, questions and solutions
Specifies the spell checking language in the editor for that file. The language of course
needs to be installed for the editor! Selection of some languages:
en_GB - English (Great Britain)
en_US - English (US)
de_DE - German (Germany)
fr_FR - French (France)
2.2.4 Encoding
% !TeX encoding = UTF-8
Sets the file encoding for the current file. The default in current editors is UTF-8.
2.2.5 bibliography tool
% !BIB = biber
The alternative is bibtex, which is no longer recommended and with this template not
supported!
The style settings for these list are loaded in file preamble/style-index.tex and file
preamble/style-glossaries.tex.
They are printed in the main file, see section 6.4.6.
2.16 Hyphenation
The hyphenation is enabled by default in LATEX. In order to function correct the language
must be specified in the document class, see section 6.2. Additional hyphenation patterns
are added to file content/hyphenation.tex.
In the text itself hyphenation marks can be added. These are however language specific.
For German texts an overview is shown in http://de.wikibooks.org/.
content/title
content/0-Abstract
content/0-Introduction
content/1-Theory
content/2-Experiments
content/3-Results
content/4-Summery
content/Z-Appendix.tex
content/Z-Publications.tex
content/Z-CV.tex
content/Z-Thanks.tex
content/Z-Declaration.tex
The prefix is chosen as numbers for all main content files in the sequence in which the
chapters are loaded and with a prefix Z- for all minor important files that mostly come
after the main content. This naming scheme thus shows the files in the order of their
appearance in the resulting document.
To speed up the compile times it is recommended to include only those chapters, on
which is currently being worked on, into the compilation. This is realized with LATEX using
the command \includeonly. This list contains all files loaded with \include that shall
be included in the current compilation. All information on those files not included into the
compilation, such as labels, is nevertheless included. This only requires that each file was
at least once included in the compilation.
that illustrates the problem. Complete means that it must contain a document class and
the document environment and the relevant code inside the document environment. It
however must not contain any package or code that does not contribute to the problem.
In order to create a minimum document from this template it is absolutely necessary
to copy the whole document code including all sub folders. If these contain too many
images these can be left out. The copy is essential, because next most files are going to be
modified or deleted.
Now first remove or comment out all chapter files that do not contribute to the error. If
it is an error in the preamble, you can as well comment out everything in the document
environment.
Next try to reduce the code in you remaining content file to the part that creates the
error.
To check if the problem is in preamble/style.tex or if this file contributes to the problem
comment out preamble/style.tex. If the error remains do the same for preamble/
packages.tex. This could however introduce further errors because functionality gets lost.
You can however check each section in this file separately or disable them from bottom to
top by changing the section created with \DefineTemplateSection to false. The same
can also be done for preamble/style.tex.
If the code section(s) in preamble/packages.tex or preamble/style.tex that gener-
ates the error is identified copy all these parts to the main document and remove the
loading of these files. Note, that in cases of incompatible packages it could be more than a
single code section that contributes to the error. If still files are included in the main file
remove them or copy their code to the main file if necessary. As a result all code should
not reside in the main file. From this point it should be able to remove all packages, all
options and all remaining content that do not contribute to the problem. As a result the
minimum working example is ready.
Typically most self-created errors are already found while processing these procedure to
track down the problem. If not a good place to ask for further help is tex.stackexchange.com.
Further reading on how to generate a minimum working example can be found at:
http://meta.tex.stackexchange.com
What is a minimal working example?
Creating a LaTeX Minimal Example
How to make a minimum example
CHAPTER 3
Known problems
This chapter provides a collection a known warnings and possible errors with an assessment
of the problem.
3.1 Warnings
3.1.1 biblatex: No file filename.bbl
If you have not executed biber you will get the following warning by biblatex. Simply
run you bibliography tool to get create bbl file.
No file <filename>.bbl.
21
22 Chapter 3 Known problems
3.2 Errors
3.2.1 No room for new write
TeX uses output registers to write to files. Unfortunately TeX was designed to use only
16 of such registers of which the output registers 0, 1 and 2 are already used by (La)TeX
itself. The remaining registers are consumed by additional packages that need to write to
external files.
If you come across this error you have reached a fixed limitation of the TeX engine
and there is nothing that can directly be done about this error, as you cannot extend the
number of available registers without extending TeX itself.
Typical packages that consume output registers are:
The most promising solution about this problem is to reduce the number of used output
registers. So for example if no index is required (package imakeidx) and the package
fancyvrb is not needed both could be commented out and instead the list of listings could
be activated.
The approach of this template is to use either the package morewrites or scrwfile,
which hook at the lowest level (TEXprimitives) to solve this problem. These packages
however might cause problems since they modify LATEXat a very basic level and can thus
cause incompatibilities. For scrwfile it is know to that titletoc does no longer work. If
however titletoc is not required scrwfile is recommended. These packages are loaded
in preamble/packages-SolutionsNoRoomForNewWrite.tex.
Further information about this issue can be found at
3.2 Errors 23
tex.stackexchange.com
UK FAQ List
CHAPTER 4
Short fonts overview
The information given here is only a subset of the whole story. A more complete catalogue
on LATEX fonts can be found at http://www.tug.dk/FontCatalogue/.
The fonts listed in the following sections are not only a list of very common fonts, but
also those that are supported within this template. If this should not be the case the
commands that are necessary to load the font is provided, so that the font loading can
be integrated in this template. The first section (4.1) lists most free fonts, which can be
expected to be installed in a complete modern LATEX distribution. The second section (4.2)
is about packages for commercial fonts. These packages are available for free, however the
fonts itself are not. The last section (4.3) is about fonts with math support.
25
26 Chapter 4 Short fonts overview
The text on these pages demonstrates the appearance of the used fonts for serif, sans serif,
math and typewriter fonts. The font(s) used in this document are Latin Modern Family.
The fonts are loaded with
\usepackage{lmodern}
\input{fonts/fonts-lmodern-sansmath.tex}
Plain text
The following paragraph is text taken from http://www.blindtextgenerator.de to show
the appearance of the text. It is a text without any meaning translated from the original
German text into English text. The translation was done automatic and thus the text has
even less meaning after the translation.
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia
live the blind texts. Separated they live in Bookmarksgrove on the coast of the Semantics,
a large language ocean. A small river named Duden flows by their place and supplies
it with the necessary regelialia. It is a paradisematic country, in which roasted parts of
sentences fly into your mouth. Even the all-powerful Pointing the blind texts - an almost
unorthographic life. One day however a small line of blind text by the name of Lorem
Ipsum was to go out into the wide grammar. The Big Oxmox advised her not to, because
there swarming of bad Commas, wild Question Marks and devious Semikoli, but the Little
Blind Text did not listen. She packed her seven capitals, pushing her initial into the belt
and made herself on the way. When she reached the first hills of the Italic Mountains, she
had a last view back on the skyline of her hometown Bookmarksgrove, the headline of
Alphabet Village and the subline of her own road, the Line Lane. Pityful was a rhetorical
question on the cheek, then she continued her way. Her way she met a copy. The copy
warned the Little Blind Text, where it came from it would have been rewritten a thousand
times and everything that was left from its origin would be the word and and the Little
Blind Text should turn around and return to its own, safe country. But nothing the copy
said could convince her and so it did not take long until a few insidious Copy Writers
ambushed her, made her drunk with Longe and Parole and made it dragged her into their
agency, where they abused it for their projects again and again. And if it has not been
rewritten, then they are still.
Two fast boxer chasing the vivacious Eva and her pug by Sylt. Fox jumps over the lazy
dog Bavaria. Twelve boxer Viktor hunt across the big Sylt dike. Bird Quax tweaks Johnys
horse Bim. Sylvia dares quick to joke at Pforzheim. Polyfon Mxchens twittering birds
ate beets, yogurt and cottage cheese. Fix, Schwyz! Jrgen squawks stupid from the pass.
30 Chapter 4 Short fonts overview
Victor chases twelve boxer across the great Sylt dike. Wrong practicing of xylophone music
tortures every larger dwarf.
Math formulas
These math formulas are taken from wikipedia.org. They show well known formulas
used in math and physics.
Greens
theorem
[ 2 ] 2
+ (,) d3 = d (0.1)
G S
Jacobian matrix ( )
(1 , . . . , ) ()
() := () := () := (0.2)
(1 , . . . , ) =1,...,; =1,...,
Tables
The following table lists some properties of the material fused silica.
The left side in serif font, the right in sans serif font.
Properties of fused silica Properties of fused silica
The text on these pages demonstrates the appearance of the used fonts for serif, sans serif, math
and typewriter fonts. The font(s) used in this document are Charter, Bera Sans, Luxi Mono. The
fonts are loaded with
\usepackage{charter}\linespread{1.05} %% --- Charter
\renewcommand{\sfdefault}{fvs} %% --- Bera Sans
\usepackage[charter]{mathdesign} %% --- Charter (Math)
\usepackage[scaled=0.85]{luximono} %% --- Luxi Mono (Typewriter)
% Note: There is a better Charter font by Linotype
% called 'ITC Charter'
Plain text
The following paragraph is text taken from http://www.blindtextgenerator.de to show the
appearance of the text. It is a text without any meaning translated from the original German
text into English text. The translation was done automatic and thus the text has even less
meaning after the translation.
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia
live the blind texts. Separated they live in Bookmarksgrove on the coast of the Semantics, a
large language ocean. A small river named Duden flows by their place and supplies it with
the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly
into your mouth. Even the all-powerful Pointing the blind texts - an almost unorthographic
life. One day however a small line of blind text by the name of Lorem Ipsum was to go out
into the wide grammar. The Big Oxmox advised her not to, because there swarming of bad
Commas, wild Question Marks and devious Semikoli, but the Little Blind Text did not listen.
She packed her seven capitals, pushing her initial into the belt and made herself on the way.
When she reached the first hills of the Italic Mountains, she had a last view back on the skyline
of her hometown Bookmarksgrove, the headline of Alphabet Village and the subline of her own
road, the Line Lane. Pityful was a rhetorical question on the cheek, then she continued her way.
Her way she met a copy. The copy warned the Little Blind Text, where it came from it would
have been rewritten a thousand times and everything that was left from its origin would be the
word and and the Little Blind Text should turn around and return to its own, safe country. But
nothing the copy said could convince her and so it did not take long until a few insidious Copy
Writers ambushed her, made her drunk with Longe and Parole and made it dragged her into
their agency, where they abused it for their projects again and again. And if it has not been
rewritten, then they are still.
32 Chapter 4 Short fonts overview
Two fast boxer chasing the vivacious Eva and her pug by Sylt. Fox jumps over the lazy dog
Bavaria. Twelve boxer Viktor hunt across the big Sylt dike. Bird Quax tweaks Johnys horse Bim.
Sylvia dares quick to joke at Pforzheim. Polyfon Mxchens twittering birds ate beets, yogurt
and cottage cheese. Fix, Schwyz! Jrgen squawks stupid from the pass. Victor chases twelve
boxer across the great Sylt dike. Wrong practicing of xylophone music tortures every larger
dwarf.
Math formulas
These math formulas are taken from wikipedia.org. They show well known formulas used in
math and physics.
Greens
theorem
[ 2 ] v 2
u v + (u,v) d3 V = u d A (0.1)
n
G S
Jacobian matrix
( )
f ( f1 , . . . , f m ) f i (a)
J f (a) := (a) := (a) := (0.2)
x (x 1 , . . . , x n ) xj
i=1,...,m; j=1,...,n
Tables
The following table lists some properties of the material fused silica.
description property
density = 2.2 g/cm3
heat capacity cp = 703 J/gK
transmission 185 - 2500 nm
4.4 Font examples 33
The text on these pages demonstrates the appearance of the used fonts for serif, sans serif, math
and typewriter fonts. The font(s) used in this document are Garamond, Bera Sans, Luxi Mono.
The fonts are loaded with
\renewcommand{\rmdefault}{ugm} %% --- URW Garamond
\renewcommand{\sfdefault}{fvs} %% --- Bera Sans
\usepackage[garamond]{mathdesign} %% --- Garamond (Math)
\usepackage[scaled=0.85]{luximono} %% --- Luxi Mono (Typewriter)
% Note: If you can efford it, combine with commercial
% sans fonts like: Syntax, Frutiger or Thesis
% (but then also use the commercial Garamond ...)
Plain text
The following paragraph is text taken from http://www.blindtextgenerator.de to show the
appearance of the text. It is a text without any meaning translated from the original German text
into English text. The translation was done automatic and thus the text has even less meaning
after the translation.
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia
live the blind texts. Separated they live in Bookmarksgrove on the coast of the Semantics, a large
language ocean. A small river named Duden flows by their place and supplies it with the necessary
regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth.
Even the all-powerful Pointing the blind texts - an almost unorthographic life. One day however
a small line of blind text by the name of Lorem Ipsum was to go out into the wide grammar. The
Big Oxmox advised her not to, because there swarming of bad Commas, wild Question Marks
and devious Semikoli, but the Little Blind Text did not listen. She packed her seven capitals,
pushing her initial into the belt and made herself on the way. When she reached the first hills of
the Italic Mountains, she had a last view back on the skyline of her hometown Bookmarksgrove,
the headline of Alphabet Village and the subline of her own road, the Line Lane. Pityful was a
rhetorical question on the cheek, then she continued her way. Her way she met a copy. The copy
warned the Little Blind Text, where it came from it would have been rewritten a thousand times
and everything that was left from its origin would be the word and and the Little Blind Text
should turn around and return to its own, safe country. But nothing the copy said could convince
her and so it did not take long until a few insidious Copy Writers ambushed her, made her drunk
with Longe and Parole and made it dragged her into their agency, where they abused it for their
projects again and again. And if it has not been rewritten, then they are still.
Two fast boxer chasing the vivacious Eva and her pug by Sylt. Fox jumps over the lazy dog
Bavaria. Twelve boxer Viktor hunt across the big Sylt dike. Bird Quax tweaks Johnys horse Bim.
34 Chapter 4 Short fonts overview
Sylvia dares quick to joke at Pforzheim. Polyfon Mxchens twittering birds ate beets, yogurt and
cottage cheese. Fix, Schwyz! Jrgen squawks stupid from the pass. Victor chases twelve boxer
across the great Sylt dike. Wrong practicing of xylophone music tortures every larger dwarf.
Math formulas
These math formulas are taken from wikipedia.org. They show well known formulas used in
math and physics.
Greens theorem
[ ] v 2
u v + (u,v) d3V =
2
u dA (0.1)
n
G S
Jacobian matrix
( )
f ( f1 , . . . , f m ) fi (a)
J f (a) := (a) := (a) := (0.2)
x (x1 , . . . , xn ) xj
i=1,...,m; j =1,...,n
Tables
The following table lists some properties of the material fused silica.
description property
density = 2.2 g/cm3
heat capacity cp = 703 J/gK
transmission 185 - 2500 nm
4.4 Font examples 35
The text on these pages demonstrates the appearance of the used fonts for serif, sans serif, math
and typewriter fonts. The font(s) used in this document are Fourier (Utopia), Latin Modern (Sans
and Typewriter). The fonts are loaded with
\usepackage{lmodern}
\usepackage{fourier}
Plain text
The following paragraph is text taken from http://www.blindtextgenerator.de to show the
appearance of the text. It is a text without any meaning translated from the original German text
into English text. The translation was done automatic and thus the text has even less meaning
after the translation.
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia
live the blind texts. Separated they live in Bookmarksgrove on the coast of the Semantics, a
large language ocean. A small river named Duden flows by their place and supplies it with the
necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into
your mouth. Even the all-powerful Pointing the blind texts - an almost unorthographic life. One
day however a small line of blind text by the name of Lorem Ipsum was to go out into the wide
grammar. The Big Oxmox advised her not to, because there swarming of bad Commas, wild
Question Marks and devious Semikoli, but the Little Blind Text did not listen. She packed her
seven capitals, pushing her initial into the belt and made herself on the way. When she reached
the first hills of the Italic Mountains, she had a last view back on the skyline of her hometown
Bookmarksgrove, the headline of Alphabet Village and the subline of her own road, the Line Lane.
Pityful was a rhetorical question on the cheek, then she continued her way. Her way she met a
copy. The copy warned the Little Blind Text, where it came from it would have been rewritten
a thousand times and everything that was left from its origin would be the word and and the
Little Blind Text should turn around and return to its own, safe country. But nothing the copy
said could convince her and so it did not take long until a few insidious Copy Writers ambushed
her, made her drunk with Longe and Parole and made it dragged her into their agency, where
they abused it for their projects again and again. And if it has not been rewritten, then they are
still.
Two fast boxer chasing the vivacious Eva and her pug by Sylt. Fox jumps over the lazy dog
Bavaria. Twelve boxer Viktor hunt across the big Sylt dike. Bird Quax tweaks Johnys horse Bim.
Sylvia dares quick to joke at Pforzheim. Polyfon Mxchens twittering birds ate beets, yogurt and
cottage cheese. Fix, Schwyz! Jrgen squawks stupid from the pass. Victor chases twelve boxer
across the great Sylt dike. Wrong practicing of xylophone music tortures every larger dwarf.
36 Chapter 4 Short fonts overview
Math formulas
These math formulas are taken from wikipedia.org. They show well known formulas used in
math and physics.
Greens
theorem
2 v 2
u v + (u,v) d3V = u d A (0.1)
n
G S
Jacobian matrix
f ( f 1 , . . . , f m ) f i (a)
J f (a) := (a) := (a) := (0.2)
x (x 1 , . . . , x n ) x j i =1,...,m; j =1,...,n
Tables
The following table lists some properties of the material fused silica.
description property
density = 2.2 g/cm3
heat capacity c p = 703 J/gK
transmission 185 - 2500 nm
4.4 Font examples 37
The text on these pages demonstrates the appearance of the used fonts for serif, sans serif,
math and typewriter fonts. The font(s) used in this document are Palantino, Arial, Courier.
The fonts are loaded with
\usepackage{mathpazo} %% --- Palantino (incl math)
\usepackage[scaled=.95]{helvet} %% --- Helvetica (Arial)
\usepackage{courier} %% --- Courier
Plain text
The following paragraph is text taken from http://www.blindtextgenerator.de
to show the appearance of the text. It is a text without any meaning translated from the
original German text into English text. The translation was done automatic and thus the
text has even less meaning after the translation.
Far far away, behind the word mountains, far from the countries Vokalia and Conso-
nantia live the blind texts. Separated they live in Bookmarksgrove on the coast of the
Semantics, a large language ocean. A small river named Duden flows by their place and
supplies it with the necessary regelialia. It is a paradisematic country, in which roasted
parts of sentences fly into your mouth. Even the all-powerful Pointing the blind texts -
an almost unorthographic life. One day however a small line of blind text by the name
of Lorem Ipsum was to go out into the wide grammar. The Big Oxmox advised her not
to, because there swarming of bad Commas, wild Question Marks and devious Semikoli,
but the Little Blind Text did not listen. She packed her seven capitals, pushing her initial
into the belt and made herself on the way. When she reached the first hills of the Italic
Mountains, she had a last view back on the skyline of her hometown Bookmarksgrove, the
headline of Alphabet Village and the subline of her own road, the Line Lane. Pityful was
a rhetorical question on the cheek, then she continued her way. Her way she met a copy.
The copy warned the Little Blind Text, where it came from it would have been rewritten a
thousand times and everything that was left from its origin would be the word and and
the Little Blind Text should turn around and return to its own, safe country. But nothing
the copy said could convince her and so it did not take long until a few insidious Copy
Writers ambushed her, made her drunk with Longe and Parole and made it dragged her
into their agency, where they abused it for their projects again and again. And if it has not
been rewritten, then they are still.
Two fast boxer chasing the vivacious Eva and her pug by Sylt. Fox jumps over the
lazy dog Bavaria. Twelve boxer Viktor hunt across the big Sylt dike. Bird Quax tweaks
Johnys horse Bim. Sylvia dares quick to joke at Pforzheim. Polyfon Mxchens twittering
birds ate beets, yogurt and cottage cheese. Fix, Schwyz! Jrgen squawks stupid from the
38 Chapter 4 Short fonts overview
pass. Victor chases twelve boxer across the great Sylt dike. Wrong practicing of xylophone
music tortures every larger dwarf.
Math formulas
These math formulas are taken from wikipedia.org. They show well known formulas
used in math and physics.
Greens
theorem
[ ] v 2
2 3
u v + (u,v) d V = u d A (0.1)
n
G S
Jacobian matrix ( )
f ( f 1 , . . . , f m ) f i ( a)
J f ( a) := ( a) := ( a) := (0.2)
x ( x1 , . . . , x n ) x j i =1,...,m; j=1,...,n
Tables
The following table lists some properties of the material fused silica.
description property
density = 2.2 g/cm3
heat capacity cp = 703 J/gK
transmission 185 - 2500 nm
4.4 Font examples 39
The text on these pages demonstrates the appearance of the used fonts for serif, sans serif, math
and typewriter fonts. The font(s) used in this document are Times, Arial, Courier. The fonts are
loaded with
\usepackage{mathptmx} %% --- Times (incl math)
\usepackage[scaled=.90]{helvet} %% --- Helvetica (Arial)
\usepackage{courier} %% --- Courier
Plain text
The following paragraph is text taken from http://www.blindtextgenerator.de to
show the appearance of the text. It is a text without any meaning translated from the original
German text into English text. The translation was done automatic and thus the text has even less
meaning after the translation.
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia live the
blind texts. Separated they live in Bookmarksgrove on the coast of the Semantics, a large language
ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia.
It is a paradisematic country, in which roasted parts of sentences fly into your mouth. Even the
all-powerful Pointing the blind texts - an almost unorthographic life. One day however a small line
of blind text by the name of Lorem Ipsum was to go out into the wide grammar. The Big Oxmox
advised her not to, because there swarming of bad Commas, wild Question Marks and devious
Semikoli, but the Little Blind Text did not listen. She packed her seven capitals, pushing her initial
into the belt and made herself on the way. When she reached the first hills of the Italic Mountains,
she had a last view back on the skyline of her hometown Bookmarksgrove, the headline of Alphabet
Village and the subline of her own road, the Line Lane. Pityful was a rhetorical question on the
cheek, then she continued her way. Her way she met a copy. The copy warned the Little Blind Text,
where it came from it would have been rewritten a thousand times and everything that was left from
its origin would be the word and and the Little Blind Text should turn around and return to its
own, safe country. But nothing the copy said could convince her and so it did not take long until
a few insidious Copy Writers ambushed her, made her drunk with Longe and Parole and made it
dragged her into their agency, where they abused it for their projects again and again. And if it has
not been rewritten, then they are still.
Two fast boxer chasing the vivacious Eva and her pug by Sylt. Fox jumps over the lazy dog
Bavaria. Twelve boxer Viktor hunt across the big Sylt dike. Bird Quax tweaks Johnys horse Bim.
Sylvia dares quick to joke at Pforzheim. Polyfon Mxchens twittering birds ate beets, yogurt and
cottage cheese. Fix, Schwyz! Jrgen squawks stupid from the pass. Victor chases twelve boxer
across the great Sylt dike. Wrong practicing of xylophone music tortures every larger dwarf.
40 Chapter 4 Short fonts overview
Math formulas
These math formulas are taken from wikipedia.org. They show well known formulas used in
math and physics.
Greens
theorem
[ ] v 2
u2 v + (u,v) d3V = u d A (0.1)
n
G S
Jacobian matrix ( )
f ( f1 , . . . , fm ) fi (a)
J f (a) := (a) := (a) := (0.2)
x (x1 , . . . , xn ) xj i=1,...,m; j=1,...,n
Tables
The following table lists some properties of the material fused silica.
description property
density = 2.2 g/cm3
heat capacity cp = 703 J/gK
transmission 185 - 2500 nm
Part II
LaTeX Examples
41
Contents
5 Template demonstration 43
5.1 Text markup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.2 Quotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.3 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.4 Other environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.5 Paragraph alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.6 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.7 Figures and captions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.8 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
5.9 Math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
5.10 Science . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
5.11 Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
5.12 Bibliographies and Citations . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
5.13 Index, glossaries, list of symbols, list of acronyms, . . . . . . . . . . . . . . . 107
5.14 Verbatim, Listings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
5.15 Fancy Packages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
5.16 Diagrams and plots with LaTeX . . . . . . . . . . . . . . . . . . . . . . . . 120
42
CHAPTER 5
Template demonstration
Originally the code of this chapter served only as a test for the template code. It was used
to verify that everything is displayed as expected. It was then extended to a presentation
of the possibilities of this template.
All examples are presented together with the creation code side by side or on top of
each other. The code can be copied directly from the pdf document and inserted in the
content files of this template. The basic LATEX code example may also work in any other
LATEX template. However, most examples require a special package or even some code
defined only in this template. Therefore it is only guaranteed that the examples work in
this template. If this should not be the case it should be reported as a bug.
All the examples are designed not to raise an error if some functionality is not available,
but instead to display why they were not included in the document. One example for
this is the code for package subfloat in section 5.7.7, which was intentionally removed
because of incompatibilities and better alternatives. Therefore these error messages do
not indicate an error of the template. They only inform why an example could not be
included.
This document (content/demo/demo.tex) could also be used in other templates provided
that all depending packages1 are loaded. In the case of glossaries some definitions need
to be loaded from an extra file content/demo/glossariesEntries.tex. All users and
package authors are encouraged to extend and improve the examples as well as use this
file for testing of their own commands and packages.
43
44 Chapter 5 Template demonstration
Result:
The standard commands for font attributes: bold, italic, slanted, sans serif, small caps
and monospaced typewrite. And any combination of them: bold italic, bold slanted,
bold sans serif, bold small caps sans serif slanted.
However, depending on the font not all combinations are possible. In this case the error
Some font shapes were not available, defaults substituted. is printed out.
The font used for this command can be set up in the preamble.
5.2 Quotes
5.2.1 quote
This standard environment can be used for quotes. Its text is indented from both sides. For
quotes with citations the blockquote environment of packages csquotes is much better
5.2 Quotes 45
suited.
Code:
\begin{quote}
The \LaTeX{} document preparation system is a special version of Donald
Knuth's \TeX{} program. \TeX{} is a sophisticated program designed to
produce high-quality typesetting, especially for mathematical text.
\end{quote}
Result:
Result:
Normal quotes inside a sentence: This sentence contains a second quote with different
quotation marks. The style of quotations can be set up and is depended on the language
setting. Quotes over several lines can be set as one block:
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nos-
trud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis
aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. (Lorem Lipsum, P. 50)
46 Chapter 5 Template demonstration
5.3 References
Code: Result:
Some text with a normal reference Some text with a normal reference to sec-
to section~\ref{sec:references}. tion 5.3.
Code:
Some math formulas to reference:
\begin{equation}
a = b + c \label{eqn:abc}
\end{equation}
and another math formula
\begin{equation}
z = y + x\,. \label{eqn:zyx}
\end{equation}
\Cref{sec:references} contains a reference to a section
whereas the formulars \cref{eqn:abc,eqn:zyx}
reference equations.
Result:
=+ (5.1)
= + . (5.2)
Section 5.3 contains a reference to a section whereas the formulars eqs. (5.1) and (5.2)
reference equations.
Result:
=+ (5.3)
Result:
The LATEX document preparation system is a special version of Donald Knuths TEX program. TEX
is a sophisticated program designed to produce high-quality typesetting, especially for mathematical
text.
48 Chapter 5 Template demonstration
Code: Result:
The \LaTeX{} document preparation The LATEX document preparation system is
system is a special version of Donald a special version of Donald Knuths TEX
Knuth's \TeX{} program. \TeX{} is a program. TEX is a sophisticated program
sophisticated program designed to
produce high-quality typesetting,
designed to produce high-quality typeset-
especially for mathematical text. ting, especially for mathematical text.
If the alignment was not intentionally changed LATEX prints text as justified and with
hyphenation.
FlushLeft
Code: Result:
\begin{FlushLeft}
The \LaTeX{} document preparation The LATEX document preparation system
system is a special version of Donald is a special version of Donald Knuths
Knuth's \TeX{} program. \TeX{} is a TEX program. TEX is a sophisticated pro-
sophisticated program designed to gram designed to produce high-quality
produce high-quality typesetting, typesetting, especially for mathematical
especially for mathematical text. text.
\end{FlushLeft}
5.5 Paragraph alignment 49
FlushRight
Code: Result:
\begin{FlushRight}
The \LaTeX{} document preparation The LATEX document preparation
system is a special version of Donald system is a special version of Don-
Knuth's \TeX{} program. \TeX{} is a ald Knuths TEX program. TEX is
sophisticated program designed to a sophisticated program designed
produce high-quality typesetting, to produce high-quality typesetting,
especially for mathematical text. especially for mathematical text.
\end{FlushRight}
Centering
Code: Result:
\begin{Centering} The LATEX document preparation system
The \LaTeX{} document preparation is a special version of Donald Knuths
system is a special version of Donald TEX program. TEX is a sophisticated
Knuth's \TeX{} program. \TeX{} is a
sophisticated program designed to
program designed to produce high-quality
produce high-quality typesetting, typesetting, especially for mathematical
especially for mathematical text. text.
\end{Centering}
Code:
\begin{multicols}{3}[Text with three columns created with package multicol]
Suspendisse ac nibh vitae nunc iaculis accumsan. Vivamus venenatis, orci vitae
interdum tristique, nisl lectus fermentum arcu, sed vehicula pede orci et
nunc. Cras tempus ultrices leo. Nulla at tortor. Morbi nisl tellus, lobortis
nec, nonummy a, vulputate at, felis. In interdum varius sem. Fusce
pellentesque, eros vitae consectetuer dignissim, ipsum urna tincidunt urna,
ut aliquet libero lectus vel purus. In commodo iaculis justo. Sed euismod.
Praesent molestie leo ac erat. Etiam a felis.
Nunc ipsum diam, porta ac, mollis non, mattis a, felis. Etiam nisl sapien,
malesuada eget, rutrum at, dictum non, metus. Aliquam ut nunc in purus rutrum
posuere. Proin id risus. Integer dignissim, lorem sit amet cursus adipiscing,
sapien purus posuere erat, ac porta risus augue non enim. Fusce nunc nunc,
sodales et, vestibulum ut, auctor ac, sem. Vivamus nisi lectus, consectetuer
eget, congue at, feugiat et, elit. Praesent sem. Curabitur interdum placerat
odio.
\end{multicols}
Result:
50 Chapter 5 Template demonstration
Suspendisse ac nibh vitae sectetuer dignissim, ipsum suere. Proin id risus. Integer
nunc iaculis accumsan. Viva- urna tincidunt urna, ut ali- dignissim, lorem sit amet cur-
mus venenatis, orci vitae in- quet libero lectus vel purus. sus adipiscing, sapien purus
terdum tristique, nisl lectus In commodo iaculis justo. posuere erat, ac porta risus
fermentum arcu, sed vehic- Sed euismod. Praesent mo- augue non enim. Fusce nunc
ula pede orci et nunc. Cras lestie leo ac erat. Etiam a fe- nunc, sodales et, vestibulum
tempus ultrices leo. Nulla lis. Nunc ipsum diam, porta ut, auctor ac, sem. Vivamus
at tortor. Morbi nisl tel- ac, mollis non, mattis a, fe- nisi lectus, consectetuer eget,
lus, lobortis nec, nonummy lis. Etiam nisl sapien, male- congue at, feugiat et, elit.
a, vulputate at, felis. In in- suada eget, rutrum at, dic- Praesent sem. Curabitur in-
terdum varius sem. Fusce tum non, metus. Aliquam terdum placerat odio.
pellentesque, eros vitae con- ut nunc in purus rutrum po-
5.6 Lists
5.6.1 itemize
This is the standard list of LATEX. It has a separation between each item, to improve the
reading of texts spanning several lines.
Code:
\begin{itemize}
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
%
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
%
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{itemize}
Result:
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
\begin{itemize}
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
%
\begin{itemize}
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
%
\begin{itemize}
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
%
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
%
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{itemize}
%
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
%
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{itemize}
\end{itemize}
Result:
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
52 Chapter 5 Template demonstration
5.6.2 enumerate
Same as the itemize list, but enumerated.
Code:
\begin{enumerate}
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
%
\begin{enumerate}
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
%
\begin{enumerate}
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
%
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
%
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{enumerate}
%
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
%
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{enumerate}
\end{enumerate}
Result:
1. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
a) Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
i. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
ii. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
iii. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
b) Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
5.6 Lists 53
c) Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
\begin{itemize}[noitemsep]
\item This environment
\item should only be used in the
\item case of single line items
\end{itemize}
Result:
This environment
should only be used in the
case of single line items
\begin{enumerate}[label=(\alph{enumi})]
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
%
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
\end{enumerate}
Result:
(a) Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
(b) Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
54 Chapter 5 Template demonstration
Result:
Result:
Code:
\begin{center}
\captionsetup{type=figure}
\includegraphics[width=0.3\textwidth]{images/testimage.png}
\caption{Another example for a caption without a figure environment}
\end{center}
Result:
Result:
5.7 Figures and captions 57
Result:
\begin{figure}[H]
\begin{subfigure}[b]{.5\linewidth}
\centering
\includegraphics[width=0.5\linewidth]{images/testimage.png}
\caption{A subfigure}\label{fig:2a}
\end{subfigure}%
\begin{subfigure}[b]{.5\linewidth}
\centering
\includegraphics[width=0.5\linewidth]{images/testimage.png}
\caption{Another subfigure}\label{fig:2b}
\end{subfigure}
\caption{A figure}\label{fig:2}
\end{figure}
Result:
\label{fig:floatrow:example:3:b}}
\end{floatrow}
\end{figure}
Result:
Figure 5.8: caption Figure 5.9: caption spanning the remaining width of the
spanning the width of the text width
picture
Result:
60 Chapter 5 Template demonstration
Figure 5.10: first image Figure 5.11: second im- Figure 5.12: third im-
positioned at the top age positioned at the top age positioned at the bot-
tom
\begin{figure}[H]
\ffigbox[\FBwidth]
{
\begin{subfloatrow}
\ffigbox[1.5\FBwidth]
{\includegraphics[width=0.2\textwidth]{images/testimage.png}}
{\caption{first image}\label{fig:floatrow:example:5:a}}
%
\ffigbox[1.5\FBwidth]
{\includegraphics[width=0.2\textwidth]{images/testimage.png}}
{\caption{second image}\label{fig:floatrow:example:5:b}}
\end{subfloatrow}
}
{\caption{subcaptions using subfloatrow environment}
\label{fig:floatrow:example:5}}
\end{figure}
Result:
Result:
Figure 5.14: caption beside the figure with some more text
and a bit more text and a little more text to fill space
Result:
62 Chapter 5 Template demonstration
Result:
Result:
64 Chapter 5 Template demonstration
\begin{figure}[H]
\IfDefined{RawFloats}{\RawFloats} % required if floatrow is loaded
\begin{addmargin*}[0pt]{-0.6\marginwidth}%
\centering
\includegraphics[width=0.22\linewidth]{images/testimage} \hfill
\includegraphics[width=0.22\linewidth]{images/testimage} \hfill
\includegraphics[width=0.22\linewidth]{images/testimage} \hfill
\includegraphics[width=0.22\linewidth]{images/testimage}
\caption[pictures extended into the margin]{pictures extended into the margin
-- Pellentesque mollis nunc sed mauris tempor molestie. Aliquam adipiscing
nisi eu metus. Proin viverra odio ac lorem consequat condimentum. Suspendisse
bibendum tellus. }
\label{fig:maincls.addmargin.default}
\end{addmargin*}
\end{figure}
%
5.7 Figures and captions 65
Result:
Pellentesque mollis nunc sed mauris tempor molestie. Aliquam adipiscing nisi eu metus.
Proin viverra odio ac lorem consequat condimentum. Suspendisse bibendum tellus.
Figure 5.18: pictures extended into the margin Pellentesque mollis nunc sed mauris tempor molestie.
Aliquam adipiscing nisi eu metus. Proin viverra odio ac lorem consequat condimentum. Suspendisse
bibendum tellus.
Pellentesque mollis nunc sed mauris tempor molestie. Aliquam adipiscing nisi eu metus.
Proin viverra odio ac lorem consequat condimentum. Suspendisse bibendum tellus.
\begin{figure}[H]
\begin{addmargin*}[0pt]{-0.6\marginwidth}%
\centering
\includegraphics[width=0.22\linewidth]{images/testimage} \hfill
\includegraphics[width=0.22\linewidth]{images/testimage} \hfill
\includegraphics[width=0.22\linewidth]{images/testimage} \hfill
\includegraphics[width=0.22\linewidth]{images/testimage}
\caption[pictures extended into the margin]{pictures extended into the margin --
Pellentesque mollis nunc sed mauris tempor molestie. Aliquam adipiscing nisi eu
metus. Proin viverra odio ac lorem consequat condimentum. Suspendisse bibendum
tellus. }
\label{fig:maincls.addmargin.full}
66 Chapter 5 Template demonstration
\end{addmargin*}
\end{figure}
%
Pellentesque mollis nunc sed mauris tempor molestie. Aliquam adipiscing
nisi eu metus. Proin viverra odio ac lorem consequat condimentum.
Suspendisse bibendum tellus.
Result:
Pellentesque mollis nunc sed mauris tempor molestie. Aliquam adipiscing nisi eu metus.
Proin viverra odio ac lorem consequat condimentum. Suspendisse bibendum tellus.
Figure 5.19: pictures extended into the margin Pellentesque mollis nunc sed mauris
tempor molestie. Aliquam adipiscing nisi eu metus. Proin viverra odio ac lorem consequat
condimentum. Suspendisse bibendum tellus.
Pellentesque mollis nunc sed mauris tempor molestie. Aliquam adipiscing nisi eu metus.
Proin viverra odio ac lorem consequat condimentum. Suspendisse bibendum tellus.
\begin{figure}[H]
\IfDefined{RawFloats}{\RawFloats} % required if floatrow is loaded
\begin{margincap}
\centering
\includegraphics[width=0.4\textwidth]{images/testimage}
\caption[short caption text]{long caption text with some more
text and a bit more text and a little more text to fill space.}
\label{fig:picmargincap}
\end{margincap}
\end{figure}
Pellentesque mollis nunc sed mauris tempor molestie. Aliquam adipiscing nisi
eu metus. Proin viverra odio ac lorem consequat condimentum. Suspendisse
5.7 Figures and captions 67
bibendum tellus. Duis non diam. Aliquam sodales sapien in mauris. Sed euismod
adipiscing lorem. Pellentesque nulla augue, nonummy vel, tincidunt at, blandit
Result:
Pellentesque mollis nunc sed mauris tempor molestie. Aliquam adipiscing nisi eu metus.
Proin viverra odio ac lorem consequat condimentum. Suspendisse bibendum tellus. Duis
non diam. Aliquam sodales sapien in mauris. Sed euismod adipiscing lorem. Pellentesque
nulla augue, nonummy vel, tincidunt at, blandit
Fig. 5.20:
long cap-
tion text
with some
more text
and a bit
more text
and a lit-
tle more
text to fill
space.
Pellentesque mollis nunc sed mauris tempor molestie. Aliquam adipiscing nisi eu metus.
Proin viverra odio ac lorem consequat condimentum. Suspendisse bibendum tellus. Duis
non diam. Aliquam sodales sapien in mauris. Sed euismod adipiscing lorem. Pellentesque
nulla augue, nonummy vel, tincidunt at, blandit
0.38\doctextwidth 0.38\doctextwidth
0.38\textwidth 0.38\textwidth
68 Chapter 5 Template demonstration
5.8 Tables
This section about tables is organized as follows:
Result:
5.8 Tables 69
Note that here the style of the table was further changed by the commands:
\small\sffamily\renewcommand{\arraystretch}{1.4}
Cmidrule (booktabs)
Code:
\begin{table}[H]
\small\sffamily\renewcommand{\arraystretch}{1.4}
\begin{tabular}{lll}
\toprule
header & header & header \\ \cmidrule(r){1-1}
\cmidrule(lr){2-2}
\cmidrule(l){3-3}
content & content & content \\
content & content & content \\
content & content & content \\
\bottomrule
\end{tabular}
\end{table}
Result:
Code:
\begin{table}[H]
% style
\small\sffamily\centering\renewcommand{\arraystretch}{1.4}
% caption
\captionabove{table with style changes and zebra colored rows}
%tabular
\rowcolors{1}{tablebodycolor}{tablerowcolor}
\begin{tabular}{ccc}
\hline
\rowcolor{tableheadcolor}
\bfseries header &
\bfseries header &
\bfseries header \\
\hline
content & content & content \\
content & content & content \\
content & content & content \\
\hline
\end{tabular}
\end{table}
Result:
Table 5.2: table with style changes and zebra colored rows
Tablestyles package
This package unifies the application of a style to a table. The following styles are predefined:
default, roman (serif instead of sans fonts), sansbold (bold header), sansboldbw (white
text on black background)
Code:
\begin{table}[H]
%
\tablestyle[sansbold]
%
\captionabove{table with bold header font using the styles by this package}
\begin{tabular}{*{2}{p{0.45\textwidth}}}
\theadstart
\thead header &
5.8 Tables 71
\thead header \\
\tbody
%
content & content \\
content & content \\
content & content \\
content & content \\
content & content \\
%
\tsubheadstart
\tsubhead subhead &
\tsubhead subhead \\
%
content & content \\
content & content \\
\tend
\end{tabular}
\end{table}
Result:
Table 5.3: table with bold header font using the styles by this package
header header
content content
content content
content content
content content
content content
subhead subhead
content content
content content
One should note, that these commands do not work together with the package tabu,
since in that package most row color command do not work as expected or need to be
replaced by color commands from the tabu package, see section 5.8.7.
5.8.2 Column types and column specifiers
Simple table (only alignment)
Code:
\begin{tabular}{lcr}
left & center & right \\ % or \tabularnewline
A & B & C \\
\end{tabular}
72 Chapter 5 Template demonstration
Result:
Column types: p
p-columns have a fixed width and align the text as justified.
Code:
\begin{center}
% Style changes
\small\renewcommand{\arraystretch}{1.4}
% tabular
\begin{tabular}{|l|p{0.1\linewidth}|p{0.2\linewidth}|p{0.4\linewidth}|}
\hline
header l & header p & header p & header p \\ \hline
%
left &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column
\newline with a line break included \\ \hline
\end{tabular}
\end{center}
Result:
Note, that such a grid should not be applied to a table. It is here only to demonstrate the
size of the columns.
Column types: p, m, b
The p,b and m columns all behave the same expect for their vertical alignment:
m means alignment in the vertical center, i.e. the baseline is in the center.
Therefore b-columns are on top of p-columns because their baselines are aligned.
Code:
\begin{center}
% Style changes
\small\renewcommand{\arraystretch}{1.4}
% tabular
\begin{tabular}{|p{0.3\linewidth}|m{0.3\linewidth}|b{0.3\linewidth}|}
\hline
\centering header p &
\centering header m &
\centering header b \tabularnewline
\hline
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column
\\
\hline
\end{tabular}
\end{center}
Result:
Note, that such a grid should not be applied to a table. It is here only to demonstrate the
alignment.
Column types: X (tabularx)
The package tabularx defines a new tabular environment, which requires the total width
of the tabular as a mandatory argument. The new X-columns take the remaining space to
fill the tabular. Each column is aligned as justified.
Code:
\begin{center}
% Style changes
\small\renewcommand{\arraystretch}{1.4}
% tabular
\small
\begin{tabularx}{0.9\textwidth}{llXX}
\hline
74 Chapter 5 Template demonstration
Result:
l l X X
left column left column text which is considerably text which is considerably
longer than the width of the longer than the width of the
column column
Note, that such a grid should not be applied to a table. It is here only to demonstrate the
size of the columns.
Custom column types: L, C, R
The predefined custom column types L, C and R all have a fixed width (they are based on
the p-columns) but are aligned as left (L), centered (C) and right (R). All columns include
hyphenation.
Code:
\begin{center}
% Style changes
\small\renewcommand{\arraystretch}{1.4}
% tabular
\small
\begin{tabular}{|L{0.3\linewidth}|C{0.3\linewidth}|R{0.3\linewidth}|}
\hline
fixed width (L: left) &
fixed width (C: center) &
fixed width (R: right) \\ \hline
%
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column \\
\hline
\end{tabular}
\end{center}
Result:
5.8 Tables 75
fixed width (L: left) fixed width (C: center) fixed width (R: right)
text which is considerably text which is consider- text which is consider-
longer than the width of the ably longer than the ably longer than the
column width of the column width of the column
Note, that such a grid should not be applied to a table. It is here only to demonstrate the
size and alignment of the columns.
\begin{center}
% Style changes
\small\renewcommand{\arraystretch}{1.4}
% tabular
\small
\begin{tabularx}{\textwidth}{|W|Z|Y|}
\hline
variable (W: left) &
variable (Z: center) &
variable (Y: right) \\ \hline
%
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column \\
\hline
\end{tabularx}
\end{center}
Result:
Note, that such a grid should not be applied to a table. It is here only to demonstrate the
size and alignment of the columns.
76 Chapter 5 Template demonstration
Result:
Description Property
density = 2.2 g/cm3
heat capacity p = 703 J/gK
transmission 185 - 2500 nm
Note that here the style of the table was further changed by the commands:
\small\renewcommand{\arraystretch}{1.4}
Result:
Note, that such a grid should not be applied to a table. It is here only to demonstrate the
size and alignment of the columns.
Code: Result:
\begin{center}
\renewcommand{\arraystretch}{1.4} left center right
\begin{tabular}{|l|c|r|}
\hline 3 columns
left & center & right \\ \
1 2 3
hline
\multicolumn{3}{|c|}{3 columns} \\ \
hline
1 & 2 & 3 \\ \
hline
\end{tabular}
\end{center}
Note, that such a grid should not be applied to a table. It is here only to demonstrate the
usage of \multicolumn
78 Chapter 5 Template demonstration
Multirow
Code: Result:
\begin{center}
\renewcommand{\arraystretch}{1.4} left centered right
\begin{tabular}{|l|c|r|} \hline
left & centered & right \\ \hline b c
\multirow{2}{*}{two cells}
two cells
2 3
& b & c \\ \cline
{2-3}
& 2 & 3 \\ \hline
\end{tabular}
\end{center}
Note, that such a grid should not be applied to a table. It is here only to demonstrate the
usage of \multicolumn
Code: Result:
\begin{center}
\renewcommand{\arraystretch}{1.4} 1 2 3
\begin{tabular}{|c|c|c|} \hline
1 & 2 & 3 \\ \hline 6
\multicolumn{2}{|c|}{\multirow{2}{*}{2x
2x2 cells
9
2 cells}}
& 6 \\ \cline{3-3}
\multicolumn{2}{|c|}{}
& 9 \\ \hline
\end{tabular}
\end{center}
Note, that such a grid should not be applied to a table. It is here only to demonstrate the
usage of \multicolumn
5.8 Tables 79
Code: Result:
\begin{center}
\renewcommand{\arraystretch}{1.4} Column a
\begin{tabular}{|c|c|}
\hline Column b
text
\multirow{4}{2cm}{text} Column c
& Column a \\
& Column b \\ Column d
& Column c \\
& Column d \\ Column a
\hline
\multirow{3}[6]*{text} text Column b
& Column a \bigstrut \\ \cline{2-2}
& Column b \bigstrut \\ \cline{2-2} Column c
& Column c \bigstrut \\
\hline
Column a
\multirow{4}[8]{1in}{text}
Column b
& Column a \bigstrut \\ \cline{2-2} text
& Column b \bigstrut \\ \cline{2-2} Column c
& Column c \bigstrut \\ \cline{2-2}
& Column d \bigstrut \\ Column d
\hline
\multirow{4}*{% Column a
\begin{tabular}{c}
row a \\ row b row a Column b
\end{tabular} row b Column c
}
& Column a \\ Column d
& Column b \\
& Column c \\
& Column d \\
\hline
\end{tabular}
\end{center}
Result:
Note, that the grid lines should not be applied to a table. It is here only to demonstrate
the size and alignment of the columns.
5.8 Tables 81
Result:
Result:
Note, that the grid lines should not be applied to a table. It is here only to demonstrate
the size and alignment of the columns.
X columns
Tabu provides X-type columns which have an additional horizontal alignment as an
argument.
Code:
\begin{center}
% Style changes
\small\sffamily\renewcommand{\arraystretch}{1.4}
% tabu
\begin{tabu} to 0.6\textwidth{|l|X[r]|X[l]|}
\hline
left & X (right) & X (left) \\ \hline
1 & 2 & 3 \\ \hline
4 & 5 & 6 \\ \hline
\end{tabu}
\end{center}
Result:
Note, that the grid lines should not be applied to a table. It is here only to demonstrate
the size and alignment of the columns.
X columns (multiples)
The X-columns can also be stretched using a multiplier.
Code:
5.8 Tables 83
\begin{center}
% Style changes
\small\sffamily\renewcommand{\arraystretch}{1.4}
% tabu
\begin{tabu} to 0.6\textwidth
{|X[1,l]|X[2,c]|X[3,c]|X[1,r]|}
\hline
1x & 2x & 3x & 1x \\ \hline
left & center & center & right \\ \hline
text & text & text & text \\ \hline
\end{tabu}
\end{center}
Result:
1x 2x 3x 1x
left center center right
text text text text
Note, that the grid lines should not be applied to a table. It is here only to demonstrate
the size and alignment of the columns.
Vertical and horizontal alignment
The X-columns further take the alignment as an option. Possible values are L,C,R and J
(justified) and in the vertical direction p,m and b.
Code:
\begin{center}
% Style changes
\small\sffamily\renewcommand{\arraystretch}{1.4}
% tabu
\begin{tabu} to 0.9\textwidth{|X[2,Lp]|X[2,Cm]|X[2,Rb]|X[2,J]|}
\hline
left (p) & left (m) & left (b) & justified (p) \\ \hline
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column \\
\hline
\end{tabu}
\end{center}
Result:
84 Chapter 5 Template demonstration
Note, that the grid lines should not be applied to a table. It is here only to demonstrate
the size and alignment of the columns.
Colors in tabu tables
The color commands from the xcolor package (\rowcolor) can not be used in tabu-
tables. For this purpose the commands from the tabu package need to be applied, such as
\taburowcolors.
Code:
\begin{center}
% Style changes
\small\sffamily\renewcommand{\arraystretch}{1.4}
% tabu
\begin{tabu} to 0.9\textwidth {X[1,l]X[1,c]X[1,c]X[1,c]}
\hline
\rowfont[c]{\bfseries}
\taburowcolors 1{tableheadcolor .. tableheadcolor}
head & head & head & head \\
\hline
\taburowcolors 2{tablebodycolor .. tablerowcolor}
content & content & content & content \\
content & content & content & content\\
content & content & content & content\\
content & content & content & content\\
\hline
\end{tabu}
\end{center}
Result:
Result:
86 Chapter 5 Template demonstration
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
\end{longtable}
\end{filecontents}
Result:
title \\ \hline
\endhead
\hline
\taburowcolors 1{white .. white}
\multicolumn{6}{r}{\emph{continued on next page \ldots}}
\endfoot
\hline
\endlastfoot
\taburowcolors 2{tablebodycolor .. tablerowcolor}
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
description & content & content & content & content & content \\
\end{longtabu}
5.8 Tables 91
Result:
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column \\
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column \\
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column \\
\hline
\end{tabularx}
\end{sideways}
\end{table}
the column the column the column the column the column the column
Chapter 5 Template demonstration
5.8 Tables 95
\begin{sidewaystable}
\begin{center}
\centering\small\renewcommand{\arraystretch}{1.4}\sffamily
\captionsetup{type=table}
\captionabove{very wide table (sidewaystable)}
\rowcolors{1}{tablebodycolor}{tablerowcolor}
\begin{tabularx}{1.0\textwidth}{*{6}{X}}
\hline
\rowcolor{tableheadcolor}
head & head & head & head & head & head \\
\hline
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column \\
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column \\
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column \\
\hline
\end{tabularx}
\end{center}
\end{sidewaystable}
5.9 Math
For all math environments and commands the mathmode.pdf script by Herbert Voss is a
very good reference.
5.9.1 Math formulas
Examples taken from wikipedia.org
Code:
Green's theorem
\begin{equation}
\underset{\mathcal{G}\quad}\iiint
\left[u\nabla^{2}v+\left(\nabla u,\nabla v\right)\right]\mathrm{d}^{3}V
=\underset{\mathcal{S}\quad}\oiint u\,\frac{\partial v}{\partial n}
\,\,\mathrm{d}^{2}A
\end{equation}
Jacobian matrix
\begin{equation}
J_f(a) := \frac{\partial {f}}{\partial {x}}(a)
:= \frac{\partial(f_1, \ldots, f_m)}{\partial(x_1, \ldots, x_n)}(a)
:= \left(\frac{\partial f_i(a)}{\partial x_j}\right)_{i=1,\ldots,m;\
j=1,\ldots,n}
\end{equation}
Result:
Greens theorem
[ 2 ] 2
+ (,) d3 = d (5.4)
G S
Jacobian matrix
( )
(1 , . . . , ) ()
() := () := () := (5.5)
(1 , . . . , ) =1,...,; =1,...,
Result:
98 Chapter 5 Template demonstration
= (5.6)
= (5.7)
Result:
=
(5.8)
=
Result:
=+ = (5.9)
=++ = (5.10)
Result:
1
0
if || > 2
rect() = 1 1
2 if || = 2
1
1 if || < 2
Result:
The determinant of the matrix
( )
=
is written as
det = = .
Result:
Code:
\begin{equation}
f(x) = \frac{\cancel{(a+1)}x}{(x-1)\cancel{(a+1)}}
\end{equation}
Result:
(
+ 1)
() = (5.12)
( 1)
(+1)
Code:
\begin{empheq}[box=\fbox]{align}
f(x) & = e^{-E/kT}
\end{empheq}
Result:
() = / (5.13)
Code: Result:
\[
\mathbb{N}\subset\mathbb{Z}
\subset\mathbb{Q}
NZQRC
\subset\mathbb{R}
\subset\mathbb{C}
\]
Code: Result:
\[
\mathds{N}\subset\mathds{Z}
\subset\mathds{Q}
NZQRC
\subset\mathds{R}
\subset\mathds{C}
\]
5.9 Math 101
Result:
You take 12 cup of sugar, . . .
New operators
\begin{equation}
\rot \vec{a} + \grad \vec{a} + \div \vec{a} + \rect f(x) + \e^{-\i x} = \const
\end{equation}
%
New Symbols (laplace, dalembert)
\begin{gather}
\laplace f(x,y) = \frac{\partial^2 f}{\partial x^2} + \frac{\partial^2 f}{\
partial y^2} \\
\dalembert = \frac{\partial ^2}{c^2\partial t^2} - \laplace
\end{gather}
%
Result:
New commands (absolute, norm, trace):
|| + ( 3)2 + (5.14)
{ ( ) }
Tr { } = Tr =+ (5.15)
C, R, H, P, 1 (5.18)
New operators
2 2
(,) = + (5.20)
2 2
2
= (5.21)
2 2
5.10 Science 103
5.10 Science
This section is mainly about packages that are useful for special professions, and the use of
units in text is demonstrated.
5.10.1 units with siunitx
Code:
\begin{tabular}{ll}
Micrometer in text mode: & 33\,\textmu m \\
and in math mode with units: & $1,23\,\si{\micro m/s}$ \\
and with formating of the number: & $\SI{0,25e-11}{m/s^2}$ \\
and finally with an uncertainty: & $\SI{1,7(5)e-11}{m/s^2}$ \\
\end{tabular}
Result:
Result:
5.11 Symbols
5.11.1 Zapf Dingbats Symbols
Code: Result:
\ding{52} \quad \ding{222} 4
\quad \ding{237}
5.12 Bibliographies and Citations 105
Result:
This is just filler text [Goo94]. This is just filler text [Goo94, p. 59]. This is just filler text
[see Goo94]. This is just filler text [see Goo94, pp. 5963].
Result:
Goossens et al. [Goo94] show that this is just filler text. Goossens et al. [Goo94, p. 59]
show that this is just filler text. Goossens et al. [see Goo94] show that this is just filler
text. Goossens et al. [see Goo94, pp. 5963] show that this is just filler text.
Result:
This is just filler text [Goo94].
Multiple citations
By default, a list of multiple citations is not sorted. You can enable sorting by setting the
sortcites package option.
Code:
\cite{companion,augustine,bertram,cotton,hammond,massa,murray}
Result:
[Aug95; Ber96; Cot99; Goo94; Ham97; Hos98; Mas04]
Citations details
Code: Result:
\cite{companion} \\ [Goo94]
\citetitle{companion} \\ LaTeX Companion
\citeyear{companion} \\
1994
\citeauthor{companion} \\
Goossens et al.
5.13 Index, glossaries, list of symbols, list of acronyms, . . . 107
Result:
Lorem ipsum dolor sit amet, consectetuer adipiscing elit Nam dui ligula, fringilla a, euismod
sodales, sollicitudin vel, wisi.
The resulting index is printed on page 255.
Code:
% use the acronyms in a document.
The \gls{NA} of an microscope objective is defined by
$\mathrm{NA} = n \sin(\alpha)$, where and $\alpha$ is the
half-angle of the maximum cone of light that can exit the lens
The $z$-length under which the objective displays the probe with a sharp
picture is named \gls{DOF} and the distribution of a single light point in the
focal area through the whole imaging system is termed \gls{PSF}. Both, the
\gls{DOF} and the \gls{PSF} are dependent on the \gls{NA}.
Result:
108 Chapter 5 Template demonstration
Acronyms
Notation Description
NA numerical Apertur
Code:
% use the symbols in a document.
Calculations with \gls{symb:Pi} always give an inaccurate result,
because \gls{symb:Pi} is an irrational number.
\printglossary[type=symbolslist]
Result:
Calculations with always give an inaccurate result, because is an irrational number.
List of Symbols
Notation Description
wavelength
arbitrary angle
mathematical constant
Code:
% use the symbols in a document.
The \gls{glos:CD} was originally developed to play sound recordings, but later
extended to data storage. Later the \gls{glos:DVD} replaced the CD for the usage
of data storage.
Result:
The Compact disc (CD) was originally developed to play sound recordings, but later
extended to data storage. Later the DVD replaced the CD for the usage of data storage.
110 Chapter 5 Template demonstration
Glossary
Compact disc (CD)
The Compact Disc (also known as a CD) is an optical disc used to store digital data.
It was originally developed to store and playback sound recordings exclusively, but
later expanded to encompass storage of data (Source: wikipedia)
DVD
DVD is an optical disc storage media format, invented and developed by Philips,
Sony, Toshiba, and Panasonic in 1995. DVDs offer higher storage capacity than
Compact Discs while having the same dimensions. The basis of the DVD name stems
from the term digital versatile disc. (Source: wikipedia)
Result:
list
wavelength
arbitrary angle
mathematical constant
Code:
\printglossary[type=symbolslist,style=altlist, title=altlist]
Result:
altlist
wavelength
arbitrary angle
mathematical constant
5.13 Index, glossaries, list of symbols, list of acronyms, . . . 111
Code:
\printglossary[type=symbolslist,style=long, title=long]
Result:
long
wavelength
arbitrary angle
mathematical constant
Code:
\printglossary[type=symbolslist,style=longheader, title=longheader]
Result:
longheader
Notation Description
wavelength
arbitrary angle
mathematical constant
Result:
longFancy
wavelength
arbitrary angle
mathematical constant
Code:
\printglossary[type=symbolslist,style=longFancyHeader,title=longFancyHeader]
Result:
112 Chapter 5 Template demonstration
longFancyHeader
Notation Description
wavelength
arbitrary angle
mathematical constant
Code:
\printglossary[type=symbolslist,style=longtabuFancy,
title=longtabuFancy]
Result:
longtabuFancy
wavelength
arbitrary angle
mathematical constant
Code:
\printglossary[type=symbolslist,style=longtabuFancyHeader,
title=longtabuFancyHeader]
Result:
longtabuFancyHeader
Notation Description
wavelength
arbitrary angle
mathematical constant
The most common usage this package is to insert clearly visible todo notes in
a latex\todo{Should be written as LaTeX} document in the margin or inline
in the text. An example of its usage is the command \emph{todo}, which
renders in the default setting with a orange box in the margin.
The line connecting the note with the place in the text can be disabled
with the option \emph{noline}.\todo[noline]{A note with no line connecting
the note to the placement in the text.}
Result:
The most common usage this package is to insert clearly visible todo notes in a la- Should be
texdocument in the margin or inline in the text. An example of its usage is the command written as
todo, which renders in the default setting with a orange box in the margin. LaTeX
The line connecting the note with the place in the text can be disabled with the option
A note with
noline.
no line con-
Furthermore it is possible to place the notes in the main text instead of placing them
necting the
in the margin. This is recommended if the text too large for printing it to the margin.
note to the
However this also means that the placement of paragraphs, figures and tables in the the
placement in
normal text is influenced.
the text.
A todo note placed in the text
Result:
114 Chapter 5 Template demonstration
Missing
figure Description or Caption of the missing figure
5.14 Verbatim, Listings 115
Result:
1 // interface
2 class Person
3 {
4 public:
5 Person(); // constructor
6 ~Person(); // destructor
7 void setName(string name);
8 string name();
9 void setAge(int age);
10 int age();
11 private:
12 string m_name;
13 int m_age;
14 };
\begin{lstlisting}[style=lstStyleLaTeX,
caption={[LaTeX Listings] Lines of code in a typical LaTeX document},
label=lstLaTeXLinesOfCode]
\documentclass[paper=a4,fontsize=11pt]{scrartcl}
% preamble: (load packages, setup layout)
% 100 - 1000 lines of code (loc)
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
...
% document: > 2000 loc
\begin{document}
\chapter{Introduction}
Some text ...
\chapter{Theory}
...
\end{document}
\end{lstlisting}
Result:
1 \documentclass[paper=a4,fontsize=11pt]{scrartcl}
2 % preamble: (load packages, setup layout)
3 % 100 - 1000 lines of code (loc)
4 \usepackage[utf8]{inputenc}
5 \usepackage[ngerman]{babel}
6 ...
7 % document: > 2000 loc
8 \begin{document}
9 \chapter{Introduction}
10 Some text ...
11 \chapter{Theory}
12 ...
13 \end{document}
Result:
first example shows the default behavior of lettrine. It will produce an initial two
A lines, followed by the text between the curly brackets, which is set in small caps. The
following text flows around the initial.
Code:
\lettrine[lines=3]{A}{} second example where the initial is printed across
three lines. Note the indentation of the second and third line. This may be
influenced by the parameter \texttt{nindent}. The indent of the first line is set
with the parameter \texttt{findent}.
Result:
second example where the initial is printed across three lines. Note the indentation
A of the second and third line. This may be influenced by the parameter nindent.
The indent of the first line is set with the parameter findent.
Code:
\lettrine[lhang=1, nindent=0pt, lines=3]{W}{e} move now in the third example,
the initial in the margin area. This behavior is controlled by the
\texttt{lhang} parameter.
Result:
e move now in the third example, the initial in the margin area. This behavior is controlled
Code:
\lettrine[lines=4, loversize=-.1, lraise=.1]{Q}{uality} has its price. And if
it's just the time to learn how such gimmicks can be achieved. But the
results show that the effort is worthwhile. As you can see, the underscore
of the Q does not protrude into the text.
Result:
uality has its price. And if its just the time to learn how such gimmicks can
Q be achieved. But the results show that the effort is worthwhile. As you can see,
the underscore of the Q does not protrude into the text.
118 Chapter 5 Template demonstration
5.15.2 boxedminipage
Code:
\begin{boxedminipage}{0.5\textwidth}
Pellentesque mollis nunc sed mauris tempor molestie. Aliquam adipiscing nisi eu
metus. Proin viverra odio ac lorem consequat condimentum. Suspendisse bibendum
tellus. Duis non diam. Aliquam sodales sapien in mauris. Sed euismod adipiscing
lorem. Pellentesque nulla augue, nonummy vel, tincidunt at, blandit
\end{boxedminipage}
Result:
5.15.3 framed
Framed boxes with text width, which can span over more than one page.
Code:
\begin{framed}
Pellentesque mollis nunc sed mauris tempor molestie.
Aliquam adipiscing nisi eu metus. Proin viverra odio ac
lorem consequat condimentum. Suspendisse bibendum tellus.
Duis non diam. Aliquam sodales sapien in mauris. Sed
euismod adipiscing lorem. Pellentesque nulla augue,
nonummy vel, tincidunt at, blandit
\end{framed}
Result:
Pellentesque mollis nunc sed mauris tempor molestie. Aliquam adipiscing nisi eu metus.
Proin viverra odio ac lorem consequat condimentum. Suspendisse bibendum tellus. Duis
non diam. Aliquam sodales sapien in mauris. Sed euismod adipiscing lorem. Pellentesque
nulla augue, nonummy vel, tincidunt at, blandit
5.15.4 mdframed
Framed boxes, which can span over more than one page and where the style can be defined
in every detail.
Code:
5.15 Fancy Packages. 119
Result:
Pellentesque mollis nunc sed mauris tempor molestie. Aliquam adipiscing nisi
eu metus. Proin viverra odio ac lorem consequat condimentum. Suspendisse
bibendum tellus. Duis non diam. Aliquam sodales sapien in mauris. Sed
euismod adipiscing lorem. Pellentesque nulla augue, nonummy vel, tincidunt
at, blandit
120 Chapter 5 Template demonstration
Result:
0 1
\setcounter{density}{20}
\begin{tikzpicture}[scale=0.75]
\def\couleur{OrangeRed}
\path[coordinate] (0,0) coordinate(A)
++( 90:12cm) coordinate(B)
++( 0:12cm) coordinate(C)
++(-90:12cm) coordinate(D);
\draw[fill=\couleur!\thedensity] (A) -- (B) -- (C) --(D) -- cycle;
\foreach \x in {1,...,40}{%
\pgfmathsetcounter{density}{\thedensity+20}
\setcounter{density}{\thedensity}
\path[coordinate] coordinate(X) at (A){};
\path[coordinate] (A)
-- (B) coordinate[pos=.10](A)
-- (C) coordinate[pos=.10](B)
-- (D) coordinate[pos=.10](C)
-- (X) coordinate[pos=.10](D);
\draw[fill=\couleur!\thedensity] (A)--(B)--(C)-- (D) -- cycle;
}
\end{tikzpicture}
\end{figure}
Result:
122 Chapter 5 Template demonstration
Result:
()
2
2 14
2
1
3/2
2 d
0
1 1 12 2 3
5.16 Diagrams and plots with LaTeX 123
Circuit Libraries
Error: tikz library circuits not loaded
Shadings Library
Code:
\begin{figure}[H]
\centering
% code origin: pgf/tikz manual
\begin{tikzpicture}[scale=2]
\shade[upper left=red,upper right=green,
lower left=blue,lower right=yellow]
(0,0) rectangle (3,2);
\end{tikzpicture}
\end{figure}
Result:
5.16.2 pgfplots
Simple plot with curve (calculated by TeX)
Code:
\begin{figure}[H]
\pgfplotsset{width=0.8\textwidth, height=0.6\textwidth}
\centering
\begin{tikzpicture}
\begin{axis}[
xlabel=$x$,
ylabel={$f(x) = x^2 - x +4$}
]
% use TeX as calculator:
\addplot {x^2 - x +4};
\end{axis}
\end{tikzpicture}
\end{figure}
Result:
35
30
25
() = 2 + 4
20
15
10
6 4 2 0 2 4 6
\begin{tikzpicture}
\begin{axis}[
xlabel=$x$,
ylabel={$\sin(x) (x+1) + 3x$},
grid=major,
/pgfplots/enlargelimits=false,
ymax=500,
/pgfplots/xtick={0,20,...,100},
/pgfplots/ytick={0,100,...,600},
]
%
\addplot[domain=0:100, blue,style={line width=0.7pt}]
gnuplot{sin(x)*(x+1) + 3*x};
%
\legend{$\sin(x) (x+1) + 3x$}
\end{axis}
\end{tikzpicture}
\end{figure}
Result:
500
sin()( + 1) + 3
400
sin()( + 1) + 3
300
200
100
0
0 20 40 60 80 100
\begin{tikzpicture}
\begin{semilogyaxis}[
axis background/.style={shade,top color=gray,bottom color=white},
legend style={fill=white},
/pgfplots/enlargelimits=false]
%
\addplot {exp(-x)};
\addplot {exp(-4*x)};
%
\legend{$e^{-x}$,$e^{-4x}$}
\end{semilogyaxis}
\end{tikzpicture}
\end{figure}
Result:
108
106 4
104
102
100
102
104
106
108
5 4 3 2 1 0 1 2 3 4 5
3D plot
Code:
\begin{figure}[H]
\pgfplotsset{width=0.8\textwidth, height=0.6\textwidth}
\centering
\begin{tikzpicture}
\begin{axis}[view={30}{30},grid=major,
/pgfplots/xtick={0,60,...,300},
/pgfplots/ytick={0,60,...,300},
/pgfplots/ztick={-1.0,-0.6,...,1.0},
colorbar,
5.16 Diagrams and plots with LaTeX 127
colorbar style={ytick={-1.0,-0.6,...,1.0},
ymin=-1,ymax=1},
colormap/jet
]
\addplot3[surf,domain=0:360,samples=20]
{sin(x)*sin(y)};
\end{axis}
\end{tikzpicture}
\end{figure}
Result:
0.6
1
0.2
0.6
0.2
0.2 0.2
0.6
1 300 0.6
0 240
60 180
120 120
180
240 60
300 0
1
Result:
128 Chapter 5 Template demonstration
30
25
20
15
10
0
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Code:
\begin{figure}[H]
\pgfplotsset{width=0.8\textwidth, height=0.6\textwidth}
\centering
\begin{tikzpicture}
\begin{axis}[scale only axis,
/pgfplots/enlargelimits=false,
ymax = 34,
legend cell align=left,
legend style={
cells={anchor=west},
legend pos=north west,
font=\small
}]
\addplot[style=solid, color=blue, mark=none, style={line width=0.7pt}]
file {plotdata.txt};
%
\addplot [raw gnuplot,
style=solid, color=red, mark=none, style={line width=0.7pt}]
gnuplot [id=plotdata] {
5.16 Diagrams and plots with LaTeX 129
Result:
( ( )2 )
5
30 () = 5 exp sin(2) +
2.5
()fit =
25
20
15
10
0
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Result:
3.5
2.5
1.5
0.5
0
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Part III
Template code documentation
131
Contents
Bibliography 233
Index 255
132
CHAPTER 6
Main file (LaTeXTemplate.tex)
% !TeX encoding=utf8
% !TeX program = pdflatex
% !TeX spellcheck = en-US
6.2 Documentclass
In this template only classes from Koma-Script (Version 3) can be used. Other classes
would result in a non compiling template and are not supported therefore.
In the document class options some of the most important settings for the document are
configured, such as paper size, font size and language of the document.
%% Document Class (Koma Script) -----------------------------------------
%% Doc: scrguien.pdf
\documentclass[%
%draft=true, % draft mode (no images, layout errors shown)
draft=false, % final mode
%%% --- Paper Settings ---
paper=a4,% [Todo: add alternatives]
paper=portrait, % landscape
pagesize=auto, % driver
%%% --- Base Font Size ---
fontsize=11pt,%
%%% --- Koma Script Version ---
version=last, %
%%% --- Global Package Options ---
english, % language (passed to babel and other packages)
% (ngerman, english, french, ...)
]{scrbook} % Classes: scrartcl, scrreprt, scrbook
133
134 Chapter 6 Main file (LaTeXTemplate.tex)
6.3.2 Encoding
Selection of encoding of the LaTeX files and the encoding of the file system. The latter is
primarily depended on the operating system.
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% encoding
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
preamble/packages.tex
preamble/style.tex
preamble/commands.tex
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% preamble
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%% select/load fonts
\input{fonts/fonts.tex}
%\input{fonts/font-commercial.tex}
%% load packages
\input{preamble/packages.tex}
%% apply style settings
\input{preamble/style.tex}
%% new commands / definitions (required by the template!)
\input{preamble/commands.tex}
6.3.4 Configuration
All the configuration code shown here is separated from the files preamble/packages.tex
or preamble/style.tex because they are either system or target specific.
Selection of link colors: The links can either be displayed in colors for a pdf document or
be displayed in black for a print document.
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Configurations
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%%% Switch between colored links (web) and black links (print)
\IfDefined{UseDefinition}{%
%\UseDefinition{Target}{Print}
\UseDefinition{Target}{Web}
}% end of UseDefinition
Here possible options are selectable, which configure the way the pdf document is opened.
\IfPackageLoaded{hyperref}{%
%%% set layout of PDF pages
\hypersetup{pdfpagelayout=OneColumn}
% options:
% SinglePage Displays a single page; advancing flips the page
% OneColumn Displays the document in one column; continuous scrolling.
% TwoColumnLeft Displays the document in two columns,
% odd-numbered pages to the left.
136 Chapter 6 Main file (LaTeXTemplate.tex)
\input{macros/newcommands.tex}
\input{preamble/makeCommands.tex}
%\includeonly{
% content/0-title,
% content/0-Abstract,
% content/0-Introduction,
% content/1-Theory,
% content/2-Experiments,
% content/3-Results,
% content/4-Summery,
%} % end includeonly
6.4.2 Abstract
An abstract is common in phd thesis, but unusual in master and bachelor thesis. If you do
not require an abstract just comment out the following lines.
% -- abstract --
% (only in phd thesis)
\include{content/0-Abstract}
\cleardoublepage
6.4.3 Declaration
These lines load the document content/Z-Declaration.tex in which you can state that
the whole document is based on your ideas and written by only yourself. As far as I know
this is required in bachelor and master thesis, but not part of phd-thesis. Comment out
this line if you do not require it.
% -- declaration --
% (only in bachelor/master thesis)
\input{content/Z-Declaration.tex}
6.4.4 Frontmatter
The front pages of a thesis typically contain the table of contents followed by other lists.
Here these are the symbol list, an acronym list and a glossary.
These lines only setup the page style and the line numbering for the front pages. The
first line sets up as pages with headings defined by srcheadings and the line numbering
is applied by the command \frontmatter in the second line.
\frontmatter
\IfPackageLoaded{scrpage2}{\pagestyle{scrheadings}}
% -- table of contents --
%
% add table of contents to pdf bookmarks
\IfPackageLoaded{hyperref}{\pdfbookmark[1]{\contentsname}{toc}}
\tableofcontents
6.4.8 Bibliography
The bibliography is placed directly after the main content. It however must not be placed in
the appendix. The layout of the bibliography is defined in file preamble/style-biblatex.
140 Chapter 6 Main file (LaTeXTemplate.tex)
tex.
% -- bibliography --
% (must be placed _before_ appendix)
\IfPackageLoaded{biblatex}{
\cleardoublepage
\IfDefined{phantomsection}{\phantomsection}\label{sec:bibliography}
\printbibliography[%
heading=bibintoc, % (bibintoc, bibnumbered)
]
}% end of bibliography
6.4.11 Appendix
The appendix contains additional information that do not fit into the main text of the
thesis and must contain only information which is not necessary for the understanding of
the main text. Therefore the appendix is not treated as part of the thesis in the evaluation.
The appendix is started with \appendix and manually added to the table of contents. In
the last line the file content/Z-Appendix.tex is loaded which contains all further chapters
and sections of the appendix.
% --- Appendix --- --- --- --- --- --- ---
\cleardoublepage\IfDefined{phantomsection}{\phantomsection}
\appendix
% Add `Appendix` to TOC
\addcontentsline{toc}{part}{\appendixname}
% must be _input_, otherwise the TOC entry is at the wrong place
\input{content/Z-Appendix.tex}
6.4 The document (the content) 141
6.4.13 Index
An index is very useful for finding a topic in a large document. It is however also very time
consuming to create a good index. If you are not sure that your index content is worth to
include it in your thesis you should comment these lines out.
The setup for the index is done in file preamble/style-index.tex.
%% -- Index --
% _Remove_ Index unless you really want to invest a large amount
% of time and effort to create a good index!
\IfDefined{printindex}{%
\cleardoublepage\IfDefined{phantomsection}{\phantomsection}\label{sec:index}%
\printindex%
}% end of index
6.4.14 Thanks
It is common to add a page at the end of the document where the author thanks all people
who helped in the creation of the thesis.
\input{content/Z-Thanks.tex}
6.4.15 Todo
One can add a todo list using the features of the todonotes. By default it is disabled and
must be removed for the final version of a document anyway. Its usage can be hindered by
the No room for new write problem, see section 3.2.1.
% add todo list (remove for final document!)
% \input{content/Z-Todo.tex}
6.4.16 End
Finally the main file is closed with
%%% document END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7.1 preamble/packages-SolutionsNoRoomForNewWrite.tex
This file loads either the packages scrwfile or morewrites and etex.
% Description: see http://www.tex.ac.uk/cgi-bin/texfaq2html?label=noroom
% short summery: The e-TeX extensions do not help with the
% "no room for a new \write" problem, but in other cases
% of "no room for a new <thing> "
% "It is essential that you load etex before any other packages,
% and reserve any extra inserts immediately:"
\usepackage{etex}
\reserveinserts{28}
7.2 fonts/fonts.tex
This file loads the packages cmap, fontenc and textcomp. The default font is Latin Modern,
loaded with package lmodern. Further font families and typical font combinations are
presented but not loaded.
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Fonts Fonts Fonts
143
144 Chapter 7 Preamble files
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% T1 Schrift Encoding
\usepackage[T1]{fontenc}
%% -------------------
%
%% - Times, Helvetica, Courier (Word Standard...)
%\usepackage{mathptmx} %% --- Times (incl math)
%\usepackage[scaled=.90]{helvet} %% --- Helvetica (Arial)
%\usepackage{courier} %% --- Courier
%% -------------------
%%
%% - Palantino , Helvetica, Courier
%\usepackage{mathpazo} %% --- Palantino (incl math)
%\usepackage[scaled=.95]{helvet} %% --- Helvetica (Arial)
%\usepackage{courier} %% --- Courier
%% -------------------
%
%% - Charter, Bera Sans
%\usepackage{charter}\linespread{1.05} %% --- Charter
%\renewcommand{\sfdefault}{fvs} %% --- Bera Sans
%\usepackage[charter]{mathdesign} %% --- Charter (Math)
%\usepackage[scaled=0.85]{luximono} %% --- Luxi Mono (Typewriter)
%% Note: There is a better Charter font by Linotype
%% called 'ITC Charter'
%% -------------------
%% - URW Garamond
%\renewcommand{\rmdefault}{ugm} %% --- URW Garamond
%\renewcommand{\sfdefault}{fvs} %% --- Bera Sans
%%%\usepackage[small]{eulervm} %% --- EulerVM (MATH)
7.2 fonts/fonts.tex 145
7.2.1 fonts/fonts-lmodern-sansmath.tex
This file defines a sans math version for package lmodern. It is activated with \mathversion{sans}.
\DeclareMathVersion{sans}
% Math letters from Latin Modern Sans
\SetSymbolFont{letters}{sans}{OML}{cmbr}{m}{it}
% Math operators
\SetSymbolFont{operators}{sans}{OT1}{lmss}{m}{n}
% Math symbols
\SetSymbolFont{symbols}{sans}{OMS}{lmsy}{m}{n}
% Large symbols
\SetMathAlphabet{\mathrm}{sans}{OT1}{lmr}{m}{n}
\SetMathAlphabet{\mathsf}{sans}{OT1}{lmss}{m}{n}
\SetMathAlphabet{\mathit}{sans}{OT1}{lmr}{m}{it}
7.2.2 fonts/fonts-commercial.tex
If you own commercial fonts and have the required LATEX packages installed then this file
might be of interest for you. It shows how to load some of the available fonts for pdflatex.
146 Chapter 7 Preamble files
The file fonts/fonts.tex must still be loaded because it contains further packages that
are required.
For MyriadPro and MinionPro the code is extracted into extra files because these package
come with a lot of functionality and thus options.
\DeclareMathVersion{sans}
% Math letters from Latin Modern Sans
\SetSymbolFont{letters}{sans}{OML}{cmbr}{m}{it}
% Math operators
\SetSymbolFont{operators}{sans}{OT1}{lmss}{m}{n}
% Math symbols
\SetSymbolFont{symbols}{sans}{OMS}{lmsy}{m}{n}
% Large symbols
\SetMathAlphabet{\mathrm}{sans}{OT1}{lmr}{m}{n}
\SetMathAlphabet{\mathsf}{sans}{OT1}{lmss}{m}{n}
\SetMathAlphabet{\mathit}{sans}{OT1}{lmr}{m}{it}
fonts/fonts-MinionPro.tex
File that loads MinionPro and takes care of the package loaded order.
% load after textcomp, amsmath and MnSymbol
\IfFileExists{MinionPro.sty}{
%
\ExecuteAfterPackage{amsmath}{
% Minion Pro
\usepackage[%
%%% Font selection
%smallfamily, % (std) use only regular and bold face
medfamily, % use semibold face in addition to smallfamily
%fullfamily, % use medium face in addition to medfamily
noopticals, % (std) use only the optical size Text
%opticals % use the optical sizes Caption, Text, Subhead, and Display
%slides, % use only the optical size Caption (useful for slides)
normalsize, % (std) adapt optical sizes to the normal font size
%nonormalsize,% use static settings for the optical sizes
% onlytext, % only change the text fonts
% onlymath, % only change the math fonts
%%% Figure selection
% textosf, % use text figures in text mode
% mathosf, % use text figures in math mode
% osf, % (std) use text figures in text and math mode
% textlf, % use lining figures in text mode
% mathlf, % use lining figures in math mode
lf,, % use lining figures in text and math mode
mathtabular, % use tabular figures in math mode
%%% Miscellaneous options
% scaled=1.0, % scale the font size by <factor>
% minionint, % take the integral symbols from MyriadPro, not from MnSymbol
]{MinionPro}
7.2 fonts/fonts.tex 147
} % end of ExecuteAfter
%
% file not found:
}{\PackageWarning{template}{File 'MinionPro.sty' not found!\MessageBreak}{}}
fonts/fonts-MyriadPro.tex
File that loads MyriadPro and takes care of the package loaded order. MyriadPro must be
loaded after MinionPro if both shall be loaded.
\IfFileExists{MyriadPro.sty}{
% load after textcomp, amsmath and MnSymbol
\ExecuteAfterPackage{amsmath}{
%% Myriad Math Fonts
%\usepackage[onlysansmath]{MdSymbol}
%
\usepackage[%
%%% Font selection
% smallfamily, % (std) use only regular and bold face
medfamily, % use semibold face in addition to smallfamily
onlytext, % only change the text fonts
% onlymath % only change the math fonts
sansmath, % provide math version sans and sansbold
%%% Figure selection
% textosf, % use text figures in text mode
% mathosf, % use text figures in math mode
% osf, % (std) use text figures in text and math mode
textlf, % use lining figures in text mode
mathlf, % use lining figures in math mode
% lf, % use lining figures in text and math mode
mathtabular, % use tabular figures in math mode
%%% Miscellaneous options
% scaled=1.0, % scale the font size by <factor>
]{MyriadPro}[2012/01/07 v0.1c]
} % end of ExecuteAfter
%
% file not found:
}{\PackageWarning{template}{File 'MyriadPro.sty' not found!\MessageBreak}{}}
7.3 preamble/packages.tex
7.3.1 Package sections
This is the file that loads all packages. The packages are grouped together according to
there usage. However in many cases the loading order must be different. Therefore the
loading order is corrected by commands such as \ExecuteAfterPackage. If packages can
only be loaded after other packages have been loaded or must not be loaded in a special
combination this is recognized and the package either loaded or not in order to prevent
the template from not compiling.
All package groups, named within this text sections, start with \BeginTemplateSection
and end with \EndCodeSection. If these section are included in the compilation or excludes
(not compiled) is defined at the beginning of the file:
%% -- package section selections -->
\DefineCodeSection[true]{PackagesBase}
\DefineCodeSection[true]{PackagesBugfixes}
\DefineCodeSection[true]{PackagesFonts}
\DefineCodeSection[true]{PackagesDiagrams}
\DefineCodeSection[true]{PackagesMath}
\DefineCodeSection[true]{PackagesScience}
\DefineCodeSection[true]{PackagesSymbols}
\DefineCodeSection[true]{PackagesTables}
\DefineCodeSection[true]{PackagesText}
\DefineCodeSection[true]{PackagesQuotes}
\DefineCodeSection[true]{PackagesCitation}
\DefineCodeSection[true]{PackagesFigures}
\DefineCodeSection[true]{PackagesCaptions}
\DefineCodeSection[true]{PackagesIndexes}
\DefineCodeSection[true]{PackagesMisc}
\DefineCodeSection[true]{PackagesVerbatim}
\DefineCodeSection[true]{PackagesFancy}
\DefineCodeSection[true]{PackagesLayout}
\DefineCodeSection[true]{PackagesHeadFoot}
\DefineCodeSection[true]{PackagesHeadings}
\DefineCodeSection[true]{PackagesTOC}
\DefineCodeSection[true]{PackagesPDF}
\DefineCodeSection[true]{PackagesAdditional}
%% <--------------------------------
If you do not require all sections in your document you can thus change the setting from
true to false in all section definitions you do not want to include in the compilation.
The whole template should compile with any section excluded except section Packages-
Base. If this is not the case please submit a bug report.
calc
babel, translater
xcolor
graphicx
epstopdf
ragged2e
The application of each package is given with a short description in the source code.
The documentation file name and package loading order requirements are also included in
the source code.
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% These packages must be loaded before all others
% (primarily because they are required by other packages)
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesBase}
\EndCodeSection{PackagesBase}
fixltx2e
marginnote, (mparhack)
scrhack
marginfix
xspace
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% LaTeX bug fixing packages
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesBugfixes}
% Description: This package implements a workaround for the LaTeX bug that
% marginpars sometimes appear on the wrong margin.
% \usepackage{mparhack}
% BUG: in some case this causes an error in the index together with package
% pdfpages the reason is unkown. Therefore I recommend to use the
% margins of marginnote
% incompatible: marginfix
% Doc: marginnote.pdf
\usepackage{marginnote}
\EndCodeSection{PackagesBugfixes}
relsize
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Fonts
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesFonts}
%% Description: Set the font size relative to the current font size
%% Doc: relsize-doc.pdf
\usepackage{relsize}
\EndCodeSection{PackagesFonts}
amsmath
mathtools
onlyamsmath
braket
152 Chapter 7 Preamble files
cancel
empheq
exscale
fixmath
icomma
xfrac
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Math Packages
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesMath}
\IfPackageLoaded{amsmath}{
all,
% warning
error
]{onlyamsmath}
% Note that many other packages have problems with the change of the
% catcode of the $-char. Therefore workarounds/fixes for tikz and tabu
% are provided (loaded in style.tex)
} % end: IfPackageLoaded{amsmath}
\EndCodeSection{PackagesMath}
154 Chapter 7 Preamble files
tikz
pgf
pgfplots
pgfplotstable
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% diagrams
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesDiagrams}
% pgfplots
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usetikzlibrary{pgfplots.patchplots}
\usetikzlibrary{pgfplots.dateplot}
\usetikzlibrary{pgfplots.colormaps}
\usetikzlibrary{pgfplots.groupplots}
\usetikzlibrary{pgfplots.polar}
\usetikzlibrary{pgfplots.units}
\EndCodeSection{PackagesDiagrams}
preamble/packages-tikzpgf.tex
\usepackage{pgf}
\usepackage{tikz}
\IfPackageLoaded{pgf}{%
% \usepgflibrary{arrows}
}
\IfPackageLoaded{tikz}{%
%%% Chapter numbers according to
%%% package version 2.10
%
7.3 preamble/packages.tex 155
% \usetikzlibrary{matrix}
%%% 39. Mindmap Drawing Library
%\usetikzlibrary{mindmap}
%%% 40. Paper Folding Diagrams Library
%\usetikzlibrary{folding}
%%% 41. Pattern Library
\usetikzlibrary{patterns}
%%% 42. Petri-Net Drawing Library
%\usetikzlibrary{petri}
%%% 43. Plot Handler Library (loaded autom.)
\usetikzlibrary{plothandlers}
%%% 44. Plot Mark Library
\usetikzlibrary{plotmarks}
%%% 45. Profiler Library
%%% 46. Shadings Library
\usetikzlibrary{shadings}
%%% 47. Shadow Library
% \usetikzlibrary{shadows}
%%% 48. Shape Library
% \usetikzlibrary{shapes.geometric}
% \usetikzlibrary{shapes.symbols}
% \usetikzlibrary{shapes.multipart}
% \usetikzlibrary{shapes.callouts}
% \usetikzlibrary{shapes.misc}
%%% 49. Spy Library: Magnifying Parts of Pictures
% \usetikzlibrary{spy}
%%% 50. SVG-Path Library
% \usetikzlibrary{svg.path}
%%% 51. To Path Library (loaded autom.)
\usetikzlibrary{topaths}
%%% 52. Through Library
% \usetikzlibrary{through}
%%% 53 Tree Library
% \usetikzlibrary{trees}
%%% 54 Turtle Graphics Library
% \usetikzlibrary{turtle}
}
%% added upon request of user
\usepackage{tkz-base}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usepackage{tkz-fct}
%%
siunitx
not recommended: gensymb, upgreek, units
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% science packages
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesScience}
\EndCodeSection{PackagesScience}
dsfont
esint
mathcomp
euscript
pifont
158 Chapter 7 Preamble files
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Symbols
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesSymbols}
%%% General Doc: symbols-a4.pdf
%
%% Math symbols
\IfPackagesNotLoaded{mathdesign,MnSymbol,MdSymbol}{
\usepackage{dsfont} %% Double Stroke Fonts
\usepackage{amssymb}
}{}
% Futher Math symbols and script fonts
\IfPackagesNotLoaded{MnSymbol,MdSymbol}{
\usepackage{esint} % generate missing integrals for lmodern
%
% provides further symbols of the Text Companion (TC) fonts
% such as \tcmu, \tcperthousand, \tcdegree
\usepackage{mathcomp}
\usepackage[mathcal]{euscript} %% adds euler mathcal font
\IfPackagesNotLoaded{mdbch}{
\usepackage{mathrsfs} % script font (\mathscr)
}{}
}{}
%\usepackage[integrals]{wasysym}
%% Common Symbols
\usepackage{pifont} %% ZapfDingbats
\EndCodeSection{PackagesSymbols}
booktabs
multirow, bigstrut
ltxtable, tabularx, longtable
tabu
tablestyles
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Tables (Tabular)
7.3 preamble/packages.tex 159
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesTables}
% tablestyles
\IfFileExists{tablestyles.sty}{
\IfDefined{rowcolors}{\usepackage{tablestyles}}%
}{}
\EndCodeSection{PackagesTables}
ellipsis
ulem
soulutf8
url
footmisc
(chngcntr)
(tablefootnote)
varioref
cleveref
160 Chapter 7 Preamble files
enumitem
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% text related packages
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesText}
%%% footnotes============================================
\EndCodeSection{PackagesText}
7.3.11 Quotes
The package csquotes is a very powerful package that makes quotes language specific and
in general easier.
csquotes
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Quotes
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesQuotes}
%
% Description: Advanced features for clever quotations
% Doc: csquotes.pdf
\usepackage[%
babel, % the style of all quotation marks will be adapted
% to the document language as chosen by 'babel'
german=quotes, % Styles of quotes in each language
english=british,
french=guillemets
]{csquotes}
\EndCodeSection{PackagesQuotes}
7.3 preamble/packages.tex 163
biblatex
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Citations
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesCitation}
%% APA Style
% style=apa
%
164 Chapter 7 Preamble files
\EndCodeSection{PackagesCitation}
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% figures, placement, floats and captions
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesFigures}
\EndCodeSection{PackagesFigures}
floatrow, fr-fancy
caption
subcaption (replaces subfig)
mcaption
rotating
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% caption packages
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesCaptions}
%% - subcaption
%% loads: caption
%% Doc: subfig.pdf
%\usepackage{subfig}
\EndCodeSection{PackagesCaptions}
lineno (unused)
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% misc packages
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesMisc}
%]{lineno}
\EndCodeSection{PackagesMisc}
imakeidx
showidx
glossaries, glossary-longragged
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Index and other lists
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesIndexes}
% (Default is savewrites=false.)
% savewrites
% Note!: This option can significantly slow document compilation.
% As an alternative, you can use the scrwfile package and not use this
option.
% -> scrwfile disabled because of incompatibility with titletoc.
translate=true, % If babel has been loaded and the translator package
% is installed, translator will be loaded and the translations
% will be provided by the translator package interface.
hyperfirst=true, % options: (*true*, false)
% This is a boolean option that specifies whether each term
% has a hyperlink on first use.
%
%%% Sectioning, Headings and TOC Options
% toc, % Add the glossaries to the table of contents.
numberline, % When used with toc, this will add \numberline{} in
% the final argument of \addcontentsline. This will align the
% table of contents entry with the numbered section titles.
section=section, % Its value should be the name of a sectional unit (e.g.
chapter).
% This will make the glossaries appear in the named sectional
unit,
% otherwise each glossary will appear in a chapter,
% if chapters exist, otherwise in a section.
numberedsection = false,%
% The glossaries are placed in unnumbered sectional
% units by default, but this can be changed using numberedsection.
% options
% - false: no number, i.e. use starred form of sectioning command
% - nolabel: use a numbered section, but the section not labelled
% - autolabel: numbered with automatic labelling.
%
%%% Glossary Appearance Options
% entrycounter=false % (true, *false*)
% If set, each main (level 0) glossary entry will
% be numbered when using the standard glossary styles.
% counterwithin=0 % if set will reset the glossaryentry counter every
% time the defined level is reset.
% nolong, % prevents loading of glossary-long and thus the longtable package
% nosuper, % prevents loading of glossary-super and thus the supertabular
package
% nolist, % prevents loading of glossary-list
% notree, % prevents loading of glossary-tree
nonumberlist, % This option will suppress the
% associated number lists in the glossaries
counter=page, % The value should be the name of the default counter
% to use in the number lists ).
%%% Sorting Options
sort=standard,%
7.3 preamble/packages.tex 169
% options
% - standard : entries are sorted according to the value of the
% sort key used in \newglossaryentry (if present)
% or the name key (if sort key is missing);
% - def : entries are sorted in the order in which they were defined
% - use : entries are sorted according to the order in which they
% are used in the document
%%% Acronym Options
acronym, % Creates a separate acronym list
shortcuts, % define shortcuts (\ac for acronym)
]{glossaries}
% further styles
\usepackage{glossary-longragged}
% Create a new list of symbols
\newglossary[slg]{symbolslist}{syi}{syg}{List of Symbols}
% Simplest and easiest sorting method, but it's
% inefficient and the sorting is done according to the English alphabet. To
% use this method, add \makenoidxglossaries to the preamble and put
% \printnoidxglossaries at the place where you want your glossary
%\makenoidxglossaries
}
\EndCodeSection{PackagesIndexes}
upquote
verbatim
fancyvrb
listings
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% verbatim packages
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesVerbatim}
%%% Doc: upquote.sty
\usepackage{upquote} % print correct quotes in verbatim-environments
% Description: This package provides many facilities for reading, writing and
% changing the output style of verbatim code
% Doc: fancyvrb.pdf
% consumes \write
% \usepackage{fancyvrb}
\EndCodeSection{PackagesVerbatim}
lettrine
boxedminipage
framed
fancybox (incompatible with fancyvrb)
mdframed
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% fancy packages
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesFancy}
% Doc: boxedminipage.pdf
\usepackage{boxedminipage}
\EndCodeSection{PackagesFancy}
indentation (unused)
multicol
setspace
geometry (unused)
typearea (automatically loaded)
changepage (unused)
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% layout packages
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesLayout}
\EndCodeSection{PackagesLayout}
scrpage2
pageslts
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% head and foot lines
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesHeadFoot}
% plainfootsepline,
% footbotline,
% plainfootbotline,
% ilines,
% clines,
% olines,
% column titles (content, style)
automark,
% autooneside,% ignore optional argument in automark at oneside
komastyle,
% standardstyle,
% markuppercase,
% markusedcase,
nouppercase,
]{scrpage2}
\EndCodeSection{PackagesHeadFoot}
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% layout of headings
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesHeadings}
\EndCodeSection{PackagesHeadings}
174 Chapter 7 Preamble files
titletoc
tocstyle (unused)
appendix (unused)
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% settings and layout of TOC
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesTOC}
% Description: The philosophy of this package is to use new commands which you
% can format the toc entries with in a generic way.
% Doc: titlesec.pdf
% load before: hyperref
% consumes \write
% usage: % Define partial toc for part pages \PartialToc
\ifcsdef{chapter}
{\usepackage{titletoc}}
{}
\EndCodeSection{PackagesTOC}
pdfpages
pdflscape (unused)
microtype
hyperref
bookmark
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% pdf packages
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{PackagesPDF}
\usepackage{pdfpages}
\EndCodeSection{PackagesPDF}
7.4 preamble/style.tex 177
\BeginCodeSection{PackagesAdditional}
\usepackage[%
% disable,
]{todonotes}
\usepackage[NoDate]{currvita}
% \usepackage{nicefilelist}
\EndCodeSection{PackagesAdditional}
7.4 preamble/style.tex
7.4.1 Package sections
This is the file that defines all settings for the package including the page layout. The
settings are grouped together according to there usage. These section defined at the
beginning of the file:
%% -- style section selections -->
178 Chapter 7 Preamble files
\DefineCodeSection[true]{StyleColors}
\DefineCodeSection[true]{StyleMath}
\DefineCodeSection[true]{StyleDiagrams}
\DefineCodeSection[true]{StyleScience}
\DefineCodeSection[true]{StyleText}
\DefineCodeSection[true]{StyleFootnote}
\DefineCodeSection[true]{StyleQuotes}
\DefineCodeSection[true]{StyleCiteBib}
\DefineCodeSection[true]{StyleFigures}
\DefineCodeSection[true]{StyleCaptions}
\DefineCodeSection[true]{StyleTables}
\DefineCodeSection[true]{StyleIndexes}
\DefineCodeSection[true]{StyleVerbatim}
\DefineCodeSection[true]{StyleFancy}
\DefineCodeSection[true]{StyleParagraph}
\DefineCodeSection[true]{StyleLineSpacing}
\DefineCodeSection[true]{StylePageLayout}
\DefineCodeSection[true]{StyleTitlepage}
\DefineCodeSection[true]{StyleHeadFoot}
\DefineCodeSection[true]{StyleHeadings}
\DefineCodeSection[true]{StyleHeadingsFonts}
\DefineCodeSection[true]{StyleHeadingsLayout}
\DefineCodeSection[true]{StyleLayoutTOC}
\DefineCodeSection[true]{StylePdf}
\DefineCodeSection[true]{StyleFixProblems}
%% <--------------------------------
If you do not require all sections in your document you can change the setting from true
to false in all section definitions you do not want to include in the compilation.
7.4.2 Colors
If package xcolor is loaded then colors for the sections, the tables and pdf links are defined
with \definecolor and \colorlet. Note that \SetTemplateDefinition is used here to
define switchable colors for different document targets (web/print).
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Colors
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{StyleColors}
\IfMultDefined{definecolor,colorlet}{%
% color of headings
%\definecolor{sectioncolor}{RGB}{0, 51, 153} % blue
%\definecolor{sectioncolor}{RGB}{0, 25, 152} % darker blue
\definecolor{sectioncolor}{RGB}{0, 0, 0} % black
%
% Farbe fuer grau hinterlegte Boxen (fuer Paket framed.sty)
\definecolor{frameshadecolor}{gray}{0.90}
\definecolor{pdfanchorcolor}{named}{black}
7.4 preamble/style.tex 179
\definecolor{pdfmenucolor}{named}{red}
\definecolor{pdfruncolor}{named}{cyan}
\SetTemplateDefinition{Target}{Web}{%
\IfDefined{definecolor}{
\definecolor{pdfurlcolor}{rgb}{0,0,0.6}
\definecolor{pdffilecolor}{rgb}{0.7,0,0}
\definecolor{pdflinkcolor}{rgb}{0,0,0.6}
\definecolor{pdfcitecolor}{rgb}{0,0,0.6}
}
}%
\SetTemplateDefinition{Target}{Print}{%
\IfDefined{definecolor}{
\definecolor{pdfurlcolor}{rgb}{0,0,0}
\definecolor{pdffilecolor}{rgb}{0,0,0}
\definecolor{pdflinkcolor}{rgb}{0,0,0}
\definecolor{pdfcitecolor}{rgb}{0,0,0}
}
}%
% table colors
\colorlet{tablebodycolor}{white!100}
\colorlet{tablerowcolor}{gray!10}
\colorlet{tablesubheadcolor}{gray!30}
\colorlet{tableheadcolor}{gray!25}
7.4.3 Math
This code shows how to exchange the vector symbol arrow with a bold font and how to
exchange various greek symbols by there var variant.
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Math Settings
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{StyleMath}
\let\epsilon=\ORGvarepsilon
%
% \let\ORGvarrho=\varrho
% \let\varrho=\rho
% \let\rho=\ORGvarrho
%
% \let\ORGvartheta=\vartheta
% \let\vartheta=\theta
% \let\theta=\ORGvartheta
%
% \let\ORGvarphi=\varphi
% \let\varphi=\phi
% \let\phi=\ORGvarphi
\EndCodeSection{StyleMath}
7.4.4 Science
Loading of preamble/style-siunitx.tex.
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Science Settings
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{StyleScience}
\EndCodeSection{StyleScience}
preamble/style-siunitx.tex
siunitx is setup for the detection of all font changes and in mode math. For german text
several changes are applied to ensure the correct setting of math in that language.
Additionally the commands \nicefrac, \unitfrac and \unit are defined in order to
emulate the commands from the package units.
\IfDefined{sisetup}{%
% detect-family,
% detect-weight,
\sisetup{%
mode = math, % text is printed using a math font
detect-all,
separate-uncertainty=true,
}
\IfDefined{iflanguage}{%
\iflanguage{ngerman}{%
\sisetup{%
7.4 preamble/style.tex 181
exponent-product = \cdot,
number-unit-separator=\text{\,},
output-decimal-marker={\text{,}},
}
}
}
\let\nicefrac\sfrac
} % end: \IfDefined
7.4.5 Diagrams
Setup of default plot size for tikz/pgfplots and in case of german text the decimal
separator is set up as a comma.
Further settings for pgfplots are in a separate file: preamble/style-pgfplots.tex.
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% diagrams
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{StyleDiagrams}
\EndCodeSection{StyleDiagrams}
preamble/style-pgfplots.tex
Color series for pgfplots are defined in this file.
\IfPackagesLoaded{tikz,pgfplots}{%
% tikz/pgf
\pgfplotsset{width=0.8\textwidth,compat=1.5.1}
%% See pgfplotstable documentation (4.12.1) for further options
% set decimal point to comma for german text
\IfDefined{iflanguage}{
182 Chapter 7 Preamble files
\iflanguage{ngerman}{%
\pgfplotsset{%
every tick label/.append style={/pgf/number format/use comma}
% x tick label style={/pgf/number format/use comma},%
% y tick label style={/pgf/number format/use comma},%
% z tick label style={/pgf/number format/use comma}%
}%
}{} % end of \iflanguage
% for all languages
\pgfplotsset{%
every tick label/.append style={/pgf/number format/set thousands separator
={\,}},
every node near coord/.append style={/pgf/number format/set thousands
separator={\,}}
}%
}{} % end of \IfDefined
\definecolor{colorseriesRGB1}{RGB}{0, 0, 192}
\definecolor{colorseriesRGB2}{RGB}{192, 0, 0}
\definecolor{colorseriesRGB3}{RGB}{0 , 128, 0}
\definecolor{colorseriesRGB4}{RGB}{192, 0, 192}
\pgfplotscreateplotcyclelist{colorseries-rgb}{
{colorseriesRGB1},
{colorseriesRGB2},
{colorseriesRGB3},
{colorseriesRGB4},
}
\pgfplotscreateplotcyclelist{colorseries-office}{%
{colorseriesOffice1},%
{colorseriesOffice2},%
{colorseriesOffice3},%
{colorseriesOffice4},%
{colorseriesOffice5},%
{colorseriesOffice6},%
}
\pgfplotsset{
/pgfplots/bar cycle list/.style={/pgfplots/cycle list={%
{colorseriesOffice1!20!black,fill=colorseriesOffice1!80!white,mark=none},%
{colorseriesOffice2!20!black,fill=colorseriesOffice2!80!white,mark=none},%
{colorseriesOffice3!20!black,fill=colorseriesOffice3!80!white,mark=none},%
{colorseriesOffice4!20!black,fill=colorseriesOffice4!80!white,mark=none},%
{colorseriesOffice5!20!black,fill=colorseriesOffice5!80!white,mark=none},%
{colorseriesOffice6!20!black,fill=colorseriesOffice6!80!white,mark=none},%
}
},
}
7.4.6 Text
Here the font for urls (package url) and the font in margins used by package marginnote
is defined.
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% text related
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{StyleText}
%% style of URL
\IfDefined{urlstyle}{
\urlstyle{tt} %sf
}
% Options of enumitem
\IfDefined{setlist}{%
\setlist{itemsep=0pt}
}%
\EndCodeSection{StyleText}
7.4.7 Footnotes
Several definitions to solve common problems with footnotes and example code for the
redefinition of the footnote layout.
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
184 Chapter 7 Preamble files
% Footnotes
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{StyleFootnote}
\EndCodeSection{StyleFootnote}
7.4.8 Quotes
Settings for package csquotes.
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Quotes
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{StyleQuotes}
\IfPackageLoaded{csquotes}{
7.4 preamble/style.tex 185
\newenvironment{myquote}%
{\begin{quote}\small}%
{\end{quote}}%
\SetBlockEnvironment{myquote}
%\SetCiteCommand{} % Changes citation command
} %end: \IfPackageLoaded{csquotes}
\EndCodeSection{StyleQuotes}
\KOMAoptions{%
% bibliography=oldstyle%
bibliography=openstyle%
}%
\EndCodeSection{StyleCiteBib}
preamble/style-biblatex.tex
Setting of bibliography options.
% !TeX encoding=utf8
% !TeX spellcheck = en-US
\IfPackageLoaded{biblatex}{%
\ExecuteBibliographyOptions{%
%--- Sorting --- --- ---
186 Chapter 7 Preamble files
preamble/style-biblatex-alpha.tex
Redefinitions of bib-macros for an alpha style.
% !TeX encoding=utf8
% !TeX spellcheck = en-US
\IfPackageLoaded{biblatex}{%
% the number is not used in the bibliography, nor
% the citations, but for the list of publications
% we want numbers to be available.
\ExecuteBibliographyOptions{labelnumber}
% <authors>: <title>
\renewcommand*{\labelnamepunct}{\addcolon\space}
% make ': ' before pages
\renewcommand*{\bibpagespunct}{\addcolon\space}
% names delimiter ';' instead of ','
%\renewcommand*{\multinamedelim}{\addsemicolon\space}
% Doc: xpatch.pdf
\usepackage{xpatch}%
7.4 preamble/style.tex 189
\newbibmacro*{name:bold}[2]{%
\def\do##1{\ifstrequal{#1, #2}{##1}{\bfseries\listbreak}{}}%
\dolistloop{\bibboldnames}}
%% # can not be used in patch command because the command is wrapped in another
macro.
%% Therefore we mus play around with cat codes.
%% see http://tex.stackexchange.com/questions/188188/loop-macro-fails-if-
wrapped-in-conditional
%% for a better explaination.
\begingroup\lccode`?=`#\lowercase{\endgroup
\xpretobibmacro{name:last}{\begingroup\usebibmacro{name:bold}{?1}{?2}}{}{}
\xpretobibmacro{name:first-last}{\begingroup\usebibmacro{name:bold
}{?1}{?2}}{}{}
\xpretobibmacro{name:last-first}{\begingroup\usebibmacro{name:bold
}{?1}{?2}}{}{}
}%
\xpretobibmacro{name:delim}{\begingroup\normalfont}{}{}
\xapptobibmacro{name:last}{\endgroup}{}{}
\xapptobibmacro{name:first-last}{\endgroup}{}{}
\xapptobibmacro{name:last-first}{\endgroup}{}{}
\xapptobibmacro{name:delim}{\endgroup}{}{}
\DeclareNameAlias{default}{last-first/first-last}
\defbibenvironment{numbered+bold}
{\list
{\printtext[labelnumberwidth]{%
\printfield{prefixnumber}%
\printfield{labelnumber}%
}%
}%
{
\setlength{\labelwidth}{\labelnumberwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\labelsep}{1em}
\addtolength{\leftmargin}{\labelsep}%
190 Chapter 7 Preamble files
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{\hss##1}%
}
{\endlist}
{\item}%\hskip-\periodwidth
}% \IfPackageLoaded{biblatex}
\IfPackageLoaded{wrapfig} {
%\setlength{\wrapoverhang}{\marginparwidth}
%\addtolength{\wrapoverhang}{\marginparsep}
\setlength{\intextsep}{0.5\baselineskip} % space above and below the image
% \intextsep ignored with draft ???
%\setlength{\columnsep}{1em} % separation to the text
}
\EndCodeSection{StyleFigures}
7.4.11 Captions
In this section the visual appearance and numbering of captions is configured for the pack-
ages caption, subcaption, subfig (in preamble/style-caption.tex) and floatrow (in
preamble/style-floatrow.tex). The package subfig however is not recommended and
can only be used without subcaption.
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Captions
7.4 preamble/style.tex 191
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{StyleCaptions}
\IfPackageLoaded{amsmath}{
% Numbering of figures and table in each chapter
% \numberwithin{figure}{chapter}
% \numberwithin{table}{chapter}
}
\EndCodeSection{StyleCaptions}
preamble/style-caption.tex
In this file the standard caption style with name captionStyleTemplateDefault is defined
and applied via \captionsetup. Furthermore a version for short captions is defined with
the name captionStyleTemplateShortDefault, which is then applied for all wrap style and
margin figures.
Additionally caption styles are defined for subcaption type captions and for subfig
captions (not recommended) in the case that subfig is loaded instead of subcaption.
\IfPackageLoaded{caption}{%
% Style of captions
\DeclareCaptionStyle{captionStyleTemplateDefault}
[ % single line captions
justification = centering
]
{ % multiline captions
% -- Formatting
format = plain, % plain, hang
indention = 0em, % indention of text
labelformat = default,% default, empty, simple, brace, parens
labelsep = colon, % none, colon, period, space, quad, newline, endash
textformat = simple, % simple, period
% -- Justification
justification = justified, %RaggedRight, justified, centering
singlelinecheck = true, % false (true=ignore justification setting in
%single line)
% -- Fonts
labelfont = {small,bf},
textfont = {small,rm},
% valid values:
% scriptsize, footnotesize, small, normalsize, large, Large
% normalfont, ip, it, sl, sc, md, bf, rm, sf, tt
192 Chapter 7 Preamble files
\newcommand\FigureAbbrevition{Fig.}
\IfDefined{iflanguage}{%
\iflanguage{ngerman}{%
\renewcommand\FigureAbbrevition{Abb.}
}{}
}
\DeclareCaptionStyle{captionStyleTemplateShortDefault}{%
style=captionStyleTemplateDefault,
name=\FigureAbbrevition,
indention=0pt,
justification=RaggedRight
}
7.4 preamble/style.tex 193
% Short Names
\IfDefined{wrapfigure}{%
\captionsetup[wrapfigure]{style=captionStyleTemplateShortDefault}}
\IfDefined{wrapfloat}{%
\captionsetup[wrapfloat]{style=captionStyleTemplateShortDefault}}
\IfDefined{floatingfigure}{%
\captionsetup[floatingfigure]{style=captionStyleTemplateShortDefault}}
\IfDefined{margincap}{%
\IfDefined{preto}{\preto\margincap{
\captionsetup{style=captionStyleTemplateShortDefault}}}}
% see http://tex.stackexchange.com/questions/37721/captionsetup-for-margin-
caption
% for an explanation of the extra code.
%
} % end \IfPackageLoaded{caption}
preamble/style-floatrow.tex
Several settings of package floatrow are set up and float styles are defined with \floatsetup.
\IfPackageLoaded{floatrow}{%
\floatsetup[table]{style=plaintop}
\DeclareFloatStyle{TemplateFloatStyleBoxed}%
{style=Boxed,frameset={\fboxrule1pt\fboxsep12pt}}
\DeclareFloatVCode{grayruleabove}%
{{\color{gray}\par\rule\hsize{2.8pt}\vskip4pt\par}}
\DeclareFloatVCode{grayrulebelow}%
{{\color{gray}\par\vskip4pt\rule\hsize{2.8pt}}}
\DeclareColorBox{TemplateFloatColorBoxStyle}%
{\fcolorbox{gray}{white}}
\DeclareObjectSet{centering}{\centering}
\DeclareMarginSet{center}%
{\setfloatmargins{\hfil}{\hfil}}
\DeclareMarginSet{hangleft}%
{\setfloatmargins{\hskip-\marginparwidth\hskip-\marginparsep}{\hfil}}
\DeclareFloatSeparators{marginparsep}%
{\hskip\marginparsep}
\floatsetup{%
%% style
style={%
plain % Standard LaTeX
% plaintop % puts captions above float object's contents
% Plaintop % Capitalized form of plaintop
% ruled
% Ruled
% boxed
% Boxed
% BOXED
% shadowbox
% Shadowbox
% SHADOWBOX
% Doublebox
% DOUBLEBOX
% wshadowbox
% Wshadowbox
% WSHADOWBOX
},%
7.4 preamble/style.tex 195
},%
%
%% - valign ---
% valign=t, % aligns objects by top line;
% valign=c, % aligns objects by center line
valign=b, % aligns objects by bottom line;
% valign=s, % stretches objects by full height (if it is possible).
%%% --- Facing Layout ---
facing=yes, % different layout for even and odd pages in if twoside is on
%%% --- Object Settings ---
%% - objectset: Defines justification of float object (float contents).
% objectset=justified, %
objectset=centering, %
% objectset=raggedright, %
% objectset=RaggedRight, %
%%% --- Defining Float Margins ---
%% - margins: ????
margins=centering, %
% margins=raggedright, %
% margins=raggedleft, %
%%% --- Defining Float Separators ---
% horizontal skip = \columnsep (default for both keys);
floatrowsep=columnsep,
% floatrowsep=quad, % horizontal skip = 1 em;
% floatrowsep=qquad, % horizontal skip = 2 em;
% floatrowsep=hfil, % like \hfil
% floatrowsep=hfill, % like \hfill
% floatrowsep=none, % empty separator
%
% horizontal skip = \columnsep (default for both keys);
capbesidesep=columnsep,
% capbesidesep=quad, % horizontal skip = 1 em;
% capbesidesep=qquad, % horizontal skip = 2 em;
% capbesidesep=hfil, % like \hfil
% capbesidesep=hfill, % like \hfill
% capbesidesep=none, % empty separator
%%% --- Defining Float Rules/Skips ---
%% - precode: above float box
precode={
none %
% thickrule %
% rule %
% lowrule %
% captionskip
},%
%% - rowprecode: above alone float box
rowprecode={
none %
% thickrule %
7.4 preamble/style.tex 197
% rule %
% lowrule %
% captionskip
},%
%% - midcode: between caption above/below and float object.
midcode={%
%none %
% thickrule %
% rule %
% lowrule %
captionskip
},%
%% - postcode: below float box
postcode={%
none %
% thickrule %
% rule %
% lowrule %
% captionskip
},%
%% - rowpostcode: below alone float box
rowpostcode={%
none %
% thickrule %
% rule %
% lowrule %
% captionskip
},%
%%% --- Defining Float Frames ---
% framestyle={%
% % fbox %
% colorbox %
% % doublebox %
% % shadowbox %
% % wshadowbox %
% },
%% - frameset: The parameters for chosen frame
% frameset={\fboxrule1pt\fboxsep12pt},
% framearound={%
% object % float object contents
% % all % full float box
% },
framefit=yes, % fit frame to whatever is set
%%% --- Settings for Colored Frames ---
% Predefinded ColorBox (\DeclareColorBox)
% colorframeset=TemplateFloatColorBoxStyle,
%%% --- Defining Float Skips ---
captionskip=5pt,
footskip=\skip\footins,
198 Chapter 7 Preamble files
\floatsetup[FloatStyleCaptionMargin]{
margins=hangleft,
floatwidth=\textwidth,
capposition=beside,
capbesideposition=left,
capbesideframe=no,
capbesidewidth=\marginparwidth,
capbesidesep=marginparsep,
framestyle=framefit=yes,
}
}% end if
7.4.12 Tables
Here new column types are defined if they are not yet defined.
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7.4 preamble/style.tex 199
% table packages
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{StyleTables}
% Define new column types only if they are not yet defined
\IfDefined{RaggedLeft}{
%% centered (Z):
\IfColumntypeDefined{Z}{}
{\newcolumntype{Z}{>{\Centering\arraybackslash\hspace{0pt}}X}}
%% right (X):
\IfColumntypeDefined{Y}{}
{\newcolumntype{Y}{>{\RaggedLeft\arraybackslash\hspace{0pt}}X}}
%% left (X):
\IfColumntypeDefined{W}{}
{\newcolumntype{W}{>{\RaggedRight\arraybackslash\hspace{0pt}}X}}
%% left (p):
\IfColumntypeDefined{L}{}
{\newcolumntype{L}[1]{>{\RaggedRight\arraybackslash\hspace{0pt}}p{#1}}}
%% right (p):
\IfColumntypeDefined{R}{}
{\newcolumntype{R}[1]{>{\RaggedLeft\arraybackslash\hspace{0pt}}p{#1}}}
%% centered (p):
\IfColumntypeDefined{C}{}
{\newcolumntype{C}[1]{>{\Centering\arraybackslash\hspace{0pt}}p{#1}}}
}
\EndCodeSection{StyleTables}
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Index and other lists
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{StyleIndexes}
\input{preamble/style-index.tex}
\input{preamble/style-glossaries.tex}
\EndCodeSection{StyleIndexes}
200 Chapter 7 Preamble files
preamble/style-index.tex
Setup for package imakeidx.
\IfPackageLoaded{imakeidx}{%
\indexsetup{%
,level=\chapter*%
,toclevel=chapter % indicate the level at which the indices appear in TOC
,noclearpage=false%
,firstpagestyle=plain%
,headers={\indexname}{\indexname}%
,othercode={\label{sec:Index}}% will be executed at the beginning of index
entries typesetting
}%
}% end if \IfPackageLoaded
preamble/style-glossaries.tex
Configuration for package glossaries. New styles are defined with \newglossarystyle
and with the use of package translator the headings are translated for the german
language.
\IfPackageLoaded{glossaries}{%
\newglossarystyle{longFancy}{%
\setglossarystyle{long}%
\renewenvironment{theglossary}%
{%
\vspace*{-1\baselineskip}
\renewcommand{\arraystretch}{1.6}%
\normalfont\normalsize%
\centering%
\rowcolors{1}{tablerowcolor}{tablebodycolor}
\begin{longtable}{l>{\RaggedRight}p{\glsdescwidth}}%
}%
{\end{longtable}}%
\renewcommand*{\glsgroupskip}{}%
\renewcommand*{\glossaryheader}{%
\hline\endhead%
\hline\endfoot%
}%
}
7.4 preamble/style.tex 201
\setlength{\glsdescwidth}{0.75\textwidth}
\newglossarystyle{longFancyHeader}{%
\setglossarystyle{longFancy}%
\renewcommand*{\glossaryheader}{%
\hline\rowcolor{tableheadcolor}
\bfseries \entryname &
\bfseries \descriptionname \tabularnewline
\hline\endhead%
\hline\endfoot%
}%
}
\setglossarystyle{longFancyHeader}
\IfPackageLoaded{tabu}{%
\newglossarystyle{longtabuFancy}{%
\setglossarystyle{long}%
\renewenvironment{theglossary}%
{%
\vspace*{-1\baselineskip}
\renewcommand{\arraystretch}{1.6}%
\normalfont\normalsize%
\centering%
\rowcolors{1}{tablerowcolor}{tablebodycolor}
\begin{longtabu} to 0.95\textwidth{lX[L]}
}%
{\end{longtabu}}%
\renewcommand*{\glsgroupskip}{}%
\renewcommand*{\glossaryheader}{%
\hline\endhead%
\hline\endfoot%
}%
} % end of newglossarystyle
\newglossarystyle{longtabuFancyHeader}{%
\setglossarystyle{longtabuFancy}%
\renewcommand*{\glossaryheader}{%
\hline\rowcolor{tableheadcolor}
\bfseries \entryname &
\bfseries \descriptionname \tabularnewline
\hline\endhead%
\hline\endfoot%
}%
}
\setglossarystyle{longtabuFancyHeader}
} % end of IfPackage
202 Chapter 7 Preamble files
\IfPackageLoaded{translator}{%
\deftranslation[to=German]{Acronyms}{Abkrzungsverzeichnis}%
\deftranslation[to=German]{List of Symbols}{Symbolverzeichnis}%
\deftranslation[to=German]{Glossary}{Glossar}%
}%
}% end if
\input{preamble/style-listings.tex}
\EndCodeSection{StyleVerbatim}
preamble/style-listings.tex
First a new basic style with name lstStyleBase is defined using \lstdefinestyle. Then
Programming dependent styles are loaded in subfiles and in the end activated with
\lstloadlanguages.
preamble/listings-latex.tex
Style definitions for language LaTeX saved as lstStyleLaTeX.
\colorlet{lstcolorStringLatex}{green!40!black!100}
\colorlet{lstcolorCommentLatex}{green!50!black!100}
\definecolor{lstcolorKeywordLatex}{rgb}{0,0.47,0.80}
,rulecolor = \color{black}%
%%% language
,language = [LaTeX]TeX%
%%% commands
% moved to: listings-latex-texcs.tex
}
\input{preamble/listings-latex-texcs.tex}
\lstloadlanguages{[LaTeX]TeX}
preamble/listings-cpp.tex
Style definitions for language C++ saved as lstStyleCpp.
%\colorlet{colorlstStringCpp}{green!40!black!100}
\colorlet{colorlstCommentCpp}{green!50!black!100}
\colorlet{colorlstBackgroundCpp}{white!100}
\definecolor{colorlstStringCpp}{rgb}{0,0.47,0.80}
%% \colorlet{colorlstStringCpp}{green!100!black!100}
%% \colorlet{commencolor}{green!100!red!50!black!100}
%\definecolor{commencolor}{rgb}{0.0,0.5,0.0}
\definecolor{colorlstKeywordCpp}{rgb}{0.4,0.4,0.0}
\lstloadlanguages{
,C++
,[Visual]C++
,[ISO]C++
}
\IfPackageLoaded{framed}{
\renewcommand\FrameCommand{\fcolorbox{black}{frameshadecolor}}
}
\EndCodeSection{StyleFancy}
\EndCodeSection{StylePageLayout}
preamble/style-geometry.tex
Configuration of page layout by package geometry.
\geometry{%
%%% Paper Groesse
a4paper, % Andere a0paper, a1paper, a2paper, a3paper, , a5paper, a6paper,
% b0paper, b1paper, b2paper, b3paper, b4paper, b5paper, b6paper
% letterpaper, executivepaper, legalpaper
%screen, % a special paper size with (W,H) = (225mm,180mm)
%paperwidth=,
%paperheight=,
%papersize=, %{ width , height }
%landscape, % Querformat
portrait, % Hochformat
%%% Koerper Groesse
%hscale=, % ratio of width of total body to \paperwidth
% hscale=0.8 is equivalent to width=0.8\paperwidth. (0.7 by
default)
%vscale=, % ratio of height of total body to \paperheight
% vscale=0.9 is equivalent to height=0.9\paperheight.
%scale=, % ratio of total body to the paper. scale={ h-scale , v-scale }
%totalwidth=, % width of total body % (Generally, width >= textwidth)
%totalheight=, % height of total body, excluding header and footer by
default
%total=, % total={ width , height }
% value similar to koma script with DIV=12
textwidth=426.8pt, % modifies \textwidth, the width of body
textheight=595.8pt, % modifies \textheight, the height of body
%body=, % { width , height } sets both \textwidth and \textheight of
the body of page.
%lines=45, % enables users to specify \textheight by the number of lines
.
%includehead, % includes the head of the page, \headheight and \headsep, into
total body.
%includefoot, % includes the foot of the page, \footskip, into body.
%includeheadfoot, % sets both includehead and includefoot to true
%includemp, % includes the margin notes, \marginparwidth and \marginparsep,
into body
%includeall, % sets both includeheadfoot and includemp to true.
%ignorehead, % disregards the head of the page, headheight and headsep in
determining vertical layout
%ignorefoot, % disregards the foot of page, footskip, in determining
vertical layout
%ignoreheadfoot, % sets both ignorehead and ignorefoot to true.
%ignoremp, % disregards the marginal notes in determining the horizontal
margins
%ignoreall, % sets both ignoreheadfoot and ignoremp to true
208 Chapter 7 Preamble files
7.4.19 Titlepage
Configuration for the title page.
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Titlepage
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\BeginCodeSection{StyleTitlepage}
\KOMAoptions{%
titlepage=true % % separate page for title
%titlepage=false %
}%
\EndCodeSection{StyleTitlepage}
\input{preamble/style-scrpage2.tex}
\EndCodeSection{StyleHeadFoot}
210 Chapter 7 Preamble files
preamble/style-scrpage2.tex
Configuration of header and footer defined by package scrpage2.
\IfPackageLoaded{scrpage2}{%
\IfElseDefined{chapter}{%
\pagestyle{scrheadings} % pages with header
}{
\pagestyle{scrplain} % pages without header but page numbers
}
%\pagestyle{empty} % empty pages
%
% delete predefined styles
\clearscrheadings
\clearscrplain
%
% What is printed where ...
\IfElseDefined{chapter}{
\ohead{\pagemark} % header outside: page number
\ihead{\headmark} % header inside: chapter and section titles
\ofoot[\pagemark]{} % footer outside: page numbers on plain pages
}{
\cfoot[\pagemark]{\pagemark} % Mitte unten: Seitenzahlen bei plain
}
% Complete list of possible positions
%\lehead[scrplain-left-even ]{scrheadings-left-even }
%\cehead[scrplain-center-even ]{scrheadings-center-even }
%\rehead[scrplain-right-even ]{scrheadings-right-even }
%\lefoot[scrplain-left-even ]{scrheadings-left-even }
%\cefoot[scrplain-center-even ]{scrheadings-center-even }
%\refoot[scrplain-right-even ]{scrheadings-right-even }
%\lohead[scrplain-left-odd ]{scrheadings-left-odd }
%\cohead[scrplain-center-odd ]{scrheadings-center-odd }
%\rohead[scrplain-right-odd ]{scrheadings-right-odd }
%\lofoot[scrplain-left-odd ]{scrheadings-left-odd }
%\cofoot[scrplain-center-odd ]{scrheadings-center-odd }
%\rofoot[scrplain-right-odd ]{scrheadings-right-odd }
%\ihead[scrplain-inside ]{scrheadings-inside }
%\chead[scrplain-centered ]{scrheadings-centered }
%\ohead[scrplain-outside ]{scrheadings-outside }
%\ifoot[scrplain-inside ]{scrheadings-inside }
%\cfoot[scrplain-centered ]{scrheadings-centered }
%\ofoot[scrplain-outside ]{scrheadings-outside }
%
% Lines
\IfDefined{chapter}{%
% \setheadtopline{} % configures the line above the header
\setheadsepline{.4pt}[\color{black}] % configures the line below the header
% \setfootsepline{} % configures the line above the footer
% \setfootbotline{} % configures the line below the footer
}
%\renewcommand*{\partpagestyle}{empty}
%\renewcommand*{\titlepagestyle}{empty}
%\renewcommand*{\indexpagestyle}{empty}
} % end: \IfPackageLoaded{scrpage2}
\KOMAoptions{%
%%%% headings
headings=small % Small Font Size, thin spacing above and below
% headings=normal % Medium Font Size, medium spacing above and below
% headings=big % Big Font Size, large spacing above and below
%
%%% Add/Dont/Auto Dot behind section numbers
212 Chapter 7 Preamble files
\IfDefined{chapter}{
\KOMAoptions{%
headings=noappendixprefix % chapter in appendix as in body text
% ,headings=nochapterprefix % no prefix at chapters
% ,headings=appendixprefix % inverse of 'noappendixprefix'
,headings=chapterprefix % inverse of 'nochapterprefix'
% ,headings=openany % Chapters start at any side
% ,headings=openleft % Chapters start at left side
,headings=openright % Chapters start at right side
}%
}%
\EndCodeSection{StyleHeadings}
\IfDefined{chapter}{%
\setkomafont{chapter}{\Large\SectionFontStyle} % Chapter
}
\setkomafont{sectioning}{\SectionFontStyle}
%\setkomafont{section}{\usekomafont{sectioning}}
%\setkomafont{subsection}{\usekomafont{sectioning}}
%\setkomafont{subsubsection}{\usekomafont{sectioning}}
\setkomafont{paragraph}{\rmfamily\itshape}
\setkomafont{subparagraph}{\rmfamily}
\setkomafont{descriptionlabel}{\itshape}
%\setkomafont{dictum}{}
7.4 preamble/style.tex 213
%\setkomafont{dictumauthor}{}
%\setkomafont{dictumtext}{}
%\setkomafont{disposition}{}
%\setkomafont{footnote}{}
%\setkomafont{footnotelabel}{}
%\setkomafont{footnotereference}{}
%\setkomafont{minisec}{}
\setkomafont{part}{\usekomafont{sectioning}\LARGE}
\setkomafont{partnumber}{\usekomafont{sectioning}\Huge}
\setkomafont{pageheadfoot}{\normalfont\normalcolor\small\sffamily}
% \setkomafont{pagenumber}{\bfseries\usekomafont{sectioning}}
\setkomafont{pagenumber}{\normalfont\sffamily\fontshape{b}\selectfont}
% colors of headings
\IfDefined{color}{%
\IfColorDefined{sectioncolor}{%
\addtokomafont{sectioning}{\color{sectioncolor}}%
\IfDefined{chapter}{%
\addtokomafont{chapter}{\color{sectioncolor}}%
}%
}{}%
}
\EndCodeSection{StyleHeadingsFonts}
something-koma-script-like
%% by user >esdd<
\RedeclareSectionCommand[
innerskip=1pt,
font=\mdseries\Large,
prefixfont=\LARGE,
]{chapter}
\renewcommand*{\partformat}{%
\raisebox{-.5\dp\strutbox}{%
\makebox[0pt]{%
\setlength\fboxsep{.5em}%
\colorbox{white}{%
\partname\nobreakspace{\Huge\thepart\autodot}%
}}}}
\renewcommand*{\chapterformat}{%
\mbox{\MakeUppercase{%
\chapappifchapterprefix{\nobreakspace}}{\Huge\thechapter\autodot}%
\IfUsePrefixLine{}{\enskip}}%
}
\renewcommand\chapterlineswithprefixformat[3]{%
\ifstr{#1}{chapter}{%
#2\nobreak%
\vspace*{\dimexpr-\ht\strutbox}%
\rule[-\dp\strutbox]{\textwidth}{.4pt}\\*[.9pc]%
{\IfColorDefined{sectioncolor}{\color{sectioncolor}}{}#3}%
\vspace*{\dimexpr-\ht\strutbox-\dp\strutbox+.9pc}\nobreak%
\rule[-\dp\strutbox]{\textwidth}{.4pt}%
\par\nobreak%
}{%
\ifstr{#1}{part}{%
\null\vfil
\fbox{%
\parbox[t][\dimexpr\height+3\normalbaselineskip][c]
{\dimexpr\textwidth-2\fboxsep-2\fboxrule\relax}
{\centering \IfColorDefined{sectioncolor}{\color{sectioncolor}}{}#3}%
7.4 preamble/style.tex 215
}\nolinebreak%
\ifnumbered{part}{\hspace*{-.5\textwidth}#2}{}%
\vfil\newpage\partheademptypage
}{%
#2#3%
}%
}%
}
\RedeclareSectionCommands[
beforeskip=-1.5ex plus -.45ex minus -0.09ex,
afterskip=.5ex plus .05ex
]{subsection,subsubsection}
\EndCodeSection{StyleHeadingsLayout}
\KOMAoptions{%
%%% Setting of 'Style' and 'Content' of TOC
% toc=left, %
toc=indented,%
}%
% \newcommand{\fontTOC}{\sffamily}
\newcommand{\fontTOC}{\rmfamily}
\IfPackageNotLoaded{tocloft}{ % inkompatible
% apply style of TOC using koma script
\setkomafont{partentry}{\fontTOC\bfseries\large}
\setkomafont{partentrypagenumber}{\fontTOC\bfseries}
\IfElseDefined{chapter}{%
\setkomafont{chapterentry}{\bfseries\fontTOC}
\setkomafont{chapterentrypagenumber}{\bfseries\fontTOC}
}{%
\setkomafont{sectionentry}{\bfseries\fontTOC}
\setkomafont{sectionentrypagenumber}{\bfseries\fontTOC}
}
}
%\IfDefined{chapter}{%
% \KOMAoptions{%
% % --- chapter highlighting ---
% % listof=chapterentry, % ??? Chapter starts are marked in figure/table
% % listof=chaptergapline, % New chapter starts are marked by a gap
% % of a single line
% listof=chaptergapsmall, % New chapter starts are marked by a gap
% % of a smallsingle line
% % listof=nochaptergap, % No Gap between chapters
% %
% % listof=leveldown, % lists are moved one level down ???
% }
%}
\EndCodeSection{StyleLayoutTOC}
\input{preamble/style-hyperref.tex}
\IfPackageLoaded{bookmark}{
\bookmarksetup{%
%%% Action options
,page=1 %
%,view %
,open=true %
,openlevel=2 % level to which bookmarks are open
,depth=4 % level to which bookmarks are generated
,numbered=true
}%
}
218 Chapter 7 Preamble files
\EndCodeSection{StylePdf}
preamble/style-hyperref.tex
Configuration of package hyperref. The option pdfpagelayout is not included here because
it should be set up by the user of the template. It is therefore in file LaTeXTemplate.tex,
see section section 6.3.4 on page 135.
\IfPackageLoaded{hyperref}{
\hypersetup{
%%% General options
,draft=false, % all hypertext options are turned off
,final=true % all hypertext options are turned on
,debug=false % extra diagnostic messages are printed in the log file
,hypertexnames=true % use guessable names for links
,naturalnames=false % use LaTeX-computed names for links
,setpagesize=true % sets page size by special driver commands
%%% Configuration options
,raiselinks=true % forces commands to reflect the
% real height of the link
,breaklinks=true % Allows link text to break across lines
,pageanchor=true % Determines whether every page is given an implicit
% anchor at the top left corner.
,plainpages=false % Forces page anchors to be named by the arabic
% form of the page number, rather than the formatted form.
%%% Extension options
,linktocpage=true % make page number, not text, be link on TOC, LOF and LOT
,colorlinks=true % Colors the text of links and anchors.
}%
\IfColorDefined{pdflinkcolor}{\hypersetup{%
%%% Colors for links
,linkcolor =pdflinkcolor % Color for normal internal links.
,anchorcolor=pdfanchorcolor % Color for anchor text.
,citecolor =pdfcitecolor % Color for bibliographical citations in text.
,filecolor =pdffilecolor % Color for URLs which open local files.
,menucolor =pdfmenucolor % Color for Acrobat menu items.
,runcolor =pdfruncolor % Color for run links (launch annotations).
,urlcolor =pdfurlcolor % color magenta Color for linked URLs.
}}{}
\hypersetup{%
7.4 preamble/style.tex 219
} % end: IfPackageLoaded{hyperref}
preamble/style-references.tex
Provides the commands \eqnref, \figref, \tabref, \secref and \chapref, which behave
like \ref but also include the name of the thing to reference in the hyperlink.
Something similar and is achieved by the package cleveref which does the same thing
in a more clever way.
\IfPackageLoaded{babel}{
% if babel loaded not necessary
220 Chapter 7 Preamble files
%\providecommand*{\figurename}{Abbildung}
%\providecommand*{\tablename}{Tabelle}
%\providecommand*{\chaptername}{Kapitel}
% not defined by babel
\iflanguage{ngerman}{%
\providecommand*{\secrefname}{Abschnitt}%
\providecommand*{\eqnrefname}{Gleichung}%
}{}%
\iflanguage{english}{%
\providecommand*{\secrefname}{section}%
\providecommand*{\eqnrefname}{equation}%
}{}%
%
\IfElsePackageLoaded{hyperref}{
\newcommand*{\eqnref}[1]{%
\hyperref[{#1}]{\eqnrefname~(\ref*{#1}})%
}%
\newcommand*{\figref}[1]{%
\hyperref[{#1}]{\figurename~\ref*{#1}}%
}%
\newcommand*{\tabref}[1]{%
\hyperref[{#1}]{\tablename~\ref*{#1}}%
}%
\newcommand*{\secref}[1]{%
\hyperref[{#1}]{\secrefname~\ref*{#1}}%
}%
\newcommand*{\chapref}[1]{%
\hyperref[{#1}]{\chaptername~\ref*{#1}}%
}%
}{% hyperref not loaded
\newcommand*{\eqnref}[1]{%
\eqnrefname~(\ref*{#1})%
}%
\newcommand*{\figref}[1]{%
\figurename~\ref*{#1}%
}%
\newcommand*{\tabref}[1]{%
\tablename~\ref*{#1}%
}%
\newcommand*{\secref}[1]{%
\secrefname~\ref*{#1}%
}%
\newcommand*{\chapref}[1]{%
\chaptername~\ref*{#1}%
}%
}% end: hyperref not loaded
}% \IfPackageLoaded{babel}
7.4 preamble/style.tex 221
\input{preamble/fix-framed-marginnote.tex}
% ------------------------------------------------------------------
\EndCodeSection{StyleFixProblems}
preamble/fix-tabu-onlyamsmath.tex
The package tabu has a problem with the $-char if it was redefined by package onlyamsmath.
Here the original definition is restored for every tabu tabular to solve the problem.
% -> switches $ back to its original definition
\IfPackagesLoaded{onlyamsmath,tabu}{%
\RequirePackage{etoolbox}
\AtBeginEnvironment{tabu}{\catcode`$=3 }
}{}
% thanks to egreg for providing this fix.
% The discussion on why this is necessary can be read at
% http://tex.stackexchange.com/questions/35139/restore-original-definition-of
preamble/fix-framed-marginnote.tex
the placement of margin notes of package marginnote is wrong next to frames created by
package framed. This is corrected here.
\IfPackagesLoaded{marginnote, framed}{%
\ifpdftex{%
\ifpdfoutput{}{%
\begingroup
\makeatletter
\g@addto@macro\framed{%
\let\marginnoteleftadjust\FrameSep
\let\marginnoterightadjust\FrameSep
}
\makeatother
\endgroup
}% ifpdfoutput
}{}% ifpdftex
}{}
7.5 preamble/commands.tex
This file defines new commands which are required by the template. User commands
should instead be inserted to macros/newcommands.tex.
7.6 macros/newcommands.tex
This file contains a collection of commands that might be useful in physics or math.
Additional user commands should as well be inserted in this file.
% --| other new definitions |-----------------------------------------
% -- new commands --
\newcommand{\abs}[1]{\lvert#1\rvert}
\newcommand{\Abs}[1]{\left\lvert#1\right\rvert}
\newcommand{\norm}[1]{\left\Vert#1\right\Vert}
\newcommand{\Trace}[1]{\ensuremath{\Tr\left\{\,#1\,\right\}}} % Trace /Spur
%
% -- differentials --
\newcommand{\pd}{\partial\mspace{1mu}} % partial diff
\newcommand{\td}{\,\mathrm{d}} % total diff
% -- Abbreviations --
\renewcommand{\Re}{\text{Re}} % Real value
\renewcommand{\Im}{\text{Im}} % Real value
\newcommand{\complex}{\mathbb{C}} % Complex
\newcommand{\real}{\mathbb{R}} % Real
224 Chapter 7 Preamble files
\renewcommand{\i}{\mathrm{i}}
%
\newcommand{\Ham}{\mathcal{H}}
\newcommand{\Prob}{\mathscr{P}}
\newcommand{\unity}{\mathds{1}}
%
% -- New Operators --
\IfDefined{DeclareMathOperator}{
\DeclareMathOperator{\rot}{rot}
\DeclareMathOperator{\grad}{grad}
\DeclareMathOperator{\rect}{rect}
\renewcommand{\div}{\text{div}\,}
\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\const}{const}
\DeclareMathOperator{\e}{e} % exponatial Function
}
% -- new symbols --
\newcommand{\laplace}{\Delta}
\newcommand{\dalembert}{\Box}
7.7 content/hyphenation.tex
Contains all hyphenation patterns inside of the command \hyphenation.
\hyphenation{multi-pho-ton io-ni-za-tion}
7.8 preamble/makeCommands.tex
Calls make commands that are required inside the preamble, such as \makeindex, \makeglossaries
and \linenumbers.
%% Index (package imakeidx)
\IfDefined{makeindex}{%
\IfPackageLoaded{imakeidx}{%
\makeindex[%
,title=\indexname%
,program=makeindex% (makeindex,xindy,texindy)
,intoc=true,%
,columns=2%
,columnsep=35pt%
,columnseprule=false%
]%
}%
}%
%% Glossary/Acronym list/list of symbols (glossaries package)
\IfDefined{makeglossaries}{\makeglossaries}
8.1 content/Z-GlossaryEntries.tex
Definition of acronyms, symbol list and glossary entries using commands \newacronym and
\newglossaryentry from package glossaries.
Note that this file must be loaded before \begin{document}.
% !TeX encoding=utf8
% !TeX spellcheck = en-US
%\newglossaryentry{symb:Pi}{%
% name=$\pi$,%
% description={mathematical constant},%
% sort=symbolpi, type=symbolslist%
%}
%\newglossaryentry{glos:DVD}{name=DVD,
227
228 Chapter 8 Document content files
8.2 content/title.tex
Here different approaches to generate a title are shown. The first uses \maketitle which
however is difficult to modify and therefore not used. The title used makes use of several
\vspace commands for manual alignment. The same layout is shown as a template for
bachelor and master thesis. For phd-thesis however it usually must be created according
to the rules of the university.
8.3 content/0-Abstract.tex
The abstract should only be included in a phd thesis. In master and bachelor thesis this is
typically not desired. Here it is on two pages. The first for the language of the thesis and
the second for an English translation. If the thesis itself is in english the first page should
be removed.
8.4 content/Z-Declaration.tex
This file prints a declaration stating the work was done by the author himself. It may
belong to a phd thesis, but often this is on a separated document. In all bachelor and
master thesis I know of, this was part of the thesis itself.
% !TeX encoding=utf8
% !TeX spellcheck = en-US
%% ----------------------------------------------
\chapter*{Declaration}
% no page number on this page
\thispagestyle{empty}
%
I hereby declare that this thesis is my own work and effort and that it has not
been submitted anywhere for any award. Where other sources of information have
been used, they have been acknowledged.
%
\mbox{}\vspace{4\baselineskip}\\
%
<insert data and location> \hfill <insert full name>
% sign this page!
% add empty back page
\clearpage\mbox{}\thispagestyle{empty}
%% ----------------------------------------------
%\chapter*{Erklrung der Selbststndigkeit}
8.5 content/0-Introduction.tex, content/1-Theory.tex, . . . 229
8.6 content/Z-Appendix.tex
Contains all chapters or sections for the appendix.
% !TeX encoding=utf8
% !TeX spellcheck = en-US
%
% add files for appendix chapter here
\input{content/Z-Appendix-01.tex}
8.7 content/Z-Publications.tex
Add all your publications to this file. Unfortunately I did not find a satisfactory way of
creating this bibliographic data other than manually.
% !TeX encoding=utf8
% !TeX spellcheck = en-US
\IfPackageLoaded{hyperref}{
\phantomsection
\addcontentsline{toc}{chapter}{Publications}
}
230 Chapter 8 Document content files
\section*{Scientific publications}
% \section*{Wissenschaftliche Verffentlichungen}
\begin{refsection}
\nocite{Siegel2007, Palmer2010, Pospiech2009, Pospiech2010, Pospiech2011}
% print all combinations in this list bold (makes name of author bold)
\forcsvlist{\listadd\bibboldnames}
{{Pospiech, Matthias}, {Pospiech, M.}}
\printbibliography[env=numbered+bold, heading=none, sorting=ynt, resetnumbers=
true]
\end{refsection}
8.8 content/Z-CV.tex
This CV is based on the CV in my own phd thesis (with little changes) and created with
package currvita. A CV should only be part of a phd thesis, not a bachelor or master
thesis. This CV should not be misunderstood with the CV in job application. The CV in
a job application is something completely different and typically considerably longer and
more detailed.
8.8 content/Z-CV.tex 231
% !TeX encoding=utf8
% !TeX spellcheck = en-US
\chapter*{Curriculum Vitae}
\markboth{Curriculum Vitae}{Curriculum Vitae}
\IfPackageLoaded{hyperref}{
\phantomsection
\addcontentsline{toc}{chapter}{Curriculum Vitae}
}
\IfPackagesLoaded{currvita,csquotes}{%
%% - notes --------------------
\minisec{Delete these notes:}
\small
This is a modified version of a german CV.
I have not translated it into English, because
I am not familiar with English CV styles.
\begin{cv}{}
\begin{cvlist}{Personalien}
\item[Name]
Max Musterman \\
geboren am 01.02.1979 in Berlin \\
ledig, deutsch
\end{cvlist}
%
\begin{cvlist}{Schulbildung}
\item[1998] Abitur, Gymnasium Musterschule in Berlin
\end{cvlist}
%
\begin{cvlist}{Zivildienst}
\item[07/98 - 08/99]
<Einfgen>
\end{cvlist}
%
\begin{cvlist}{Studium}
\item[SS/99 - SS/06] Universitt Hannover, Studium der Physik
\\[0.5\baselineskip]
Thema der Diplomarbeit: \enquote{Charakterisierung des Rauschverhaltens eines
weit abstimmbaren Ytterbium dotierten kerngepumpten Faserlasers}, durchgefhrt
am Laserzentrum Hannover e.\,V.
232 Chapter 8 Document content files
\end{cv}
}{}%
8.9 content/Z-Thanks.tex
The thesis ends with some acknowledgment statements. Here a fixed paragraph skip is
introduced and the paragraph indentation removed.
% !TeX encoding=utf8
% !TeX spellcheck = en-US
% change parskip
\setlength\parindent{0pt}
\setlength\parskip{\medskipamount}
I would also like to than all people who supported me in writing this thesis.
\cleardoublepage
8.10 content/Z-Todo.tex
This code prints out a todo list created by commands of package todonotes.
\IfPackageLoaded{todonotes}{
\clearpage
\IfPackageLoaded{hyperref}{\phantomsection}
\todototoc % add to toc
\listoftodos % print to document
}
Bibliography
[Aug95] Augustine, Robert L.: Heterogeneous catalysis for the synthetic chemist. New
York: Marcel Dekker, 1995 (cit. on p. 106).
[Ber96] Bertram, Aaron and Richard Wentworth: Gromov invariants for holomorphic
maps on Riemann surfaces. J. Amer. Math. Soc. (1996), vol. 9(2): pp. 529571
(cit. on p. 106).
[Cot99] Cotton, Frank Albert, Geoffrey Wilkinson, Carlos A. Murillio, and Manfred
Bochmann: Advanced inorganic chemistry. 6th ed. Chichester: Wiley, 1999 (cit.
on p. 106).
[Goo94] Goossens, Michel, Frank Mittelbach, and Alexander Samarin: The LaTeX Com-
panion. 1st ed. Reading, Mass.: Addison-Wesley, 1994. 528 pp. (cit. on pp. 105,
106).
[Ham97] Hammond, Christopher: The basics of crystallography and diffraction. Oxford:
International Union of Crystallography and Oxford University Press, 1997 (cit.
on p. 106).
[Hos98] Hostetler, Michael J., Julia E. Wingate, Chuan-Jian Zhong, Jay E. Harris,
Richard W. Vachet, Michael R. Clark, J. David Londono, Stephen J. Green,
Jennifer J. Stokes, George D. Wignall, Gary L. Glish, Marc D. Porter, Neal D.
Evans, and Royce W. Murray: Alkanethiolate gold cluster molecules with core
diameters from 1.5 to 5.2 nm. Core and monolayer properties as a function of
core size. Langmuir (1998), vol. 14(1): pp. 1730 (cit. on p. 106).
[Mas04] Massa, Werner: Crystal structure determination. 2nd ed. Berlin: Spinger, 2004
(cit. on p. 106).
233
List of Figures
235
List of Tables
237
Listings
239
A List of packages loaded
A.1 Sorted list for speed measurement
The packages listed in table A.1 were recorded by adding step by step more code and
comparing the log files for changes in the list of packages. The execution times for each
part were monitored as well. These numbers are presented in fig. 1.1. Here only .sty files
are listed, all further files that are loaded by packages, such as .cfg or .fd files are not
included in the list. For a complete list
This evaluation was done during the development of this template and not updated since
then. The number of packages is thus not consistent with the current template. A recent
list of all packages is presented in appendix A.2
241
242 A List of packages loaded
fp-exp.sty 1995/04/03
fp-trigo.sty 1995/04/14
fp-pas.sty 1994/08/29
fp-random.sty 1995/02/23
fp-eqn.sty 1995/04/03
fp-upn.sty 1996/10/21
fp-eval.sty 1995/04/03
tkz-tools-utilities.tex
tkz-tools-arith.tex
tkz-tools-base.tex
tkz-tools-misc.tex
tkz-tools-math.tex
tkz-obj-points.tex
tkz-obj-segments.tex
tkz-obj-marks.tex
tkz-euclide.sty 2011/06/01 1.16 c for plots 2d
tkz-tools-intersections.tex
tkz-tools-transformations.tex
tkz-obj-lines.tex
tkz-lib-symbols.tex
tkz-obj-circles.tex
tkz-obj-addpoints.tex
tkz-fct.sty 2011/06/01 1.16 c function
pgfplots.sty 2016/01/06 v1.13 Data Visualization (1.13)
pgfplotstable.sty 2016/01/06 v1.13 Table typesetting and Pretty-printing (1.
13)
pgfcalendar.sty
pgfcalendar.code.tex 2007/07/23 v3.0.1a (rcs-revision 1.11)
preamble/fix-pgfplots.tex
siunitx.sty 2016/03/01 v2.6q A comprehensive (SI) units package
dsfont.sty 1995/08/01 v0.1 Double stroke roman fonts
amssymb.sty 2013/01/14 v3.01 AMS font symbols
amsfonts.sty 2013/01/14 v3.01 Basic AMSFonts support
esint.sty
mathcomp.sty 2001/01/07 v0.1f (TBo)
euscript.sty 2009/06/22 v3.00 Euler Script fonts
mathrsfs.sty 1996/01/01 Math RSFS package v1.0 (jk)
eurosym.sty 1998/08/06 v1.1 European currency symbol ``Euro''
pifont.sty 2005/04/12 PSNFSS-v9.2a Pi font support (SPQR)
upzd.fd 2001/06/04 font definitions for U/pzd.
upsy.fd 2001/06/04 font definitions for U/psy.
booktabs.sty 2005/04/14 v1.61803 publication quality tables
multirow.sty
bigstrut.sty
tabu.sty 2011/02/26 v2.8 - flexible LaTeX tabulars (FC)
varwidth.sty 2009/03/30 ver 0.92; Variable-width minipages
tablestyles.sty 2011/10/01 v0.1 tablestyles
ellipsis.sty 2004/9/28 v1.6 ellipsis: fixes spacing around \global\let .\ker
n \fontdimen 3\font .\kern \fontdimen 3\font .\kern \fontdimen 3\font .\kern \f
248 A List of packages loaded
ontdimen 3\font .\kern \fontdimen 3\font .\kern \fontdimen 3\font .\kern \fontd
imen 3\font .\kern \fontdimen 3\font .\kern \fontdimen 3\font
ulem.sty 2012/05/18
soulutf8.sty 2007/09/09 v1.0 Permit use of UTF-8 characters in soul (HO)
soul.sty 2003/11/17 v2.4 letterspacing/underlining (mf)
url.sty 2013/09/16 ver 3.4 Verb mode for urls, etc.
varioref.sty 2016/02/16 v1.5c package for extended references (FMi)
xr-hyper.sty 2000/03/22 v6.00beta4 eXternal References (DPC)
enumitem.sty 2011/09/28 v3.5.2 Customized lists
csquotes.sty 2016/01/31 v5.1g context-sensitive quotations (JAW)
csquotes.def 2016/01/31 v5.1g csquotes generic definitions (JAW)
csquotes.cfg
biblatex.sty 2016/03/03 v3.3 programmable bibliographies (PK/JW/AB)
biblatex_.sty 2016/03/03 v3.3 programmable bibliographies (biber) (PK/JW/AB)
demo-glossaries-Glossary.tex
english.lbx 2016/03/03 v3.3 biblatex localization (PK/JW/AB)
supp-pdf.mkii
doctools.sty 2012/12/01 v0.1 commands and packages for documenting LaTeX Cod
e
kvoptions-patch.sty 2011/06/30 v3.11 LaTeX patch for keyval options (HO)
xstring.sty 2013/10/13 v1.7c String manipulations (C Tellechea)
translator-months-dictionary-English.dict
translator-basic-dictionary-English.dict
siunitx-abbreviations.cfg 2016/03/01 v2.6q siunitx: Abbreviated units
TemplateDocumentation.bbl
ltcaption.sty 2013/06/09 v1.4-94 longtable captions (AR)
fr-longtable.sty 2007/11/28 v0.1b (beta) floatrow: additions for longtable
ot1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
omllmm.fd 2009/10/30 v1.6 Font defs for Latin Modern
omslmsy.fd 2009/10/30 v1.6 Font defs for Latin Modern
umsa.fd 2013/01/14 v3.01 AMS symbols A
umsb.fd 2013/01/14 v3.01 AMS symbols B
uesint.fd
ursfs.fd 1998/03/24 rsfs font definition file (jk)
pdflscape.sty 2008/08/11 v0.10 Display of landscape pages in PDF (HO)
lscape.sty 2000/10/22 v3.01 Landscape Pages (DPC)
lscape.hak 2015/10/03 v3.19a KOMA-Script package (hacking package lscape)
mt-cmr.cfg 2013/05/19 v2.2 microtype config. file: Computer Modern Roman (
RS)
nameref.sty 2012/10/27 v2.43 Cross-referencing by name of section
gettitlestring.sty 2010/12/03 v1.4 Cleanup title references (HO)
t1lmtt.fd 2009/10/30 v1.6 Font defs for Latin Modern
ot1lmss.fd 2009/10/30 v1.6 Font defs for Latin Modern
ot1lmtt.fd 2009/10/30 v1.6 Font defs for Latin Modern
doc/0-title.tex
mt-msa.cfg 2006/02/04 v1.1 microtype config. file: AMS symbols (a) (RS)
mt-msb.cfg 2005/06/01 v1.0 microtype config. file: AMS symbols (b) (RS)
version.txt
t1lmss.fd 2009/10/30 v1.6 Font defs for Latin Modern
doc/doc-introduction.tex
ts1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
doc/plot.executiontimes.tex
ts1lmtt.fd 2009/10/30 v1.6 Font defs for Latin Modern
se-iso-8859-1.def 2011/12/02 v1.10 stringenc: ISO-8859-1
fonts/fontsample - Latin Modern Family.pdf
fonts/fontsample - Charter-Bera Sans-Luxi Mono.pdf
fonts/fontsample - Garamond-Bera Sans-Luxi Mono.pdf
fonts/fontsample - Fourier (Utopia)-Latin Modern (Sans and Typewriter).pdf
fonts/fontsample - Palantino-Arial-Courier.pdf
fonts/fontsample - Times-Arial-Courier.pdf
doc/demo/demo.tex
doc/demo/democode.tex
images/testimage.png
252 A List of packages loaded
content/longtable.tex
ueus.fd 2013/01/14 v3.01 Euler Script
mt-eus.cfg 2006/07/28 v1.2 microtype config. file: AMS Euler Script (RS)
udsrom.fd
TemplateDocumentation.acr
TemplateDocumentation.syi
TemplateDocumentation.gls
doc/doc-code-filled.tex
LaTeXTemplate.tex
fonts/fonts-MinionPro.tex
fonts/fonts-MyriadPro.tex
preamble/style-geometry.tex
content/Z-GlossaryEntries.tex
content/Z-Declaration.tex
content/Z-Appendix.tex
content/Z-Publications.tex
content/Z-CV.tex
content/Z-Thanks.tex
content/Z-Todo.tex
doc/doc-z-appendix.tex
doc/history.tex
TemplateDocumentation.ind
B Changes and history
Version numbers
The version number is defined by the KOMA-Script version followed by the template
version. Version 3.2.0 is thus a huge change from 3.1.0 with both compatible for version 3
of KOMA-script.
2015/08 v3.2.4
Minor bug fixes and other changes
The template failed to compile with latest package titlesec in combination with
KOMA-script. Since both are not compatible and can be used only with workarounds
within KOMA-Script the package titlesec was removed and the style changes
applied using different commands.
2015/08 v3.2.3
Minor bug fixes and other changes
The template failed to compile with TeX Live 2015. Package pageslts requires
atveryend to be loaded before etoolbox.
Removed package fixltx2e
2014/07 v3.2.2
Bug fixes, Improvements and other changes
The template failed to compile with TeX Live 2014. The error was in the definition
of \addmoretexcs.
The options of geometry were not well thought out. If a spacing factor was introduced
this could lead to an ugly page layout. All options of geometry are now such that
the page layout is similar to the one of typearea with DIV12.
The publications lists are now bibliography lists create with \printbibliography.
Previously these needed to be created completely manual.
New magic comment for the bibliography tool added.
Removed packages. These are now available from CTAN or better the distribution
package manager.
2014/01 v3.2.1
Mainly enhancements and bug fixing. The following list is a selection:
Selection of packages for the no room for a new \write problem added.
Update of glossary lists handling. New file for definitions and update of glossaries
options.
253
254 B Changes and history
2013/06 v3.2.0
Initial Release of the complete reworked template with several outstanding features and
changes:
Complete new compilation of packages (up to date at 2013) with framework for
selecting package sections.
Focus on a target group of user who want to write thesis like documents.
Introduction of a template documentation.
Significant enhancements in the latex examples. It transformed from a simple
rudimentary test and sample document to a test and example framework with
examples for every package.
Translation of all texts and comments into English. It targets therefor a much broader
audience.
255
256 Index