Thesis Guide

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 105

DownloadThesis Guide
Open PDF In BrowserView PDF
Users Guide to Writing a Thesis in a
Physics/Astronomy Institute of the University of
Bonn
Hinweise und Tipps
zur
Produktion einer Bachelor/Master/Diplom/Doktorarbeit
in der
Mathematisch-Naturwissenschaftlichen-Fakultät
der
Rheinischen Friedrich-Wilhelms-Universität Bonn
vorgelegt von
Ian C. Brock
aus
Stoke-on-Trent
Version 2.1
12th July 2013

Bonn 2013

1. Gutachter:
2. Gutachterin:
Tag der Promotion:
Erscheinungsjahr:

Prof. Dr. John Smith
Prof. Dr. Anne Jones

Acknowledgements

I would like to thank the members of my group who read and criticised different versions of this guide.
Questions and suggestions from students who used previous versions of the guide have led to a number
of improvements. The authors of the book “Physics at the Terascale” provided many examples of
different LATEX usage and conventions that were also very helpful. Andrii Verbytskyi provided the tikz
examples.
Acknowledgements at the beginning should be a \chapter* so that they do not appear in the Table
of Contents.

12th July 2013 10:14

iii

Contents

1
2

Introduction
Tips and tricks

2.1
2.2
2.3
2.4

2.5
2.6
2.7
3

3.2

5

How to use the ubonn-thesis style
Do . . . . . . . . . . . . . . . . .
Do Not . . . . . . . . . . . . . .
Units . . . . . . . . . . . . . . . .
2.4.1 siunitx package . . . . . .
2.4.2 SIunits/hepunits packages
Hints . . . . . . . . . . . . . . . .
Line numbering . . . . . . . . . .
Updating ubonn-thesis . . . . . .

5

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

PhD thesis . . . . . . . . . . . . . . . . . . . . . . . .
3.1.1 Submission . . . . . . . . . . . . . . . . . . .
3.1.2 Printing the final version . . . . . . . . . . . .
Master/Diplom/Bachelor thesis . . . . . . . . . . . . .
3.2.1 Submission . . . . . . . . . . . . . . . . . . .
3.2.2 MSc/Diplom theses for the department library .
3.2.3 BSc theses . . . . . . . . . . . . . . . . . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

Submitting your thesis

3.1

4

1

5
7
9
10
10
12
13
14
14
17

17
17
17
18
18
18
19

Useful packages

21

4.1
4.2
4.3

21
21
22

Layout and language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Appearance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Other packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Figures

5.1
5.2
5.3
5.4
5.5

Simple figures . . . . . . . . . . . . .
Fancier figures . . . . . . . . . . . .
Figure Formats . . . . . . . . . . . .
TikZ and PGF . . . . . . . . . . . . .
5.4.1 standalone package and class
Feynman graphs . . . . . . . . . . . .
5.5.1 FeynMF and FeynMP . . . .
5.5.2 Feynman graphs with TikZ . .

12th July 2013 10:14

25

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

25
26
27
28
29
29
31
32

v

5.6
6

Tables

6.1
6.2
6.3
7

7.4

7.5
7.6
7.7

Use of \phantom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using siunitx and the S column option . . . . . . . . . . . . . . . . . . . . . . . . . .
Using dcolumn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page layout . . .
Footnotes . . . .
Thesis in German
Fonts . . . . . .
Other languages .
Coloured links . .
Chapter headings

35
36
38
43

Formatting by hand . . . . . . . . . .
Using BibTEX and biblatex . . . . . .
BibTEX entries . . . . . . . . . . . . .
7.3.1 Entry types . . . . . . . . . .
7.3.2 Entries from Inspire and CDS
7.3.3 More on names . . . . . . . .
Formatting references . . . . . . . . .
7.4.1 biblatex styles . . . . . . . .
7.4.2 BibTEX styles . . . . . . . . .
Sources for references . . . . . . . . .
Common wishes . . . . . . . . . . . .
Using mcite . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

Layout and language

8.1
8.2
8.3
8.4
8.5
8.6
8.7

33
35

References

7.1
7.2
7.3

8

Placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43
44
45
45
46
47
47
47
48
48
49
49
51

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

51
51
53
54
54
54
54

A Changes and plans

57

B Long tables

59

C TEX setup and packages

C.1 Integrated environments .
C.1.1 Kile . . . . . . .
C.2 (Ku|Xu|U)buntu . . . . .
C.3 Windows . . . . . . . .
C.3.1 MiKTEX . . . .
C.3.2 TEX Live . . . .
C.4 Mac . . . . . . . . . . .

61

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

D Making a glossary or list of acronyms

67

D.1 ZEUS detector description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
E Print shops

vi

61
62
62
64
65
65
66

68
71

12th July 2013 10:14

F A famous equation is E = mc2

F.1
F.2

A slightly less famous equation is F = ma . . . . . . . . . . . . . . . . . . . . . . . .
The cross-section is given by σ = N/L . . . . . . . . . . . . . . . . . . . . . . . . . .

73

73
73

G Plots with tikz

75

H Old or obsolete information and instructions
H.1 More on feynmf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

77

H.2 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
H.2.1 Windows XP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
H.2.2 TEXnic Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

77
78
78
79

Bibliography

81

List of Figures

83

List of Tables

85

Glossary

87

Acronyms

89

Acknowledgements

95

12th July 2013 10:14

vii

CHAPTER

1

Introduction

LATEX file: ./guide_intro.tex
When you want to start writing your thesis you usually ask a (more senior) colleague if he or she has a
LATEX framework that you can start with. He or she in turn had asked their (more senior) colleague for
an example thesis several years earlier etc.! Maybe it is surprising that we are actually using LATEX and
not TEX to write theses!
LATEX (or more precisely the packages that one can use in LATEX) is actually in a state of continual
development and improvement, so it certainly makes sense to review what packages are available, how
they should be used and whether there are better ways of doing things than methods used 10 or more
years ago.
The aim of this guide is to break with the tradition of just adapting what your predecessor used and
provide up-to-date guidelines on the layout and packages that can or should be used for thesis writing.
The guide should also provide you with enough information for you to concentrate on the content of
your thesis, rather than having to spend too much time making it look nice!
You may ask why bother? First and foremost a thesis is something that you should be proud of!
I therefore think it is actually worth devoting some effort to not only making it look good, but also
to using correct and consistent notation when you write it. Figures and tables should be legible and
understandable (including the size of the axis labels!). You should, however, not have to spend too
much time working out how to make the thesis look the way you want it to. It is also good if you can
avoid annoying or irritating your supervisor if he or she also thinks that GeV/c2 should be written like
this and not as GeV/c2 or GeV/c2 etc. or some mixture of the two.
The recommendations are based on experience I gained:
• preparing the lecture course „EDV für Physiker“ in WS06/07;
• editing the book “Physics at the Terascale”, which was published in April 2011;
• regular reading of the „TeXnische Komödie“, which is published by Dante (Deutschsprachige
Anwendervereinigung TEX) 4 times a year;
• general interest in preparing good quality documents;
• reading quite a lot of theses!

12th July 2013 10:14

1

1 Introduction
This document does not attempt to explain how to write LATEX. I assume a basic level of knowledge.
The aim is more to give some practical tips and solutions to solve problems that often occur when you
are writing your thesis. There are many books and online documents to help you get started, so many
in fact that it is difficult to know where to start. My favourite is “Guide to LATEX” from Kopka [KD04].
Be sure to read the Fourth Edition though. It was originally written in German where the title is „LATEX:
Eine Einführung“. When you want to know what packages exist, what they can do and how to use them,
consult “The LATEXCompanion” from M. Goossens et al [MG04]. A fairly comprehensive online guide
is the “A (Not So) Short Introduction to LaTeX2e.” [Oet+], which is available in many languages. Help
on getting started and a list of online documents can be found on the CTAN (Comprehensive TEXArchive
Network) information page http://tug.ctan.org/starter.html. Other useful sources of information that I and others use are:
• http://www.tex.ac.uk/faq: This contains an extensive FAQ (maybe even a bit better than
the German one maintained by Dante). An interesting feature is the “Visual FAQ” that serves as
a rather unorthodox, but very intuitive kind of index: http://www.tex.ac.uk/tex-archive/
info/visualFAQ/visualFAQ.pdf.
• http://tex.stackexchange.com often comes up in Google searches and contains a lot of very
useful tips.
• http://detexify.kirelabs.org/classify.html contains a little online tool to find LATEX
names of symbols. It works quite well and can be a lot quicker than searching through the written
documentation.
Not everyone knows about the texdoc command which should be available for Linux TEX installations. To get help on a package, you can simply give the command texdoc geometry, etc. Note
that to see the KOMA - Script manual you have to know the name of the PDF file: texdoc scrguide
or texdoc scrguien for the German and English versions, respectively. The AMS Math users guide
also does not have a totally obvious name – try texdoc amsldoc. It contains a whole host of useful
information on typesetting (complicated) equations.
The Physikalisches Institut is a member of Dante and so receives three copies of each issue of „der
TeXnische Komödie“, one of which is available in the department library in PI. The booklet often
contains useful hints on typesetting. We also get a DVD every year with TEX distributions for Unix,
MacOSX and Windows. Details on how to install a LATEX distribution can be found in Appendix C.
If you write your thesis in English, questions are sure to occur on how things should be written in
English, what is the correct punctuation and hyphenation, and what do you have to worry about when
you construct sentences. I will not attempt to answer such questions here. The “The guide to writing
ZEUS papers” from Brian Foster [Fos] contains a wealth of useful information. Brian kindly gave me
permission to package a PDF file of the note with this guide.
This document is structured as follows. Chapter 2 tells you how to get started with the files and
package. It also contains several tips and tricks that it is probably good to include early. It is sometimes
not clear which version of the cover should be used when submitting and/or printing your thesis. Some
instructions are given in Chapter 3. This is followed by Chapter 4, which lists the packages used in this
document and says what they are good for. Chapters 5 and 6 give some guidelines for figures and tables.
Chapter 7 discusses the tricky business of references and their formatting. Some hints on how to solve
common layout problems, which fonts one can use and how to handle multiple languages in a document
are given in Chapter 8. As big tables are often moved to the appendix, an example of how to create such
tables is given there. Also in the appendix I include some more information on the TEX setup I have

2

12th July 2013 10:14

used to test things. I have seen a glossary (list of acronyms) in a few theses and think this is a nice idea.
The appendix shows how you can create such a list.
While this guide is structured pretty much like a thesis, I have included a couple of extra features
that are usually not needed in a thesis. The first is a link to the relevant LATEX file at the beginning of
each chapter. I have also started to add an index, as that is probably a useful complement to the table of
contents.
Regular updates are made to the guide, so it is worth checking every so often to see if a new version
is available. Corrections and suggestions for improvements are very welcome.

12th July 2013 10:14

3

CHAPTER

2

Tips and tricks

LATEX file: ./guide_tips.tex
Over time I have collected quite a lengthy list of things you should “Do” and “Not Do” (at least in my
head) that I think it is useful to write down early in the document, so that you may actually read them!
In this chapter I will first tell you how to get and use the style file and then give some tips.

2.1 How to use the ubonn-thesis style
The idea with this document is that you also look at the LATEX that is used to create it, in order to find
out how things are done. I will therefore usually not give the LATEX commands in the printed document,
but assume that you will have a look at the LATEX source. To help you with this, each chapter contains a
link to the relevant file at the top. This link should work if you have compiled the guide yourself and are
in the guide subdirectory of the ubonn-thesis directory tree. The files that make up this document
are available in a subversion repository and as a tar file. To get the latest subversion entries give the
command:
svn co https://svn.physik.uni-bonn.de/basic/ubonn-thesis/trunk
If you want to checkout a particular release you can give the command:
svn co https://svn.physik.uni-bonn.de/basic/ubonn-thesis/tags/ubonn-thesis-N.M
The tar file (and the release tree (as of release 1.5)) also includes the guide as a PDF file: thesis_guide.pdf.
It can be obtained from:
http://www-biblio.physik.uni-bonn.de/info/index.shtml#info:titelvorl and
http://www.pi.uni-bonn.de/lehre/uni-bonn-thesis.
Once you have the files, you can then give the command:
make new [THESIS=dirname]
to create a new directory with a couple of files to help you get started. By default the directory name
will be mythesis. To compile your thesis try:
cd mythesis [or dirname]
make thesis

12th July 2013 10:14

5

2 Tips and tricks
Note that as of release 2.1, the main file for the thesis (mythesis.tex), the Makefile and the style
file (ubonn-thesis.sty) are copied into your mythesis subdirectory. This means that if you update
the ubonn-thesis you can look for differences between the new style file and the one you have. It also
implies that if you want the update to have an effect on your thesis you should copy the Makefile and
ubonn-thesis.sty into the directory with your thesis.
My original idea was that the style file should work for all recent TEX installations. However, some
of the packages I recommend have been changing quite a lot over the past few years. By default things
should work with TEX Live 2011 and later. If you have an older version, you should set the value of
\texlive in the thesis main file to 2009 rather than 2011 and then use the command “make thesis09”
rather than “make thesis”. Note that you should not mix these two commands. If you switch from
one to the other do a “make clean cleanbbl cleanblx” in between.
In the main thesis file, mythesis.tex, you need to specify which cover page should be used:
PhD_Submit_Title.tex and PhD_Final_Title.tex: the title pages for a PhD thesis;
Master_Submit_Title.tex and Master_Final_Title.tex: the title pages for an MSc thesis;
Diplom_Submit_Title.tex and Diplom_Final_Title.tex: the title pages for a Diplom thesis;
Bachelor_Title.tex: the title pages for a BSc thesis.
For the printed version for the department library you also need to include the appropriate cover page
(with an abstract):
PhD_Cover.tex: The cover page for a PhD thesis;
Diplom_Cover.tex: The cover page for a Diplom thesis;
Master_Cover.tex: The cover page for an MSc thesis.
This extra cover should not be included for the version of the PhD thesis that is submitted to the university library (ULB). See Chapter 3 for some more details.
If you are not a member of the „Physikalisches Institut“ you should also change \InstituteName,
\inInstitute and \InstituteAddress. The style file ubonn-thesis.sty already contains the
appropriate definitions for PI, HISKP, IAP and AIFA.
All packages that are needed should be part of your TEX installation. If not you may have to install
them or ask your system administrator to do so.
If you just want to make the cover pages, use the file cover_only.tex. Be sure to adapt the font
selected in ubonn-thesis.sty to the font you actually used in your thesis. Be aware that not all font
sizes are available in all font collections. If you used the default LATEX font in your thesis, then choose
lmodern in the style file.
The main file for this guide is guide/thesis_guide.tex and it includes the LATEX files in the
directory ./guide and some of the Feynman graphs in the directories ./feynmf and ./tikz. Again
this guide should compile without changes for TEX Live 2011. For earlier versions set \texlive in
thesis_guide.tex to 2009.1
1

6

You should set \texlive to 2011 also if you have TEX Live 2012, which is the default version for Ubuntu 12.10.

12th July 2013 10:14

2.2 Do

2.2 Do
• Have 1–2 other people read your thesis well before you are supposed to submit it. Do not ask too
many; everyone has their own opinions on how things should be written, how much detail should
be included etc. and these opinions will not necessarily agree with each other!
• Write “nice” LATEX. It makes it much easier to find mistakes in your document. If you like to use
the keyboard rather than the mouse when moving round in a document, turn on “auto-fill-mode
(emacs)” or its equivalent in any other editor, so that line breaks are inserted.
• Make sure every table and figure is referenced in the text. I get very irritated when I suddenly find
a figure that is not described in the text. A useful package to check this is refcheck. You need
to run LATEX one more time for it to work. It indicates both in the log file and the resulting PDF
which figures, tables, equations and sections are referenced.
• Use a units package to format numbers and their units. Recent versions of LATEX include the
siunitx package, which is a superior replacement of SIunits. I used to use SIunits, or rather
hepunits which is built on top of SIunits, and defines common particle physics units such as
GeV. Use of these packages will be discussed in Section 2.4. An alternative is the units package.
• Define any complicated symbols once you use them more than once:
\newcommand{\etajet}{\ensuremath{\eta_{\text{jet}}}\xspace}
If you decide at a later date that jet should be a superscript rather than a subscript you only have
to change this in one place!
• If you use normal words in superscripts or subscripts (or anything else in math mode) enclose
them in \text. You can also use \mathrm or \textrm. However, if you then use the same
symbols in slides with a sans-serif font, the text may well continue to be in a serif font.
jet
Compare: A common jet energy cut at the LHC is now pT > 20 GeV, while at HERA we
jet
typically used pT > 6 GeV. The GeV in the first expression is in sans-serif. This is because the
\sisetup{detect-family=true}2 option is set in ubonn-thesis.sty (see Section 2.4.1). I
used the option detect-family=false3 for the \SI command in the 2nd expression. In the first
expression I use \text for “jet”, while I use \mathrm in the second expression.
• Use \xspace and \ensuremath in all commands where you would like to use a symbol both in
text mode and in math mode. Without \xspace you have to make sure that you end every symbol
with \ or {}, otherwise the space is used to signify the end of the symbol, e.g. in LATEXwe have
to pay attention otherwise the symbol and the next word run together.
• Decide how you want to write abbreviations for particles and stick to it – you should probably
define the particle names in your style file and always use them (also for quarks). At some point
the CERN Computer Newsletter claimed that all particle should be written upright, e.g. Z boson,
b quark. However, nowadays it seems to be much more common to use math mode. This is
also how the particles are written in the PDG. I would therefore recommend one of the following
definitions:
2
3

obeyall in TEX Live 2009.
obeyfamily=false in TEX Live 2009

12th July 2013 10:14

7

2 Tips and tricks
\newcommand*{\Zo}{\ensuremath{Z}\xspace}
\newcommand*{\Zo}{\ensuremath{\text{Z}}\xspace}
\newcommand*{\bbarQ}{\ensuremath{\bar{b}}\xspace}
\newcommand*{\bbarQ}{\ensuremath{\bar{\text{b}}}\xspace}
which produce Z, Z, b̄, b̄. Note that you are not allowed to include numbers in the names of
±
commands, so \Z0 or \U1S are not valid commands. For Bc and other particles whose names are
±
capital letters, it can be debated whether it better to use \overline than \bar. Compare Bc and
±

±

0

0

B̄±c . If you use upright letters the choice is maybe easier: Bc and B̄c or KS and K̄L .
Note that Kopka [KD04] recommends using \newcommand* rather than \newcommand for short
commands.
• Decide how you want to write coordinate axes and stick to it. Far too often I see text like: “The
proton beam defines the Z direction, while the interaction point is denoted as (x0 , y0 , z0 ). The
polar angle is measured with respect to the z axis and cot θ = pZ /pT ”. Which is the best way of
writing the coordinates? As x, y and z are often used for kinematic variables, there are arguments
in favour of (X, Y, Z).
• Use \enquote from the csquotes package to quote text rather than using explicit quotation
marks. This has the advantage that consistent quotation marks are used everywhere (also if they
are nested) and that they are also correct for the language (and dialect4 ) you are writing your thesis
in. You can also see in the Chapter 1 how this works, even when switching languages inside a
paragraph.
• Use sizes that depend on the font size, em (width of “M”) and ex (height of “x”), for spacing that
should change with the text size. Use absolute sizes cm, mm, pt etc. where they are appropriate,
e.g. title pages, boxes, etc. \quad and \qquad are also useful sizes in tables and equations.
• Add a \ (or {}) after abbreviations that end with a full stop such as e.g. if followed directly by
text. If you do not, an end of sentence space is added rather than a normal interword space. Note
that \ is not needed (but does no harm) after abbreviations that only consist of capital letters:
compare “e.g. my name is Ian C. Brock” and “e.g. my name is Ian C. Brock”, where \ was included
in the second version. In this example the difference is small. However, if LATEX increases the
spacing between words to fill a line the effect is more obvious.
• Ask someone (me) if you cannot easily find out how to solve formatting problems. I recently saw
a thesis in German, where the author wanted to use commas instead of full stops in numbers and
wrote numbers as $2,\!47$ to produce 2,47 instead of 2, 47. There are usually much better solutions, e.g. \num{2.47} with the siunitx package produces 2.47 in English and 2,47 in German.
In the end such solutions will save you time!
• Use punctuation in equations and “d”, i.e. \dif for derivatives, e.g.
Z
y dx .
4

By default, British English uses ‘British quoted text’ for outer quotation marks, while American (US) English uses “American quoted text”. In this guide (and in ubonn-thesis.sty) “American (US) quotes” are used even if you write in British
(UK) English.

8

12th July 2013 10:14

2.3 Do Not
This is also one of the the very few places, where it makes sense to put some spacing in by hand
– normally you should leave this to TEX.
• Pay attention to the alignment of numbers in tables. siunitx provides the S column specifier to
help with this. Packages such as dcolumn also provide assistance.
Not really a strict “Do”: I highly recommend that you use an integrated environment for editing and
compiling your thesis. If you are on a Mac or under Windows you probably use TEXshop or TEX
Live. Under Linux you can use Kile or the way I work is to use emacs and AUCTeX. Note that the
RefTeX mode in emacs also provides powerful tools for finding cross-references and the names of
citations easily. TEXstudio is based on Texmaker and is available for Linux, Windows and MacOSX.
One advantage of such environments is that it is usually possible to switch between a position output
and the relevant place in the source code and vice versa. This makes it much quicker to fix things when
you spot an error in your output PDF file. You can usually also step through the errors when you try to
compile your file and fix them directly. In addition, they know which environments and mathematical
symbols exist, which can speed things up if you have not been working with LATEX for the past 20 years!
More details on installing TEX for different systems can be found in Appendix C.

2.3 Do Not
• Don’t write symbols differently in math mode and in text. One of my pet hates is: “The most
famous equation in the world is:
E = mc2
(2.1)
where E is the energy of the particle and m is its mass”, i.e. E and m are in math mode in the
equation, but in text mode in the text where they are explained.
• Another example of how not to write things is something like “The scale factor, SF, used to correct
the MC is determined in an independent dataset using S F = Ndata /N MC ”. Note the wrong font
and spacing of S F, data and MC. All should be enclosed in \text: SF = Ndata /NMC .
• Do not include the directory or the extension of the file in \includegraphics commands. Use
\graphicspath instead to set up a list of directories that hold the figures. Let LATEX or PDFLATEX
pick the extension for the figure, so that you can (in principle) easily switch between the two.
• Do not try to end paragraphs with \\. These should be used sparingly when for some reason you
really have to start a new line. Just leave an empty line for a new paragraph.
• Do not draw conclusions or interpret figures in the caption. The caption should just describe what
is in the figure. Interpretation belongs in the main body of the text.
• Do not start trying to format figure and table captions inside each caption – use the options available in KOMA - Script to set such things at the beginning of the document.
• Do not worry about overfull boxes, positions of figures and tables, etc. until you reach the final
version of your thesis.

12th July 2013 10:14

9

2 Tips and tricks

2.4 Units
As just mentioned above, but I’ll say it again just to make the point, one of my pet hates is inconsistent
and poor typesetting and spacing of units. At least three standard packages exist to solve this problem:
siunitx, SIunits and units. My favourite is siunitx as it offers many extra features in addition to the
correct typesetting of numbers and their units.
Instead of SIunits, I used to use hepunits, which is based on SIunits but includes units commonly used
in particle physics such as GeV and pb. Unfortunately the syntax of the hepunits and units packages
is different even though they use the same macro name. In hepunits you write \unit{10}{\GeV},
while in units you write \unit[10]{\GeV}. The siunitx package is quite new and older versions were
supposed to have compatibility modes for both SIunits and units, but I had problems getting them
working. It uses the macros \SI and \num rather than \unit.

2.4.1 siunitx package
This package is a more modern and complete package than either SIunits or units. As the package is
rather new it is also still developing. There are quite a few changes from version 1 (TEX Live 2009)
to version 2 (TEX Live 2011) which means that several of the examples I include here have somewhat
different syntaxes depending on which version of TEX Live is being used to compile this guide. If you
use TEX Live 2011, but want to use units which were available in TEX Live 2009 or the older syntax you
can include the option version-1-compatibility. Note that TEX Live 2009 was the default version
for Ubuntu releases up to and including 12.04. I will give the siunitx version 2 options in the text and
the version 1 options as footnotes.
One very attractive feature is that it allows you to format computer-generated numbers such as 1.4E4
automatically, e.g. \num{1.4E4} produces 1.4 × 104 . Depending on the language or using the option
exponent-product5 you can also get −3.4 · 10−6 . It is even possible to set the number of decimal
places, cf. 2.994 67 × 108 m s−1 and 3.0 × 108 m s−1 , which only differ by the use of the round-mode
and round-precision6 options, and even rounds correctly!
Another extremely nice feature of the package is that you can typeset numbers in a single way and
then a full stop or a comma will be used as the decimal point, depending on which language you set
for your document. This means that computer generated decimal numbers can be output with commas
in a German thesis just by changing the language of your thesis – this for me is LATEX at its best! For
example, writing \num{1.2345E-3} produces 1.2345 × 10−3 in the default language of the document
and 1,2345 · 10−3 if I say that this piece of text is in German (ngerman to be exact).
In keeping with LATEX philosophy, you can specify a number and its error using \num{2.88(32)}
to produce 2.88 ± 0.32 with the separate-uncertainty7 option (which I specify) or 2.88(32) with
the default option. Errors and powers can also be combined, e.g. \num{2.88(32)E-3} produces
(2.88 ± 0.32) × 10−3 . You also give as an option how units with negative powers of units should be
shown, e.g. per second. This can be changed for a single command.
Some examples are given below:
• c is 3 × 108 m s−1 – default \per;
• c is 3 × 108 m/s – using per-mode=fraction,fraction-function=\sfrac8
5
6
7
8

expproduct in TEX Live 2009.
dp in TEX Live 2009
seperr in TEX Live 2009.
per=fraction,fraction=nice in TEX Live 2009

10

12th July 2013 10:14

2.4 Units
• written in displaymath or preferably equation*:
c = 2.99 × 108 m/s
with per-mode=symbol9 ;
• ~ is 1.054 × 10−34 J s.
You use “.” or “,” to make a space between the units, as illustrated in the last bullet. Angles are also
very straightforward – just use \ang as in 90°.
If you also want to use siunitx in slides, where one usually uses a sans serif font, you may at first
be disappointed that siunitx uses a serif font for the units! DO not despair! You can use the command
\sisetup{detect-family=true}10 to ensure that the package uses the current font (in all its aspects)
rather than its default.
Have a look at the manual, texdoc siunitx, for many more examples. siunitx also contains useful
and powerful tools for typesetting tables and as mentioned above can be used to round numbers. These
aspects are discussed in Chapter 6.
Note that the \clight symbol that is used in the macro \MeVovercsq to produce MeV/c2 is defined
as c0 in siunitx version 2. As this is not the way it is usually written in high energy physics I redefined
it using:
\DeclareSIUnit\clight{\ensuremath{c}}
Two things that are currently not built in are separate statistical and systematic errors and asymmetric
errors. From the author I got some suggestions on how to define such things. They are included in
guide_defs.sty at present and can be added to thesis_defs.sty. Two versions of a few of the
commands are defined depending on the value of \texlive, as some of the options changed when
moving from version 1 to version 2 of siunitx. Several new macros have been defined there: \numerrt,
\numpmerr and \numpmerrt to write errors with a description, which are asymmetric and both, respectively. The corresponding macros for values and errors are \SIerrt, \SIpmerr and \SIpmerrt.
For the macros whose names end with “t”, you also have to provide the descriptive text. If you have two
errors then use \SIerrtt or \SIpmerrtt, which have two or three more arguments, respectively. For
the standard case of statistical and systematic errors, you can use the macros \SIerrs and \SIpmerrs.
Examples of their use are:
• σ = (3.42 ± 0.46 (stat.) ± 0.32 (sys.)) pb
+0.46 ) pb
• σ = (3.42 −0.32

• σ = (3.42 +0.46
−0.32 (stat.)) pb
+0.06
• σ = (3.42 +0.46
−0.32 (stat.) −0.04 (sys.)) pb
+0.06
• σ = (3.42 +0.46
−0.32 (stat.) −0.04 (sys.)) pb

The last two examples use \SIpmerrs and \SIpmerrtt just to show that they can both give the same
output. If you need even more complicated combinations of errors, or more errors, have a look at the
definitions, e.g.
σtt¯ = (164.6 ± 8.7 (stat.) +6.4
−5.3 (sys.) ± 8.2 (lumi.)) pb
9
10

per=slash in TEX Live 2009
obeyall in TEX Live 2009.

12th July 2013 10:14

11

2 Tips and tricks

2.4.2 SIunits/hepunits packages
Before I found siunitx these used to be my preferred units packages. This section therefore gives examples on how to use hepunits and what you should be careful about. As siunitx has got stricter about
what it allows for a syntax, I have had to cheat in the LATEX code several times to show the effect.
Even though \xspace is used for some units in hepunits it does not appear to have the usual effect.
Hence, if you use units in normal text it is probably wise to terminate them with “\” or “{}”. Compare
• The GeVis a heavily used unit in particle physics and cross-sections measured in pbor nbare quite
common. Masses can be given in either MeV/c2 or MeV.
• The GeV is a heavily used unit in particle physics and cross-sections measured in pb or nb are
quite common. Masses can be given in either MeV/c2 or MeV.
In the first bullet the units were not terminated, while in the second they were.
Note that SIunits typesets the value in text mode and the unit in math mode. You only have to worry
about this if you want to use math mode symbols e.g. 108 in the value. Three different ways of writing
the velocity of light are:
•
•
•
•

c is \unit{$3 \cdot 10^{8}$}{\metre\per\second}
c is \unit{3$\cdot$\power{10}{8}}{\metre\reciprocal\second}
c is \unit{3 $\cdot$ \power{10}{8}}{\metre\usk\reciprocal\second}
Written in displaymath or preferably equation*:
\begin{equation*}
c = \unit{$3 \times \power{10}{8}$}{\metre\usk\reciprocal\second}
\end{equation*}

Note the difference in spacing in the examples. The first example gives the best result. Two different
ways of handling the value are used in the second and third examples, either without or with space
between the number and $\cdot$. In the fourth example, where you use \unit in math mode, you
still need to enclose the value in $...$ if it includes characters from math mode. Conversely if for some
reason you want normal text in your units, you should put it inside \text, e.g. the velocity of light is
3 × 108 metres per second. If you forgot the \text command using
\unit{$3 \cdot \power{10}{8}$}{metres per second} you would get: 3·108 metrespersecond
or if you tried to write the units yourself you would get 3 × 108 ms−1 .
If you have negative powers then you can play around with the \power command and the usual
superscript:
• ~ is \unit{$1.054 \times 10^{-34}$}{\joule\usk\second}
• ~ is \unit{1.054 $\times$ \power{10}{-34}}{\joule\usk\second}
• ~ is \unit{1.054 $\times$ \power{10}{$-34$}}{\joule\usk\second}
Note the use of \usk to get a bit of space between the units. In the second example the minus sign
appears as a dash, “-”, rather than “−”, which is too small. Hence, if you use \power you should put
the power in math mode.
Just to complicate things further, if you use the Palatino font for example, then the standard TEX
font is used in math mode. You thus have to decide from the very beginning whether numbers should
ALL be in text or in math mode. This is clearly one of the disadvantages of using a font for which the

12

12th July 2013 10:14

2.5 Hints
math mode is different from the text mode. ATLAS uses either the txfonts or the mathptmx packages,
which do not have this problem. This is why I use txfonts in this guide. If you compile the guide with
a different font and the numbers 1234.56 and 1234.56 look the same then you do not have to worry!
There are ways to get around the problem with Palatino. You can try either the pxfonts or the mathpazo
packages – for my taste the sans serif font used in pxfonts looks a bit better.

2.5 Hints
xspace is great, but how do you write B0 B̄0 when you have defined the symbols \Bo and \Bobar with

\xspace at the end. Here you need {} between the two commands, e.g. \Bo{}\Bobar produces B0 B̄0
while \Bo\Bobar produces B0 B̄0 .
How should you write “between 104 and 105 ”? If you use math mode it looks like 104 − 105 , which is
not really what you want. Although it is rather clumsy, the best way to do it is $10^{4}$--$10^{5}$
which produces “104 –105 ”.
With siunitx and \num there is a built-in option. You simply write
\numrange{3e4}{7e4} to produce “3 × 104 to 7 × 104 ” or
\SIrange[range-phrase=- -]{5}{7}{\GeV} to produce “5 GeV–7 GeV”. If you only want the unit
to appear once write
\SIrange[range-units = single, range-phrase=- -]{5}{7}{\GeV} to produce 5–7 GeV. In
a single range, such settings are rather long-winded! However, they can be applied to the whole document using the \sisetup macro.
With SIunits and \unit you can write \unit{\power{10}{4}--\power{10}{5}}{}, which would
look almost correct, but leaves some space for the unit! If you want to write between 5 and 7 GeV, then
\unit works well: \unit{5--7}{\GeV}.
A similar problem is how do you write “about 10%”? Again the simple solution ∼ 10% or ∼ 10%
have too much space. In the file thesis_defs.sty two macros \mysim and \mysymeq are defined
that add some negative space so that you can simply put everything in math mode: ∼ 10% or ' 0.2. An
alternative is to use \SI or \unit, as there should actually be some space between the number and the
% sign, e.g. $\sim$\SI{10}{\%}, which produces ∼10 %, is completely correct and does not need the
use of \mysim.
What is the difference between \textrm and \mathrm? I used to worry about this and found a few
examples (which I then forgot) where the font size was better using one or the other. Then I learnt about
\text, converted all my predefined symbols to use \text rather than \mathrm or \textrm, and don’t
have to worry any more. However, I can given an example: the transverse energy of the highest energy
1st jet
1st jet
jet is denoted pT if one uses \mathrm, while it is denoted by pT
if you use \textrm, where I used
st
\text to produce 1 . As you can see from this example, the key difference is that \mathrm switches
to an upright font, but keeps you in math mode – hence ignoring any spaces. \textrm switches to text
mode (with a serif font) and therefore pays attention to spaces.
A perennial problem is bold math when it is needed in section headings etc. This is further complicated by the fact that the table of contents is usually not typeset using a bold font (except for chapter titles,
or whatever the highest level(s) of sectioning are. The only reliable way to get this right in both cases is
to give the heading twice, once with \boldmath for the real title and once without as the optional title
for the table of contents. An illustration of how this works is given in Appendix F.

12th July 2013 10:14

13

2 Tips and tricks

2.6 Line numbering
You probably do not need line numbers when writing your thesis (who knows?). However, as this is a
very useful package that occasionally has some problems, I thought I would include some information
here.
lineno is the package to use to get line numbers in your text, but sometimes a block of lines is not
numbered - see Fig. 2.1a.

(a)

(b)

Figure 2.1: Example of (a) a problem with line numbers and (b) its solution.

Such problems are associated with text that is close to math mode environments. Some of the problems can be solved by using a new version of the lineno package. However, this only works for “standard” LATEX math environments: displaymath, equation and eqnarray, while it does not work for
recommended amsmath environments such as equation*, align(*) and alignat(*).
The solution is to enclose the equation in linenomath environment, e.g.

The total visible cross section for inclusive heavy-quark jet
production, $\sigma^{q}$, with $q\in\{b,c\}$ is given by
\begin{linenomath}
\begin{equation*}
\sigma^{q} = \frac{N_{q}^{\text{rec,Data}}}{\mathcal{A}_{q}\cdot\mathcal{L}_{\text{Data}
\end{equation*}
end{linenomath}
Here, $\mathcal{L}_{\text{Data}}$ denotes the integrated luminosity,
$\mathcal{A}_{q}$ is the acceptance and $N_{q}^{\text{rec,Data}}$ the
number of reconstructed heavy-quark jets in data, which was determined
Then the line numbering will be correct, see Fig. 2.1b.

2.7 Updating ubonn-thesis
What is the best way to update ubonn-thesis? If you are using SVN, then you just need to do an svn
update. If you use a tar file, then you should unpack it and copy over your mythesis directory tree
and any other files you need to the new tree.
Note that when you make a new thesis skeleton (as of release 2.1) the files thesis_skel/Makefile
and ubonn-thesis.sty are copied to your mythesis directory. If you want to profit from updates

14

12th July 2013 10:14

2.7 Updating ubonn-thesis
to one of these files, you therefore need to copy the new version into mythesis again. The advantage
of this scheme is that you can easily check what the differences are before you do the copy. More
importantly, if you have made your own changes to the style file, it should be relatively easy to merge
the two versions. Having all files in the mythesis subdirectory also makes it much easier for you to
use your own version manager for your thesis.
As a side remark, I would also recommend that you put all Feynman graphs etc. in subdirectories of
mythesis. You may have to change some variables that are set at the beginning of the Makefile so
that this works if you use feynmf. If you use feynmp just add \write18 statements. See Section 5.5 for
some more details.

12th July 2013 10:14

15

CHAPTER

3

Submitting your thesis

LATEX file: ./guide_submit.tex
Questions often come up when your thesis is finished and now you have to print it and submit it. Both the
„Promotionsbüro“ and the „Prüfungsamt“ have instructions on what you have to do, but it is sometimes
not clear what this means in terms of the cover pages offered by this thesis framework.
For the printed version of your thesis, you probably want hyperref links and the table of contents to
be black. In order to do this, you should uncomment the \hypersetup command that is in the thesis
main file, just after the \usepackage{mythesis/thesis_defs}.

3.1 PhD thesis
3.1.1 Submission
1. Use the file PhD_Submit_Title.tex for the title pages. Leave the „Tag der Promotion“ and
„Erscheinungsjahr“ blank.
2. You are required to also submit a CV and a summary of your thesis. A skeleton CV is provided as
the file thesis_cv.tex which you then include at the end of your thesis. The summary should
also be printed separately.
3. You have to print and bind five copies of your thesis for the Promotionsbüro. Nowadays these are
usually in colour.
4. The first and second referees for your thesis often like to also have an extra copy of the thesis so
that they can make comments when they read your thesis – ask them if they want one. You can
usually save the institute some money and print these copies in black & white.

3.1.2 Printing the final version
1. Use the file PhD_Final_Title.tex for the title page.
2. Do not include your CV.

12th July 2013 10:14

17

3 Submitting your thesis
3. There are probably some small corrections you or the referees found during the time between
submission and your examination. These should be corrected before you submit your thesis to the
university library (ULB).
4. Almost everyone submits their thesis electronically to the ULB. You still have to print five copies
for them as well. The ULB is quite strict on the quality of the binding etc. The university print
shop is not able to fulfil the requirements, so you have to print these versions externally. When
you do this do not forget to uncomment the \hypersetup command as mentioned above, if you
want to print them in colour.
5. The department library (in the Physikalisches Institut) needs eight printed copies with the file
PhD_Cover.tex as the cover and PhD_Final_Title.tex for the title pages. You have to get
the “BONN–IR–YYYY–nnn” number from the librarian. You should also include an abstract
(in English) on the cover page. You can also use this abstract when you submit your thesis
electronically to the ULB.
6. The department library version of the thesis is the one that you usually print if you need extra
copies for your experiment or research group.
Note that when you want to get your degree certificate, you will get some forms from the Promotionsbüro that have to fill out. These forms have to be signed by your supervisor. One of the forms asks you
if you have published significant parts of your thesis elsewhere. This means your actual thesis and not
a paper that uses the results from your thesis. If you submit your thesis electronically to the ULB, then
you should not fill out this form. It only applies if you actually publish your thesis elsewhere (which is
allowed by the Promotionsordnung).
Appendix E suggests some print shops that can make copies of your thesis in good enough quality to
be accepted by the university library.

3.2 Master/Diplom/Bachelor thesis
3.2.1 Submission
1. Use the file Master_Submit_Title.tex, Diplom_Submit_Title.tex or Bachelor_Title.tex
for the title pages.
2. You have to print and bind three copies of your thesis to be submitted to the Prüfungsamt.
Nowadays these are usually in colour.
3. The first and second referees for your thesis often like to also have an extra copy of the thesis so
that they can make comments when they read your thesis – ask them if they want one. You can
usually save the institute some money and print these copies in black & white.
Note that a CV does not have to be included in a Master/Diplom/Bachelor thesis. This is only needed
when you submit a PhD thesis.

3.2.2 MSc/Diplom theses for the department library
1. Use the file Master_Cover.tex for the cover and Master_Final_Title.tex1 for the title
pages.
1

Replace Master with Diplom as appropriate.

18

12th July 2013 10:14

3.2 Master/Diplom/Bachelor thesis
2. There are probably some small corrections you or the referees found during the time between
submission and the completion of the referees’ reports and grades. These should be corrected
before you submit your thesis to the department library.
3. The department library (in the Physikalisches Institut) needs 2 printed copies with the file
Master_Cover.tex as the cover. You have to get the “BONN–IB–YYYY–nnn” number from
the librarian. You should also include an abstract (in English) on the cover page.
4. This version of the thesis is the one that you usually print if you need extra copies for your
experiment or research group.

3.2.3 BSc theses
1. There are probably some small corrections you or the referees found during the time between
submission and the completion of the referees’ reports and grades. These should be corrected
before you print some extra copies of your thesis if your group wants them.

12th July 2013 10:14

19

CHAPTER

4

Useful packages

LATEX file: ./guide_package.tex
LATEX has so many packages that it is often hard to find the correct or most useful ones. It is also not a
good idea to just take one of your friend’s theses and use his/her packages and conventions, as there is
a steady and regular improvement in the packages available.
This chapter lists some useful packages – maybe also some that are not so commonly known. Here
I only say what the package is used for. More detailed instructions on the usage can be found in the
relevant chapters. I first list the packages used in this guide and then give a bit of information on other
packages that may be useful.
From all that I have read, KOMA - Script seems to be the way to go for the overall classes. I have
therefore based the ubonn-thesis style on this. You replace article, report and book by scrartcl, scrreprt
and scrbook. For theses I think it is best to use scrbook, as this class also includes the commands
\frontmatter, \mainmatter and \backmatter that set up page numbering etc. appropriately.
Please try to use KOMA - Script version 3.0 or higher. The \KOMAoptions command is not available
in earlier versions, so you would have to modify the style file.

4.1 Layout and language
There are quite a few packages related to layout and also to handling of text input and languages. As
far as layout goes, KOMA - Script has many options with which you can already do a lot. You can either
use the built-in typearea package to do the page layout, which also includes nice options to allow for
the binding, or use the geometry package which also contains more than enough options. In the past I
have used geometry, but I also see no reason not to just use typearea. Note that you should not include
the typearea package, you should simply set the options using \KOMAoptions. The packages are listed
in Table 4.1.

4.2 Appearance
It used to be the case that nearly all LATEX documents used the Computer Modern Fonts. That is no
longer necessary. There are rather complete font sets that are also free that you can use instead. In this
guide I use the txfonts package. Other fonts that look quite nice (e.g. Palatino) can also be used. You

12th July 2013 10:14

21

4 Useful packages
geometry
typearea
setspace
fontenc
inputenc
babel
csquotes
scrpage2
xspace

Provides simple options for page layout such as scale=0.75 to cover 75% of the
page.
Does much the same, but here you specify how many elements to split the page
into. You do not have to include this package explicitly if you use KOMA - Script.
Useful options to change spacing.
The encoding used for fonts. Recommended is T1, which is given as an option.
Use either utf8 or latin1 so that you can input German letters such as ä, ü and ß
directly.
Language specific typesetting.
Package for quoting things using the correct language-dependent symbol.
Set headers and footer.
Avoid having to put “\ ” or “{}” after a macro.
Table 4.1: Useful packages for layout.

have to use a package such as pxfonts to get both text and math fonts in the same style. Some examples
of other possible font packages are given in the style file.
Commonly used packages associated with fonts, tables and figures are listed in Table 4.2.
siunitx
graphicx
rotating
array
longtable
booktabs
amsmath, amssymb
mhchem
xfrac
xcolor
titlesec

Typeset units properly with correct spacing.
The package to use for including graphics.
Package to use for rotating tables etc. The \includegraphics command can
rotate figures directly.
Adds extra column formatting capabilities.
Can produce tables that extend over more than one page.
Help for producing nicer tables.
Extra math commands and symbols from AMS.
Nice package for typesetting chemical elements correctly.
Some more options for typesetting fractions.
Add colour commands.
Change the appearance of chapter and section headings.
Table 4.2: Useful packages for appearance.

As an alternative to longtable, one can also use supertab. Both packages also have the advantage
that you can specify header and footer text.

4.3 Other packages
Some other useful packages, some of which are included in ubonn-thesis.sty are listed in Table 4.3.
While the amsmath package solves many problems that occur if you just use the normal LATEX math
mode commands, there are some things that are not so nice with long and complicated multiline equations. IEEEtrantools, in particular the IEEEeqnarray environment, can help here. See Ref. [Oet+] or
the package documentation for more details.
standalone is both a package and a document class. It is available from TEX Live 2012 onward. It
allows you to have a standalone document for a tikz or feynmf figure and also input this file into another
document. If you run PDFLATEX on the file it also automatically crops the resulting picture. This is

22

12th July 2013 10:14

4.3 Other packages

ifthen
IEEEtrantools
feynmf
feynmp
axodraw
tikz
standalone
hyperref
subfiles
subfig
subcaption
tabularx
floatrow
adjustbox
caption
wrapfig
floatflt
glossaries
nomencl
fncychap
quotchap
refcheck

Provides the \ifthenelse command.
Contains useful environments for multiline equations.
Draw Feynman graphs with Metafont
Draw Feynman graphs with Metapost.
Draw Feynman graphs.
General drawing package that can also be used for Feynman graphs.
Allows you to have a document that you can directly compile for each figure and
also input to another document.
Adds \url command as well as ability to click on entries on table of contents etc.
Provides a nice alternative to \include.
As the name suggests make sub-figures and add separate captions for them. This
package has apparently been deprecated.
An alternative to subfig.
Allows fixed table width with flexible column widths.
Add ability to define own floats.
Add much more sophisticated clipping capabilities than offered by graphicx.
Much more control on captions – as KOMA - Script also has many options, not sure
this is necessary.
Allow text to flow around figures.
Similar capabilities to wrapfig – allow text to flow around figures.
Provide commands for creating a glossary. This is intended to replace the glossary
package.
Another package for creating a glossary.
Another package for changing the style of the chapter heading.
Another package for changing the style of the chapter heading.
Check whether labels are used, i.e. if figures and tables are actually referenced.
Table 4.3: Other useful packages.

12th July 2013 10:14

23

4 Useful packages
one of those packages where you think “Why didn’t someone create this years ago?”. The tikz figures
included in this guide make use of it.
I do not recommend the subfiles package by default as it is not included in TEX Live by default. Have
a look at http://en.wikibooks.org/wiki/LaTeX/General_Guidelines for example for more
information. If you want to use the package you have to download it and install for yourself. You can
do much the same thing using AUCTeX inside emacs.
A list of other packages that are commonly used is given in Table 4.4. They are not included in the
list above, because they are either not really needed or have been superseded by other packages.
hepunits
units
SIunits
fancyhdr
dcolumn
color
float
ziffer

Typeset units properly with correct spacing
Typeset units properly with correct spacing.
Typeset units properly with correct spacing. hepunits uses this package, so it does
not need to be added explicitly
As the name suggests, do your own header and footer configuration. Within
KOMA - Script it is recommended to use scrpage2 instead
Very helpful for lining up columns on character strings such as a decimal point.
siunitx offers similar and better functionality.
Add colour commands – xcolor is needed to colour boxes around links.
As far as I can tell floatflt offers more options.
Spacing with a comma as decimal separator is correct.
Table 4.4: Other packages that are often used, but I have already given alternatives.

As indicated, the ziffer package is advertised as providing the correct spacing after a comma in math
mode if you use the comma as the decimal separator. Compare 2, 5 with 2,5 and 2,5. The first spacing
is wrong. If you use the ziffer package it will be correct. However, it does seem to conflict with the
use of the dcolumn package, so I cannot compile this guide if ziffer is included. Some workarounds
are discussed in Section 8.3. In addition, the siunitx package contains the same functionality, which can
simply be steered by changing the document language, as discussed in Section 6.2. Hence, ziffer is not
really needed anymore.

24

12th July 2013 10:14

CHAPTER

5

Figures

LATEX file: ./guide_figs.tex
This chapter discusses what you need to know to include graphics in your thesis. The basic command
to use is \includegraphics.
I recently found a pretty complete guide (in German) called l2piqfaq which can be obtained from
http://www.ctan.org/tex-archive/info/l2picfaq/german. It contains a lot of detailed information and tricks.
The chapter also contains some suggestions as to how to create Feynman graphs with a number of
different packages.

5.1 Simple figures
A simple figure and its associated caption is straightforward to include. For example, the layout of the
LHC and its experiments is shown in Fig. 5.1.
Note the use of \centering rather than the environment \begin{center} . . . \end{center} to
centre the figure. This avoid adding extra vertical space. It is also important that the \label be either
inside the caption or after it. If your caption is more than 1 (or 2) lines, you should also give a short
form that will appear in the “List of Figures”.
One tricky question is how to best format the caption. This document uses a smaller font and no
extra indentation. Often italics are used. I dislike this, as symbols are then formatted in different
ways in the main text and in the caption. One can also reduce the width of the caption. The font for
the caption can be specified using the \setkomafont{caption} command. You can specify how to
label the figure by changing the \figureformat command. The captions in this document follow the
standard KOMA - Script convention: if they are one line long they are centred; if they are longer they
are left-adjusted. If you want them all to be left-adjusted set the KOMAoptions caption=nooneline
in ubonn-thesis.sty. Some examples of the possibilities are included in the style file.
Another thing to consider is whether the text should be indented or not. For short captions, indentation
is OK. I do not think it looks good for long captions. Hence the style file sets \setcapindent{0pt}.

12th July 2013 10:14

25

5 Figures

Figure 5.1: Sketch of the LHC ring, the position of the experiments and the surrounding countryside. The four
big LHC experiments are indicated. The location of the injection lines and the SPS are also shown.

5.2 Fancier figures
Life gets more complicated if you want to include several plots in one figure, if you want the caption
next to the figure, or if you want the text to “flow” around the figure. For the first case I like to use the
tabular environment to place the plots, although there are other ways of doing it.
Another very nice way to add (a), (b) etc. to the figure is to use the \put command. This has
the big advantage that you can display the letters in the figure without actually having to add them
to the EPS/PDF file. Figure 5.2 shows how this is done. Note that the origin of the coordinate system is the bottom right-hand corner of the file that you have included (assuming that the \put command comes just after the \includegraphics). The units for the \put command are set with the
\setlength{\unitlength} command, which is by default set to 1 mm in ubonn-thesis.sty. The
same units are also used for Feynman graphs made with the feynmf and/or feynmp package – see Section 5.5.1.
t

(a)

t

(b)

t

(c)

g
g

g

Figure 5.2: Adding letters to figures with \put.

Another way of achieving the same thing, but this time with the letter outside the figure is to use
tabular. An example of this is shown in Fig. 5.3.

26

12th July 2013 10:14

5.3 Figure Formats
t

t

t

g
g

(a)

g

(b)

(c)

Figure 5.3: Adding letters to figures with tabular.

If you want to save space it is sometimes nice to put the caption next to the figure. While packages
exist to do this, KOMA - Script has its own built-in captionbeside environment. The placement option
comes after the caption itself and can be one of:
l Left of figure
r Right of figure
i Inner margin in two-sided layout
o Outer margin in two-sided layout

Note that this is an environment rather than a macro and that the figure itself is inside the environment.
Also the placement does not seem to work exactly how it is advertised in the manual. I set the width
equal to \figwidth and then the offset to -\figwidth.

t
Figure 5.4: A small figure with a simple caption beside
it.

g

If you want different (partial) captions for a figure then the subfig package used to be the way to go.
An example of its use can be seen in Fig. 5.5. You can see how to reference the different parts of the
figure in Section 5.5. If you want the captions of the sub-figures to also appear in the “List of Figures”
you should include the package with the option lofdepth. For tables use the option lotdepth.
An alternative, and successor, to subfig is subcaption. It works in much the same way as subfig. A
nice tutorial on its use can be found in http://www.peteryu.ca/tutorials/publishing/latex_
captions
If you run out of space (applies more often to proceedings than to theses) you can use the wrapfig
package.

5.3 Figure Formats
If you use plain LATEX, you are pretty much stuck with encapsulated postscript (EPS) as your figure
format. If you use PDFLATEX, then you have much more freedom, with the notable exception that you
cannot include EPS files!1 I would still recommend that you always try to use a vector graphic format.
What usually works well is to either create PDF directly or to create EPS and then convert from EPS to
PDF.
1

This restriction has finally been lifted with TEX Live 2011. It simply converts the EPS files to PDF inline.

12th July 2013 10:14

27

5 Figures

e0 (k 0 )

νe (k 0 )

e(k)

e(k)

W ± (q)

γ, Z(q)

p(P )

p(P )
X
(a) NC

1

X
(b) CC

Figure 5.5: Processes in ep scattering.

1

The tool I use for conversion is epstopdf. Occasionally this fails; in that case eps2eps can help. It
is important that the bounding box is set correctly in the EPS file before you run epstopdf.
If these fail, you can try the convert command which is part of ImageMagick. A more powerful
tool is inkscape which is a successor to xfig. Professionals use Adobe Illustrator!

5.4 Tik Z and PGF
pgfplots and tikz are packages to help with creating graphics “inline”. For 3D figures you also need tikz3dplot. PGF is the backend, while TikZ is what the user interacts with directly. The manual contains all

the information you should need, but is 726 pages long at the last count, so it may not to be too easy to
find what you want!
I do not have much experience with using these packages so far, so this section will certainly not cover
all possibilities. There may also be better ways of doing things than I illustrate here. The examples I
give come from Andrii Verbytskyi or are adapted from questions and answers found on http://tex.
stackexchange.com/. The examples included in this guide and a few more are collected in the tikz
subdirectory. Note that some of the examples only work with TEX Live 2011 and later. This is indicated
in the file. I also did not manage to compile the guide without errors when including tikz with TEX Live
2009, so some of the figures may be missing if you compile your own version of the guide with TEX
Live 2009.
TikZ is not included by default in a new skeleton thesis. See the commented out packages in a new
thesis skeleton or thesis_guide.tex for the packages and TikZ libraries that you should include if
you want to use it.
You often want to include a figure of your experiment’s coordinate system in your thesis. One way to
do this is illustrated in Fig. 5.6.
It is also possible to make flow charts with TikZ. This is illustrated in Fig. 5.7.
There are many more possibilities, including plots which you would otherwise make with root or

28

12th July 2013 10:14

5.5 Feynman graphs
y

p
θ
e

φ

z

x
Figure 5.6: The ZEUS coordinate system.

some other graphics program. An example plot showing the effect of systematic variations can be found
in App. G. Making Feynman graphs with TikZ is covered in Section 5.5.2.

5.4.1 standalone package and class
The standalone package provides a great way of developing figures in small files and then inputting
these files directly, without making any changes, into your thesis!
It is in fact both a package and a document class. It is available from TEX Live 2012 onward. It
allows you to have a standalone document for a tikz or feynmf figure and also input this file into another
document. If you run PDFLATEX on the file it also automatically crops the resulting picture. This is one
of those packages where you think “Why didn’t someone create this years ago?”. The TikZ figures that
I include in this guide (see subdirectory tikz) make use of this package. If you want to use it, make
sure that you also include this package in your thesis.

5.5 Feynman graphs
You have lots of Feynman graphs you want to include, but how do you generate them? This is another
area where most people (including me) have found one way to do it and never change! I use Mn_Fit,
mainly because I wrote it and therefore know inside out how it works. Examples can be found on my
web page: http://pi.physik.uni-bonn.de/~brock/feynman.
Alternatives include axodraw and the feynmf or feynmp packages. It is also possible to use tikz.
The use of feynmf and feynmp is described in Section 5.5.1, while a few examples of usage of tikz are
given in Section 5.5.2. Examples of Feynman graphs made with feynmf and feynmp can be found in the
feynmf directrory, while those made with tikz can be found in the tikz subdirectory.
Instructions on how to use axodraw may come at a later date – contributions would be welcome!
Several people have claimed that jaxodraw is the way to go. This is a Java package which you can
download from http://jaxodraw.sourceforge.net/. It has a Graphical User Interface (GUI) to
axodraw and so is simple and straightforward to use.
This paragraph illustrates how to reference different parts of a figure that uses subfig. The NC and
CC graphs shown in Fig. 5.5, or more accurately in Fig. 5.5a and Fig. 5.5b were made with feynmp.

12th July 2013 10:14

29

5 Figures

Event
generator

Collision

MOZART

Detector

ZGANA

Trigger

MOZART control cards
MOZART GAFs

ZGANA control cards
ZGANA GAFs

ZEPHYR control cards
ZEPHYR GAFs

ORANGE control cards
ORANGE GAFs

ZEPHYR

Event
rejection

ORANGE
and
PHANTOM

NTuples

Analysis

Figure 5.7: Event reconstruction and simulation in ZEUS.

30

12th July 2013 10:14

5.5 Feynman graphs
Another way of saying the same thing is that typical Feynman graphs for ep scattering are shown in
Fig. 5.5, where (a) shows a neutral current and (b) show a charged current process.

5.5.1 FeynMF and FeynMP
In order to use feynmf or feynmp, you have to put the commands to draw the graph in a LATEX file and
then process this file with LATEX and either Metafont or Metapost.2 You can either make a separate LATEX
file containing the Feynman graph or include the commands inside your normal LATEXfile. Metapost is
a bit easier to use than Metafont. You should be able to just run mpost after (pdf)latex and then run
pdflatex again twice. Note that you have to run mpost on all the files whose names are defined at the
beginning of the fmffile environment. While Metapost works will with TEX Live 2011, I did not get
it to work properly with TEX Live 2009 for unknown reasons.
Metafont is a bit trickier. On Unix systems the feynmf perl script exists that runs both LATEX and
Metafont for you. This will produce a dvi file that you then then look at or use to make a Postscript/PDF
file.
I think a better way to proceed is the following:
• make a separate LATEX file for each of the Feynman graphs;
• input this file in your figure;
• use the Makefile described below to automatically run over one or all feynmp/feynmf LATEX files
by giving the command make feynmp or make feynmf. Check ./feynmf/feynmf_all.dvi
or ./feynmf/feynmf_all.pdf to see if the graphs are OK;
• run LATEX or PDFLATEX;
• run BibTEX or biber;
• run LATEX or PDFLATEX again, at least twice.
The last three steps are done with the command make thesis or make thesis09. The big advantage
of this procedure is that the graphs are included “properly” in the thesis, their fonts should automatically
match the fonts used in the thesis and you don’t have to worry about converting and clipping. I have
written a small script that is executed by the Makefile to do the third step. The script is run_mf for
feynmf and run_mp for feynmp. These are included in the directory with this file. The scripts assume
that all Feynman graphs are in the feynmf subdirectory. This can clearly be adjusted in the Makefile
as necessary.
The run_mf script assumes that all files of type tex (except those that start with feynmf_) are
Feynman graphs to process with feynmf. Note that it may be necessary to give the command make
cleanfeynmf to get rid of temporary files before make feynmf if you change the sizes of things.
The run_mp script works a bit differently. It creates a temporary directory mpost_tmp in which it
processes the figures (tex files) in the feynmf subdirectory. The resulting PDF files are copied back to
the feynmf subdirectory.
You can also use the package standalone together with feynmp. The files in the feynmf directory
contain commented out code that shows how this can be done. I do not do this by default for the guide,
as the package is very new and I also want to test making the Feynman graphs with feynmf. Note that
2

ubonn-thesis.sty now includes feynmp by default for TEX Live 2011 and later. If you want to use feynmf instead just
change the name.

12th July 2013 10:14

31

5 Figures
the name in the fmffile environment (and the \write18 command) should be the same and different
from the name of the LATEX file. If you use this option, you should probably also adjust the Makefile
target for feynmp to work in the same way as the target tikz. You have to run pdflatex twice on each
file.
Figure 5.8 shows the same neutral current and charged current graphs, but this time inputting the
appropriate feynmf commands directly. The graphs are enclosed in \fbox for illustration purposes only.
νe (k0 )

e0 (k0 )
e(k)

e(k)
γ, Z(q)

W ± (q)

p(P)

p(P)
X

X

Figure 5.8: NC and CC graphs for ep scattering using feynmf code directly.

If you are using feynmp, another way to do things is illustrated in Fig. 5.8. Here an appropriate
\write18 statement is included in the LATEX source code, e.g. \write18 mpost gluon, after the
figure, where the figure starts with \begin{fmffile}{gluon}.
With the TEX Live 2011 and later setups I use to test this guide, this is all you need. If mpost does not
run automatically, you must execute the command pdflatex shell-escape mythesis when you
compile your thesis. This can be achieved by including the EXTRACMD definition that is commented out
in the Makefile. In this guide I put the Feynman graph in its own file and the \write18 statement in
the main file so that I can test feynmf and feynmp with the same LATEX code. In your thesis, you should
probably put the \write18 statement in the file with the Feynman graph.
As mentioned above, you probably want to first draw the graphs outside of your thesis to get them
into the form that you need. If you give the command make feynmf, it will run feynmf on all tex
files in the subdirectory feynmf. If you give the command make feynmf file=ep_nc it will run over
./feynmf/ep_nc.tex etc. As indicated above, the graphs can then be looked at in feynmf_all.dvi
or
feynmf_all.pdf. You can use the same syntax for make feynmp and make tikz.

5.5.2 Feynman graphs with Tik Z
In order to draw Feynman graphs with TikZ, you need to include some extra TikZ packages and libraries.
In addition it makes sense to define things like gluons, photons and incoming and outgoing particles
once, as these are objects that are often needed.
Given the multitude of possibilities that exist to draw things with TikZ, it is not surprising that there
are several ways of achieving the same end. It is also debatable whether feymp or tikz is better. If you
use TikZ for drawing other things, then it is probably easier to use it also for Feynman graphs. However,
if you want things like gluons on an arc, this may well only be available, if at all, with very recent
versions of tikz.

32

12th July 2013 10:14

5.6 Placement
As a start we can directly compare a scattering graph made with feynmp and tikz. This is shown in
Fig. 5.9. As you can see the quality of the graphs is very similar. Further tweaking can probably make
them almost identical.

e−

e−

e−

e−

γ

γ
e−
e−

(a) Feynmp

e−

e−
(b) TikZ

Figure 5.9: Feynman graphs drawn with feynmp and tikz.

5.6 Placement
Even after many years of including figures into LATEX files, I still think there is a fair amount of black
magic involved in getting them into the place that you want them to be.
In general, you are advised to give LATEX as much freedom as possible in the placing, so it is usual
to use the options [htbp] for the placement. In particular, be very careful with using just [h] or [H]
as the placement option. It very easily leads to LATEX putting single lines of text either above or below
a figure. You can also add an ! at the end of the list of options, which suspends spacing and number
restrictions.
I used to think it was better to attach the figure to a paragraph:
The distribution is shown in Fig.~\ref{fig:funny1}.
%
\begin{figure}[htbp]
\centering
\includegraphics[width=\figwidth]{file}
\caption{An odd plot that I don’t understand.}
\label{fig:funny1}
\end{figure}
%
The distribution shows something that I do not understand.
Given that this is not understood we went to the pub for a beer to
think about it a bit more.
More recently it appears to me to be better to separate the figure from the paragraph:
The distribution is shown in Fig.~\ref{fig:funny2}.
The distribution shows something that I do not understand.

12th July 2013 10:14

33

5 Figures
\begin{figure}[htbp]
\centering
\includegraphics[width=\figwidth]{file}
\caption{An odd plot that I don’t understand.}
\label{fig:funny2}
\end{figure}
Given that this is not understood we went to the pub for a beer to
think about it a bit more.

34

12th July 2013 10:14

CHAPTER

6

Tables

LATEX file: ./guide_tables.tex
You almost certainly have tables with results that you want to include in your thesis. You probably even
know about the tabular environment, but what about fine-tuning to get the tables exactly in the form
that you want? How do you line up the decimal points in a list of cross-sections and/or ± for the errors?
How can you handle a table that goes over more than one page and what if it is so wide that you would
like to rotate it by 90°?
Also, how can you make your tables look more professional with for example thick and thin lines
in appropriate places? This is easy to solve – use \toprule, \midrule and \bottomrule commands
from the booktabs package. These commands also produce much better spacing between these lines
and the rows above and below. The booktabs package gives you some advice on how good tables should
look, as well as some guidelines on how to make your tables look better.
The \rule command is very useful for adding more space between rows. Kopka has several examples
of its usage. You can also use \arraystretch, e.g. \renewcommand{\arraystretch}{1.5} to
increase the spacing by 50 %. This command is often useful if table cells contain subscripts and/or
superscripts. \toprule etc. mean that it is usually not needed in headers.
If you want columns of expandable width you can use the tabularx package. The environment
tabular* has instead expandable intercolumn spacing.
Tables usually go inside the table environment so their position can “float”. In this chapter I use
some tables inside table and some inline.
Trying to include footnotes in tables can be tricky. See Section 8.2 for some guidance on how this
can be done.

6.1 Use of \phantom
Although extra packages can help, a very useful command is \phantom. This inserts white space
corresponding to the width of the argument. Compare the results in the following table with two numbers
0.76 and 83.1:

12th July 2013 10:14

35

6 Tables

Centred
Phantom
0.76
0.76
83.1
83.1

Right justified
Phantom
0.76
0.76
83.1
83.1

Centred
Phantom
0.76
83.1

0.76
83.1

Right justified
Phantom
0.76
83.1

0.76
83.1

The difference between the two tables is that the one on the right has the length \extrarowheight set
to 0.5ex. The first two columns are centred, the last two are right justified. This is clearly a bit clumsy,
but it does work!

6.2 Using siunitx and the S column option
The siunitx package contains some nice tools that make the correct alignment of numbers simpler. The
syntax of some of the options changed between version 1 (2009) and version 2 (2011). I discuss the
version 2 options in the main text and give the equivalent version 1 options as a footnote. If you look
at the LATEX code, the TEX Live 2009 version is inside \ifthenelse{\texlive = 2009}, while the TEX
Live 2011 version is in the second block.
A first simple example is shown in Table 6.1. In fact I show the table twice, once with the language
set to default and once with it set to German. The tabular contents are identical, the second tabular
is inside a \foreignlanguage. Note the use of table-format1 to centre the temperatures as the
heading is wider than the numbers.
Flüssigkeit

Temp.
[◦C]

Blut
Glyzerin

Motoröl (SAE 10)
Wasser

Luft

37
0
20
60
30
0
20
60
20

Viskosität η
(m Pa s)
4.0
10 000
1410
81
200
1.8
1.00
0.65
0.018

Flüssigkeit
Blut
Glyzerin

Motoröl (SAE 10)
Wasser

Luft

Temp.
[◦C]
37
0
20
60
30
0
20
60
20

Viskosität η
(m Pa s)
4,0
10 000
1410
81
200
1,8
1,00
0,65
0,018

Table 6.1: A table of viscosities in the default language and German.

Table 6.2 shows a more complicated table set using the tools. You can either enclose all numbers in
\num or use the S column descriptor. If you use S, note that it usually centres the contents of the column.
You can use the table-number-alignment2 option to change this. S and \num cannot generally be
mixed in a single column though. If you want to use \num in an S column you have to enclose it in
braces. You also need to do this with regular text, such as column headings – see Table 6.1.
With \num you can also specify the precision with which each number is shown separately. With S
you specify the format for the whole column. With siunitx version 1 this is done using the dp option
gives the number of decimal places for the rounding. With siunitx version 2 you should also make sure
1
2

tabformat in TEX Live 2009
tabnumalign in TEX Live 2009

36

12th July 2013 10:14

6.2 Using siunitx and the S column option
ηjet

dσb /dηb
[pb]

dσNLO
/dpbT
b
[pb GeV−1 ]

Chad
b

−1.60 : −1.10
−1.10 : −0.80
−0.80 : −0.50
−0.50 : −0.20
−0.20 : 0.10
0.10 : 0.50
0.50 : 1.40

57.4 ± 9.4 +13
−3
121 ± 21 +16
−16
214 ± 22 +22
−12
233 ± 21 +28
−21
264 ± 22 +28
−23
316 ± 21 +23
−17
288 ± 15 +20
−30

72 +22
−13
182 +50
−30
255 +69
−42
307 +83
−50
342 +91
−55
346 +96
−57
265 +82
−48

0.70
0.78
0.79
0.79
0.81
0.85
0.93

Table 6.2: A selection of cross-section measurements!

that you specify the rounding mode in the preamble of the table (usually figures or places – you can
also choose off).
If you know that you are going to make such a table, it is very easy to use either of these options
to write it out in this format using a program. Using \num solves the very common problem of your
program writing out the results with too many significant digits and you have to correct them all by hand
later (as well as every time they get updated)! A slightly different approach that one could follow is to
use S for simple numbers in tables and \num for more complicated number typesetting. For asymmetric
errors you could consider defining something similar to \numpmerr, which internally uses \num.
A common and closely related problem that occurs is that your analysis spits out a result such as
24.36789+0.36423
. You copy and paste this into a table and then a referee (or your supervisor) complains
−0.45236
that you clearly don’t understand statistics, as you should never quote an error to 5 significant digits.
You can go ahead and edit all the numbers by hand, but what do you do if you rerun your analysis and
all the numbers change. Reformatting by hand is then an error prone and lengthy process. As discussed
above, you can either use options such as round-precision3 in the S command or use the macro \num
and dp/round-precision to do the rounding for you.
Table 6.3 shows and compares two different approaches on how this can be done, even for asymmetric
errors. While the form may appear to be a bit clumsy at first, it is easy enough to get your program to
write out the lines. In siunitx version 1 you should use option dp for the rounding. In version 2 you
should use the options round-mode and round-precision. In the first line of the left-hand part of the
table I show what to do if you need to change the precision of a single number. As you can see this
is rather trivial. However, then the alignment on the decimal point is no longer perfect. While this is
probably OK for internal notes etc., theses or papers (should) have tougher requirements. Another way
of achieving the same thing and avoiding the use of round-mode and round-precision4 is shown in
the right half. Note the use of options for the S command and the use of \num enclosed in braces to
format the row that requires a different precision.
It takes a while to learn what the different options mean and their consequences. I hope that these
examples cover most problems and at least give ideas as to what is possible. In particular the solution
on the right-hand side of Table 6.3 is very nice, as all numbers except the one that requires an extra digit
are written without any special formatting!
Another example using siunitx tools that contains a similar problem is:
3
4

dp in TEX Live 2009
dp in TEX Live 2009. The round-mode should be set in the preamble of the table and not for every number.

12th July 2013 10:14

37

6 Tables
ηjet

dσb /dηb
[pb]

ηjet

dσb /dηb
[pb]

−1.60 : −1.10
−1.10 : −0.80
−0.80 : −0.50
−0.50 : −0.20
−0.20 : +0.10
+0.10 : +0.50
+0.50 : +1.40

0.574 ± 0.094 +0.035
−0.031
1.21 ± 0.21 +0.16
−0.16
2.14 ± 0.22 +0.22
−0.12
2.33 ± 0.21 +0.28
−0.21
2.64 ± 0.22 +0.28
−0.23
3.16 ± 0.21 +0.23
−0.17
2.88 ± 0.15 +0.20
−0.30

−1.60 : −1.10
−1.10 : −0.80
−0.80 : −0.50
−0.50 : −0.20
−0.20 : +0.10
+0.10 : +0.50
+0.50 : +1.40

0.574 ± 0.094 +0.035
−0.031
1.21 ± 0.21 +0.16
−0.16
2.14 ± 0.22 +0.22
−0.12
2.33 ± 0.21 +0.28
−0.21
2.64 ± 0.22 +0.28
−0.23
3.16 ± 0.21 +0.23
−0.17
+0.20
2.88 ± 0.15 −0.30

Table 6.3: Another selection of cross-section measurements! Note the use of \sisetup to keep the plus signs on
the positive errors.

English
Value ±Error

German1
Wert

German2
Messung

0.76 ± 0.14
83.1 ± 7.6

0,89 ± 0,16
94,2 ± 8,3

0,89 ± 0,16
94,2 ± 8,3

As you can see, the “English” column formats things nicely using the S column descriptor. The
“German1” column successfully converts the decimal point to a comma and also the parentheses with
the error to ±. However, the alignment of the numbers is now messed up. The “German2” column looks
better. I had to do some dirty tricks with the formatting of the intercolumn separator @{\,\pm\!\!}
to get the spacing nice! This confirms my statement above that the S format is most useful for aligning
simple numbers easily, while \num is very nice for rounding to a given precision – note that you can use
either the dp or sf options to achieve what you want.

6.3 Using dcolumn
An alternative is the dcolumn package. You can also use this package to convert numbers written with
“.” as the decimal point into German-style numbers with “,”.5 You can line up measurements and errors
by putting each of them in its own column. If your errors are symmetric you can put ± as the intercolumn
separator:
English
0.76
83.1

0.76
83.1

German
0,76
83,1

0,76
83,1

Val ± Err
0.76
83.1

± 0.14
± 4.2

Val

Err

0.76 ± 0.04
83.1 ± 4.2

Table 6.4 shows quite a complicated table set in 2 different ways. It is rotated by 90° to illustrate how
that can be done.
The 2nd version (right) is certainly simpler to typeset and does not really use any tricks to line things
up. Note the use of array rather than tabular which means that the contents are typeset in math mode
rather than text mode. For tables of numbers this is often preferred. You just have to enclose the array
5

See Section 8.3 for hints on how to get around problems with the ziffer package

38

12th July 2013 10:14

12th July 2013 10:14

11
16
21
27
35

−1.6 :
−1.1 :
−0.8 :
−0.5 :
−0.2 :
0.1 :
0.5 :

−1.1
−0.8
−0.5
−0.2
0.1
0.5
1.4

ηjet

6:
11 :
16 :
21 :
27 :

jet

pT
(GeV)

dσNLO
/dpbT
b
(pb)
72+22
−13
182+50
−30
255+69
−42
307+83
−50
342+91
−55
346+96
−57
265+82
−48

57 ± 22+13
− 3
121 ± 21+16
−16
214 ± 22+22
−12
233 ± 21+28
−21
264 ± 22+28
−23
316 ± 21+23
−17
288 ± 15+20
−30

109 +31
−19
29.1 +− 7.9
4.7
7.1 +− 2.0
1.2
1.87+− 0.54
0.34
0.46+− 0.13
0.08

95.6 ± 4.9 +9.8
−7.0
24.8 ± 1.2 +1.8
−1.4
6.02 ± 0.49+0.6
−0.6
0.93 ± 0.22+0.31
−0.20
0.30 ± 0.12+0.14
−0.12
dσb /dηb
(pb)

dσNLO
/dpbT
b
(pb/GeV)

dσb /dpbT
(pb/GeV)

0.70
0.78
0.79
0.79
0.81
0.86
0.93

Chad
b

0.83
0.89
0.92
0.95
1.05

Chad
b

−1.6 : −1.1
−1.1 : −0.8
−0.8 : −0.5
−0.5 : −0.2
−0.2 : +0.1
+0.1 : +0.5
+0.5 : +1.4

ηjet

6 : 11
11 : 16
16 : 21
21 : 27
27 : 35

jet

pT
[GeV]

57
121
214
233
264
316
288

dσNLO
/dpbT
b
[pb GeV−1 ]

±22
±21
±22
±21
±22
±21
±15

+13
−3
+16
−16
+22
−12
+28
−21
+28
−23
+23
−17
+20
−30

72
182
255
307
342
346
265

+22
−13
+50
−30
+69
−42
+83
−50
+91
−55
+96
−57
+82
−48

dσNLO
/dpbT
b
[pb]

4.9 +9.8
109 +31
−19
−7.0
+7.9
1.2 +1.8
29.1
−1.4
−4.7
+0.6
0.49 −0.6
7.1 +2.0
−1.2
0.22 +0.31
1.87 +0.54
−0.20
−0.34
+0.13
0.12 +0.14
0.46
−0.12
−0.08

dσb /dηb
[pb]

95.6 ±
24.8 ±
6.02 ±
0.93 ±
0.30 ±

dσb /dpbT
[pb GeV−1 ]

0.70
0.78
0.79
0.79
0.81
0.86
0.93

Chad
b

0.83
0.89
0.92
0.95
1.05

Chad
b

6.3 Using dcolumn

Table 6.4: Cross-section measurements!

39

6 Tables
in \(...\) or \begin{math}...\end{math}. Close inspection of the right-hand table shows that it is,
however, not perfect. It is questionable whether one wants to to write +0.5 or just 0.5. The fact that both
pT as well as η cross-sections are in a single tabular, but the numerical values are so different makes
it difficult to line things up perfectly. An alternative, which uses the headers to fix the width of the
columns is given in Table 6.5. Note that this uses sidewaystable rather than sideways inside table,
which also rotates the caption.
This version of the table also adds a few extra bells and whistles. It uses a \rule of zero width
to give a bit more space above and below the cross-sections. p{...} switches to paragraph mode,
so \centering is needed to get centred headers. It adds a bit more space between the rows using
\arraystretch. You have to play around a bit with the column widths. If you set one of them too
small it gets expanded anyway, so the two parts of the table would not line up. Just for fun the bottom
half of the table uses “,” instead of “.” for the decimal point! Admittedly the header is a bit complicated,
but the numbers are nice and easy to write!

40

12th July 2013 10:14

12th July 2013 10:14
−1,1
−0,8
−0,5
−0,2
0,1
0,5
1,4

11
16
21
27
35

±22
±21
±22
±21
±22
±21
±15

+13
−3
+16
−16
+22
−12
+28
−21
+28
−23
+23
−17
+20
−30

72
182
255
307
342
346
265

+22
−13
+50
−30
+69
−42
+83
−50
+91
−55
+96
−57
+82
−48

[pb]

[pb]
57
121
214
233
264
316
288

dσNLO
/dpbT
b

109 +31
−19
29.1 +7.9
−4.7
7.1 +2.0
−1.2
1.87 +0.54
−0.34
0.46 +0.13
−0.08

dσb /dηb

+9.8
95.6 ±4.9 −7.0
+1.8
24.8 ±1.2 −1.4
+0.6
6.02 ±0.49 −0.6
+0.31
0.93 ±0.22 −0.20
+0.14
0.30 ±0.12 −0.12

0,70
0,78
0,79
0,79
0,81
0,86
0,93

Chad
b

0.83
0.89
0.92
0.95
1.05

Chad
b

Table 6.5: Cross-sections using sidewaystable, which also rotates the caption. Just for fun the numbers indicating the η range of the bins in the lower half
have been converted to German format! Note also the dirty trick used to get the Chad
b values nicely in the centre of the column.

−1,6 :
−1,1 :
−0,8 :
−0,5 :
−0,2 :
0,1 :
0,5 :

ηjet

:
:
:
:
:

[pb GeV−1 ]

[pb GeV−1 ]

[GeV]
6
11
16
21
27

dσNLO
/dpbT
b

dσb /dpbT

jet

pT

6.3 Using dcolumn

41

CHAPTER

7

References

LATEX file: ./guide_refs.tex
Every thesis should also include a list of references, called the bibliography in LATEX terminology. You
“cite” a reference using the \cite command. For example, the book of Kopka [KD04] is my favourite
LATEX book. In general you should include a non-breaking space, i.e. “~” between the text and the \cite
command. In British (UK) English the reference should come before the punctuation; in American
English it comes after it.1
That is the easy part! Where do you get the references from and how do you format them? Sources
of references are discussed in Section 7.5. There are two options for the formatting. Either you do it
by hand, formatting \bibitem entries yourself or you use BibTEX. While BibTEX may appear to be the
more complicated option at the beginning, I strongly recommend that you use it.
In addition, you have to make sure that authors’ names are printed consistently, you include the appropriate collaboration name, the title is formatted correctly and journals are given consistent abbreviations.
Such topics are discussed in Section 7.3.
What about citing a series of articles? Can you include them in one reference or do you want to
keep one article per reference? I give some hints on useful options and settings for biblatex below
(Section 7.4.1). If you use BibTEX, then you probably have to use the mcite package – see Section 7.7.
Just to take a silly example. The ZEUS collaboration publications in 2010 [Z+10b; Abr+10b; Abr+10a]
were not as numerous as in previous years. If you use the standard \cite command and the unsrt
option or its equivalent, you get a list of numbers. In the past one could use the mcite package to make
the references nicer, put them all in one, write the list as [m–n] etc.

7.1 Formatting by hand
Don’t! The number of references that you will need will probably grow fast. It is quite likely that
at some point you will decide that they are not really formatted as you would like them to be. You
will almost certainly add references when you correct your thesis. How do you make sure they are
in the order you want? How do you make sure that only articles that you actually refer to are in the
bibliography?
1

After some research, it appears to me that the footnote number should come after the punctuation, unless the footnote only
refers to the last word of the phrase or sentence.

12th July 2013 10:14

43

7 References
Suppose you want to use some of the references in your thesis in conference proceedings or a paper
in a journal. Every place where you publish will have it’s own preferred format for the references that
almost certainly will not be the one you chose for your thesis.
If you insist on following this route, consult a book on LATEX!

7.2 Using BibTEX and biblatex
I won’t pretend that BibTEX is the most user-friendly way of handling references and there are several
things that you have to pay attention to when you use it for your references.
The two big advantages of BibTEX are: only references that you actually refer to appear in the bibliography; you can change the format (consistently) of all articles in the bibliography simply by changing
the style!
The first step is to put your references in one or more .bib files. For this document they can be found
in:
• ../guide/guide_refs.bib;
• ../refs/standard_refs-bibtex.bib or ../refs/standard_refs-biber.bib;
• ../refs/example_refs-latin1.bib or ../refs/example_refs-utf8.bib;
• ../guide/refs/zeus_2009.bib and ../guide/refs/zeus_2010.bib.
For each article you specify things like its title, author, journal etc.
You then include these files into your LATEX document where you want the bibliography to appear and
specify which style should be used.
At this point you also have to decide which interface to the contents of the .bib files you want to use.
You have a choice of the original BibTEX or the more modern biblatex. If you use biblatex you need
something like:
%
% Use biblatex for the bibliography
%
% \usepackage[backend=bibtex8,hyperref=true,bibencoding=latin1,
%
style=numeric-comp,sorting=none,block=ragged,firstinits=true]{biblatex}
\usepackage[backend=biber,
style=numeric-comp,sorting=none,block=ragged,firstinits=true]{biblatex}
%
% Adjustments to output are in this style file:
% \usepackage{../biblatex/biblatex-num-v2009}
\usepackage{../biblatex/biblatex-num-v2011}
% \bibliography{../mythesis/thesis_refs.bib,%
%
../refs/standard_refs-bibtex.bib}
\addbibresource{../mythesis/thesis_refs.bib}
\addbibresource{../refs/standard_refs-biber.bib}
in the document preamble and \printbibliography where they should be printed. The commented
out lines are for TEX Live 2009 with the bibtex8 backend.
If you use BibTEX you need something like:

44

12th July 2013 10:14

7.3 BibTEX entries
%
% Use BibTeX for the bibliography
%
\bibliographystyle{unsrt}
\bibliography{../mythesis/thesis_refs,%
../refs/standard_refs-bibtex}
at the point where the references should be printed. Note that LATEX is sometimes picky about lists of
directories that have spaces between them, so it is safer to include all files on one line.
Which should you use? BibTEX has been around for a long time and is therefore better known.
However, it has many problems when it comes to sorting, handling more modern sources of information
(e.g. the web), etc. biblatex is still developing rather quickly and so some options and ways of doing
things may change. It supports things like online references and enables you to click on references
using the preprint number or DOI to look at a reference. It is also easier though to change the way your
references look. I therefore strongly recommend that you use biblatex.
Another serious problem with BibTEX is that it cannot handle umlauts etc. properly. While I have said
elsewhere in this document that you should use UTF-8 or latin1 encoding so that you can enter ä etc.
directly, this does not work with BibTEX. You can use the old syntax \"{a}. This problem is completely
solved if you use biblatex and the biber backend.
If you use biblatex and the bibtex8 backend (default setting for TEX Live 2009), then you have to encode your .bib files with latin1 and use the line: \usepackage[bibencoding=latin1]{biblatex}.2
For this reason, as indicated above the thesis package includes two versions of the file with some standard references and also of the files with some example references:
• ./ref/examples_refs-latin1.bib with latin1 encoding
• ./ref/examples_refs-utf8.bib with UTF-8 encoding.
If you try to compile the guide with the wrong file using BibTEX, you will get some errors as I have
included some umlauts in the example references.
That’s it? Well almost! First, you will have to make sure that the entry type that you use corresponds
to the type of document that you are citing. Second, you will probably get some or all of your references
from standard sources such as Spires3 , Inspire or CDS you will have to change the entries a bit so that
they get formatted the way you want.

7.3 BibTEX entries
In this section I discuss how to format your BibTEX databases, i.e. the .bib files. In the following
section I talk about how you make your references look the way you want them to be in your thesis.

7.3.1 Entry types
One question is what entry type you should use for what? I give here recommendations on what to use
for biblatex. Some of the entry types that biblatex has are not part of BibTEX.
@article This is easy – use it for articles published in journals, e.g. [Z+10b].
2
3

If you do not include umlauts directly in the references you do not need this option.
I will refer to both as Inspire in this chapter

12th July 2013 10:14

45

7 References
@book Just as easy – use it for books, e.g. [KD04].
@proceedings, @inproceedings The name says it all. Use @inproceedings for a paper in the

proceedings and @proceedings for the whole volume.
@collection Use it for things such as the ATLAS Technical Design Report [Brü+04b] where the names

that you find are the editors. Use @incollection for a single article in a collection.
@report Use it for conference and internal notes. This is probably also the best type to use for pre-

prints. You can also use @online. However, then the title is usually printed in italics rather than
upright text inside quotes.
@online Use it for things that are only available online, e.g. [Oet+].
@thesis The name says it all. @phdthesis and @mastersthesis also exist. If you are using biblatex you can and should specify the thesis type, e.g. type = {PhD}, see for example a PhD

thesis [Lod12].
biblatex also knows about multivolume proceedings etc. See the manual for more details.

Note that Inspire will always give you a BibTEX entry of type @article, so you should adjust it by
hand according to what the document you refer to really is. CDS tries a bit harder, but you probably still
have to set the entry type by hand.
As indicated above, biblatex knows about preprint archives, online references with a url etc. and can
format the references so that you can click on a DOI or arXiv number. Details of how these are handled
are well documented in the manual. In order to make use of these abilities you have to modify the Inspire
format of the references a bit so that it is fully compatible with what biblatex expects for preprints etc.
More details on this are given below.
What else do you have to be careful about? The first thing to know is that biblatex and BibTEX will
try to format your author names and titles. Thus, if you want the title to remain in exactly the form you
have typed it in include it in “"{Title}"”, i.e. both double quotes and braces. If not, collaborations and
accelerators tend to be converted to lowercase, e.g. “lhc” instead of “LHC”. If you use an author such
as “ATLAS Collaboration” it gets printed as “A. Collaboration”.

7.3.2 Entries from Inspire and CDS
Things like the LHC Design Report are by default called @article in Inspire [Bru+04] or @book in
CDS [Brü+04a]. They are in fact best declared as @collection with the author field replaced by
editor and a field indicating the institution instead of publisher [Brü+04c]. You can also add
the CDS link as a url field.
Conference notes, e.g. from ATLAS, are defined as @techreport by CDS [11]. It is better to just call
them @report. You should add an author, usually just author = "{ATLAS Collaboration}", [ATL11].
You may also have to change the month format to avoid error messages. For internal notes, also call
them report and add type = internal report to the entry. Again you could add the CDS link as a
url field. For preprints, I also think it is best to use the @report entry type.
Books need to be changed from @article to @book and it is better to give the ISBN in the isbn
field [HM84b] rather than the reportNumber field as given in Inspire [HM84a].
Theses should used the @thesis entry type and then add a type field. Alternatively you can use
@mastersthesis or @phdthesis.

46

12th July 2013 10:14

7.4 Formatting references
√
In all cases you probably have to edit the titles a bit to get things like s = 7 TeV printed properly.
An open question is whether you should assume the use of a units package in the formatting of the title.
If you want to make your .bib files usable by others, it is probably best to do the formatting by hand.
An example of a typical ATLAS paper as it comes from Inspire [Aad+11] needs a bit of work. With
TEX Live 2011 the link to DOI and arXiv both work well [A+11]. With TEX Live 2009, it worked on my
laptop, but did not work properly on ATLAS machines (Ubuntu 10.04) that had version 0.8e of biblatex.
It may be that one can get it to work with a bit of help, but I have not tried all possible options.

7.3.3 More on names
The best way to format author names so that they appear correctly whatever BibTEX style you use is
Surname, Name. Any other syntax is likely to get mangled.
What about collaboration names? If you use Inspire as the source of your BibTEX entries, you will see
that it has a field for the collaboration. This is often, but not always, formatted correctly. However, very
few BibTEX styles pay any attention to this field. The ones from Spires listed below will work properly.
The only other reliable alternative I have found is to use the following syntax:
@Article{Chekanov:2009qja,
author
= "{ZEUS Collab.} and Chekanov, S. and others",
which then usually gets formatted as “ZEUS Collab., S. Chekanov et al.,”. I went through and changed
the references in zeus_2009.bib accordingly.

7.4 Formatting references
While BibTEX or biblatex format the references for you from the .bib files, you have to tell them what
format you want! For a start, you have to choose between an alphabetic and a numeric scheme for the
references. Most journals use a numeric style. This corresponds to style unsrt or a variant thereof using
standard BibTEX. If you use biblatex you include the package with option numeric-comp or numeric.
numeric-comp produces more compact citations (e.g. [1-4,7,9]) than numeric (e.g. [1,2,3,4,7,9].
For this guide (for a change) I use an alphabetic style: alpha with BibTEX or option alphabetic
with biblatex. In the thesis skeleton I use a more usual unsorted numeric style.

7.4.1 biblatex styles
My experience with biblatex has only recently been acquired and I am still learning, but I have tried out
a few things that I will document here. The first official stable release was 19 Oct 2010. Active and rapid
development is ongoing – there were many updates in 2011. TEX Live 2009 includes either Version 0.8e
(ATLAS cluster Ubuntu 10.04) or 1.4c (Kubuntu 11.10), so some things I recommend below may work a
bit differently depending on which version you have. See Appendix C on how to install a newer version
of TEX Live if you want a more up-do-date version of LATEX.
Looking for numeric styles you can either use the built-in numeric or numeric-comp. The numeric-comp
style is used by default in the thesis skeleton. I made a few adjustments that are included in the
file ./biblatex/biblatex-num-v2009.sty or ./biblatex/biblatex-num-v2011.sty. Again
which file is used by default is steered by the \texlive macro which is set in the main file.
You can fine tune things even more by using hooks that are available. For example, if you do not want
to print the URL field you can include the command:

12th July 2013 10:14

47

7 References
\AtEveryBibitem{\clearfield{url}}
in the preamble or in the relevant style file given in the previous paragraph. It is not clear to me if you
also need \AtEveryCitekey{\clearfield{url}}.
A fairly nice-looking style is ieee. This is only be available in recent releases (2011) of TEX Live.
After playing around a bit with the ieee style, I decided it is too new and has too many settings that
depend on having a new version of biblatex for now.
There are slowly more and more biblatex styles around, but not as many as BibTEX. It is, however,
much easier to change things (usually you can just change an option) with biblatex than it was for
BibTEX, so you can probably start with a standard file and just make adjustments in your preamble. I
have found a number of very useful hints on how to make changes in http://tex.stackexchange.
com/ – just search for biblatex.
If it is available, biber is probably the preferred backend to bibtex8. However, the backend is
mostly relevant for sorting, so it probably does not matter which you use if you use an option that gives
the references in the order that they were cited. biber seems to work well with TEX Live 2011; it is
often not available with earlier versions.
If you want to find out where your references are actually cited, you can include the option backref=true.
If you get an error such as:

biber
thesis_guide
data source /tmp/par-62726f636b/cache-ab06f20732bfab23dfa35f56998ad4edca61bee1//inc/lib/Biber/LaTeX/recode_data.xml not fou
Compilation failed in require at Biber/Utils.pm line 21.

then you should delete the directory /tmp/par-... and try to run again.

7.4.2 BibTEX styles
If you use references directly from Spires or Inspire, then it is probably best to use one of the style
files that is compatible with their format. A list can be found on http://www.slac.stanford.edu/
spires/hep/refs/bibstyles.shtml. I have used utphys a few times and it works OK. I see that
there are also style files available there for common HEP journals, which could save quite a bit of work.
The big advantage of utphys is that it also knows about the arXiv and preprints.
The equivalent of biblatex’s ieee style in BibTEX is ieeetr. It also knows about arXiv and preprints.
However, it does not know about collaborations.

7.5 Sources for references
The ZEUS collaboration kept a reasonably up-to-date list of ZEUS and H1 publications (as well as
some others) in BibTEX format. ATLAS also keeps such a list and I assume that other collaborations
keep similar lists.
Within experimental high energy physics the standard way to get a reference is to use Inspire (http:
//inspirehep.net).4 You can get the appropriate Inspire entry by using the Inspire search engine.
Alternatively if you know the arXiv preprint number you can go from its entry to Inspire directly.
To get the ZEUS references I used above I first tried the following command in Inspire:
find exp zeus and date 2009
4

This has now replaced Spires (http://www.slac.stanford.edu/spires/). One problem with Spires was that it was
very slow and regularly timed out when you perform searches.

48

12th July 2013 10:14

7.6 Common wishes
This does not really give you the references you expect though! It seems much more reliable to use an
author name so I used:
find a chekanov and date 2009
and then selecting BibTEX format, saving the resulting page in a file and removing the 
 and
entries between references. This worked better, even though I got a whole load of ATLAS papers as well. If you then try to use the references, you get complaints that something is not in math mode. You have to go through by hand and change things such as Q^2 to $Q^{2}$. 7.6 Common wishes It is possible that you would like to combine several articles into a single reference. The mcite package was designed to do this, but is not compatible with biblatex and hyperref. biblatex has another solution that it calls sets. In standard_refs-biber.bib and standard_refs-bibtex.bib I have put in the three standard references for the Standard Model [Gla61]. They are combined by using @Set and the relevant keys. If you use a recent version of biber (TEX Live 2011) this is all you have to do. If, however, you are using TEX Live 2009, and therefore the bibtex8 backend, the crossref field must contain the same key as the first one in entryset. One thing you should always do is include all references in a single \cite. e.g. there were quite a few ZEUS publications in 2009 [Z+10a; Z+09; Z+10c] is better than [Z+10a][Z+09][Z+10c]. If you want to get a list of references printed in the form “[m–n]”, then with biblatex you should use the style numeric-comp. In 2009 there were many papers published by the ZEUS collaboration [Z+10a; Z+09; Z+10c] as well as several articles from both the H1 and ZEUS collaborations[H+10a; H+10b]. See Section 7.7 on how to do this with BibTEX. You are nearing the end of your thesis and have to properly format all the references that you have. However, they are spread over several files and these files also contain many references that you do not use or want to correct. How best to proceed? bibtool -x mythesis.aux -o refs.bib will extract the entries that you use and in future you can use and correct refs.bib, which only contains the references that you actually cite.5 7.7 Using mcite As mentioned above, the mcite package used to be a good way of combining several articles into a single references and also getting them to be printed out in the form “[m–n]”, rather than “[l,m,n]” or “[l],[m],[n]”. How do you achieve this? Just put all the articles in a single \cite and prefix those that should be lumped together with a “*”, e.g. \cite{Chekanov:2009wt,*Aaron:2009wg,*Aaron:2009sma}. The problem is that this package does not appear to be compatible with the hyperref package, so you have to choose between the two. Given the ability that the hyperref package offers to jump directly 5 I got this tip from http://tex.stackexchange.com/questions/417/how-to-split-all-bibtex-referencedentries-from-a-big-bibtex-database-to-a-copy. Do not forget to change mythesis.tex to use refs.bib instead of the previous sources. 12th July 2013 10:14 49 7 References to sections, equations, references referred to in a document, I guess most of you will go with hyperref rather than mcite. As mentioned above the biblatex package offers a more modern alternative and different ways of achieving the same results! It is also not compatible with mcite. A modified version mcite is used by ZEUS in its LaTeX4ZEUS environment, which is why I include a short description here. 50 12th July 2013 10:14 CHAPTER 8 Layout and language LATEX file: ./guide_layout.tex If you are not happy with the layout, fonts, etc. that are used in this guide or the thesis skeleton, this chapter includes some examples on how you can change things. 8.1 Page layout Page geometry can be changed using either the typearea or the geometry package. In this guide I use typearea as it is closely tied into KOMA - Script. The basic command is to specify how many pieces to divide the page into. This guide uses DIV=14 by default with a binding correction of BCOR=8mm. You can then let KOMA - Script and typearea sort out the rest. Note that typearea will issue a warning that you have “Bad type area settings” when using DIV=14. If you want to avoid this warning, you can set DIV to 11 or smaller, but then the amount of text on each page is reduced by quite a bit and your thesis will cover more pages. The alternative is to use geometry, where by default I say that the text should cover about 75% of the page. In practice, I have found geometry easier to use if you want to specify exactly the layout, e.g. making single Feynman graphs with feynmf. typearea is probably to be preferred for documents on normal paper sizes. See the beginning of the KOMA - Script guide for a detailed introduction on how a page should be laid out. The setspace package has a number of useful options to change spacing in a fairly easy way, if such options are not already available in KOMA -Script. 8.2 Footnotes A few tweaks may well be useful in order to get footnotes looking the way you want them rather than using the default KOMA - Script settings. The default setting of KOMA - Script is: \deffootnote[1em]{1.5em}{1em}{\textsuperscript{\thefootnotemark}} In this guide and in ubonn-thesis.sty I have changed this to: 12th July 2013 10:14 51 8 Layout and language \deffootnote{1em}{1em}{\textsuperscript{\thefootnotemark}\ } The differences are: • The optional argument is missing that sets the box width for the footnote mark (which is rightadjusted). In this case the width of the first required argument is used instead, which also defines how much all other lines are indented. Hence all lines in the footnote are now left-aligned, while in the default setting the first line is indented more than the others. • In the last argument an extra space has been added so that the footnote mark is not quite so close to the text. You might think that a nice way to write footnotes is: We want to include a footnote \footnote{ This is the footnote text. } about what the footnote should look like. If you do this you will find some extra space where it should not be. This is illustrated in footnote 1 . To try out footnotes we try first an example which is probably how you would first try to write a footnote: 1 As you can see this is not really satisfactory. You have a spurious space between the colon and the footnote mark 1 . If may even be the case that the footnote mark appears on the next line! To get the spacing correct and still have “nice” LATEX you have to add some judicious % signs: We want to include a footnote% \footnote{% This is the footnote text. } about what the footnote should look like. To show how this works2 have a look at the footnote referred to above. In standard LATEX you can use \footnotemark to set the symbol for a footnote and refer to it. KOMA - Script has a better solution for this. You define a \label inside the footnote and then refer to it via the label and \footref. You can see how to do this in footnote 2 and if you were paying attention you will have seen that I also used it to refer to footnote 1 . Using this mechanism it is even possible to click on the reference if you use PDFLATEX. When a footnote contains a complete sentence, people still often forget to add a full stop at the end of it – try not to! If you try to use footnotes in tables, you will probably have some problems. The ctable package allows you to include footnotes that are part of the table. It also supports booktabs, so it should be possible to keep the same format. If you use longtable rather than table and tabular, you can also include footnotes easily – see Appendix B for an example. Another recent package (TEX Live 2011) is tablefootnote which provides the command \tablefootnote. This is advertised to also work in sideways tables. 1 2 This is an example of a footnote with extra space at the beginning. This is a longer footnote about nothing in particular that goes over more than one line to make sure that we can also have a proper look at the effect of indentation. 52 12th July 2013 10:14 8.3 Thesis in German 8.3 Thesis in German babel is a powerful package for handling different languages. The languages to be used in a document can either be given as options to \documentclass or to babel. I choose to use \documentclass here so that the style file ubonn-thesis.sty is independent of the thesis language. If you give more than one language make sure that the default language comes last. Your thesis is in German rather than English. What do you have to worry about? First, set the languages in the \documentclass to UKenglish,ngerman rather than the other way round. Second, if you want to use a comma rather than a full stop for the decimal point you may notice that numbers are sometimes not written properly. In text mode they are OK, e.g. 91,1234, while in math mode there is a small space after the comma, e.g. 91, 1234. If you use the siunitx package, you can simply specify the locale: \sisetup{locale = DE}. This is already done for you in ubonn-thesis.sty in such a way that if you select ngerman as the language of your document \num{2.3} will be printed as 2,3. I find this by far the best way to handle such things. You can also do such things locally in a single table for example by using constructions such as “S[decimalsymbol=comma]” in the column description of a table to change full stops into commas – see Chapter 6. Another way to avoid this problem by using the ziffer package. It is usually commented out in ubonn-thesis.sty. An alternative is to remove the comments on the TEX code snippet at the top of the file thesis_defs.sty: \mathchardef\CommaOrdinary="013B \mathchardef\CommaPunct ="613B \mathcode‘,="8000 % , im Math-Mode aktiv ("8000) machen {\catcode‘\,=\active \gdef ,{\obeyspaces\futurelet\next\CommaCheck}} \def\CommaCheck{\if\space\next\CommaPunct\else\CommaOrdinary\fi} As far as I have able to tell this above code does just what one wants and so is probably better than trying to use ziffer. I have spent some effort to try to get around the problems that occur if you try to use ziffer and dcolumn together. A way that seems to work is to use the full stop as the decimal point in columns that are formatted using dcolumn and then just change full stop to a comma, i.e. use the form D{.}{,}{2}. The table below illustrates this usage: Teilchen Z-Boson W-Boson Top-Quark Masse [GeV/c2 ] 91,0372 ± 0,0002 83 ± 0,035 173,3 ± 1,1 If you use ziffer and want to keep the decimal symbol, e.g. D{.}{.} or D{,}{,} this does not seem to work. Hence if you try to use ziffer with this guide you will get error messages. The other question is whether to use the traditional TEX way of writing letter with umlauts: \"{u} to get ü, or \"a to get ä, or just to type in the character directly. I strongly recommend typing the characters directly. It makes your LATEX much easier to read and spell-check. You can either switch your keyboard to German (this is simple under Windows, KDE or Gnome (Unity)) or set the compose key and then type the sequence Compose " a to get ä for example. 12th July 2013 10:14 53 8 Layout and language 8.4 Fonts Fonts to use for the various parts of a document can usually be set using the \setkomafont command. I have set a few such fonts in ubonn-thesis.sty. In particular I set the fonts for the title page so that it conforms more closely to the requirements for theses and also have a few more commented out examples there. Which font should I use? http://tug.ctan.org/tex-archive/info/Free_Math_Font_Survey/ en/survey.html has a list of fonts that one can consider using. I have included commented out packages that use some of these in the style file. Good alternatives to txfonts (with the varg option) seem to be either lmodern or pxfonts. See Section 2.4 for some of the things you have to worry about if you use a font for which the text mode and math mode display numbers differently. 8.5 Other languages If you have a few words in the foreign language just use \foreignlanguage, e.g. \foreignlanguage{ngerman}{Das Physikalische Institut der Universität Bonn} to produce Das Physikalische Institut der Universität Bonn. You might ask why bother? Hyphenation, in particular, is not the same in different languages, so telling LATEX which language the text is in certainly helps. To change the language at a certain point in the document use \selectlanguage. To set a block of text (inside an environment) use the otherlanguage environment. I used this in the title pages, as (except for the cover page) they are in German. It certainly does no harm to specify the language of the abstract within \thesisabstract. The csquotes package advertises itself as the way to cope with quoting things in different languages. The basic command to use is \enquote for quoting things in the current default language, while you use \foreignquote to quote things in another language. For example, John said “I have too much to do at the moment”, while Johannes sagte „ich habe im Moment alle Zeit der Welt“. Note that babel uses ngerman for “new” German spelling, while csquotes options calls the same thing german. However, this only affects the setting of options. If you use commands such as \foreignquote you can specify ngerman as the language. Having used csquotes for a year of so now, I find it a really nice way of quoting things properly in the language you are writing your text in without having to worry about using the correct opening and closing quotes, so I warmly recommend it. 8.6 Coloured links In the default version of the thesis, links in the table of contents are coloured blue, citations are coloured dark magenta and URLs are coloured dark green. These settings are in ubonn-thesis.sty. For the printed version you probably do not want these things to be coloured. You can change the hyperref options using the \hypersetup command as indicated in the main file of your thesis. Using these changes, such links will be surrounded by a coloured box when viewed on the screen and not shown when the thesis is printed. 8.7 Chapter headings The standard appearance of the chapter headings is not very exciting! You can make some changes with the KOMA - Script options, but nothing very radical. A number of packages exist that can make larger 54 12th July 2013 10:14 8.7 Chapter headings changes. I tried out fncychap, quotchap and titlesec. A variant of titlesec is used for this guide and by default for the thesis. If you want to get back to the usual style, just comment out the appropriate lines in ubonn-thesis.sty. See the documentation on titlesec on how to make further adjustments. 12th July 2013 10:14 55 APPENDIX A Changes and plans LATEX file: ./guide_appendix.tex In this section I document briefly the major changes to this guide. I also indicate other topics for which I would like to add some more information. Date Comment 10 Jul 2013 Move thesis main file to mythesis subdirectory. Also put Makefile and copy ubonn-thesis.sty into mythesis subdirectory. Split main Makefile into several files, one for thesis, one for the guide an done for pictures and Feynman graphs. Use the standalone package in the tikz figures. Add commented out code to feynmp figures to show how to use standalone for them as well. Move the guide main file to the guide subdirectory so that this works properly. Add a few examples of using the tikz package. Switch to using feynmp rather than feynmf by default (for TEX Live 2011). Add \write18 statements for Feynman graphs with feynmp and adapt Makefile. Add some information on the refcheck package and back-referencing with biblatex. Rename pibonn-thesis to ubonn-thesis. Make thesis submission a separate chapter (so that PhD submission can also be a separate document). Make TEX Live 2011 the default. Make Inspire rather than Spires default. Add instructions on how to use LATEX backport under Ubuntu variants. Updated and hopefully complete and correct instructions on thesis submission. Move to USenglish and UKenglish as languages rather than american and british. Change the style of the chapter heading. Add some more instructions which cover pages are needed when. Add watermark possibility with background package. Added a glossary and a list of acronyms as well as instructions on how to make them. Skeleton CV for PhD thesis added – has still to be cross-checked with the Promotionsbüro. Add some hints on what title pages to use when and what you have to worry about when printing and submitting your thesis. 06 Jul 2013 04 Jul 2013 18 May 2013 23 Apr 2013 31 Mar 2013 28 Mar 2013 14 Mar 2013 24 Jan 2013 14 Dec 2012 04 Dec 2012 12th July 2013 10:14 57 A Changes and plans 02 Dec 2012 22 Oct 2012 12 Oct 2012 24 Aug 2012 19 Jun 2012 18 Jun 2012 05 Jun 2012 24 May 2012 15 May 2012 14 May 2012 06 Mar 2012 23 Jan 2012 20 Jan 2012 11 Jul 2011 17 Jun 2011 23 May 2011 Use American-style quotation marks by default with the csquotes package. This means outer “double quote and inner ‘single quote’”, which seems to be quite common, even in British (UK) English publications such as CERN Courier. Replace color by xcolor so that one can colour boxes around links. Add some more information on installing TEX Live 2011. Add some thesis examples. Add some hints on using Kile. Sorting of references turned off for TEX Live 2011. Some more information on which reference types to use added. Update svn information due to PI changes. Make a separate file for cover so that page numbering starts properly. Add instructions for TEX Live under Windows. Move current version into the trunk subdirectory to conform to usual svn structure. Made the guide more generic so that it can be sent to other institutes. Used \ifthenelse everywhere rather than having separate files for different TEX Live versions. Reorganised switching between TEX Live 2009 and 2011. The version should be set first before loading the style file. Without the option TEX Live 2009 is assumed. Some changes to adapt to stricter siunitx version 2 requirements and new options. Added some comments on ways of writing axis names for coordinates. Added some information on using feynmp rather than feynmf. Only include one title page for Bachelor theses. Add some more sources of information. Reorganise and improve a bit the references chapter. Reorganise information on installing a TEX setup. Move Windows XP to a separate subsection. Add a bit of information for a Mac. Add a bit of information on the subfiles package. Add more information on formatting footnotes. Added more and better examples of using the S column format in tables. Add more information on biblatex and make this the default (unsorted, numeric) for a thesis. Removed dot after chapter and figure/table numbers. Added discussion of siunitx package. Added some extra tables that also use this package. Added booktabs package which include \toprule, \midrule and \bottomrule to get better looking tables. Also switched from \usepackage to \RequirePackage in ubonn-thesis.sty. Changed default font to txfonts. Added more font options and explanation. Here is a list of ideas for more information that could be added to this guide: • Add an example table using ctable and footnotes in a table. • Add drawing of Feynman graphs with axodraw and/or jaxodraw. • Add instructions on content of CV and summary for PhD thesis. • Add information on the import package. 58 12th July 2013 10:14 APPENDIX B Long tables LATEX file: ./guide_appendix.tex Long and complicated tables, such as tables containing the breakdown of the systematic error for each data point are usually put into the appendices. Code or data cards can also be included here. Examples of complicated typesetting have been given already in Chapter 6. In this appendix I give an example of a table (Table B.1) that goes over more than one page using the longtable package. Note that longtable is a combination of tabular and table in one environment. As mentioned in Chapter 4, an alternative is the supertab package. Footnotes do not work properly in a normal tabular, but they do work in longtable. Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 2 Letter Explanation a b c d e f g h i j k l m n o p q r s The lowercase 1st letter in the alphabet1 The lowercase 2nd letter in the alphabet The lowercase 3rd letter in the alphabet The lowercase 4th letter in the alphabet The lowercase 5th letter in the alphabet The lowercase 6th letter in the alphabet The lowercase 7th letter in the alphabet The lowercase 8th letter in the alphabet The lowercase 9th letter in the alphabet The lowercase 10th letter in the alphabet2 The lowercase 11th letter in the alphabet The lowercase 12th letter in the alphabet The lowercase 13th letter in the alphabet The lowercase 14th letter in the alphabet The lowercase 15th letter in the alphabet The lowercase 16th letter in the alphabet The lowercase 17th letter in the alphabet The lowercase 18th letter in the alphabet The lowercase 19th letter in the alphabet “a” deserves a footnote “j” deserves another footnote 12th July 2013 10:14 59 B Long tables Number 20 21 22 23 24 25 26 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Letter Explanation t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z The lowercase 20th letter in the alphabet The lowercase 21st letter in the alphabet The lowercase 22nd letter in the alphabet The lowercase 23rd letter in the alphabet The lowercase 24th letter in the alphabet The lowercase 25th letter in the alphabet The lowercase 26th letter in the alphabet The uppercase 1st letter in the alphabet The uppercase 2nd letter in the alphabet The uppercase 3rd letter in the alphabet The uppercase 4th letter in the alphabet The uppercase 5th letter in the alphabet The uppercase 6th letter in the alphabet The uppercase 7th letter in the alphabet The uppercase 8th letter in the alphabet The uppercase 9th letter in the alphabet The uppercase 10th letter in the alphabet The uppercase 11th letter in the alphabet The uppercase 12th letter in the alphabet The uppercase 13th letter in the alphabet The uppercase 14th letter in the alphabet The uppercase 15th letter in the alphabet The uppercase 16th letter in the alphabet The uppercase 17th letter in the alphabet The uppercase 18th letter in the alphabet The uppercase 19th letter in the alphabet The uppercase 20th letter in the alphabet The uppercase 21st letter in the alphabet The uppercase 22nd letter in the alphabet The uppercase 23rd letter in the alphabet The uppercase 24th letter in the alphabet The uppercase 25th letter in the alphabet The uppercase 26th letter in the alphabet Table B.1: The alphabet. 60 12th July 2013 10:14 APPENDIX C TEX setup and packages LATEX file: ./guide_appendix.tex If you have an older LATEX installation (with a KOMA - Script version less than 3.0) you will probably have to make a few changes to the style file and your main thesis file. In particular the \KOMAoptions does not exist. In this case, you have to put the options into the document class options. Also some of the names have changed. Consult the KOMA - Script manual for more information. Other packages that I recommend and that are subject to rapid development still are biblatex and siunitx. If you want to fully exploit their capabilities, you should make sure you LATEX installation is as recent as possible – I recommend TEX Live 2011 or 2012. As I mentioned in the introduction, the institute is a member of Dante and I therefore receive a copy of the TEX Collection DVD every year. You can also download the installation you need from the TEX Users (TUG) group web page: http://www.tug.org/texcollection. C.1 Integrated environments As already mentioned in Section 2.2, I highly recommend that you use an integrated environment for editing and compiling your thesis. All such tools allow you to define projects, which then know about which files should be included when compiling. Kile is quite popular, especially if you use the KDE desktop environment. TEXstudio and Texmaker can be installed under Windows, MacOSX or Linux. I have tried TEXstudio under Windows and it works nicely. It can be downloaded from http://texstudio.sourceforge.net/. Others report good experience with Texmaker (under Ubuntu). As mentioned above it is available as an Ubuntu package or from http://www.xm1math.net/texmaker. Texmaker and TEXstudio (TEXmakerX) split in 2009, so both packages contain a lot of similarities. You can also make a glossary from within TEXstudio. In order to do this you have to define a user build command. You can find such commands under: Options → Configure TeXstudio → Build. I defined a new command which I called “BuildWithGlossary”. This executes pdflatex, biber, makeindex, makeglossary, pdflatex, pdflatex. I continue to use is emacs and AUCTeX, as I can then use the same editor for everything. Note that the RefTeX mode in emacs also provides powerful tools for finding and inserting cross-references and the names of citations easily. 12th July 2013 10:14 61 C TEX setup and packages C.1.1 Kile Many people use Kile as their environment for editing and compiling LATEX. If you use bibtex for your references then the default setup does not have to be changed. If you want to use the biber backend then you should integrate the command into Kile. To do this you need to do the following: In Kile: Settings → Configure Kile → Tools → Build and then insert a new tool (Biber) on the left-hand side. It is probably best to define the class of the tool as BibTEX. Then on the right-hand side in the General tab the command should be biber and the option %S. In the Advanced tab you should set the Source extension to aux and the Target extension to bbl. I would then recommend adding a new configuration to the QuickBuild called PDFLaTeX+Biber+ViewPDF that executes the commands: PDFLaTeX, Biber, PDFLaTeX, PDFLaTeX, ViewPDF. This is also the series of commands that the Makefile executes. I have not yet investigated how to also make the glossary from within Kile, but it should be possible to do it in the same way as you add a biber command. C.2 (Ku|Xu|U)buntu For my most recent tests I have been using my laptop with Kubuntu 12.10 and using TEX Live 2012, which I installed by hand. I also made the guide on a plain Xubuntu 12.04 installation, which used the default packages from the Xubuntu image. At installation time I enabled the usage of 3rd party non-free software. This is be needed for acroread among other things.1 If you want to write your thesis in British (UK) English you should make sure that that language is fully installed. If you want to write your thesis in German, then also install German as a language, even if your system is in English. I explicitly installed the following packages in addition: (k|x)ubuntu-restricted-extras subversion texlive texlive-doc-en texlive-science texlive-science-doc texlive-latex3 texlive-lang-german feynmf biblatex For Kubuntu 13.04 I also had to install texlive-metapost in order to compile the guide. Using these packages I was able to issue to following commands to produce the guide (assuming that you have TEX Live 2011 or later): mkdir ubonn-thesis; cd ubonn-thesis svn co https://svn.physik.uni-bonn.de/basic/ubonn-thesis/trunk cd trunk Then the following worked: 1 Nowadays you have to download acroread from the Adobe web page. 62 12th July 2013 10:14 C.2 (Ku|Xu|U)buntu cd guide make guide so all packages are there as well as at least the default font which I selected: txfonts. The default version of the guide uses biber for the biblatex package and includes ./refs/example_refs-utf8 rather than ./refs/example_refs-latin1. You give the command make guide to compile, which uses biber rather than bibtex to process the .bib files. For a older version of TEX Live (2009) you have to change \texlive in thesis_guide.tex to 2009. Then the following works: make feynmf make guide09 The default version of the guide also compiles on ATLAS Bonn desktop computers ((K)Ubuntu 12.04 with TEX Live 2012). If you want to use feynmf instead of feynmp to compile the guide, you have to change ubonn-thesis.sty appropriately and give the command make feynmf before make guide. If you want to switch from biber to bibtex or vice versa, give the commands make cleanguide cleanbbl cleanblx before you try to compile the guide (or your thesis). In order to edit LATEX you need an editor such as emacs or use a package such as kile (and the associated kile-doc), TEXstudio or Texmaker. These were discussed breifly in the previous section. If your LATEX installation is old, you may want to bring it up-to-date. For Ubuntu variants there is a simple solution. Just add TEX Live backports to your list of sources (use the sudo apt-add-repository ppa:texlive-backports/ppa command). You should then be able to give the command sudo apt-get update; sudo apt-get upgrade. Note that this variant will overwrite your current LATEX installation. An alternative is the method discussed in the following paragraphs, which allows you to have two different installations in parallel. A recent TEXnische Komödie (3/2011) contained detailed instructions on how to install a newer version of TEX Live in parallel to the default version in Kubuntu (Ubuntu works in almost exactly the same way). I am now doing this as standard practice on my laptop and it works very well. Another useful source of information on how to install TEX Live can be found under http://tug.org/texlive/ quickinstall.html. A brief summary of how to do the installation by hand: you must have perl-tk installed. Go to a directory where you want the install script to be and then execute the following chain of commands: wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz tar zxvf install-tl-unx.tar.gz cd install-tl-... sudo ./install-tl -gui perltk Turn off some of the languages Make sure installation is in /usr/local/texlive Install I installed the scheme scheme-tetex and added the collections: Extra BibTeX styles, Extra generic packages, LaTeX supplementary packages and Typesetting for natural and computer sciences. When the installation is complete (can easily take 1 to 2 hours): cd .. echo ’export PATH=/opt/texbin:${PATH}’ > texlive.sh sudo cp texlive.sh /etc/profile.d/ sudo ln -s /usr/local/texlive/2011/bin/i386-linux /opt/texbin 12th July 2013 10:14 63 C TEX setup and packages If you have a 64-bit installation replace i386-linux with x86_64-linux. Note that the last 3 commands set things up so that /opt/texbin is at the beginning of your PATH and that LATEX is then taken from there rather than the usual /usr/bin. With Kubuntu 13.04, I had to install texdoc in addition in order to be able to use it to access the documentation with it.2 For updating, additions of packages etc., it is useful to define an alias in your .bashrc or .bash_aliases: function sutlmgr () { if [[ -z "$@" ]]; then sudo /opt/texbin/tlmgr -gui else sudo /opt/texbin/tlmgr "$@" fi } You then give the command sutlmgr to start the TEX Live manager interface. You can use this interface to install new packages as well as to update the ones you have installed. If you want to update things, you should first click on “Load default” to load a repository and then you can do things such as “Update all installed”. If you are using Ubuntu 11.10, you may well get an error: “sh: gnome-open: not found” when you try to give a texdoc command. I fixed this by making a link from /usr/local/bin/gnome-open to /usr/bin/xdg-open. C.3 Windows I also tried to to make the guide and a skeleton thesis under Windows. I used the 2010 TEX Collection DVD from Dante to install proTEXt, which is based on MiKTEX. What the user sees is TEXworks which is deliberately supposed to look like the Mac’s TEXShop. This is discussed in Section C.3.1. You can also install TEX Live for Windows. Some hints on how to do this are given below (Section C.3.2). For a first attempt I used Windows XP in a virtual machine using VirtualBox. More recently all my tests have been done using Windows 7. Once you have a TEX installation, you have to get the guide. To do this I used TortoiseSVN which is available from http://tortoisesvn.net/ as the interface between Windows and subversion. To checkout the files, simply start Windows Explorer and go to the top-level directory where you want to do the checkout, right-click on the mouse and enter https://svn.physik.uni-bonn.de/basic/ubonn-thesis/trunk or https://svn.physik.uni-bonn.de/basic/ubonn-thesis/tags/ubonn-thesis-N.M as the URL. To set up your thesis, you have to do by hand what the Makefile does under Linux, i.e. make a new directory mythesis, copy thesis_skel/thesis_skel.tex to mythesis/mythesis.tex, and copy the rest of the files from thesis_skel into mythesis. in addition you should copy the style file ubonn-thesis.sty into the mythesis directory. To compile things, I ran the sequence PDFLATEX, BibTEX, PDFLATEX, PDFLATEX to get the output file for the skeleton thesis. If you want to use biber instead of BibTEX, then you should change the BibTEX command from bibtex to biber in TEXstudio or TEXworks. 2 This was not necessary for earlier (K)Ubuntu versions. I found it a bit strange, but it seems to be needed. 64 12th July 2013 10:14 C.3 Windows TEXstudio knows about indexes and glossaries. You have to set up a user command to execute makeindex and makeglossaries as discussed in Section C.1. With the addition of these commands, you should also be able to compile this guide. If you run PDFLATEX with the option -enable-write18 and include appropriate mpost commands in your LATEX file(s), as discussed in Section 5.5.1, Feynman graphs made using feynmp work well. With TEXstudio, you can simply include this option in the PDFLATEX command: Options → Configure TeXstudio → Commands. I have not yet invested any effort in trying to get feynmf working under Windows. The output files are produced, but I have not tried to run Metafont on them. C.3.1 MiKTEX I have installed TEX under Windows both from the TEX Collection 2010 DVD and via a download from Internet. For the DVD I logged in as an Administrator and then opened the DVD. It opened a TEX Collection window and I then clicked on proTEXt Quick Install and installed MiKTEX (minimal version), Ghostscript and Ghostview for all users. Once the installation was finished, I also updated all the packages using the MiKTEX Maintenance (Admin) → Update (Admin) program. Be patient – these updates always take a while! With the minimal version of MiKTEX you are then asked whether to install the missing packages when first compiling a file that needs them. Note that such missing packages are installed in your local directory tree and not in the central directory tree. Be patient if the first compilation appears to hang. This usually means that new packages are being installed. Note that the Dante TEX Collection 2011 DVD has dropped TEXnic Center within proTEXt and is using the TEXmakerX front-end instead. TEXmakerX has recently been superseded by TEXstudio, My comments on TEXnic Center have been relegated to Chapter H. There is also the package Texmaker. C.3.2 TEX Live You can install TEX Live instead of proTEXt. To do that you can either use the TEX Collection DVD or download TEX Live. If you download TEX Live you should unzip the file that you get and go to the directory install-tl/install-tl-YYYYMMDD. In that directory you should run install-tl-advanced.bat as Administrator if you want to install TEX Live in a system directory. I installed the “medium” scheme. The following extra collections were needed: • Extra BibTeX styles • Extra generic packages • LaTeX supplementary packages – needed for csquotes • Typesetting for natural and computer sciences I also added the German documentation. Do not forget to toggle the option All users if you want more than one user to be able to use LATEX on your machine. If you forget one of the above collections, you can install the missing packages later. While MiKTEX can install missing packages on the fly, this does not seem to be the case for TEX Live. To install extra packages you should start the TEX Live manager and before doing anything else you should load the default repository. You can either use TEXworks as the front end or you can install TEXstudio or Texmaker. 12th July 2013 10:14 65 C TEX setup and packages C.4 Mac Even though they are becoming more and more popular, I do not have any experience installing and running LATEX on a Mac. I have been told that the standard package to install is TEXShop. Together with BasicTEX this provides a basic environment. However, if you want to do more (like write a thesis), you should install TEX Live. Note that the Dante TEX Collection DVD includes MacTEX, which is what the TEXShop web page recommends as the best combination to install. There are MacOSX versions of TEXstudio and Texmaker which you can also try. 66 12th July 2013 10:14 APPENDIX D Making a glossary or list of acronyms LATEX file: ./guide_appendix.tex What is the difference between a glossary and a list of acronyms? They are in fact very similar. A list of acronyms is probably most appropriate for defining the abbreviations used for detector names, e.g. the electromagnetic calorimeter (EMC). A glossary is used for defining terms, e.g. “transition radiation: transition radiation can be emitted when a particle crosses the boundary between two media with different dielectric constants”. A list of acronyms is probably a good idea to include in any thesis; a glossary may be helpful as well. Several packages are available to help in the creation of a glossary: glossaries A new glossary package that can do everything! This is what I use here. nomencl Another glossary package that I used in the book “Physics at the Terascale”. glossary Replaced by glossaries in TEX Live 2012 and also available with TEX Live 2009. glosstex Rather an old package that looks to be quite simple to use. A short introduction to these packages can be found in the TEXnische Komödie 4/2012. The nomencl package is maybe the easiest to use for creating a simple list of acronyms. If you want to change the formatting or do anything other than create a simple list, it is probably worth investigating glossaries. The nice thing about glossaries is that it works with hyperref so that you can even click on an acronym and find its definition. In this guide I included the package with the option acronym, in order to get both a glossary and a list of acronyms. I also included the option toc, so that the glossary and list of acronyms are included in the table of contents. You tell it to to make a glossary (and list of acronyms) by giving the command \makeglossaries in the preamble and you print the glossary (usually at the end of the document) with the \printglossaries command. I have not included these commands in the thesis skeleton, as the glossaries package is rather new and may not be available in older TEX installations. In order to process the glossary, you need to run the command makeglossaries filename. This is included in the Makefile for the commands make guide and make guide09 and should be added to make thesis and/or make thesis09 if you want to make a glossary for your thesis. 12th July 2013 10:14 67 D Making a glossary or list of acronyms I illustrate the use with the standard description of the ZEUS detector, which includes the abbreviations that are used in the rest of a ZEUS paper. As a first step you define the terms for the glossary and the acronyms. In this guide, the acronyms and the glossary entries are defined in the file guide_glossary.tex. These definitions must come before they are used. You can decide whether it is best to have them in a single file, or define them just before they are used. When they are printed at the end, they will be sorted alphabetically. Once an acronym is defined, the first time the acronym is used, \gls{acronym}, the full text and the abbreviation is printed. Every time after that only the abbreviation is printed. D.1 ZEUS detector description In the kinematic range of the analysis, charged particles were tracked in the central tracking detector (CTD) and the MVD silicon tracker (MVD). These components operated in a magnetic field of 1.43 T provided by a thin superconducting solenoid. The CTD consisted of 72 cylindrical drift-chamber layers, organised in nine superlayers covering the polar-angle region 15° < θ < 164°. The MVD consisted of a barrel (BMVD) and a forward (FMVD) section. The BMVD contained three layers and provided polarangle coverage for tracks from 30° to 150°. The four-layer FMVD extended the polar-angle coverage in the forward region to 7°. After alignment, the single-hit resolution of the MVD was 24 µm. The transverse distance of closest approach (DCA) of tracks to the nominal vertex in X–Y was measured to have a resolution, averaged over the azimuthal angle, of (46 ⊕ 122/pT ) µm, with pT in GeV. For CTDMVD tracks that pass through all nine CTD superlayers, the momentum resolution was σ(pT )/pT = 0.0029pT ⊕ 0.0081 ⊕ 0.0012/pT , with pT in GeV. The high-resolution uranium–scintillator calorimeter (CAL) consisted of three parts: the forward (FCAL), the barrel (BCAL) and the rear (RCAL) calorimeters. Each part was subdivided transversely into towers and longitudinally into one electromagnetic section (EMC) and either one (in RCAL) or two (in BCAL and FCAL) hadronic sections (HAC). The smallest subdivision of the calorimeter was called √ a cell. The CAL energy resolutions, √ as measured under test-beam conditions, were σ(E)/E = 0.18/ E for electrons and σ(E)/E = 0.35/ E for hadrons, with E in GeV. 68 12th July 2013 10:14 D.1 ZEUS detector description We start a new page so that you can see how the cross-referencing works. ZEUS had quite a large assortment of tracking detectors. In the forward direction there was the forward tracking detector (FTD) and the transition radiation detector (TRD). The TRD was replaced by the straw-tube tracker (STT) for the HERA 2 running period. In the middle of the detector, the CTD was always there, while the MVD was also installed later. 12th July 2013 10:14 69 APPENDIX E Print shops For a PhD thesis, as mentioned in Section 3.1, you have to print and bind the five copies that are needed by the university library externally. Some print shops in the Bonn region that can supply the required quality at a reasonable price are: • Typo-Druck & Verlags-GmbH Irmintrudisstr. 1b 53111 Bonn Telefon 0228-650905 http://www.typo-druck.de • Buchbinderei Hennemann Paulusplatz 12 53119 Bonn Telefon 0228-223521 http://www.buchbinderei-hennemann.de It is also possible to order online, e.g.: • http://www.druckerei-eberwein.de/shop • http://www.kunsthaus-schwanheide.de • http://www.druckterminal • http://www.sedruck.de • http://hundt-druck.de • http://copyteamcologne.de • http://dr.hut-verlag.de We have tried out „Druckerei Eberwein“. Their price was reasonable and they delivered quickly and in good quality. 12th July 2013 10:14 71 APPENDIX F A famous equation is E = mc2 LATEX file: ./guide_appendix.tex This chapter is included to illustrate how to get bold mathematics in a chapter/section title and how to avoid it in the table of contents. No optional title for a chapter is needed as the chapter title is typeset in bold font also in the table of contents. F.1 A slightly less famous equation is F = ma The optional title here does not include \boldmath, as the section in the table of contents is typeset in a normal font when writing a book or report. F.2 The cross-section is given by σ = N/L This attempt uses Greek letters and some specific font and appears to also work OK. 12th July 2013 10:14 73 APPENDIX G Plots with tikz Figure G.1 shows how you can produce a plot showing the contributions of many different systematic uncertainties to a result. Note that this plot uses some modern features of tikz and pgfplots. Hence it is only included if this guide is compiled with TEX Live 2011 or later. 12th July 2013 10:14 75 Central value Cut on cos θ∗ − 0.050 for D0 Cut on cos θ∗ − 0.025 for D0 Cut on cos θ∗ + 0.025 for D0 Cut on cos θ∗ + 0.050 for D0 Cut on cos θ∗ − 0.050 for D∗+ (2p, 4p) Cut on cos θ∗ − 0.0250 for D∗+ (2p, 4p) Cut on cos θ∗ − 0.0250 for D∗+ (2p, 4p) Cut on cos θ∗ + 0.050 for D∗+ (2p, 4p) Cut on cos θ∗ − 0.050 for D0 (K) Cut on cos θ∗ − 0.025 for D0 (K) Cut on cos θ∗ + 0.025 for D0 (K) Cut on cos θ∗ + 0.050 for D0 (K) Window of M(D∗+ ) − M(D0 ) − 2% Window of M(D∗+ ) − M(D0 ) − 4% Window of M(D∗+ ) − M(D0 ) + 2% Window of M(D∗+ ) − M(D0 ) + 4% Window of M(D∗+ )(2p, 4p) − 2.5% Window of M(D∗+ )(2p, 4p) − 5% Window of M(D∗+ )(2p, 4p) + 2.5% Window of M(D∗+ )(2p, 4p) + 5% Window of M(D0 )−5 MeV Window of M(D0 )−10 MeV Window of M(D0 )+5 MeV Window of M(D0 )+10 MeV Cut on pT (D0 ) −0.05 GeV Cut on pT (D0 ) −0.10 GeV Cut on pT (D0 ) +0.05 GeV Cut on pT (D0 ) +0.10 GeV Cut on pT (D∗+ )(2p) −0.05 GeV Cut on pT (D∗+ )(2p) −0.10 GeV Cut on pT (D∗+ )(2p) +0.05 GeV Cut on pT (D∗+ )(2p) +0.10 GeV Cut on pT (πe ) D∗+ (2p, 4p) −0.010 GeV Cut on pT (πe ) D∗+ (2p, 4p) −0.005 GeV Cut on pT (πe ) D∗+ (2p, 4p) +0.005 GeV Cut on pT (πe ) D∗+ (2p, 4p) +0.010 GeV Cut on pT (πe ) D0 −0.02 GeV Cut on pT (πe ) D0 −0.04 GeV Cut on pT (πe ) D0 +0.02 GeV Cut on pT (πe ) D0 +0.04 GeV CAL energy scale−1% CAL energy scale−2% CAL energy scale+1% CAL energy scale+2% Change BG pars Separate BG parameters −16 MeV fit range −1 MeV resolution +1 MeV resolution MPDG (D∗+ ) +0.14 MeV MPDG (D∗+ ) −0.14 MeV MPDG (D0 ) +0.16 MeV MPDG (D0 ) −0.16 MeV MC beauty contribution × 0.0 MC beauty contribution × 0.5 MC beauty contribution × 1.5 MC beauty contribution × 2.0 f (c → D+s1 ) s1 S BD+ →D∗+ K 0 /BD+s1 →D∗0 K + G Plots with tikz δ1 76 δ2 δ3 δ4 δ5 2.5 2 1.5 1 1 0.9 0.8 0.7 0.6 Figure G.1: The results of strange excited charm meson fragmentation fraction and branching ratio with systematic variations. The individual systematic variations are put into groups δ1 − δ5 . 12th July 2013 10:14 APPENDIX H Old or obsolete information and instructions With time things change! Some of the instruction or packages that I recommended at an earlier time are superseded. Operating systems and TEX installations also change with time. In order to avoid cluttering up the main chapters of the guide with outdated or obsolete information, such things are collected in this appendix. H.1 More on feynmf I relegate this section to the chapter on obsolete instructions, because I think it is much easier to just use feynmp than feynmf. If you have TEX Live 2012, you can combine feynmp with standalone for a very convenient way to develop and include Feynman graphs, as discussed in Section 5.5.1. If you use feynmp you can just give the command make feynmp and it will produce PDF files of all the tex files in the feynmf subdirectory. If you do not want to include the feynmf commands for Feynman graphs in the thesis (or input the file containing them), you can try to make encapsulated Postscript (or PDF) files that contain a single Feynman graph and then include these as usual in your thesis. If you want to use feynmf you can start with the feynmf command on the tex file containing the graph.1 This produces a dvi file that you then have to convert to Encapsulated Postscript and/or PDF. This is not totally trivial. The best way is to specify the options to the geometry package so that the page size corresponds to the Feynman graph. For a graph with size (50, 50), as specified at the beginning of the fmfgraph* environment (within \unitlength in mm), the following wrapper works well: \documentclass{article} % \usepackage[papersize={60mm,56mm},text={58mm,52mm},centering]{geometry} \usepackage{feynmf} \usepackage{color} % \pagestyle{empty} 1 Note that the example files that are included in this document tree are missing the \documentclass and \usepackage commands. 12th July 2013 10:14 77 H Old or obsolete information and instructions \begin{document} \setlength{\parindent}{0pt} \setlength{\parskip}{0pt} \setlength{\unitlength}{1mm} \begin{center} \fbox{\input{figs/feynmf/ep_nc.tex}} \end{center} \end{document} I also had success with the command chain: feynmf ep_nc dvips ep_nc ps2epsi ep_nc.ps and then you can include ep_nc.epsi in your LATEXfile.2 To get PDF you need one more step: epstopdf ep_nc.epsi An alternative with explicit Metafont calls is: pdflatex ep_nc mf ’\mode=localfont; input ep_nc;’ pdflatex ep_nc pdflatex ep_nc The trouble with this is that the Feynman graph is not clipped, unless you have specified the page size appropriately as discussed above. H.2 Windows H.2.1 Windows XP As I know longer have access to a Windows XP machine, and Windows XP is slowly disappearing, my experience with Windows XP stopped 2011. I started the TEX Collection 2010 DVD. I started it as an Administrator, it opened a TEX Collection window and I then clicked on proTeXt Quick Install and installed MiKTEX (minimal version), TEXnic Center, Ghostscript and Ghostview for all users. Once the installation was finished, I also updated all the packages using the MiKTEX Maintenance (Admin) → Update (Admin) program. Be patient – these updates always take a while! You should then be able to double-click on mythesis.tex and try to compile it! My first attempt at this failed. I had set MiKTEX to install missing packages, but it was supposed to ask me first. This seems to work well if you are logged in as the same user (with Administration rights) as the one who installed MiKTEX. The package updating does not seem to work properly (it only asks you for the first missing package I think) if you are a normal user. After going through the exercise once as an Administrator to compile the skeleton thesis, I could also compile both the thesis and the guide as a normal user. 2 By default LATEX will not find .epsi files with the \includegraphics command. Rename them to .eps instead or add .epsi to the list of file types that \includegraphics can handle. 78 12th July 2013 10:14 H.2 Windows The second attempt was a complete MiKTEX installation. I told it to install missing packages without asking. This also failed at the first attempt as it was missing the package logreq and somehow did not install it automatically. I had to use the MiKTEX Maintenance (Admin) → Package Manager (Admin) to install logreq. H.2.2 TEXnic Center I tried out the TEXnic Center, which is also available. You first have to tell it where to find the LATEX executables. In my case this is C:\Program Files\MiKTeX 2.8\mktex\bin. You also have to tell the program where to find Acrobat (Reader) although it should find it automatically. In the TEXnic Center I opened one of the main files, i.e. mythesis.tex or thesis_guide.tex and then in the Project menu I declared this file to be the main file for a new project. You should declare the file format to be Unix. You can then compile the project and look at the output by hitting Ctrl + F5. It is also possible to set some options such that you do not have to close the file in Acrobat Reader before compiling. There is a small problem and irritation with TEXnic Center and Acrobat Reader X. Under Build → Define Output Profiles → Viewer you have to change acroview to acroviewR10 in the three places where it is given. If you then try to compile Adobe Reader opens but you get an error message. Just view the output again F5 and the PDF file will be shown. Via Google, I found some tricks that are supposed to fix this problem, but they did not work for me. You can also just start Adobe Reader first and then TEXnic Center. In general, I thought I liked the TEXnic Center somewhat more than TEXworks, which is the direct MiKTEX interface. It allows you to set up projects and you then have the ability to navigate easily through all your files via the Navigator. However, it has a serious problem in that it does not handle UTF-8 files properly. Although support for UTF-8 has been advertised for almost two years I do not see much signs of progress. As TEXnic Center has been dropped on the Dante TEX Collection 2011 DVD I have relegated this information to a subsection. 12th July 2013 10:14 79 Bibliography [11] “Determination of the muon reconstruction efficiency in ATLAS at the Z resonance in proton-proton collisons at sqrt(s)=7 TeV”, tech. rep. ATLAS-CONF-2011-008, Entry directly from CDS: CERN, Feb. 2011 (cit. on p. 46). [A+11] ATLAS Collab., G. Aad et al., “Measurement of the top quark-pair production cross √ section with ATLAS in pp collisions at s = 7 TeV”, Eur. Phys. J. C71 (2011) 1577, doi: 10.1140/epjc/s10052-011-1577-6, arXiv: 1012.1792 (cit. on p. 47). [Aad+11] G. Aad et al., “Measurement of the top quark-pair production cross section with ATLAS √ in pp collisions at s = 7 TeV”, Eur.Phys.J. C71 (2011), Entry directly From InSpire 1577, doi: 10.1140/epjc/s10052-011-1577-6, arXiv: 1012.1792 [hep-ex] (cit. on p. 47). [Abr+10a] H. Abramowicz et al., “Measurement of D+ and Λ+c production in deep inelastic scattering at HERA”, JHEP 11 (2010) 009, doi: 10.1007/JHEP11(2010)009, arXiv: 1007.1945 [hep-ex] (cit. on p. 43). [Abr+10b] H. Abramowicz et al., “Measurement of high-Q2 charged current deep inelastic scattering cross sections with a longitudinally polarised positron beam at HERA”, Eur. Phys. J. C70 (2010) 945–963, doi: 10.1140/epjc/s10052-010-1498-9, arXiv: 1008.3493 [hep-ex] (cit. on p. 43). [ATL11] ATLAS Collaboration, “Determination of the muon reconstruction efficiency in ATLAS √ at the Z resonance in proton-proton collisons at s = 7 TeV”, ATLAS-CONF-2011-008, CERN, Feb. 2011 (cit. on p. 46). [Bru+04] (. Bruning Oliver S. et al., “LHC Design Report. 1. The LHC Main Ring” (2004), Entry directly From InSpire (cit. on p. 46). [Brü+04a] O. S. Brüning et al., LHC Design Report, Entry directly From CDS, Geneva: CERN, 2004 (cit. on p. 46). [Brü+04b] O. S. Brüning et al., eds., LHC Design Report. 1. The LHC Main Ring, CERN-2004-003-V-1, CERN-2004-003, Geneva, 2004, url: https://cdsweb.cern.ch/record/782076 (cit. on p. 46). [Brü+04c] O. S. Brüning et al., eds., LHC Design Report. 1. The LHC Main Ring, CERN-2004-003-V-1, CERN-2004-003, Geneva, 2004, url: https://cdsweb.cern.ch/record/782076 (cit. on p. 46). 12th July 2013 10:14 81 Bibliography [Fos] B. Foster, The guide to writing ZEUS papers, url: http://pi.physik.uni-bonn.de (cit. on p. 2). [Gla61] S. Glashow, “Partial Symmetries of Weak Interactions”, Nucl. Phys. 22 (1961) 579; A. Salam, “Weak and Electromagnetic Interactions”, Elementary particle theory. Relativistic groups and analyticity. Proceedings of the Eighth Nobel Symposium, ed. by N. Svartholm, Stockholm: Almquist & Wiksell, 19th–25th May 1968 367; S. Weinberg, “A Model of Leptons”, Phys. Rev. Lett. 19 (1967) 1264, cit. on p. 49. [H+10a] H1 and ZEUS Collab., F. D. Aaron et al., “Combined Measurement and QCD Analysis of the Inclusive ep Scattering Cross Sections at HERA”, JHEP 01 (2010) 109, doi: 10.1007/JHEP01(2010)109, arXiv: 0911.0884 [hep-ex] (cit. on p. 49). [H+10b] H1 and ZEUS Collab., F. D. Aaron et al., “Events with an Isolated Lepton and Missing Transverse Momentum and Measurement of W Production at HERA”, JHEP 03 (2010) 035, doi: 10.1007/JHEP03(2010)035, arXiv: 0911.0858 [hep-ex] (cit. on p. 49). [HM84a] F. Halzen and A. D. Martin, “QUARKS AND LEPTONS: AN INTRODUCTORY COURSE IN MODERN PARTICLE PHYSICS” (1984), Entry directly From InSpire (cit. on p. 46). [HM84b] F. Halzen and A. D. Martin, Quarks and Leptons: An Introductory Course in Modern Particle Physics, 1984, isbn: 9780471887416 (cit. on p. 46). [KD04] H. Kopka and P. W. Daly, Guide to LATEX, 4th ed., Addison-Wesley, 2004 (cit. on pp. 2, 8, 43, 46). [Lod12] T. Loddenkötter, “Implementation of a kinematic fit of single top-quark production in association with a W boson and its application in a neural-network-based analysis in ATLAS”, BONN-IR-2012-06, PhD Thesis: University of Bonn, 2012, url: http://hss.ulb.uni-bonn.de/diss_online (cit. on p. 46). [MG04] F. Mittelbach and M. Goossens, The LATEX Companion, 2nd ed., Addison-Wesley, 2004 (cit. on p. 2). [Oet+] T. Oetiker et al., A (Not So) Short Introduction to LaTeX2e, url: http://ctan.org/tex-archive/info/lshort (cit. on pp. 2, 22, 46). [Z+09] ZEUS Collab., S. Chekanov et al., “Exclusive photoproduction of upsilon mesons at HERA”, Phys. Lett. B680 (2009) 4–12, doi: 10.1016/j.physletb.2009.07.066, arXiv: 0903.4205 [hep-ex] (cit. on p. 49). [Z+10a] ZEUS Collab., S. Chekanov et al., “A QCD analysis of ZEUS diffractive data”, Nucl. Phys. B831 (2010) 1–25, doi: 10.1016/j.nuclphysb.2010.01.014, arXiv: 0911.4119 [hep-ex] (cit. on p. 49). [Z+10b] ZEUS Collab., H. Abramowicz et al., “Inclusive dijet cross sections in neutral current deep inelastic scattering at HERA”, Eur. Phys. J. C70 (2010) 965–982, doi: 10.1140/epjc/s10052-010-1504-2, arXiv: 1010.6167 [hep-ex] (cit. on pp. 43, 45). 82 12th July 2013 10:14 Bibliography [Z+10c] ZEUS Collab., S. Chekanov et al., “Measurement of J/ψ photoproduction at large momentum transfer at HERA”, JHEP 05 (2010) 085, doi: 10.1007/JHEP05(2010)085, arXiv: 0910.1235 [hep-ex] (cit. on p. 49). 12th July 2013 10:14 83 List of Figures 2.1 Example of (a) a problem with line numbers and (b) its solution. . . . . . . . . . . . . 14 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 Sketch of the LHC ring, the position of the experiments and the surrounding countryside. Adding letters to figures with \put. . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding letters to figures with tabular. . . . . . . . . . . . . . . . . . . . . . . . . . A small figure with a simple caption beside it. . . . . . . . . . . . . . . . . . . . . . . Processes in ep scattering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The ZEUS coordinate system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Event reconstruction and simulation in ZEUS . . . . . . . . . . . . . . . . . . . . . . NC and CC graphs for ep scattering using feynmf code directly. . . . . . . . . . . . . Feynman graphs drawn with feynmp and tikz. . . . . . . . . . . . . . . . . . . . . . . 26 26 27 27 28 29 30 32 33 G.1 Strange D∗∗ systematics, fragmentation fractions . . . . . . . . . . . . . . . . . . . . 12th July 2013 10:14 76 85 List of Tables 4.1 4.2 4.3 4.4 Useful packages for layout. . . . . . . . . . . . . . . . . . . . . . . . . Useful packages for appearance. . . . . . . . . . . . . . . . . . . . . . Other useful packages. . . . . . . . . . . . . . . . . . . . . . . . . . . Other packages that are often used, but I have already given alternatives. . . . . 22 22 23 24 6.1 6.2 6.3 A table of viscosities in the default language and German. . . . . . . . . . . . . A selection of cross-section measurements! . . . . . . . . . . . . . . . . . . . . Another selection of cross-section measurements! Note the use of \sisetup to the plus signs on the positive errors. . . . . . . . . . . . . . . . . . . . . . . . . Cross-section measurements! . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cross-sections using sidewaystable, which also rotates the caption. . . . . . . . . . . . . keep . . . . . . . . . 36 37 38 39 41 B.1 The alphabet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 6.4 6.5 12th July 2013 10:14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Glossary LATEX the typesetting program that is used for this guide. 1 csquotes a very nice package for using consistent quotes that is language sensitive. 8 siunitx the best package around for typesetting units. 7 12th July 2013 10:14 89 Acronyms CAL uranium–scintillator calorimeter. 68 CTD central tracking detector. 68, 69 DCA transverse distance of closest approach. 68 FTD forward tracking detector. 69 MVD MVD silicon tracker. 68, 69 STT straw-tube tracker. 69 TRD transition radiation detector. 69 12th July 2013 10:14 91 Index adjustbox, 23 align(*), 14 alignat(*), 14 American English, 8 AMS math, 2 amsmath, 14, 22 amssymb, 22 \ang, 11 array, 22, 38 \arraystretch, 35, 40 article, 21, 45 axodraw, 23, 29, 58 babel, 22, 53, 54 background, 57 \backmatter, 21 \bar, 8 biber, 62, 63 \bibitem, 43 biblatex, 43–50, 57, 58, 61, 63 @Set option, 49 BibTEX, 44 bibtex, 63 bibtool, 49 \Bo, 13 \Bobar, 13 \boldmath, 13, 73 book, 21, 46 booktabs, 22, 35, 52, 58 \bottomrule, 35, 58 British English, 8 BSc, 6, 18 caption, 23 captionbeside, 27 CDS, 46 12th July 2013 10:14 \centering, 25, 40 chapter heading, 54 \chapter, 85 \chapter*, iii \cite, 43, 49 \clight, 11 color, 24, 58 link, 54 compiling, 5 conference note, 46 coordinates, 8 cover, 6 cover page, 6 csquotes, 8, 22, 54, 58, 65 ctable, 52, 58 CV, 17 dcolumn, 9, 24, 38, 53 department library, 18, 19 derivative, 8 design report, 46 \dif, 8 Diplom, 6, 18 displaymath, 11, 12, 14 \documentclass, 53, 77 em, 8 emacs, 7, 9, 61 English, 2 \enquote, 8, 54 \ensuremath, 7 eqnarray, 14 equation, 14 equation*, 11, 12, 14 ex, 8 93 Index \extrarowheight, 36 fancyhdr, 24 \fbox, 32 feymp, 32 Feynman graphs, 29 feynmf, 15, 22, 23, 26, 29, 31, 32, 51, 57, 58, 63, 77 feynmp, 15, 23, 26, 29, 31–33, 57, 58, 63, 65, 77 \figureformat, 25 figures, 25 directories, 9 Feynman graphs, 29 multiple, 26 figures formats, 27 \figwidth, 27 float, 24 floatflt, 23, 24 floatrow, 23 fmffile, 31, 32 fmfgraph*, 77 fncychap, 23, 55 font lmodern, 6 fontenc, 22 footnote, 51 \footnotemark, 52 \footref, 52 \foreignlanguage, 36, 54 \foreignquote, 54 \frontmatter, 21 geometry, 21, 22, 51, 77 German, 53 ghostscript, 65 ghostview, 65 glossaries, 23, 67 glossary, 23, 67 glosstex, 67 \gls, 68 \graphicspath, 9 graphicx, 22, 23 hepunits, 7, 10, 12, 24 hyperref, 17, 23, 49, 50, 54, 67 \hypersetup, 17, 18, 54 94 IEEEeqnarray, 22 IEEEtrantools, 22, 23 ifthen, 23 \ifthenelse, 23, 36, 58 import, 58 \include, 23 \includegraphics, 9, 22, 25, 26, 78 \inInstitute, 6 inputenc, 22 inspire, 46 \InstituteAddress, 6 \InstituteName, 6 internal note, 46 jaxodraw, 58 kile, 9, 61, 62 \KOMAoptions, 21, 61 KOMA - Script, 21 Kubuntu, 62 \label, 25, 52 LATEX, 1 library department, 18, 19 university, 18 line numbers, 14 lineno, 14 linenomath, 14 Linux, 62 lmodern, 6, 54 logreq, 79 longtable, 22, 52, 59 mac, 66 \mainmatter, 21 \makeglossaries, 67 Master thesis, 46 math bold, 13, 73 mathpazo, 13 mathptmx, 13 \mathrm, 7, 13 mcite, 43, 49, 50 metafont, 31 \MeVovercsq, 11 mhchem, 22 \midrule, 35, 58 12th July 2013 10:14 Index MiKTeX, 65, 78 MSc, 6, 18 \mysim, 13 \mysymeq, 13 \rule, 35, 40 \qquad, 8 \quad, 8 quotation marks, 54 quotchap, 23, 55 quotes, 54 scrartcl, 21 scrbook, 21 scrpage2, 22, 24 scrreprt, 21 \selectlanguage, 54 \setcapindent, 25 \setkomafont, 25, 54 \setlength, 26 setspace, 22, 51 \sfrac, 10 \SI, 7, 10, 13 sideways, 40 sidewaystable, 40, 41 \SIerrs, 11 \SIerrt, 11 \SIerrtt, 11 \SIpmerr, 11 \SIpmerrs, 11 \SIpmerrt, 11 \SIpmerrtt, 11 \sisetup, 7, 11, 13, 38, 53 SIunits, 7, 10, 12, 13, 24 siunitx, 7–13, 22, 24, 36, 37, 53, 58, 61 spires, 46 standalone, 22, 23, 29, 31, 57, 77 subcaption, 23, 27 subfig, 23, 27, 29 subfiles, 23, 24, 58 submit, 17 BSc thesis, 18 Diplom thesis, 18 MSc thesis, 18 PhD thesis, 17 subversion, 64 supertab, 22, 59 svn, 64 range, 13 refcheck, 7, 23, 57 RefTeX, 9, 61 report, 21 technical, 46 \RequirePackage, 58 rotating, 22 rounding, 37 table, 35, 40, 52, 59 tablefootnote, 52 \tablefootnote, 52 tabular, 26, 27, 35, 36, 38, 52, 59 tabular*, 35 tabularx, 23, 35 TEX distribution, 2 texdoc, 2 \newcommand, 8 \newcommand*, 8 nomencl, 23, 67 note conference, 46 internal, 46 \num, 10, 13, 36–38, 53 \numerrt, 11 \numpmerr, 11, 37 \numpmerrt, 11 otherlanguage, 54 \overline, 8 page, 51 particles, 8 \per, 10 pgfplots, 28, 75 \phantom, 35 PhD, 6, 17 PhD thesis, 46 \power, 12 preprint, 46 \printbibliography, 44 \printglossaries, 67 proceedings, 46 \put, 26 pxfonts, 13, 22, 54 12th July 2013 10:14 95 Index TEX Live 2009, 6, 10 2011, 6, 10 \texlive, 6, 11, 47, 63 TeXmaker, 61 TeXnic Center, 78, 79 TeXstudio, 61 \text, 7, 9, 12, 13 \textrm, 7, 13 thesis, 46, 47 Bachelor, 6 Diplom, 6 Master, 6, 46 PhD, 6, 46 \thesisabstract, 54 TikZ, 28, 32 tikz, 22–24, 28, 29, 32, 33, 57, 75 tikz-3dplot, 28 tips, 5 titlesec, 22, 55 \toprule, 35, 58 tortoisesvn, 64 txfonts, 13, 21, 54, 63 typearea, 21, 22, 51 xcolor, 22, 24, 58 xfrac, 22 xspace, 13, 22 \xspace, 7, 12, 13 Xubuntu, 62 \Z0, 8 ZEUS paper guide, 2 ziffer, 24, 38, 53 \U1S, 8 ubonn-thesis, 5, 6, 14, 21 updating, 14 Ubuntu, 62 ubuntu 12.04, 10 12.10, 6 UK English, 8 ULB, 18 \unit, 10, 12, 13 \unitlength, 77 units, 7, 10, 24 university library, 18 upadting, 14 \url, 23 US English, 8 \usepackage, 17, 58, 77 \usk, 12 windows, 64 wrapfig, 23, 27 \write18, 15, 32, 57 96 12th July 2013 10:14 Acknowledgements There is plenty of discussion as to where the acknowledgements should go in a thesis. The two most common places are just after the title and dedication or right at the end. For the purpose of this guide I include both options. Acknowledgements at the end should be in \chapter so that they appear in the Table of Contents. 12th July 2013 10:14 97

Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.5
Linearized                      : No
Page Count                      : 105
Page Mode                       : UseOutlines
Author                          : 
Title                           : 
Subject                         : 
Creator                         : LaTeX with hyperref package
Producer                        : pdfTeX-1.40.13
Create Date                     : 2013:07:12 10:14:38+02:00
Modify Date                     : 2013:07:12 10:14:38+02:00
Trapped                         : False
PTEX Fullbanner                 : This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012) kpathsea version 6.1.0
EXIF Metadata provided by EXIF.tools

Navigation menu