Invert the intermezzo offset.
[matthijs/master-project/report.git] / Utils / Formats.tex
1 %
2 % Defines some useful formatting environments.
3 %
4
5 % A simple description format
6 \definedescription 
7   [desc]
8   [location=hanging,hang=20,width=broad]
9
10 % An (invisible) frame to hold some expression. Used to treat multiple lines
11 % as a single line and put it next to each other.
12 \define[1]\hiddenframe{
13         % The align=right option really does left-alignment, but without it,
14         % all lines will end up on a single line. The strut=no option prevents
15         % a bunch of empty space at the start of the frame.
16         \framed[offset=0mm,location=middle,strut=no,align=right,frame=off]{#1}
17 }
18
19 % Define a \strikethrough command. For some reason, this does blue
20 % strikethrough, sometime that still needs fixing. We add some offset,
21 % since the strikethrough is just below the middle for some reason.
22 \definetextbackground
23   [strikethrough]
24   [location=text,
25    alternative=4,
26    voffset=0.5mm,
27    background=,
28    frame=off]
29
30 \def\setwidthof#1\to#2%
31 {\bgroup
32 \setbox\scratchbox\hbox{#1}%
33 \expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}}
34
35 % Allow \emph{foo} (and {\emph foo}, but that's not really needed).
36 \definealternativestyle[emph][\em][]                                                                                                                         
37
38 % Put a bit of space betwen paragraphs, to make them easier to distinguish.
39 \setupwhitespace[small]
40
41 % Use the c alternative for the toc, which uses dots between the section
42 % name and the page number.
43 \setupcombinedlist      [content][alternative=c]
44
45 % vim: set sw=2 sts=2 expandtab: