Top Banner
A Thesis Template by Lukas Kuerten
19

Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you

Aug 25, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you

A Thesis Template by

Lukas Kuerten

Page 2: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you

Cover Image:

“Der Bucherwurm”by Carl Spitzweg

Museum Georg Schafer, Schweinfurt

Public Domain via Wikipedia

Page 3: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you

A Thesis Template

Based on the memoir class

by

Lukas Kurten

Max-Planck-Institute for Solid State ResearchStuttgart, Germany

Page 4: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you
Page 5: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you

CONTENTS

List of Figures vi

1 Introduction 1

2 Useful packages 32.1 The memoir class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 pgfplots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.3 siunitx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.4 babel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.5 hyperref and zref-xr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.6 glossaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.7 BibLaTex and biber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Appendices 7

A Troubleshooting 9

Bibliography 11

v

Page 6: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you

LIST OF FIGURES

2.1 Two plots generated with pgfplots . . . . . . . . . . . . . . . . . . . . . . . . . . 3

vi

Page 7: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you

GLOSSARY

UNO United Nations Organization

vii

Page 8: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you
Page 9: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you

True glory consists in doing what deserves to be written;in writing what deserves to be read;

and in so living as to make the world happier for our living in it.

Pliny the Elder

INTRODUCTION 1This template is distilled from the experience of writing my PhD thesis. It is intended to helpothers writing their theses facing the same problems of formatting and structuring as I did. Itoffers to lend a helping hand, so that not everyone has to re-invent the wheel while writing theirthesis. However, it does not claim completeness or portability, let alone elegance in any way, itis simply a compilation of packages and methods which I found useful. The .pdf document doesnot explain every aspect of the packages and tricks used while writing it. However, looking atthe source code (and its comments) will demonstrate to the reader how a particular task isachieved.

The template is aimed at intermediate-level users of LATEXwho have a basic grasp of how towrite equations and use basic commands. It does not offer a general introduction to LATEX.

The memoir class and the LATEXpackages used in this document as well as themybibstyle.bbx bibstyle are not my work and I owe thanks to the respective authors.

1

Page 10: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you
Page 11: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you

There is no wealth like knowledge, no poverty like ignorance.

Ali ibn Abi-Talib

USEFUL PACKAGES 2This chapter lists a selection of LATEXpackages which are useful for creating scientific documents.All packages listed here have extensive manuals which can be found on CTAN. This documentuses more packages than the ones listed here, which can be seen by a look at the source code ofthe document preamble.

2.1 The memoir class

The memoir class is the basis for this document. It is well suited for writing long documents(theses, books...) in LATEXand includes many features and options for which other classes haveto rely on external packages, for example the quotes at the chapter beginnings of this documentor the arrangement of subfigures below.

2.2 pgfplots

The package pgfplots allows to draw plots directly in LATEX, by either supplying the data ora function. Fig. 2.1 demonstrates a few basic features, but the package is much more powerful.

3 3.5 4 4.5 5

2

4

6

8

x

y

some datasome other data

(a)

−2 0 2

−1

0

1

x

y

sin(x)

cos(x)

(b)

Figure 2.1: (a) The package pgfplots allows to plot data both written directly into the document andimported from files stored externally. (b) The package can also compute plots from a variety of functions.The two figures next to one another are positioned by the subfloat routine internal in memoir.

3

Page 12: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you

2.3 siunitx

The package siunitx is useful for formatting numbers and units, for example it automaticallyinserts the half-space which is customarily placed between number and unit (e.g. 0.1 V) orit makes sure that numbers are always displayed in the same format regardless of how theyappear in the source code: 8 × 10−5 or 5 × 10−4.

2.4 babel

babel is necessary when the text of the document contains multiple languages. The last optionargument defines the main language of the text and the language for the automatically generatedheadings (such “Table of Contents”), whereas the other arguments define additionally availablelanguages. In this document, the package was loaded as

\usepackage[ngerman, english]{babel}

which makes English the main language of the document, but allows to switch to German forselected sections:

Dieser Teil des Dokuments setzt Trennungen und Zeilenumbruche entsprechend der neuendeutschen Rechtschreibung.

2.5 hyperref and zref-xr

hyperref adds click-able hyperlinks to all references in the .pdf documents, both for internalreferences (e.g. to other pages of the document) and for external references (e.g. to the DOIof a cited article). When creating large documents, it is usually advisable to separate thedocument into individual .tex files, as was done in this template. zref-xr allows referencingbetween different .tex files (e.g., to Chapter 1) if the external documents are declared as wasdone in the source code above.

2.6 glossaries

This package takes care of the acronyms used in the document (and can do much more).Acronyms are defined in the preamble and referenced in the text by their defined key, e.g.United Nations Organization (UNO). The package ensures that the first time an acronym isused, its meaning is spelled out, and all subsequent times, just the acronym is printed (UNO).It also creates a list of acronyms to be printed in the frontmatter.

2.7 BibLaTex and biber

The bibliography of this document is created using the BibLaTex syntax with biber as backend.This allows for more customization options and is more capable of dealing with special characterscompared to the older BibTex standard. As examples, these are references to an article [1], abook [2] and a PhD Thesis [3]. Note that when compiling this document, you must specify tothe compiler to use biber instead of the standard BibTex. In this document, BibLaTex wasloaded with the options displayed below:

4

Page 13: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you

\usepackage[

sorting=none,

sortcites=true,

citestyle=numeric-comp,

backend=biber,

bibstyle=mybibstyle,

giveninits=true,

url=false,

isbn=false,

eprint=false,

maxbibnames=99,

date=year]

{biblatex}

These options have the following effects, respectively:

• Display references in the bibliography in the order in which they are cited in the text(equivalent to unsrt in BibTex).

• If there are multiple consecutive citations in the text, sort them.

• Citations in the text are displayed as numbers, and multiple consecutive citations arecompressed (e.g. [1–3]).

• Use biber to compile the bibliography (requires to install biber via the package manager)

• The standard Biblatex style places an “in” before the journal name in the bibliography.This custom-defined bibstyle contained in the file mybibstyle.bbx suppresses printing ofthe word “in”.

• Only the initials of author first names are shown in the bibliography.

• Do not display an article URL in the bibliography.

• Do not display an article ISBN in the bibliography.

• Do not display an article eprint (e.g. ArXiv) ID in the bibliography.

• Truncate the list of authors after 99 entries. (Default is 4).

• Show only the year of publication (instead of month or day).

Some more fine-tuning of the bibliography can be found in the source code of the documentpreamble. Be aware that some journal templates, such as e.g. revtex, require the bibliographyto be in BibTex. Writing a thesis with this template and a journal article with revtex maytherefore require switching back and forth between BibTex and BibLaTex.

It is highly recommended to save the bibliographical data in an external file and not in the.tex file. In principle it suffices to have a single bibliography file somewhere on the system, towhich all .tex documents can refer. This file can be supplied by a reference manager program,e.g. Mendeley. However, Mendeley sometimes writes trash into some of the fields, which makesBibLaTex crash or simply stop without giving error messages. To find the error, it is then

5

Page 14: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you

sometimes necessary to sift through the bibliography to find the entry that’s causing trouble(e.g. a “%” in a URL line which BibLaTex interprets as the beginning of a comment line). Toprevent this problem from appearing, the troublesome fields are set to empty in the bibliographysetup of this template.

6

Page 15: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you

Appendices

7

Page 16: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you
Page 17: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you

The popular stereotype of the researcher is that of a skeptic and apessimist. Nothing could be further from the truth!

Scientists must be optimists at heart, in order to block out theincessant chorus of those who say “It cannot be done”.

Prokhor Zakharov

TROUBLESHOOTING AWriting long documents in LATEXcan be frustrating at times, because the compiler can giveuseless error messages or changing something in one part of the document breaks a solutionwhich was previously working in some other part, or for a variety of other reasons. In myexperience, the following steps (often) lead to success:

1. Have a look at the manual of the package which is causing trouble.

2. Search for the error message (if there is one) on the internet. More likely than not, thesearch will end at Stack Exchange.

3. Delete the .aux, .bbl etc. -files and recompile.

4. Selectively comment out parts of the code until the error has been localized.

5. Ask a friend 1.

1If this step is always the first step instead of the last, the friendship may suffer

9

Page 18: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you
Page 19: Persönliche Website – Services & Ressourcen | ETH Zürichkuertenl/download/Thesis_Template/main.pdf · book [2] and a PhD Thesis [3]. Note that when compiling this document, you

BIBLIOGRAPHY

[1] A. Einstein. “Uber einen die Erzeugung und Verwandlung des Lichtes betreffenden heuris-tischen Gesichtspunkt.” Annalen der Physik 77 (2005), pp. 132–148. doi: 10.1002/andp.19053220607.

[2] M. Tinkham. Introduction to Superconductivity. Dover Publications, 2004.

[3] L. Kuerten. The superconductor-insulator transition in the LaAlO3/SrTiO33 interface -Tunneling and Field Effect Investigations. PhD thesis. MPI for Soild-State Research, 2017.doi: 10.18419/opus-9529.

11