Write appealing documents with LaTeX

I admit that this title should read “How To write documents that Sebastian finds appealing with LaTeX”…

Basics

Several things are needed to write documents in LaTeX, the ones I mention here do run under Linux and as far as I know also under Windows. A notable exception is the graphics section which I am afraid is not accessible from the Windows-world except perhaps via cygwin.

  1. A LaTeX Distribution: I like very much TeX Live, it is more up-to-date than the teTeX often shipped with Linux distributions. TeX Live can run without install from a CD or it can be installed which is essentially copied in a directory — afterwards, three lines have to be added to the ~/.bashrc which is no problem (the modified .bashrc will be read at the next login). I always use pdfLaTeX. It outputs directly a pdf-file which is very convenient and has amazing features (see microtype.pdf). The pictures have to have jpg, png, or pdf format. eps is not processed.
  2. A Text editor: Over time, I got used to gVim which is in combination with the latex suite (a plugin) a very nice editor. However, there are many other editors most of which will supply a more graphical interface.
  3. A pdf-viewer (we will always use pdflatex): xpdf does everything we need, the Adobe Acrobat Reader had in some versions the problem that it locks the displayed file (meaning that you cannot change a document you are viewing — this is very annoying). Last version that works is 5.something, could be that they changed it in the latest version again.

Existing
Documentation

There is a lot of documentation on the web for LaTeX, if you cannot find the answer to your question in one of the many FAQs or package documentations, there will probably help available in a newsgroup — comp.text.tex in english and de.comp.text.tex in german, to mention two.

Some pdf documentations I find useful or interesting are given in the following. I gathered them in the internet and am not completely sure any more whichones I used in the end. Also the descriptions might be wrong…

Graphics

As already mentioned, pdfLaTeX accepts jpg, png, and pdf pictures. pdf pictures can be vector graphics, that means that you can zoom in on them as much as you like, they will always have sharp edges. If you scan your images or want to show photographs, they will already be in a bitmap format, so using jpg or png is fine. For other things like computer drawings or diagrams, however, the pdf format is very nice.

OpenOffice can produce pdf files right away. Every program can produce ps files (say print — to file) which can be converted to pdfs.

Now assume you have some text in your vector image — it will be in the font you selected in your program which is most probably not the font you use in your LaTeX document. This does not look nice and in the case the text is a formula, typing the formula in, say, Excel will be a pain and look very ugly. The solution is that you separate text from image and give the text to LaTeX for typesetting it at specified places on top of the image. This text is even searchable! There are two ways of achieving that, using xfig (older) or inkscape (newer) which I would like to present both in the following:

  • Install xfig (it should bring fig2dev with it) and pstoedit
  • Version one: draw everything directly in xfig and save as “combined pdf/latex”. As this is not very comfortable, we go on.
  • Save the two files given below: eps2fig3 and xfigfontmap.fmp. Take care about the line breaks. I don’t know if ‘bin’ is the right place to save it — most important is that your system finds eps2fig3 where you have to set the right path to the xfigfontmap. Don’t forget to make eps2fig3 executable. By the way, it handles ps files just as well as eps files.
  • Work with your favourite program. Whereever you want LaTeX to put a special character, just write one of about the same size. So, for example, DE where you would like to put $\Delta$E.
  • Save as ps or eps file
  • Call “eps2fig3 yourfile.ps”. xfig will pop up where you can change some things if you whish. You can also edit the text here (i.e. change to $\Delta$E), but this is not comfortable. I never find my cursor. Then close xfig, save changes. A couple new files will have appeared in the directory, two of them are important: the .pdftex and the .pdftex_t. The first one contains the graphic part, the second the text part.
  • Edit (if not already done in xfig) the .pdftex_t. You might want to look for places where the ps file used spaces to make horizontal spacings. This will of course not work any more in LaTeX. I
    have all my graphics in a subfolder called /img/ — you will have to adjust this to your needs. It is specified in the eps2fig3 file.
  • Add the following line to your header, it will make pdfLaTeX recognise pdftex as an image:
    \DeclareGraphicsRule{.pdftex}{pdf}{.pdftex}{}
  • Add also the following line there, it makes a command “infig” which you then can use to insert the graphics:
    \newcommand{\infig}[2]{\resizebox{#1}{!}{\input{#2.pdftex_t}}}
  • Now simply input your graphic files. They will look great!
    =)

/usr/local/bin/eps2fig3

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env bash
#
# ein kleines bash-Skript, das zunaechst
# alle gefundenen eps-Dateien ins xfig-Format wandelt,
# und dabei mittels xfigfontmap die xfig-Dateien so modifiziert,
# dass alle Textfelder das special-Attribut (2, 9.Spalte)
# und die Schrfitart LaTeX-sans-serif (4, 6.Spalte) bekommen.
#
# (c) Matthias Firner 2004       GPL
#
# <a rel="nofollow" href="http://linux.matthiasfirner.de/latex.html" target="_blank">http://linux.matthiasfirner.de/latex.html</a>
#
# Will man Vektorgrafiken in LaTeX einbinden, so hat man immer das
# Problem, dass die Schriften in der Grafik sich von den Dokumentschriften
# unterscheiden.
#
# Das Vektorgrafikprogramm xfig bietet mit dem Export nach "Combined
# PDF/LaTeX" beziehungsweise "Combined PS/LaTeX" die Moeglichkeit, nur den
# Grafikteil als PDF oder Postscript auszugeben und den Text von LaTeX
# verarbeiten zu lassen (so dass z.B. auch Formeln moeglich sind), wobei
# er mittels einer picture-Umgebung passgenau auf die Grafik gelegt wird.
# Eine meiner Meinung nach brilliante Technologie.
# Wenn man jetzt aber komplexe Daten hat, die von irgendeinem anderen
# Programm kommen[1], hat man das Problem, diese vernnftig nach xfig
# importieren.
#
# Hierfr bietet sich pstoedit an, ein Programm, das unter bestimmten
# Voraussetzungen Postscript-Grafiken nach xfig (und in viele andere
# Formate) konvertieren kann. Dabei wird Text in der Grafik auch in xfig
# korrekt als Text (und ncht etwa als komplizierte Polygone) eingebunden.
# Seit Version 3.40 koennen dabei ber eine Schriftenersetzungstabelle
# auch gleich das "special flag" und die entsprechenden LaTeX-Schriften
# gesetzt werden.
#
# Um das zu vereinfachen und zu automatisieren, habe ich ein bash-skript
# (eps2fig3) geschrieben, das automatisch eps-Grafiken nach xfig
# konvertiert und dabei gleich mittels einer Fontmap-Datei die Schriften
# anpasst und das special-flag in den xfig-Dateien setzt.
#
# Kurzfassung:
# Man bringe seine Daten in Vektor-eps-Dateien, schicke die durch
# eps2fig3, bearbeite die Bilder ggf. in xfig nach und exportiere das dann
# nach PS/LaTeX bzw. PDF/LaTeX.
 
for d in "$@"
do
echo "processing $d"
base=`basename $d .ps`
base=`basename $base .eps`
 
# be prepared for both, ps and eps
# eps --&gt; fig:
 
pstoedit -mergetext -nomaptoisolatin1 -fontmap /usr/local/bin/xfigfontmap.fmp -f fig:-metric "$d" "$base.fig"
 
# replace letter by a4:
sed '/^Letter/s/Letter/A4/' "$base.fig" &gt; temp.fig
mv temp.fig "$base.fig"
 
# now open in xfig (edit, save it, exit xfig to proceed):
echo "please edit"
xfig -nosplash -metric -latexfonts -specialtext "$base.fig"
 
# now export the fig file to pdftex
echo "converting to pdftex..."
fig2dev -L pdftex ${base}.fig ${base}.pdftex
fig2dev -L pdftex_t -p ${base}.pdftex ${base}.fig ${base}.pdftex_t
 
# as all images will be in the img/ folder, we have to add this path to the includegraphics-command:
echo "add img/ path and clean up" # will 1) add img path; 2) remove color definition; 3) switch to sans serif
sed -i '2s@includegraphics{@includegraphics{img/@' "${base}.pdftex_t"
sed -i 's@\\color\[rgb\]{0,0,0}@@' "${base}.pdftex_t"
sed -i 's@familydefault@sfdefault@' "${base}.pdftex_t"
echo "done!"
 
done

/usr/local/bin/xfigfontmap.fmp

1
2
3
4
5
6
7
8
9
% a template for a fontmap for pstoedit to be used for the conversion
% of Postscript to xfig format using LaTeX fonts
%
 
Helvetica "LaTeX::special::Sans Serif"
Courier LaTeX::special::Typewriter
Times-Roman LaTeX::special::Roman
Times-Bold LaTeX::special::Bold
Helvetica-Bold "LaTeX::special::Sans Serif"

The second (newer) way is described for example in the release notes of inkscape or on CTAN.

  • Install inkscape, version >=0.48. For ubuntu 10.04, you’ll have to use a backport from 10.10:
    1
    2
    3
    
    sudo add-apt-repository ppa:ricotz/ppa
    sudo aptitude update
    sudo aptitude install inkscape

    Deactivate the repository when done with inkscape to avoid the installation of the new version of Thunderbird as it might be incompatible with your Add-Ons.

  • Version one: draw everything directly in inkscape and save as “combined pdf/latex”. As this is not very comfortable, we go on.
  • Save the file given below: ps2tex. Take care about the line breaks. I don’t know if ‘bin’ is the right place to save it — most important is that your system finds ps2tex. Don’t forget to make ps2tex executable. By the way, it handles ps files just as well as eps files.
  • Work with your favourite program. Whereever you want LaTeX to put a special character, just write one of about the same size. So, for example, DE where you would like to put $\Delta$E.
  • Save as ps or eps file
  • Call “ps2tex yourfile.ps”. A couple new files will have appeared in the directory, three of them are important: the .eps, .pdf and the .epspdf_tex. The first two contain the graphic part, the latter the text part.
  • Edit (if not already done in xfig) the _epspdf.tex. You might want to look for places where the ps file used spaces to make horizontal spacings. This will of course not work any more in LaTeX.
  • Add the following line to your tex file, it makes a command “infig” which you then can use to insert the graphics:
    \newcommand{\infig}[2]{\resizebox{#1}{!}{\textsf{\input{#2_epspdf.tex}}}}
  • Now simply input your graphic files. They will look great!
    =)

/usr/local/bin/ps2tex

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash
for d in "$@"; do
        echo "processing $d"
        base=`basename $d .ps`
        base=`basename $base .eps`   # be prepared for both, ps and eps
        # (e)ps --> pdf
        ps2pdf $d temp_pdf_file_for_inkscape.pdf
        # --> tex
        inkscape temp_pdf_file_for_inkscape.pdf -z -D --export-pdf="$base.pdf" --export-eps="$base.eps" --export-latex
        # remove temp file
        rm temp_pdf_file_for_inkscape.pdf
        # replace utf hyphen by latex hyphen
        sed -i 's@−@--@' "${base}.pdf_tex"
        # use one tex file for both, eps and pdf
        sed -i "s@${base}.pdf@${base}@" "${base}.pdf_tex"
        mv "${base}.pdf_tex" "${base}_epspdf.tex"
        rm "${base}.eps_tex"
        echo "done!"
done

The LaTeX Document

In the following, I simply give you the code with some explanations in
it. It consists of three files:

  • sbusch.sty
    It is not necessary to put the stuff in a style file, I found it more clearly arranged, that’s all. The only difference (apart from the first two lines) is that \usepackage becomes \RequirePackage. And you can omit eventual \makeatletter \makeatother.
  • main.tex
    This is the main document. It contains document-specific stuff and the big structure. The real text is in other files which are used as inputs here. This is the document to compile.
  • example.tex
    A file which would correspond to a chapter.

Most should be self-explaining, otherwise the package documentations should help. Of course, I will also be happy to answer questions: webmaster@thamnos.de
.

sbusch.sty

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{sbusch}[2006/09/19 standard packages]
 
%%%%%
% input
%%%%%
\RequirePackage[utf8]{inputenc}			 % unicode
\RequirePackage[l2tabu,				 % according to l2tabu
                abort				 % not only warning but errors
               ]{nag}				 % error for depreciated stuff
\g@addto@macro\nag@captions{,SubFloat}		 % tell nag that subfloat creates a caption so that it allows to place a label
 
%%%%%
% output text
%%%%%
%%% provide letters etc
\RequirePackage{cmap}				 % allow to search for ligatures
\RequirePackage[T1]{fontenc}			 % european computer modern font: cm-super
\RequirePackage{textcomp}			 % some signs like yen, ... (load after T1)
\RequirePackage{eurosym}			 % provides euro
\RequirePackage{hfoldsty}			 % minuskelziffern
\RequirePackage{relsize}			 % allow \smaller, ...
 
%%% spacings
\RequirePackage{microtype}			 % do protrusion and expansion
\nonfrenchspacing{}				 % bigger space after fullstop
\RequirePackage{xspace}				 % replace eaten spaces at end of macros
%\makeatletter					 % make spacings also work inside minipages etc
%\newcommand{\orig@minipagerestore}{}
%\let\orig@minipagerestore=\@minipagerestore
%\def\@minipagerestore{%
%  \orig@minipagerestore
%  \setlength{\parindent}{1ex}%			 % first line in paragraph to the left
%  \addtolength{\parskip}{0.2ex}%		 % first line in paragraph to the top
%}
%\makeatother
 
%%% special text
\RequirePackage[style=swiss]{csquotes}		 % easy use of guillemets (also nested) with \enquote{}
\RequirePackage[np]{numprint}			 % write numbers with exponents easily
  \global
  \npfourdigitnosep
  \npthousandsep{\,}
  \npdecimalsign{\ensuremath{.}}
  \npproductsign{\ensuremath{\cdot{}}}
  \npunitseparator{\,}
  \npdegreeseparator{}
\RequirePackage{url}				 % linebrak urls
\RequirePackage{xcolor}				 % make colour available -- better than {color}
 
%%% colours
\definecolor{TUM-blue}{cmyk}{1,0.43,0,0}
\definecolor{TUM-grey}{cmyk}{0,0,0,0.6}
 
%%%%%
% headings, footnotes, ...
%%%%%
%%% margin of page
\RequirePackage[automark]{scrpage2}		 % access to page head- and footnotes
\pagestyle{scrheadings}				 % make use of it
\RequirePackage{lastpage}			 % gives number of last page in document
\RequirePackage{extramarks}			 % additional marks for headers
 
%%% footnotes
\RequirePackage{fnbreak}			 % warn for split footnotes
 
%%%%%
% tables, graphics &amp; floating stuff
%%%%%
%%% tables
\RequirePackage{booktabs}			 % nice tables
 
%%% graphics
\RequirePackage[pdftex]{graphicx}		 % input (normal) pictures
\newcommand{\infig}[2]{\resizebox{#1}{!}{\input{#2.pdftex_t}}}	 % \resizebox{width}{height} -- {!} = adjust height proportionally
\DeclareGraphicsRule{.pdftex}{pdf}{.pdftex}{}	 % input xfig-treated pictures: \infig{width}{img/file}
\RequirePackage{tikz}				 % draw with pdflatex
 
%%% float
\RequirePackage{flafter}			 % put floating environment always after its link in the text
\RequirePackage[caption=0,indention=1em]{subfig} % subfloats, do not load caption (interfers with koma)
\setcapindent{1em}				 % how to set captions of normal floats: second ff lines 1em indented
 
%%% references
%\RequirePackage{varioref}			 % provides vref which gives also page number in links
\newcommand{\vref}[1]{\ref{#1}}
 
%%%%%
% mathematics
%%%%%
\RequirePackage[intlimits]{amsmath}		 % integral limits above and below
\RequirePackage[psamsfonts]{amssymb}		 % scalable ps-symbols
\RequirePackage{onlyamsmath}			 % forbids normal latex math mode
\RequirePackage{mathcomp}			 % same as textcomp in math mode
\RequirePackage{nicefrac}			 % set nice fractions
\RequirePackage{units}				 % set units upright and in correct face
\RequirePackage[liter,				 % set as a small l
                noabbrv				 % does not find them anyway
               ]{unitsdef}			 % to write units plain text
\renewcommand{\unitvaluesep}{\hspace*{0em}}	 % switch off unitdef's internal spacing and replace with next line
\newcommand\q[2]{\numprint{#1}\,#2}		 % use: \q{15,00000e15}{\micohm}
\newcommand\qt[2]{{\npunit{#2}} #1}		 % use: \qt{15,00000e15}{\micohm} in tables with column type n/N{2}{3} for alignment at decimal point
 
%%%%%
% index, bib
%%%%%
%%% bibliography
\RequirePackage[colon,				 % seperate multiple citations with colons
                authoryear,			 % not numbers
                sort&amp;compress
               ]{natbib}			 % citations
 
%%% index
\RequirePackage{makeidx}
\makeindex{}
 
%%%%%
% pdf and hyperref setup
%%%%%
%%% pdf
\pdfcompresslevel=9				 % highest compression
\pdfcatalog{ /PageMode /UseNone	}		 % open pdf hiding bookmarks and thumbnails
 
%%% hyperref
\RequirePackage[pdftex,				 % backend for hyperref
                a4paper,			 % paper size
                pdfborder={0 0 0},		 % width of pdf link border
                bookmarks,			 % make pdf bookmarks
                bookmarksnumbered,		 % include section numbers
                bookmarksopen=false,		 % subtrees not expanded
                pdfpagemode=none,		 % how file is opened (thumbnails, ...)
                pdfstartview=Fit,		 % FitH = fit horizontally -- Fit = whole page
                pdfpagelayout=Facing,		 % how pages are shown -- OneColumn, TwoColumnRight
                breaklinks=true,		 % links may break over lines
                pageanchor=true,		 % makes an anchor on every page (to be able to make links to pages)
                plainpages=false,		 % anchors have formatted form, i.e. ii != 2
                pdfpagelabels,			 % display e.g. ii (2 of 40)
                pagebackref,			 % in bibliography: show page numbers where mentioned. backref: show sections
                hyperindex,			 % link index to text
               ]{hyperref}			 % make links
\hypersetup{ pdfauthor = {Sebastian Busch},	 % additional information in pdf
             pdftitle = {Diffusion in Concentrated Protein Solutions},
             pdfsubject = {Diplomarbeit},
             pdfkeywords = {Protein, Diffusion, Quasielastic Neutron Scattering},
             colorlinks=false,			 % links will have a special text colour -- use only for desktop!
             linkcolor=TUM-blue,		 % inside document
             anchorcolor=TUM-blue,		 % colour of anchor text
             citecolor=TUM-blue,		 % link to literature
             filecolor=TUM-blue,		 % link to local file
             menucolor=TUM-blue,		 % acrobat menu items
             pagecolor=TUM-blue,		 % link to other pages
             urlcolor=TUM-blue,			 % link to internet
           } %
\RequirePackage{hypernat}			 % make hyperref and natbib interwork
 
%%%%%
% TUM specific
%%%%%
%%% headings
\addtokomafont{sectioning}{\color{TUM-blue}}
 
%%% item environment
\renewcommand{\labelitemi}{{\color{TUM-grey}\rule[0ex]{1ex}{1ex}}\ }
 
%%%%%
% abbrevations etc
%%%%%
\newcommand{\inindex}[1]{#1\index{#1}}		 % \inindex{x} = x\index{x}


main.tex

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
\RequirePackage{fix-cm}
\documentclass[12pt,			 % use 12pt instead of 11 as standard
               a4paper,			 % page size
               pdftex,			 % tell pdflatex that pdf is output for writing page sizes
               titlepage,		 % own page for title
               cleardoubleempty,	 % page before new chapter is completely empty
               bibtotoc,		 % bibliography to toc
               liststotoc,		 % lof and lot
               idxtotoc,		 % index
               openbib,			 % in bib: title on own line
              ]{scrbook}
 
\usepackage{sbusch}
 
%for being able to align subfloats at their tops
\newsavebox{\tempboxone}
\newsavebox{\tempboxtwo}
%
\newcommand{\figbox}[3]{{% Params: {height}{width}{text}
	\hbox to #2{%
		\vbox to #1{%
			\vfil
			\hbox to #2{%
				\hfil
				#3
			\hfil}%
			\vfil%
		}%
	}%
}}
 
\usepackage{listings}
\usepackage{pdflscape}
\usepackage{supertabular}
 
\definecolor{my-lila}{rgb}{1, 0, 1}
\definecolor{my-blau}{rgb}{0, 0, 1}
\definecolor{my-gruen}{rgb}{0, 1, 0}
\definecolor{my-braun}{rgb}{0.6, 0.3, 0}
\definecolor{my-orange}{rgb}{1, 0.6, 0}
 
\lstset{numbers=left, numberstyle=\tiny, stepnumber=1, numbersep=5pt,
  breaklines=true,
  showspaces=true,
  frame=lines,
  basicstyle=\footnotesize\ttfamily,
  }
 
\lstdefinelanguage{my-python}
  {comment=[l][\color{my-blau}]{\#},
   string=[b][\color{my-braun}]',
   morestring=[b][\color{my-braun}]",
   keywords={from, import, def, open, close, read, readlines, write, len, range, append, return}, keywordstyle={\color{my-lila}},
   emph={[1]for, in, if, else, print}, emphstyle={[1]\color{my-orange}},
   emph={[2]int, float, split, linesep, zfill, str, cos, exp, sin, sqrt}, emphstyle={[2]\color{my-braun}}}
 
\lstdefinelanguage{my-fortran}
  {comment=[l][\color{my-blau}]{!},
   string=[b][\color{my-braun}]',
   keywords={RETURN, DO, ENDDO}, keywordstyle={\color{my-lila}},
   emph={[1]IF, ELSE, ELSEIF, ENDIF, eq, ge, gt, le, lt, ne, THEN}, emphstyle={[1]\color{my-orange}},
   emph={[2]character, double, INTEGER, PARAMETER, PRECISION, REAL, DOUBLE, DBLE, CMPLX, EXTERNAL, dcos, dsin, sqrt, dabs, dexp, dquot0}, emphstyle={[2]\color{my-braun}}}
 
\lstdefinelanguage{my-i96}
  {comment=[l][\color{my-blau}]{\#},
   string=[b][\color{my-braun}]',
   keywords={eob}, keywordstyle={\color{my-lila}},
   emph={[1]}, emphstyle={[1]\color{my-orange}},
   emph={[2]}, emphstyle={[2]\color{my-braun}}}
 
% getting a SubFloat environment
\makeatletter
\newbox\sf@box
\newenvironment{SubFloat}[2][]%
  {%
    \def\sf@one{#1}%
    \def\sf@two{#2}%
    \setbox\sf@box\hbox
    \bgroup%
  }%
  {%
    \egroup
    \ifx\@empty\sf@two\@empty\relax
      \def\sf@two{\@empty}
    \fi
    \ifx\@empty\sf@one\@empty\relax
      \subfloat[\sf@two]{\box\sf@box}%
    \else
      \subfloat[\sf@one][\sf@two]{\box\sf@box}%
    \fi%
  }
\makeatother
 
\newcommand{\ensuretext}[1]{\ensuremath{\text{#1}}}
\newcommand{\command}[1]{\texttt{#1}}
\newcommand{\h}[1]{\multicolumn{1}{c}{#1}}
 
\newcommand{\ie}{i.\,e.\@\xspace}	 % \@ prevents space from being a french one
\newcommand{\eg}{e.\,g.\@\xspace}
\newcommand{\Q}{\ensuremath{Q}\xspace}
\newcommand{\Qsq}{\ensuremath{Q^2}\xspace}
\newcommand{\E}{\ensuremath{E}\xspace}
\newcommand{\dE}{\ensuremath{\Delta E}\xspace}
\newcommand{\D}{\ensuremath{D}\xspace}
\newcommand{\vQ}{\ensuremath{\vec{Q}}\xspace}
\newcommand{\SQw}{\ensuremath{S(Q,\omega{})}\xspace}
\newcommand{\IQt}{\ensuremath{I(Q,t)}\xspace}
\newcommand{\Grt}{\ensuremath{G(r,t)}\xspace}
\newcommand{\F}{\ensuremath{\mathcal{F}}\xspace}
\newcommand{\twthha}{\ensuremath{\frac{2 \theta}{2}}\xspace}
\newcommand{\twth}{\ensuremath{2 \theta}\xspace}
\newcommand{\HtO}{\ensuretext{H\textsubscript{2}O}\xspace}
\newcommand{\DtO}{\ensuretext{D\textsubscript{2}O}\xspace}
\newcommand{\Ot}{\ensuretext{O\textsubscript{2}}\xspace}
\newcommand{\dg}{\ensuremath{\mathrel{\mathop:}=}\xspace}
\newcommand{\gd}{\ensuremath{=\mathrel{\mathop:}}\xspace}
\newcommand{\uu}{{\ensuremath{\uparrow \! \uparrow}}\xspace}
\newcommand{\ud}{{\ensuremath{\uparrow \! \downarrow}}\xspace}
\newcommand{\du}{{\ensuremath{\downarrow \! \uparrow}}\xspace}
\newcommand{\dd}{{\ensuremath{\downarrow \! \downarrow}}\xspace}
\newcommand{\bcoh}{\ensuremath{b_\text{coh}}\xspace}
\newcommand{\binc}{\ensuremath{b_\text{inc}}\xspace}
\newcommand{\de}{\ensuremath{\mathrm{d}}}
\newcommand{\corresponds}{\mathrel{\widehat{=}}}
% acronyms
\newcommand{\HWHM}{\ensuretext{\textsmaller{HWHM}}\xspace}
\newcommand{\FWHM}{\ensuretext{\textsmaller{FWHM}}\xspace}
\newcommand{\EISF}{\ensuretext{\textsmaller{EISF}}\xspace}
\newcommand{\HFBS}{\ensuretext{\textsmaller{HFBS}}\xspace}
\newcommand{\NIST}{\ensuretext{\textsmaller{NIST}}\xspace}
\newcommand{\SPHERES}{\ensuretext{\textsmaller{SPHERES}}\xspace}
\newcommand{\TOFTOF}{\ensuretext{\textsmaller{TOFTOF}}\xspace}
\newcommand{\MIBEMOL}{\ensuretext{\textsmaller{MIBEMOL}}\xspace}
\newcommand{\OSIRIS}{\ensuretext{\textsmaller{OSIRIS}}\xspace}
\newcommand{\ISIS}{\ensuretext{\textsmaller{ISIS}}\xspace}
\newcommand{\ILL}{\ensuretext{\textsmaller{ILL}}\xspace}
\newcommand{\LLB}{\ensuretext{\textsmaller{LLB}}\xspace}
\newcommand{\MW}{\ensuretext{\textsmaller{MW}}\xspace}
\newcommand{\FRIDA}{\ensuretext{\textsmaller{FRIDA}}\xspace}
\newcommand{\PSI}{\ensuretext{\textsmaller{PSI}}\xspace}
\newcommand{\FReM}{\ensuretext{\textsmaller{FRM II}}\xspace}
\newcommand{\PCS}{\ensuretext{\textsmaller{PCS}}\xspace}
\newcommand{\SANS}{\ensuretext{\textsmaller{SANS}}\xspace}
\newcommand{\ANTARES}{\ensuretext{\textsmaller{ANTARES}}\xspace}
\newcommand{\RNA}{\ensuretext{\textsmaller{RNA}}\xspace}
\newcommand{\NMR}{\ensuretext{\textsmaller{NMR}}\xspace}
\newcommand{\INten}{\ensuretext{\textsmaller{IN}10}\xspace}
\newcommand{\INthirteen}{\ensuretext{\textsmaller{IN}13}\xspace}
\newcommand{\INsixteen}{\ensuretext{\textsmaller{IN}16}\xspace}
\newcommand{\UV}{\ensuretext{\textsmaller{UV}}\xspace}
\newcommand{\UVVIS}{\ensuretext{\textsmaller{UV/VIS}}\xspace}
\newcommand{\CD}{\ensuretext{\textsmaller{CD}}\xspace}
\newcommand{\PST}{\ensuretext{\textsmaller{PST}}\xspace}
\newcommand{\tangstrom}{\ensuretext{\AA ngström}\xspace}
\newcommand{\FORTRAN}{\ensuretext{\textsmaller{FORTRAN}}\xspace}
\newcommand{\NAG}{\ensuretext{\textsmaller{NAG}}\xspace}
\newcommand{\PYTHON}{\ensuretext{\textsmaller{PYTHON}}\xspace}
 
%%% units
% lengths
\newunit{\cm}{\centi\meter}
\newunit{\mm}{\milli\meter}
\newunit{\um}{\micro\meter}
\newunit{\nanom}{\nano\meter}
\newunit{\angstrom}{\ensuretext{\AA}}
\newunit{\angstromsq}{\ensuretext{\AA}\unitsuperscript{2}}
\newunit{\rangstrom}{\ensuretext{\AA}\unitsuperscript{-1}}
\newunit{\rangstromsq}{\ensuretext{\AA}\unitsuperscript{-2}}
\newunit{\qangstrom}{\ensuretext{\AA}\unitsuperscript{3}}
\newunit{\fm}{\femto\meter}
\newunit{\barn}{\ensuretext{barn}}
\newunit{\mdeg}{\ensuretext{mdeg}}
% times
\newunit{\us}{\micro\second}
\newunit{\ns}{\nano\second}
\newunit{\ps}{\pico\second}
\newunit{\rns}{\nano\second\unitsuperscript{-1}}
% energies
\newunit{\eV}{\electronvolt}
\newunit{\meV}{\milli\electronvolt}
\newunit{\ueV}{\micro\electronvolt}
\newunit{\rueV}{\micro\electronvolt\unitsuperscript{-1}}
% matter
\newunit{\ml}{\milli\liter}
\newunit{\mg}{\milli\gram}
\newunit{\Da}{\ensuretext{Da}}
\newunit{\kDa}{\ensuretext{kDa}}
\newunit{\molar}{\per{\mole}{\liter}}
\newunit{\gpmole}{\per{\gram}{\mole}}
\newunit{\molepg}{\per{\mole}{\gram}}
\newunit{\mmolar}{\per{\millimole}{\liter}}
\newunit{\umolar}{\per{\micromole}{\liter}}
\newunit{\mlpg}{\per{\milliliter}{\gram}}
\newunit{\gpml}{\per{\gram}{\milliliter}}
\newunit{\kgpmcu}{\per{\kilogram}{\cubicmeter}}
% other
\newunit{\mps}{\per{\meter}{\second}}
\newunit{\smps}{\per{\squaremeter}{\second}}
\newunit{\mPas}{\milli\pascal\second}
\newunit{\rpm}{\ensuretext{rpm}}
 
\hyphenation{}
 
\begin{document}
 
%%%%%
\frontmatter
%%%%%
 
\input{txt/title}
 
\pdfbookmark[0]{Contents}{Contents}
\tableofcontents{}
 
%%%%%
\mainmatter
%%%%%
 
\input{txt/intro}
 
\input{txt/theory}
 
\input{txt/matmet}
 
\input{txt/data}
 
\input{txt/results}
 
\input{txt/discussion}
 
\input{txt/conclusion}
 
\appendix
 
\input{txt/appendix}
 
%%%%%
\backmatter
%%%%%
\pagenumbering{Alph}
 
%%% bib lof lot idx
\bibliographystyle{plainnat}
\bibliography{bib/literature}
 
\listoffigures{}
 
\listoftables{}
 
%\printindex{}
%
%%% danksagung
\input{txt/merci}
 
\end{document}

example.tex

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
\chapter{Introduction}
 
\section{Diffusion in Biology}
 
We hardly notice the physical process of mass \emph{diffusion}. It is only scents which can be transported by diffusion over larger distances -- and even these are much faster when transported by the wind. In the liquid state, diffusion is too slow for us to notice: even coffee has to be stirred to distribute the sugar which has been dissolved in it. A review by \citet{purcell1977} points out that this changes dramatically in the \enquote{micron world} inhabited by cells. Here, diffusion is \emph{the only} way of transport.
 
%%%%% this is a scanned image
 
\begin{figure}
\begin{captionbeside}[A chloroplast]{A textbook picture of a chloroplast (taken from \cite{alberts}). Some organelles float in -- empty spaces?}
\includegraphics{img/chloroplast}
\end{captionbeside}
\label{fig:chloroplast}
\end{figure}
 
%%%%% this is a computer-generated pdf without text
 
\begin{figure}
\begin{captionbeside}[In-scale picture of proteins in water at a volume fraction of $\phi$ = 0.4]{In-scale picture of proteins (grey) in water (blue) at a volume fraction of $\phi$~=~0.4. The two-dimensional representation is not capable of reflecting the three-dimensional problem completely. The values for water are taken from \citet{chaplin,martz}.}
\begin{SubFloat}{\label{subfig:in-scale_grey}}
\includegraphics[width=0.2\textwidth]{img/in-scale-grey}
\end{SubFloat}
\begin{SubFloat}{\label{subfig:in-scale_big_grey}}
\includegraphics[width=0.2\textwidth]{img/in-scale-big-grey}
\end{SubFloat}
\end{captionbeside}
\label{fig:in-scale-volfrac}
\end{figure}
 
%%%%% this is an image with text
 
\begin{figure}
\begin{captionbeside}[Diffusion coefficient as a function of \Q seen with spin echo]{The diffusion coefficient as a function of \Q seen with neutron spin echo spectroscopy (taken from \citet{longeville2003}). Three volume fractions $\phi$ are shown, error bars are omitted for clarity. The diffusion coefficient decreases with increasing \Q and concentration. At high \Q, a plateau is reached which was assigned to self diffusion.}
\infig{0.45\textwidth}{img/nse-DofQ}
\end{captionbeside}
\label{fig:nse-DofQ}
\end{figure}
 
%%%%% this is a picture drawn with tikz
 
\begin{figure}
\centering
\begin{SubFloat}{The dynamical ranges of several scattering techniques \citep{mesot}. Neutrons have the big advantage of probing energies on the molecular level. The application areas are also influenced by the penetration depth and interaction strengths of the different techniques.}
\begin{tikzpicture}
% axes
 
\draw[-&gt;] (-2,0) -- (2,0);
\draw (2cm,-1mm) node [anchor=north] {\tiny{$Q [\rangstrom]$}};
\draw[-&gt;] (0,-4) -- (0,2);
\draw (-1mm,2cm) node [anchor=east] {\tiny{$E [\electronvolt]$}};
 
\foreach \x in {-1,0,1}
\draw (\x cm,-1mm) -- (\x cm,1mm);
\foreach \x in {-1,1}
\draw (\x cm,-1mm) node [anchor=north] {\tiny{$10^{\x}$}};
\foreach \y in {-3,-2,-1,0,1}
 
\draw (-1mm,\y cm) -- (1mm,\y cm);
\foreach \y in {-3,-2,-1,1}
\draw (-1mm,\y cm) node [anchor=east] {\tiny{$10^{\y}$}};
% x-ray
\fill[semitransparent,red] (0,1) circle (2.5mm);
 
\draw (0,1) node [anchor=south east] {X-rays};
% electrons
\fill[semitransparent,gray] (1,1) circle (2.5mm);
\draw (1.25,1) node [anchor=west] {Electrons};
% light
 
\fill[semitransparent,gray] (-1,-1) circle (2.5mm);
\draw (-1.25,-1) node [anchor=east] {Light};
% neutrons
\fill[semitransparent,blue] (0,-1) ellipse (2.5mm and 12.5mm);
\draw (0.25,-1) node [anchor=west] {Neutrons};
 
% mössbauer
\fill[semitransparent,gray] (0,-3) circle (2.5mm);
\draw (0.25,-3) node [anchor=west] {Mössbauer};
\end{tikzpicture}
\end{SubFloat}
\qquad
\begin{SubFloat}{Dispersion relations of X-rays and neutrons \citep{ashcroftmermin}.}
\begin{tikzpicture}[xscale=2,yscale=0.5]
\draw (-1,-6) rectangle (1,6);
 
% horiz
\foreach \y in {-4,-2,0,2,4}
\draw (-1cm,\y cm) -- (1cm,\y cm);
\foreach \y in {-6,-4,-2,0,2,4,6}
\draw (-1cm,\y cm) node [anchor=east] {\tiny{$10^{\y}$}};
 
% vert
\draw (0,-6) -- (0,6);
\foreach \x in {-1,0,1}
\draw (\x cm,-6 cm) node [anchor=north] {\tiny{$10^{\x}$}};
 
% label
\draw (-1.3,0) node [anchor=east] {\tiny{E[\eV{}]}};
\draw (0,-6.8) node [anchor=north] {\tiny{k[\rangstrom{}]}};
 
% lines
\draw [thick,red] (-1,2.7) -- (1,4.6);
\draw [thick,blue] (-1,-5.4) -- (1,-1.6);
 
% text
\draw (0,3) node [anchor=west] {$E_\gamma = p_\gamma c$};
\draw (-1,-3) node [anchor=west] {$E_n = \frac{p_n^2}{2M_n}$};
\end{tikzpicture}
\end{SubFloat}
\caption{Comparison of neutrons with other scattering probes regarding the accessible \Q- and \E-range.}
\label{fig:disprel}
\end{figure}
 
%%%%% this is a table that fits on a single page
 
\begin{table}
\centering
\begin{tabular}{ccN{2}{4}N{2}{2}N{2}{2}} \toprule
Isotope &amp; Spin &amp; \h{$\sigma_\text{coh}$} &amp; \h{$\sigma_\text{inc}$} &amp; \h{$\sigma_\text{tot}$} \\ \midrule
 
\textsuperscript{1}H &amp; \nicefrac{1}{2} &amp; 1.7583 &amp; 80.27 &amp; 82.03 \\
\textsuperscript{2}D &amp; 1 &amp; 5.592  &amp;  2.05 &amp;  7.64 \\
\textsuperscript{12}C &amp; 0 &amp; 5.559  &amp;  0    &amp;  5.55 \\
\textsuperscript{14}N &amp; 1 &amp; 11.03  &amp;  0.5  &amp; 11.51 \\
\textsuperscript{16}O &amp; 0 &amp; 4.232  &amp;  0    &amp;  4.23 \\
\textsuperscript{32}S &amp; 0 &amp; 0.988  &amp;  0    &amp;  1.03 \\
\textsuperscript{56}Fe &amp; 0 &amp; 12.42   &amp;  0    &amp; 11.62 \\
\bottomrule
\end{tabular}
\caption[Cross sections of isotopes contained in proteins]{Cross sections of isotopes contained in proteins. Cross sections from \citet{nistnlengths}, nuclear spins from \citet{berkeleyisotopes}. The total cross sections are -- except H and D -- given for the natural mix of isotopes.}
\label{tab:crossec}
\end{table}
 
%%%%% here are two subfigures of unequal size that should be aligned at the top
 
\begin{figure}
\centering
 
\sbox{\tempboxone}{\infig{0.45\textwidth}{img/protein-series}}%
\sbox{\tempboxtwo}{\infig{0.45\textwidth}{img/hb-q-series}}%
\begin{SubFloat}{\label{subfig:myo-conc-series}}
\infig{0.45\textwidth}{img/myo-conc-series}
\end{SubFloat}
\hfill
\begin{SubFloat}{\label{subfig:lys-conc-series}}
\infig{0.45\textwidth}{img/lys-conc-series}
\end{SubFloat}
\hfill
\begin{SubFloat}{\label{subfig:protein-series}}
\vbox to \ht\tempboxtwo{%
\figbox{\ht\tempboxone}{0.45\textwidth}{\usebox{\tempboxone}}%
\vfil%
}%
\end{SubFloat}
\hfill
\begin{SubFloat}{\label{subfig:hb-q-series}}
\usebox{\tempboxtwo}%
\end{SubFloat}
\caption[Measurements on \HFBS]{Measurements on \HFBS. At the example of \Q = \q{0.99}{\rangstrom}, the recorded spectra are shown together with the resolution. All spectra were normalised to 1 to ease comparison. \subref{subfig:myo-conc-series}: myoglobin solutions at four concentrations. \subref{subfig:lys-conc-series}: lysozyme at different concentrations. As no diffusion was observed for the highest concentration, the sample was also measured at elevated temperature. \subref{subfig:protein-series}: the three different proteins at approximately the same concentration. Haemoglobin inside the red blood
cells exhibits a slower diffusion than the proteins in pure \DtO solution. This is due to the size of haemoglobin and to a minor extent also due to the higher viscosity of the buffer. \subref{subfig:hb-q-series}: Spectrum of Haemoglobin at several \Q-values.}
\label{fig:series}
\end{figure}
 
%%%%% subfigures of equal height
 
\begin{figure}
\centering
\begin{SubFloat}{Spectrum of lysozyme, measured at $\phi$~=~0.32 and $T$~=~\q{293}{\kelvin} compared with vanadium.\label{subfig:l3-spec06}} \infig{0.45\textwidth}{img/l3-spec06}
\end{SubFloat}
\hfill
\begin{SubFloat}{Spectrum of lysozyme, measured at $\phi$~=~0.32 and $T$~=~\q{293}{\kelvin} compared with vanadium.\label{subfig:l3-spec13}} \infig{0.45\textwidth}{img/l3-spec13}
\end{SubFloat}
 
\begin{SubFloat}{Spectrum of lysozyme, measured at $\phi$~=~0.32 and $T$~=~\q{320}{\kelvin} with a fit using one Lorentzian.\label{subfig:l4-spec06-1lor}}
\infig{0.45\textwidth}{img/l4-spec06-1lor}
\end{SubFloat}
\hfill
\begin{SubFloat}{Spectrum of lysozyme, measured at $\phi$~=~0.32 and $T$~=~\q{320}{\kelvin} with a fit using one Lorentzian.\label{subfig:l4-spec13-1lor}}
\infig{0.45\textwidth}{img/l4-spec13-1lor}
\end{SubFloat}
\caption[A broad line is prominent in lysozyme measurements]{A broad line is prominent in lysozyme measurements: \subref{subfig:l3-spec06} and \subref{subfig:l3-spec13}: Diffusion cannot be detected in lysozyme solutions at a volume fraction of $\phi$ = 0.32 at \q{293}{\kelvin}, the central line coincides with the one of vanadium. However, a broad component remains clearly visible. \subref{subfig:l4-spec06-1lor} and \subref{subfig:l4-spec13-1lor} show the same solution at \q{320}{\kelvin}. The central line is broadened by diffusion. It is obvious that a fit with only one Lorentzian does not describe the data.}
\label{fig:lysozyme-broadcomp}
\end{figure}
 
%%%%% this is a \textsmaller thing in a caption -- throws an error when put into the bookmark
 
\subsection{Measurements on \texorpdfstring{\TOFTOF}{TOFTOF}}
 
%%%%% now a table that is too long for a single page. it cannot go inside a table-environment
 
\begin{center}
\tablefirsthead{%
\toprule
\h{Sample} &amp; \h{$\phi$} &amp; \h{$h$} &amp; \h{$T$} &amp; \h{$\lambda$} &amp; \h{Ratio} &amp; \h{Run} \\
 &amp; \h{$\left[\frac{\ml}{\ml}\right]$} &amp; \h{$\left[\frac{\gram}{\gram}\right]$} &amp; \h{[\kelvin]} &amp; \h{[\angstrom]} &amp; &amp; \\ \midrule
}
%
\tablehead{%
\multicolumn{7}{l}{\textit{\ldots continued from previous page}}\\ \midrule
 
\h{Sample} &amp; \h{$\phi$} &amp; \h{$h$} &amp; \h{$T$} &amp; \h{$\lambda$} &amp; \h{Ratio} &amp; \h{Run} \\
 &amp; \h{$\left[\frac{\ml}{\ml}\right]$} &amp; \h{$\left[\frac{\gram}{\gram}\right]$} &amp; \h{[\kelvin]} &amp; \h{[\angstrom]} &amp; &amp; \\ \midrule
}
%
 
\tabletail{%
\midrule
\multicolumn{7}{r}{\textit{continued on next page\ldots}} \\
}
%
\tablelasttail{\bottomrule \\}
 
\bottomcaption[Table of all measurements done at \TOFTOF]{Table of all measurements done at \TOFTOF. For solutions is the volume fraction $\phi$ given, for powders the hydration $h$. Wavelength and ratio were always used in the same combination, see section \ref{sec:adjustableparams}. The files can be accessed by their run number. Most of the time, a run corresponds to one hour measurement time.}
\begin{supertabular}{lN{1}{2}N{1}{1}N{3}{0}N{2}{2}N{1}{0}l}
 
Vanadium \q{1}{\mm} &amp;      &amp;     &amp; 150 &amp; 10    &amp; 8 &amp; 5799 -- 5804 \\
Vanadium \q{1}{\mm} &amp;      &amp;     &amp; 150 &amp;  7    &amp; 6 &amp; 5805 -- 5810 \\
Vanadium \q{1}{\mm} &amp;      &amp;     &amp; 150 &amp;  4.75 &amp; 4 &amp; 5811 -- 5816 \\ \midrule
Vanadium \q{0.5}{\mm} &amp;      &amp;     &amp; 150 &amp; 10    &amp; 8 &amp; 6671 -- 6673 \\
Vanadium \q{0.5}{\mm} &amp;      &amp;     &amp; 150 &amp;  7    &amp; 6 &amp; 6674 -- 6676 \\ \midrule
Vanadium \q{0.5}{\mm} &amp;      &amp;     &amp; 290 &amp; 10    &amp; 8 &amp; 7340 -- 7347 \\
Vanadium \q{0.5}{\mm} &amp;      &amp;     &amp; 290 &amp;  7    &amp; 6 &amp; 7348 -- 7355 \\ \midrule
Empty Can &amp;      &amp;     &amp; 293 &amp; 10    &amp; 8 &amp; 5877 -- 5882 \\
Empty Can &amp;      &amp;     &amp; 273 &amp;  7    &amp; 6 &amp; 6007 -- 6009 \\
Empty Can &amp;      &amp;     &amp; 293 &amp;  7    &amp; 6 &amp; 5835 -- 5840 \\
Empty Can &amp;      &amp;     &amp; 320 &amp;  7    &amp; 6 &amp; 6010 -- 6011 \\
Empty Can &amp;      &amp;     &amp; 293 &amp;  4.75 &amp; 4 &amp; 5859 -- 5864 \\ \midrule
D2O &amp;      &amp;     &amp; 293 &amp; 10    &amp; 8 &amp; 5817 -- 5822 \\
D2O &amp;      &amp;     &amp; 268 &amp;  7    &amp; 6 &amp; 5971 -- 5976 \\
D2O &amp;      &amp;     &amp; 278 &amp;  7    &amp; 6 &amp; 5977 -- 5982 \\
D2O &amp;      &amp;     &amp; 293 &amp;  7    &amp; 6 &amp; 5823 -- 5828 \\
D2O &amp;      &amp;     &amp; 320 &amp;  7    &amp; 6 &amp; 5983 -- 5988 \\
D2O &amp;      &amp;     &amp; 293 &amp;  4.75 &amp; 4 &amp; 5829 -- 5834 \\ \midrule
Myoglobin solution &amp; 0.07 &amp;     &amp; 293 &amp; 10    &amp; 8 &amp; 5890 -- 5895 \\
Myoglobin solution &amp; 0.07 &amp;     &amp; 293 &amp; 7    &amp; 6 &amp; 5896 -- 5901 \\ \midrule
Myoglobin solution &amp; 0.13 &amp;     &amp; 293 &amp; 10    &amp; 8 &amp; 5841 -- 5846 \\
Myoglobin solution &amp; 0.13 &amp;     &amp; 268 &amp; 7    &amp; 6 &amp; 5914 -- 5919 \\
Myoglobin solution &amp; 0.13 &amp;     &amp; 278 &amp; 7    &amp; 6 &amp; 5922 -- 5927 \\
Myoglobin solution &amp; 0.13 &amp;     &amp; 293 &amp; 7    &amp; 6 &amp; 5847 -- 5852 \&amp; 5928 \\
Myoglobin solution &amp; 0.13 &amp;     &amp; 320 &amp; 7    &amp; 6 &amp; 5929 -- 5934 \\
Myoglobin solution &amp; 0.13 &amp;     &amp; 293 &amp;  4.75 &amp; 4 &amp; 5853 -- 5858 \\ \midrule
Myoglobin solution &amp; 0.21 &amp;     &amp; 293 &amp; 10    &amp; 8 &amp; 5865 -- 5870 \\
Myoglobin solution &amp; 0.21 &amp;     &amp; 293 &amp; 7    &amp; 6 &amp; 5871 -- 5876 \\ \midrule
Myoglobin powder &amp;      &amp; 0.2 &amp; 273 &amp; 7    &amp; 6 &amp; 5941 -- 5946 \\
Myoglobin powder &amp;      &amp; 0.2 &amp; 293 &amp; 7    &amp; 6 &amp; 5902 -- 5907 \\
Myoglobin powder &amp;      &amp; 0.2 &amp; 320 &amp; 7    &amp; 6 &amp; 5935 -- 5940 \\ \midrule
Myoglobin powder &amp;      &amp; 0.6 &amp; 273 &amp; 7    &amp; 6 &amp; 5989 -- 5994 \\
Myoglobin powder &amp;      &amp; 0.6 &amp; 293 &amp; 7    &amp; 6 &amp; 5995 -- 6000 \\
Myoglobin powder &amp;      &amp; 0.6 &amp; 320 &amp; 7    &amp; 6 &amp; 6001 -- 6006 \\ \midrule
$\beta$-Casein solution &amp; 0.07 &amp;     &amp; 268 &amp;  7 &amp; 6 &amp; 5965 -- 5970 \\
$\beta$-Casein solution &amp; 0.07 &amp;     &amp; 278 &amp;  7 &amp; 6 &amp; 5947 -- 5952 \\
$\beta$-Casein solution &amp; 0.07 &amp;     &amp; 293 &amp;  7 &amp; 6 &amp; 5953 -- 5958 \\
$\beta$-Casein solution &amp; 0.07 &amp;     &amp; 320 &amp;  7 &amp; 6 &amp; 5959 -- 5964 \\
\end{supertabular}
\label{tab:toftofmeasurements}
\end{center}

The document won’t compile, I’m afraid. However, I think that it is possible to look up all things here and reproduce them. If this is not the case, there should be an error, or you have questions, please contact me: webmaster@thamnos.de .
Sebastian.

4 Responses to “Write appealing documents with LaTeX”

  1. mike says:

    Hi, in the code below you have a buggy empty line 83. But thanks a lot for the macro, really helps

    \makeatletter
    \newbox\sf@box
    \newenvironment{SubFloat}[2][]%
    {%
    \def\sf@one{#1}%
    \def\sf@two{#2}%
    \setbox\sf@box\hbox
    \bgroup%
    }%

    {%
    \egroup
    \ifx\@empty\sf@two\@empty\relax
    \def\sf@two{\@empty}
    \fi
    \ifx\@empty\sf@one\@empty\relax
    \subfloat[\sf@two]{\box\sf@box}%
    \else
    \subfloat[\sf@one][\sf@two]{\box\sf@box}%
    \fi%
    }
    \makeatother

  2. Sebastian says:

    thanks — should be corrected now!

  3. Sebastian says:

    i heard that siunitx is a better way to work with units.

  4. Sebastian says:

    todonotes looks like a great package to make comments in a latex text.

    latexdfiff is similar to the “follow changes” feature in office applications.

Leave a Reply