line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Amuse::Compile::Templates; |
2
|
|
|
|
|
|
|
|
3
|
59
|
|
|
59
|
|
56737
|
use strict; |
|
59
|
|
|
|
|
122
|
|
|
59
|
|
|
|
|
1858
|
|
4
|
59
|
|
|
59
|
|
332
|
use warnings FATAL => 'all'; |
|
59
|
|
|
|
|
130
|
|
|
59
|
|
|
|
|
2156
|
|
5
|
59
|
|
|
59
|
|
302
|
use utf8; |
|
59
|
|
|
|
|
165
|
|
|
59
|
|
|
|
|
445
|
|
6
|
|
|
|
|
|
|
|
7
|
59
|
|
|
59
|
|
21001
|
use File::Spec::Functions qw/catfile/; |
|
59
|
|
|
|
|
37269
|
|
|
59
|
|
|
|
|
81060
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Text::Amuse::Compile::Templates - Built-in templates for Text::Amuse::Compile |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 METHODS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head2 new(ttdir => 'mytemplates') |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Costructor. Options: |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=over 4 |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=item ttdir |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
The directory where to search for templates. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
B: some things are needed for a correct |
26
|
|
|
|
|
|
|
layout/compilation. It's strongly reccomended to use the existing one |
27
|
|
|
|
|
|
|
(known to work as expected) as starting point for a custom template. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=item format_id |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
If passed, a template named C<${format_id}-${name}.tt> will be loaded |
32
|
|
|
|
|
|
|
if exists in the C directory. This gives you as much |
33
|
|
|
|
|
|
|
flexibility as you need for output. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=back |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head2 TEMPLATES |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
The following methods return a B to a scalar with the |
40
|
|
|
|
|
|
|
templates. It should be self-evident which kind of template they |
41
|
|
|
|
|
|
|
return. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head3 html |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head3 css |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
The default CSS, with some minor templating. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head3 bare_html |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
The HTML fragment with the B of the text (no HTML headers, no |
52
|
|
|
|
|
|
|
Muse headers). |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head3 minimal_html |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Minimal (but valid) XHTML template, with a link to C. |
57
|
|
|
|
|
|
|
Meant to be used in the EPUB generation. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head3 title_page_html |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Minimal XHTML template for a title page in the EPUB generation. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head3 bare_latex |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Minimal and uncomplete LaTeX chunck, meant to be used when merging |
66
|
|
|
|
|
|
|
files. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head3 latex |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
The LaTeX template. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
The template itself uses two hashrefs with tokens: C and |
73
|
|
|
|
|
|
|
C. The C contains tokens which are interpreted |
74
|
|
|
|
|
|
|
as L strings from the C constructor. The |
75
|
|
|
|
|
|
|
C ones contains validate copies of the C for |
76
|
|
|
|
|
|
|
places where it make sense, plus some internal things like the |
77
|
|
|
|
|
|
|
languages and additional strings to get the LaTeX code right. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
We use only the C tokens, while the C should be |
80
|
|
|
|
|
|
|
used only by custom templates which in this way can receive random |
81
|
|
|
|
|
|
|
stuff. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
See L |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Anyway, all the values from C and C, because of the |
86
|
|
|
|
|
|
|
markup interpretation, are (hopefully) safely escaped (so you can pass |
87
|
|
|
|
|
|
|
even LaTeX commands, and they will be escaped). |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head3 slides |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
The Beamer template. It shares the same tokens (when it makes sense) |
92
|
|
|
|
|
|
|
with the LaTeX template. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Theme and color theme selection is done via the |
95
|
|
|
|
|
|
|
Text::Amuse::Compile::BeamerThemes class, calling C on the |
96
|
|
|
|
|
|
|
object. The relevant token is C, picked up from |
97
|
|
|
|
|
|
|
the C and C from the C |
98
|
|
|
|
|
|
|
constructor. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 INTERNALS |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head3 ttref($name) |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Return the scalar ref associated to the given template file, if any. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head3 names |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Return the list of methods for template generation |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=cut |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
sub new { |
114
|
315
|
|
|
315
|
1
|
32824
|
my ($class, @args) = @_; |
115
|
315
|
50
|
|
|
|
1491
|
die "Wrong usage" if @args % 2; |
116
|
315
|
|
|
|
|
1352
|
my %params = @args; |
117
|
315
|
|
|
|
|
757
|
my $self = {}; |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
# argument parsing |
120
|
315
|
|
|
|
|
1069
|
foreach my $k (qw/ttdir format_id/) { |
121
|
630
|
100
|
|
|
|
1747
|
if (exists $params{$k}) { |
122
|
575
|
|
|
|
|
1595
|
$self->{$k} = delete $params{$k}; |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
} |
125
|
315
|
50
|
|
|
|
1078
|
die "Unrecognized options: " . join(" ", keys %params) if %params; |
126
|
|
|
|
|
|
|
|
127
|
315
|
|
|
|
|
951
|
$self->{tt_subrefs} = {}; |
128
|
315
|
100
|
100
|
|
|
2060
|
if (exists $self->{ttdir} and defined $self->{ttdir}) { |
129
|
|
|
|
|
|
|
|
130
|
2
|
50
|
|
|
|
34
|
if (-d $self->{ttdir}) { |
131
|
2
|
|
|
|
|
9
|
my $dir = $self->{ttdir}; |
132
|
2
|
50
|
|
|
|
68
|
opendir (my $dh, $dir) or die "Couldn't open $dir $!"; |
133
|
2
|
100
|
|
|
|
63
|
my @templates = grep { -f catfile($dir, $_) |
|
12
|
|
|
|
|
215
|
|
134
|
|
|
|
|
|
|
and |
135
|
|
|
|
|
|
|
/^ |
136
|
|
|
|
|
|
|
([a-zA-Z][a-zA-Z0-9_]+-)? |
137
|
|
|
|
|
|
|
(((bare|minimal)[_.-])?html| |
138
|
|
|
|
|
|
|
(bare[_.-])?latex | |
139
|
|
|
|
|
|
|
css) |
140
|
|
|
|
|
|
|
(\.tt2?)?/x |
141
|
|
|
|
|
|
|
} readdir($dh); |
142
|
2
|
|
|
|
|
28
|
closedir $dh; |
143
|
|
|
|
|
|
|
|
144
|
2
|
|
|
|
|
8
|
foreach my $t (@templates) { |
145
|
8
|
|
|
|
|
36
|
my $target = catfile($dir, $t); |
146
|
8
|
50
|
|
|
|
214
|
open (my $fh, '<:encoding(utf-8)', $target) |
147
|
|
|
|
|
|
|
or die "Can't open $target $!"; |
148
|
8
|
|
|
|
|
440
|
local $/ = undef; |
149
|
8
|
|
|
|
|
174
|
my $content = <$fh>; |
150
|
8
|
|
|
|
|
178
|
close $fh; |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
# manipulate the subref name |
153
|
8
|
|
|
|
|
40
|
$t =~ s/\.(tt|tt2)//; |
154
|
8
|
|
|
|
|
28
|
$t =~ s/[\.-]/_/g; |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
# populate the object with closures. |
157
|
|
|
|
|
|
|
$self->{tt_subrefs}->{$t} = sub { |
158
|
|
|
|
|
|
|
# copy the content, otherwise we return |
159
|
|
|
|
|
|
|
# a ref that can be modified |
160
|
32
|
|
|
32
|
|
48
|
my $string = $content; |
161
|
32
|
|
|
|
|
84
|
return \$string; |
162
|
8
|
|
|
|
|
65
|
}; |
163
|
|
|
|
|
|
|
} |
164
|
|
|
|
|
|
|
} |
165
|
|
|
|
|
|
|
else { |
166
|
0
|
|
|
|
|
0
|
die "<$self->{ttdir}> is not a directory!"; |
167
|
|
|
|
|
|
|
} |
168
|
|
|
|
|
|
|
} |
169
|
315
|
|
|
|
|
5388
|
bless $self, $class; |
170
|
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
sub ttdir { |
173
|
3
|
|
|
3
|
1
|
609
|
return shift->{ttdir}; |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
sub format_id { |
177
|
1092
|
|
|
1092
|
1
|
3248
|
return shift->{format_id}; |
178
|
|
|
|
|
|
|
} |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
sub names { |
181
|
2
|
|
|
2
|
1
|
348
|
return (qw/html minimal_html bare_html |
182
|
|
|
|
|
|
|
css latex bare_latex |
183
|
|
|
|
|
|
|
/); |
184
|
|
|
|
|
|
|
} |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
sub ttref { |
187
|
1092
|
|
|
1092
|
1
|
2649
|
my ($self, $name) = @_; |
188
|
1092
|
50
|
|
|
|
2746
|
return unless $name; |
189
|
1092
|
|
|
|
|
2182
|
my $tts = $self->{tt_subrefs}; |
190
|
1092
|
100
|
|
|
|
2849
|
if (my $format_id = $self->format_id) { |
191
|
11
|
|
|
|
|
39
|
my $try = $format_id . '_' . $name; |
192
|
11
|
100
|
|
|
|
45
|
if (my $sub = $tts->{$try}) { |
193
|
2
|
|
|
|
|
5
|
return $sub->(); |
194
|
|
|
|
|
|
|
} |
195
|
|
|
|
|
|
|
} |
196
|
1090
|
100
|
|
|
|
2985
|
if (my $sub = $tts->{$name}) { |
197
|
30
|
|
|
|
|
49
|
return $sub->(); |
198
|
|
|
|
|
|
|
} |
199
|
1060
|
|
|
|
|
3202
|
return; |
200
|
|
|
|
|
|
|
} |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
sub html { |
203
|
122
|
|
|
122
|
1
|
4496
|
my $self = shift; |
204
|
122
|
100
|
|
|
|
495
|
if (my $ref = $self->ttref('html')) { |
205
|
6
|
|
|
|
|
21
|
return $ref; |
206
|
|
|
|
|
|
|
} |
207
|
116
|
|
|
|
|
250
|
my $html = <<'EOF'; |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
[% title %] |
214
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
[% IF doc.wants_preamble %] |
236
|
|
|
|
|
|
|
[% IF doc.header_defined.author %] |
237
|
|
|
|
|
|
|
[% doc.header_as_html.author %] |
238
|
|
|
|
|
|
|
[% END %] |
239
|
|
|
|
|
|
|
[% doc.header_as_html.title %] |
240
|
|
|
|
|
|
|
[% IF doc.header_defined.subtitle %] |
241
|
|
|
|
|
|
|
[% doc.header_as_html.subtitle %] |
242
|
|
|
|
|
|
|
[% END %] |
243
|
|
|
|
|
|
|
[% IF doc.header_defined.date %] |
244
|
|
|
|
|
|
|
[% doc.header_as_html.date %] |
245
|
|
|
|
|
|
|
[% END %] |
246
|
|
|
|
|
|
|
[% END %] |
247
|
|
|
|
|
|
|
[% IF doc.toc_as_html %] |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
[% doc.toc_as_html %] |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
[% END %] |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
[% doc.as_html %] |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
[% IF doc.wants_postamble %] |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
[% IF doc.header_defined.seriesname %] |
260
|
|
|
|
|
|
|
[% IF doc.header_defined.seriesnumber %] |
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
[% doc.header_as_html.seriesname %] [% doc.header_as_html.seriesnumber %] |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
[% END %] |
265
|
|
|
|
|
|
|
[% END %] |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
[% IF doc.header_defined.source %] |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
[% doc.header_as_html.source %] |
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
[% END %] |
272
|
|
|
|
|
|
|
[% IF doc.header_defined.notes %] |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
[% doc.header_as_html.notes %] |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
[% END %] |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
[% IF doc.header_defined.rights %] |
279
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
[% doc.header_as_html.rights %] |
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
[% END %] |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
[% IF doc.header_defined.isbn %] |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
ISBN [% doc.header_as_html.isbn %] |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
[% END %] |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
[% IF doc.header_defined.publisher %] |
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
[% doc.header_as_html.publisher %] |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
[% END %] |
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
[% IF doc.header_defined.colophon %] |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
[% doc.header_as_html.colophon %] |
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
[% END %] |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
[% END %] |
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
EOF |
310
|
116
|
|
|
|
|
680
|
return \$html; |
311
|
|
|
|
|
|
|
} |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
sub css { |
314
|
190
|
|
|
190
|
1
|
3806
|
my $self = shift; |
315
|
190
|
100
|
|
|
|
597
|
if (my $ref = $self->ttref('css')) { |
316
|
5
|
|
|
|
|
12
|
return $ref; |
317
|
|
|
|
|
|
|
} |
318
|
185
|
|
|
|
|
521
|
my $css = <<'EOF'; |
319
|
|
|
|
|
|
|
[% IF epub %] |
320
|
|
|
|
|
|
|
@page { margin: 5pt; } |
321
|
|
|
|
|
|
|
[% END %] |
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
[% IF epub_embed_fonts %] |
324
|
|
|
|
|
|
|
[% FOREACH family IN fonts.families %] |
325
|
|
|
|
|
|
|
[% IF family.has_files %] |
326
|
|
|
|
|
|
|
[% FOREACH ff IN family.font_files %] |
327
|
|
|
|
|
|
|
@font-face { |
328
|
|
|
|
|
|
|
font-family: "[% family.name %]"; |
329
|
|
|
|
|
|
|
font-weight: [% ff.css_font_weight %]; |
330
|
|
|
|
|
|
|
font-style: [% ff.css_font_style %]; |
331
|
|
|
|
|
|
|
src: url("[% ff.basename %]") format("[% ff.format %]"); |
332
|
|
|
|
|
|
|
} |
333
|
|
|
|
|
|
|
[% END %] |
334
|
|
|
|
|
|
|
[% END %] |
335
|
|
|
|
|
|
|
[% END %] |
336
|
|
|
|
|
|
|
[% END %] |
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
html,body { |
339
|
|
|
|
|
|
|
margin:0; |
340
|
|
|
|
|
|
|
padding:0; |
341
|
|
|
|
|
|
|
border: none; |
342
|
|
|
|
|
|
|
background: transparent; |
343
|
|
|
|
|
|
|
font-family: [% IF fonts %]"[% fonts.main.name %]",[% END %] serif; |
344
|
|
|
|
|
|
|
word-wrap: break-word; |
345
|
|
|
|
|
|
|
} |
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
div#thework { |
348
|
|
|
|
|
|
|
margin-top: 3em; |
349
|
|
|
|
|
|
|
} |
350
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
div#thework > p { |
352
|
|
|
|
|
|
|
margin: 0; |
353
|
|
|
|
|
|
|
text-indent: 1em; |
354
|
|
|
|
|
|
|
text-align: justify; |
355
|
|
|
|
|
|
|
} |
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
p.tableofcontentline { |
358
|
|
|
|
|
|
|
margin: 0; |
359
|
|
|
|
|
|
|
} |
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
blockquote > p, li > p { |
362
|
|
|
|
|
|
|
margin-top: 0.5em; |
363
|
|
|
|
|
|
|
text-indent: 0em; |
364
|
|
|
|
|
|
|
text-align: justify; |
365
|
|
|
|
|
|
|
} |
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
a { |
368
|
|
|
|
|
|
|
color:#000000; |
369
|
|
|
|
|
|
|
text-decoration: underline; |
370
|
|
|
|
|
|
|
} |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
.table-of-contents a { |
373
|
|
|
|
|
|
|
text-decoration: none; |
374
|
|
|
|
|
|
|
} |
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
[% IF epub %] |
377
|
|
|
|
|
|
|
/* |
378
|
|
|
|
|
|
|
* Workaround for Cool Reader, which as of version 3.2.9 |
379
|
|
|
|
|
|
|
* does not have default styles for blockquotes defined. |
380
|
|
|
|
|
|
|
* |
381
|
|
|
|
|
|
|
* These values are taken from https://www.w3schools.com/cssref/css_default_values.asp |
382
|
|
|
|
|
|
|
* Firefox 66 uses the same styles by default. |
383
|
|
|
|
|
|
|
*/ |
384
|
|
|
|
|
|
|
blockquote { |
385
|
|
|
|
|
|
|
margin: 1em 40px; |
386
|
|
|
|
|
|
|
} |
387
|
|
|
|
|
|
|
[% END %] |
388
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
[% IF html %] |
390
|
|
|
|
|
|
|
div#page { |
391
|
|
|
|
|
|
|
margin:20px; |
392
|
|
|
|
|
|
|
padding:20px; |
393
|
|
|
|
|
|
|
} |
394
|
|
|
|
|
|
|
[% END %] |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
.muse-sc { |
397
|
|
|
|
|
|
|
font-variant: small-caps; |
398
|
|
|
|
|
|
|
} |
399
|
|
|
|
|
|
|
|
400
|
|
|
|
|
|
|
.muse-sf { |
401
|
|
|
|
|
|
|
font-family: [% IF fonts %]"[% fonts.sans.name %]",[% END %]Helvetica,Arial, sans-serif; |
402
|
|
|
|
|
|
|
} |
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
pre, code { |
405
|
|
|
|
|
|
|
font-family: [% IF fonts %]"[% fonts.mono.name %]",[% END %]Consolas, courier, monospace; |
406
|
|
|
|
|
|
|
} |
407
|
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
pre { |
409
|
|
|
|
|
|
|
overflow: auto; |
410
|
|
|
|
|
|
|
} |
411
|
|
|
|
|
|
|
|
412
|
|
|
|
|
|
|
/* invisibles */ |
413
|
|
|
|
|
|
|
span.hiddenindex, span.commentmarker, .comment, span.tocprefix, #hitme { |
414
|
|
|
|
|
|
|
display: none |
415
|
|
|
|
|
|
|
} |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
h1 { |
418
|
|
|
|
|
|
|
font-size: 200%; |
419
|
|
|
|
|
|
|
margin: .67em 0; |
420
|
|
|
|
|
|
|
clear: both; |
421
|
|
|
|
|
|
|
} |
422
|
|
|
|
|
|
|
h2 { |
423
|
|
|
|
|
|
|
font-size: 180%; |
424
|
|
|
|
|
|
|
margin: .75em 0; |
425
|
|
|
|
|
|
|
clear: both; |
426
|
|
|
|
|
|
|
} |
427
|
|
|
|
|
|
|
h3 { |
428
|
|
|
|
|
|
|
font-size: 150%; |
429
|
|
|
|
|
|
|
margin: .83em 0; |
430
|
|
|
|
|
|
|
clear: both; |
431
|
|
|
|
|
|
|
} |
432
|
|
|
|
|
|
|
h4 { |
433
|
|
|
|
|
|
|
font-size: 130%; |
434
|
|
|
|
|
|
|
margin: 1.12em 0; |
435
|
|
|
|
|
|
|
clear: both; |
436
|
|
|
|
|
|
|
} |
437
|
|
|
|
|
|
|
h5 { |
438
|
|
|
|
|
|
|
font-size: 115%; |
439
|
|
|
|
|
|
|
margin: 1.5em 0; |
440
|
|
|
|
|
|
|
clear: both; |
441
|
|
|
|
|
|
|
} |
442
|
|
|
|
|
|
|
h6 { |
443
|
|
|
|
|
|
|
font-size: 100%; |
444
|
|
|
|
|
|
|
margin: 0; |
445
|
|
|
|
|
|
|
clear: both; |
446
|
|
|
|
|
|
|
} |
447
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
[% IF centerchapter %] |
449
|
|
|
|
|
|
|
h1, h2, h3 { text-align: center; } |
450
|
|
|
|
|
|
|
[% END %] |
451
|
|
|
|
|
|
|
|
452
|
|
|
|
|
|
|
[% IF centersection %] |
453
|
|
|
|
|
|
|
h1, h2, h3, h4, h5, h6 { text-align: center; } |
454
|
|
|
|
|
|
|
[% END %] |
455
|
|
|
|
|
|
|
|
456
|
|
|
|
|
|
|
sup, sub { |
457
|
|
|
|
|
|
|
font-size: 80%; |
458
|
|
|
|
|
|
|
line-height: 0; |
459
|
|
|
|
|
|
|
} |
460
|
|
|
|
|
|
|
|
461
|
|
|
|
|
|
|
/* invisibles */ |
462
|
|
|
|
|
|
|
span.hiddenindex, span.commentmarker, .comment, span.tocprefix, #hitme { |
463
|
|
|
|
|
|
|
display: none |
464
|
|
|
|
|
|
|
} |
465
|
|
|
|
|
|
|
|
466
|
|
|
|
|
|
|
.comment { |
467
|
|
|
|
|
|
|
background: rgb(255,255,158); |
468
|
|
|
|
|
|
|
} |
469
|
|
|
|
|
|
|
|
470
|
|
|
|
|
|
|
.verse { |
471
|
|
|
|
|
|
|
margin: 24px 48px; |
472
|
|
|
|
|
|
|
overflow: auto; |
473
|
|
|
|
|
|
|
} |
474
|
|
|
|
|
|
|
|
475
|
|
|
|
|
|
|
table, th, td { |
476
|
|
|
|
|
|
|
border: solid 1px black; |
477
|
|
|
|
|
|
|
border-collapse: collapse; |
478
|
|
|
|
|
|
|
} |
479
|
|
|
|
|
|
|
|
480
|
|
|
|
|
|
|
td, th { |
481
|
|
|
|
|
|
|
padding: 2px 5px; |
482
|
|
|
|
|
|
|
} |
483
|
|
|
|
|
|
|
|
484
|
|
|
|
|
|
|
table { |
485
|
|
|
|
|
|
|
margin: 24px auto; |
486
|
|
|
|
|
|
|
} |
487
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
td, th { vertical-align: top; } |
489
|
|
|
|
|
|
|
|
490
|
|
|
|
|
|
|
caption { |
491
|
|
|
|
|
|
|
caption-side:bottom; |
492
|
|
|
|
|
|
|
} |
493
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
table.markdown-style-table, |
495
|
|
|
|
|
|
|
table.markdown-style-table th, |
496
|
|
|
|
|
|
|
table.markdown-style-table td { |
497
|
|
|
|
|
|
|
border: none; |
498
|
|
|
|
|
|
|
} |
499
|
|
|
|
|
|
|
|
500
|
|
|
|
|
|
|
table.markdown-style-table > thead > tr > th, |
501
|
|
|
|
|
|
|
table.markdown-style-table > thead > tr > td { |
502
|
|
|
|
|
|
|
border-bottom: solid 1px black; |
503
|
|
|
|
|
|
|
} |
504
|
|
|
|
|
|
|
|
505
|
|
|
|
|
|
|
table.markdown-style-table > tfoot > tr > th, |
506
|
|
|
|
|
|
|
table.markdown-style-table > tfoot > tr > td { |
507
|
|
|
|
|
|
|
border-top: solid 1px black; |
508
|
|
|
|
|
|
|
} |
509
|
|
|
|
|
|
|
|
510
|
|
|
|
|
|
|
table.markdown-style-table > thead > tr > td { |
511
|
|
|
|
|
|
|
border-bottom: solid 1px black; |
512
|
|
|
|
|
|
|
} |
513
|
|
|
|
|
|
|
|
514
|
|
|
|
|
|
|
hr { |
515
|
|
|
|
|
|
|
margin: 24px 0; |
516
|
|
|
|
|
|
|
color: #000; |
517
|
|
|
|
|
|
|
height: 1px; |
518
|
|
|
|
|
|
|
background-color: #000; |
519
|
|
|
|
|
|
|
} |
520
|
|
|
|
|
|
|
|
521
|
|
|
|
|
|
|
img.embedimg { |
522
|
|
|
|
|
|
|
max-width:90%; |
523
|
|
|
|
|
|
|
} |
524
|
|
|
|
|
|
|
div.image, div.float_image_f { |
525
|
|
|
|
|
|
|
margin: 1em; |
526
|
|
|
|
|
|
|
text-align: center; |
527
|
|
|
|
|
|
|
padding: 3px; |
528
|
|
|
|
|
|
|
background-color: white; |
529
|
|
|
|
|
|
|
} |
530
|
|
|
|
|
|
|
|
531
|
|
|
|
|
|
|
div.float_image_r { |
532
|
|
|
|
|
|
|
float: right; |
533
|
|
|
|
|
|
|
text-align: center; |
534
|
|
|
|
|
|
|
margin: 1em 0 1em 1em; |
535
|
|
|
|
|
|
|
} |
536
|
|
|
|
|
|
|
|
537
|
|
|
|
|
|
|
div.float_image_l { |
538
|
|
|
|
|
|
|
float: left; |
539
|
|
|
|
|
|
|
text-align: center; |
540
|
|
|
|
|
|
|
margin: 1em 1em 1em 0; |
541
|
|
|
|
|
|
|
} |
542
|
|
|
|
|
|
|
|
543
|
|
|
|
|
|
|
div.float_image_f { |
544
|
|
|
|
|
|
|
margin-top: 3em; |
545
|
|
|
|
|
|
|
margin-bottom: 3em; |
546
|
|
|
|
|
|
|
clear: both; |
547
|
|
|
|
|
|
|
margin-left: auto; |
548
|
|
|
|
|
|
|
margin-right: auto; |
549
|
|
|
|
|
|
|
|
550
|
|
|
|
|
|
|
} |
551
|
|
|
|
|
|
|
|
552
|
|
|
|
|
|
|
.biblio p, .play p { |
553
|
|
|
|
|
|
|
margin-left: 1em; |
554
|
|
|
|
|
|
|
text-indent: -1em; |
555
|
|
|
|
|
|
|
} |
556
|
|
|
|
|
|
|
|
557
|
|
|
|
|
|
|
div.biblio, div.play { |
558
|
|
|
|
|
|
|
padding: 24px 0; |
559
|
|
|
|
|
|
|
} |
560
|
|
|
|
|
|
|
|
561
|
|
|
|
|
|
|
div.caption { |
562
|
|
|
|
|
|
|
padding-top: 1em; |
563
|
|
|
|
|
|
|
text-align: center; |
564
|
|
|
|
|
|
|
} |
565
|
|
|
|
|
|
|
|
566
|
|
|
|
|
|
|
div.center { |
567
|
|
|
|
|
|
|
text-align: center; |
568
|
|
|
|
|
|
|
margin: 1em 0 1em 0; |
569
|
|
|
|
|
|
|
} |
570
|
|
|
|
|
|
|
|
571
|
|
|
|
|
|
|
div.right { |
572
|
|
|
|
|
|
|
text-align: right; |
573
|
|
|
|
|
|
|
margin: 1em 0 1em 0; |
574
|
|
|
|
|
|
|
} |
575
|
|
|
|
|
|
|
|
576
|
|
|
|
|
|
|
div.right > p { |
577
|
|
|
|
|
|
|
margin: 0; |
578
|
|
|
|
|
|
|
} |
579
|
|
|
|
|
|
|
|
580
|
|
|
|
|
|
|
div.center > p { |
581
|
|
|
|
|
|
|
margin: 0; |
582
|
|
|
|
|
|
|
} |
583
|
|
|
|
|
|
|
|
584
|
|
|
|
|
|
|
.toclevel1 { |
585
|
|
|
|
|
|
|
font-weight: bold; |
586
|
|
|
|
|
|
|
font-size:110%; |
587
|
|
|
|
|
|
|
} |
588
|
|
|
|
|
|
|
|
589
|
|
|
|
|
|
|
.toclevel2 { |
590
|
|
|
|
|
|
|
font-weight: bold; |
591
|
|
|
|
|
|
|
font-size: 100%; |
592
|
|
|
|
|
|
|
padding-left: 1em; |
593
|
|
|
|
|
|
|
} |
594
|
|
|
|
|
|
|
|
595
|
|
|
|
|
|
|
.toclevel3 { |
596
|
|
|
|
|
|
|
font-weight: normal; |
597
|
|
|
|
|
|
|
font-size: 90%; |
598
|
|
|
|
|
|
|
padding-left: 2em; |
599
|
|
|
|
|
|
|
} |
600
|
|
|
|
|
|
|
|
601
|
|
|
|
|
|
|
.toclevel4 { |
602
|
|
|
|
|
|
|
font-weight: normal; |
603
|
|
|
|
|
|
|
font-size: 80%; |
604
|
|
|
|
|
|
|
padding-left: 3em; |
605
|
|
|
|
|
|
|
} |
606
|
|
|
|
|
|
|
|
607
|
|
|
|
|
|
|
/* definition lists */ |
608
|
|
|
|
|
|
|
|
609
|
|
|
|
|
|
|
dt { |
610
|
|
|
|
|
|
|
font-weight: bold; |
611
|
|
|
|
|
|
|
} |
612
|
|
|
|
|
|
|
dd { |
613
|
|
|
|
|
|
|
margin: 0; |
614
|
|
|
|
|
|
|
padding-left: 2em; |
615
|
|
|
|
|
|
|
} |
616
|
|
|
|
|
|
|
|
617
|
|
|
|
|
|
|
/* footnotes */ |
618
|
|
|
|
|
|
|
|
619
|
|
|
|
|
|
|
a.footnote, a.footnotebody { |
620
|
|
|
|
|
|
|
font-size: 80%; |
621
|
|
|
|
|
|
|
line-height: 0; |
622
|
|
|
|
|
|
|
vertical-align: super; |
623
|
|
|
|
|
|
|
text-decoration: none; |
624
|
|
|
|
|
|
|
} |
625
|
|
|
|
|
|
|
|
626
|
|
|
|
|
|
|
* + p.fnline, * + p.secondary-fnline { |
627
|
|
|
|
|
|
|
border-top: 1px solid black; |
628
|
|
|
|
|
|
|
padding-top: 0.5em; |
629
|
|
|
|
|
|
|
} |
630
|
|
|
|
|
|
|
|
631
|
|
|
|
|
|
|
p.fnline + p.fnline, p.secondary-fnline + p.secondary-fnline { |
632
|
|
|
|
|
|
|
border-top: none; |
633
|
|
|
|
|
|
|
padding-top: 0; |
634
|
|
|
|
|
|
|
} |
635
|
|
|
|
|
|
|
|
636
|
|
|
|
|
|
|
p.fnline, p.secondary-fnline { |
637
|
|
|
|
|
|
|
font-size: 80%; |
638
|
|
|
|
|
|
|
} |
639
|
|
|
|
|
|
|
|
640
|
|
|
|
|
|
|
/* end footnotes */ |
641
|
|
|
|
|
|
|
|
642
|
|
|
|
|
|
|
div.amw-impressum { |
643
|
|
|
|
|
|
|
margin-top: 1em; |
644
|
|
|
|
|
|
|
} |
645
|
|
|
|
|
|
|
|
646
|
|
|
|
|
|
|
div.amw-impressum-container { |
647
|
|
|
|
|
|
|
margin-top: 10em; |
648
|
|
|
|
|
|
|
} |
649
|
|
|
|
|
|
|
|
650
|
|
|
|
|
|
|
EOF |
651
|
185
|
|
|
|
|
1322
|
return \$css; |
652
|
|
|
|
|
|
|
} |
653
|
|
|
|
|
|
|
|
654
|
|
|
|
|
|
|
sub bare_html { |
655
|
17
|
|
|
17
|
1
|
1209
|
my $self = shift; |
656
|
17
|
100
|
|
|
|
50
|
if (my $ref = $self->ttref('bare_html')) { |
657
|
5
|
|
|
|
|
13
|
return $ref; |
658
|
|
|
|
|
|
|
} |
659
|
12
|
|
|
|
|
23
|
my $html = <<'EOF'; |
660
|
|
|
|
|
|
|
[% IF doc.toc_as_html %] |
661
|
|
|
|
|
|
|
|
662
|
|
|
|
|
|
|
[% doc.toc_as_html %] |
663
|
|
|
|
|
|
|
|
664
|
|
|
|
|
|
|
[% END %] |
665
|
|
|
|
|
|
|
|
666
|
|
|
|
|
|
|
[% doc.as_html %] |
667
|
|
|
|
|
|
|
|
668
|
|
|
|
|
|
|
EOF |
669
|
12
|
|
|
|
|
150
|
return \$html; |
670
|
|
|
|
|
|
|
} |
671
|
|
|
|
|
|
|
|
672
|
|
|
|
|
|
|
sub title_page_html { |
673
|
56
|
|
|
56
|
1
|
111
|
my $self = shift; |
674
|
56
|
50
|
|
|
|
239
|
if (my $ref = $self->ttref('title_page_html')) { |
675
|
0
|
|
|
|
|
0
|
return $ref; |
676
|
|
|
|
|
|
|
} |
677
|
56
|
|
|
|
|
112
|
my $html = <<'EOF'; |
678
|
|
|
|
|
|
|
[% IF doc.wants_preamble %] |
679
|
|
|
|
|
|
|
|
680
|
|
|
|
|
|
|
[% IF doc.header_defined.author %] |
681
|
|
|
|
|
|
|
[% doc.header_as_html.author %] |
682
|
|
|
|
|
|
|
[% END %] |
683
|
|
|
|
|
|
|
[% doc.header_as_html.title %] |
684
|
|
|
|
|
|
|
[% IF doc.header_defined.subtitle %] |
685
|
|
|
|
|
|
|
[% doc.header_as_html.subtitle %] |
686
|
|
|
|
|
|
|
[% END %] |
687
|
|
|
|
|
|
|
[% IF doc.header_defined.date %] |
688
|
|
|
|
|
|
|
[% doc.header_as_html.date %] |
689
|
|
|
|
|
|
|
[% END %] |
690
|
|
|
|
|
|
|
|
691
|
|
|
|
|
|
|
[% END %] |
692
|
|
|
|
|
|
|
|
693
|
|
|
|
|
|
|
* * * * * |
694
|
|
|
|
|
|
|
|
695
|
|
|
|
|
|
|
[% IF doc.wants_postamble %] |
696
|
|
|
|
|
|
|
|
697
|
|
|
|
|
|
|
[% IF doc.header_defined.source %] |
698
|
|
|
|
|
|
|
|
699
|
|
|
|
|
|
|
[% doc.header_as_html.source %] |
700
|
|
|
|
|
|
|
|
701
|
|
|
|
|
|
|
[% END %] |
702
|
|
|
|
|
|
|
[% IF doc.header_defined.notes %] |
703
|
|
|
|
|
|
|
|
704
|
|
|
|
|
|
|
[% doc.header_as_html.notes %] |
705
|
|
|
|
|
|
|
|
706
|
|
|
|
|
|
|
[% END %] |
707
|
|
|
|
|
|
|
|
708
|
|
|
|
|
|
|
[% END %] |
709
|
|
|
|
|
|
|
EOF |
710
|
56
|
|
|
|
|
430
|
return \$html; |
711
|
|
|
|
|
|
|
} |
712
|
|
|
|
|
|
|
|
713
|
|
|
|
|
|
|
sub minimal_html { |
714
|
|
|
|
|
|
|
# has no options. |
715
|
391
|
|
|
391
|
1
|
4410
|
my $self = shift; |
716
|
391
|
100
|
|
|
|
866
|
if (my $ref = $self->ttref('minimal_html')) { |
717
|
5
|
|
|
|
|
15
|
return $ref; |
718
|
|
|
|
|
|
|
} |
719
|
386
|
|
|
|
|
743
|
my $html = <<'EOF'; |
720
|
|
|
|
|
|
|
|
721
|
|
|
|
|
|
|
|
722
|
|
|
|
|
|
|
|
723
|
|
|
|
|
|
|
|
724
|
|
|
|
|
|
|
[% title %] |
725
|
|
|
|
|
|
|
|
726
|
|
|
|
|
|
|
|
727
|
|
|
|
|
|
|
|
728
|
|
|
|
|
|
|
|
729
|
|
|
|
|
|
|
|
730
|
|
|
|
|
|
|
|
731
|
|
|
|
|
|
|
[% text %] |
732
|
|
|
|
|
|
|
|
733
|
|
|
|
|
|
|
|
734
|
|
|
|
|
|
|
|
735
|
|
|
|
|
|
|
|
736
|
|
|
|
|
|
|
|
737
|
|
|
|
|
|
|
EOF |
738
|
386
|
|
|
|
|
1588
|
return \$html; |
739
|
|
|
|
|
|
|
} |
740
|
|
|
|
|
|
|
|
741
|
|
|
|
|
|
|
|
742
|
|
|
|
|
|
|
sub latex { |
743
|
249
|
|
|
249
|
1
|
6946
|
my $self = shift; |
744
|
249
|
100
|
|
|
|
1059
|
if (my $ref = $self->ttref('latex')) { |
745
|
6
|
|
|
|
|
14
|
return $ref; |
746
|
|
|
|
|
|
|
} |
747
|
243
|
|
|
|
|
625
|
my $latex = <<'EOF'; |
748
|
|
|
|
|
|
|
\documentclass[DIV=[% safe_options.division %],% |
749
|
|
|
|
|
|
|
BCOR=[% safe_options.bcor %],% |
750
|
|
|
|
|
|
|
headinclude=[% IF safe_options.headings %]true[% ELSE %]false[% END %],% |
751
|
|
|
|
|
|
|
footinclude=false,[% IF safe_options.opening %]open=[% safe_options.opening %],[% END %]% |
752
|
|
|
|
|
|
|
fontsize=[% safe_options.fontsize %]pt,% |
753
|
|
|
|
|
|
|
[% safe_options.paging %],% |
754
|
|
|
|
|
|
|
paper=[% safe_options.papersize %]]% |
755
|
|
|
|
|
|
|
{[% safe_options.class %]} |
756
|
|
|
|
|
|
|
[% IF safe_options.use_geometry %] |
757
|
|
|
|
|
|
|
\usepackage[% |
758
|
|
|
|
|
|
|
top=[% safe_options.geometry_top_margin %],% |
759
|
|
|
|
|
|
|
outer=[% safe_options.geometry_outer_margin %],[% IF safe_options.headings %]includehead,[% END %]% |
760
|
|
|
|
|
|
|
width=[% safe_options.areaset_width %],% |
761
|
|
|
|
|
|
|
height=[% safe_options.areaset_height %]% |
762
|
|
|
|
|
|
|
]{geometry} |
763
|
|
|
|
|
|
|
[% ELSE %] |
764
|
|
|
|
|
|
|
[% IF safe_options.areaset_width %] |
765
|
|
|
|
|
|
|
[% IF safe_options.areaset_height %] |
766
|
|
|
|
|
|
|
\areaset[current]{[% safe_options.areaset_width %]}{[% safe_options.areaset_height %]} |
767
|
|
|
|
|
|
|
[% END %] |
768
|
|
|
|
|
|
|
[% END %] |
769
|
|
|
|
|
|
|
|
770
|
|
|
|
|
|
|
[% END %] |
771
|
|
|
|
|
|
|
|
772
|
|
|
|
|
|
|
[% IF tex_indexes %] |
773
|
|
|
|
|
|
|
\usepackage[noautomatic]{imakeidx} |
774
|
|
|
|
|
|
|
[% FOREACH idx IN tex_indexes %] |
775
|
|
|
|
|
|
|
\makeindex[name=[% idx.name %],title={[% idx.title %]}] |
776
|
|
|
|
|
|
|
[% END %] |
777
|
|
|
|
|
|
|
[% END %] |
778
|
|
|
|
|
|
|
|
779
|
|
|
|
|
|
|
[% tex_setup_langs %] |
780
|
|
|
|
|
|
|
|
781
|
|
|
|
|
|
|
[% IF safe_options.nocoverpage %] |
782
|
|
|
|
|
|
|
\let\chapter\section |
783
|
|
|
|
|
|
|
[% ELSE %] |
784
|
|
|
|
|
|
|
\renewcommand*{\partpagestyle}{empty} |
785
|
|
|
|
|
|
|
[% END %] |
786
|
|
|
|
|
|
|
|
787
|
|
|
|
|
|
|
% global style |
788
|
|
|
|
|
|
|
[% IF safe_options.headings %] |
789
|
|
|
|
|
|
|
\setlength{\headsep}{\baselineskip} |
790
|
|
|
|
|
|
|
\usepackage{scrlayer-scrpage} |
791
|
|
|
|
|
|
|
\pagestyle{scrheadings} |
792
|
|
|
|
|
|
|
[% IF safe_options.twoside %] |
793
|
|
|
|
|
|
|
[% IF safe_options.headings.part_chapter %] |
794
|
|
|
|
|
|
|
\automark[part]{part} |
795
|
|
|
|
|
|
|
\automark*[chapter]{} |
796
|
|
|
|
|
|
|
\ohead{\pagemark} |
797
|
|
|
|
|
|
|
\ihead{\headmark} |
798
|
|
|
|
|
|
|
[% END %] |
799
|
|
|
|
|
|
|
[% IF safe_options.headings.title_subtitle %] |
800
|
|
|
|
|
|
|
\lehead{\pagemark} |
801
|
|
|
|
|
|
|
\rohead{\pagemark} |
802
|
|
|
|
|
|
|
\rehead{[% doc.header_as_latex.title %]} |
803
|
|
|
|
|
|
|
\lohead{[% IF doc.header_defined.subtitle %][% doc.header_as_latex.subtitle %][% ELSE %][% doc.header_as_latex.title %][% END %]} |
804
|
|
|
|
|
|
|
[% END %] |
805
|
|
|
|
|
|
|
[% IF safe_options.headings.author_title %] |
806
|
|
|
|
|
|
|
\lehead{\pagemark} |
807
|
|
|
|
|
|
|
\rohead{\pagemark} |
808
|
|
|
|
|
|
|
\rehead{[% IF doc.header_defined.author %][% doc.header_as_latex.author %][% ELSE %][% doc.header_as_latex.title %][% END %]} |
809
|
|
|
|
|
|
|
\lohead{[% doc.header_as_latex.title %]} |
810
|
|
|
|
|
|
|
[% END %] |
811
|
|
|
|
|
|
|
[% IF safe_options.headings.section_subsection %] |
812
|
|
|
|
|
|
|
\automark[subsection]{section} |
813
|
|
|
|
|
|
|
\ohead[]{\pagemark} |
814
|
|
|
|
|
|
|
\ihead[]{\headmark} |
815
|
|
|
|
|
|
|
[% END %] |
816
|
|
|
|
|
|
|
[% IF safe_options.headings.chapter_section %] |
817
|
|
|
|
|
|
|
\automark[section]{chapter} |
818
|
|
|
|
|
|
|
\ohead[]{\pagemark} |
819
|
|
|
|
|
|
|
\ihead[]{\headmark} |
820
|
|
|
|
|
|
|
[% END %] |
821
|
|
|
|
|
|
|
[% IF safe_options.headings.title_chapter %] |
822
|
|
|
|
|
|
|
\automark[chapter]{chapter} |
823
|
|
|
|
|
|
|
\lehead{\pagemark} |
824
|
|
|
|
|
|
|
\rohead{\pagemark} |
825
|
|
|
|
|
|
|
\rehead{[% doc.header_as_latex.title %]} |
826
|
|
|
|
|
|
|
\lohead{\headmark} |
827
|
|
|
|
|
|
|
[% END %] |
828
|
|
|
|
|
|
|
[% IF safe_options.headings.title_section %] |
829
|
|
|
|
|
|
|
\automark[section]{section} |
830
|
|
|
|
|
|
|
\lehead{\pagemark} |
831
|
|
|
|
|
|
|
\rohead{\pagemark} |
832
|
|
|
|
|
|
|
\rehead{[% doc.header_as_latex.title %]} |
833
|
|
|
|
|
|
|
\lohead{\headmark} |
834
|
|
|
|
|
|
|
[% END %] |
835
|
|
|
|
|
|
|
\chead[]{} |
836
|
|
|
|
|
|
|
\ifoot[]{} |
837
|
|
|
|
|
|
|
\cfoot[]{} |
838
|
|
|
|
|
|
|
\ofoot[]{} |
839
|
|
|
|
|
|
|
[% ELSE %] |
840
|
|
|
|
|
|
|
[% IF safe_options.headings.part_chapter %] |
841
|
|
|
|
|
|
|
\automark[part]{part} |
842
|
|
|
|
|
|
|
\chead[]{\headmark} |
843
|
|
|
|
|
|
|
[% END %] |
844
|
|
|
|
|
|
|
[% IF safe_options.headings.title_subtitle %] |
845
|
|
|
|
|
|
|
\chead{[% doc.header_as_latex.title %]} |
846
|
|
|
|
|
|
|
[% END %] |
847
|
|
|
|
|
|
|
[% IF safe_options.headings.author_title %] |
848
|
|
|
|
|
|
|
\chead{[% doc.header_as_latex.title %]} |
849
|
|
|
|
|
|
|
[% END %] |
850
|
|
|
|
|
|
|
[% IF safe_options.headings.section_subsection %] |
851
|
|
|
|
|
|
|
\automark[section]{section} |
852
|
|
|
|
|
|
|
\chead[]{\headmark} |
853
|
|
|
|
|
|
|
[% END %] |
854
|
|
|
|
|
|
|
[% IF safe_options.headings.chapter_section %] |
855
|
|
|
|
|
|
|
\automark[chapter]{chapter} |
856
|
|
|
|
|
|
|
\chead[]{\headmark} |
857
|
|
|
|
|
|
|
[% END %] |
858
|
|
|
|
|
|
|
[% IF safe_options.headings.title_chapter %] |
859
|
|
|
|
|
|
|
\automark[chapter]{chapter} |
860
|
|
|
|
|
|
|
\chead[]{\headmark} |
861
|
|
|
|
|
|
|
[% END %] |
862
|
|
|
|
|
|
|
[% IF safe_options.headings.title_section %] |
863
|
|
|
|
|
|
|
\automark[section]{section} |
864
|
|
|
|
|
|
|
\chead[]{\headmark} |
865
|
|
|
|
|
|
|
[% END %] |
866
|
|
|
|
|
|
|
\ihead[]{} |
867
|
|
|
|
|
|
|
\ohead[]{} |
868
|
|
|
|
|
|
|
\ifoot[]{} |
869
|
|
|
|
|
|
|
\cfoot[\pagemark]{\pagemark} |
870
|
|
|
|
|
|
|
\ofoot[]{} |
871
|
|
|
|
|
|
|
[% END %] |
872
|
|
|
|
|
|
|
[% ELSE %] |
873
|
|
|
|
|
|
|
\pagestyle{plain} |
874
|
|
|
|
|
|
|
[% END %] |
875
|
|
|
|
|
|
|
|
876
|
|
|
|
|
|
|
|
877
|
|
|
|
|
|
|
|
878
|
|
|
|
|
|
|
\usepackage{indentfirst} |
879
|
|
|
|
|
|
|
|
880
|
|
|
|
|
|
|
% remove the numbering |
881
|
|
|
|
|
|
|
\setcounter{secnumdepth}{-2} |
882
|
|
|
|
|
|
|
|
883
|
|
|
|
|
|
|
% remove labels from the captions |
884
|
|
|
|
|
|
|
\renewcommand*{\captionformat}{} |
885
|
|
|
|
|
|
|
\renewcommand*{\figureformat}{} |
886
|
|
|
|
|
|
|
\renewcommand*{\tableformat}{} |
887
|
|
|
|
|
|
|
\KOMAoption{captions}{belowfigure,nooneline} |
888
|
|
|
|
|
|
|
\addtokomafont{caption}{\centering} |
889
|
|
|
|
|
|
|
|
890
|
|
|
|
|
|
|
[% IF safe_options.continuefootnotes %] |
891
|
|
|
|
|
|
|
[% UNLESS safe_options.nocoverpage %] |
892
|
|
|
|
|
|
|
% continuous numbering across the document. Defaults to resetting at chapter. |
893
|
|
|
|
|
|
|
\usepackage{chngcntr} |
894
|
|
|
|
|
|
|
\counterwithout{footnote}{chapter} |
895
|
|
|
|
|
|
|
[% END %] |
896
|
|
|
|
|
|
|
[% END %] |
897
|
|
|
|
|
|
|
|
898
|
|
|
|
|
|
|
[% IF safe_options.centerchapter %] |
899
|
|
|
|
|
|
|
\let\raggedchapter\centering |
900
|
|
|
|
|
|
|
[% END %] |
901
|
|
|
|
|
|
|
[% IF safe_options.centersection %] |
902
|
|
|
|
|
|
|
\let\raggedsection\centering |
903
|
|
|
|
|
|
|
[% END %] |
904
|
|
|
|
|
|
|
|
905
|
|
|
|
|
|
|
[% IF enable_secondary_footnotes %] |
906
|
|
|
|
|
|
|
\usepackage[fragile]{bigfoot} |
907
|
|
|
|
|
|
|
\usepackage{perpage} |
908
|
|
|
|
|
|
|
\DeclareNewFootnote{default} |
909
|
|
|
|
|
|
|
[% IF safe_options.secondary_footnotes_alpha %] |
910
|
|
|
|
|
|
|
\DeclareNewFootnote{B}[alph] |
911
|
|
|
|
|
|
|
\MakeSortedPerPage[1]{footnoteB} |
912
|
|
|
|
|
|
|
[% ELSE %] |
913
|
|
|
|
|
|
|
\DeclareNewFootnote{B} |
914
|
|
|
|
|
|
|
\MakeSorted{footnoteB} |
915
|
|
|
|
|
|
|
\renewcommand*\thefootnoteB{(\arabic{footnoteB})} |
916
|
|
|
|
|
|
|
[% END %] |
917
|
|
|
|
|
|
|
[% END %] |
918
|
|
|
|
|
|
|
\deffootnote[3em]{0em}{4em}{\textsuperscript{\thefootnotemark}~} |
919
|
|
|
|
|
|
|
|
920
|
|
|
|
|
|
|
[% UNLESS safe_options.sansfontsections %] |
921
|
|
|
|
|
|
|
\addtokomafont{disposition}{\rmfamily} |
922
|
|
|
|
|
|
|
\addtokomafont{descriptionlabel}{\rmfamily} |
923
|
|
|
|
|
|
|
[% END %] |
924
|
|
|
|
|
|
|
|
925
|
|
|
|
|
|
|
\frenchspacing |
926
|
|
|
|
|
|
|
% avoid vertical glue |
927
|
|
|
|
|
|
|
\raggedbottom |
928
|
|
|
|
|
|
|
|
929
|
|
|
|
|
|
|
% this will generate overfull boxes, so we need to set a tolerance |
930
|
|
|
|
|
|
|
% \pretolerance=1000 |
931
|
|
|
|
|
|
|
% pretolerance is what is accepted for a paragraph without |
932
|
|
|
|
|
|
|
% hyphenation, so it makes sense to be strict here and let the user |
933
|
|
|
|
|
|
|
% accept tweak the tolerance instead. |
934
|
|
|
|
|
|
|
\tolerance=[% safe_options.tex_tolerance %] |
935
|
|
|
|
|
|
|
% Additional tolerance for bad paragraphs only |
936
|
|
|
|
|
|
|
\setlength{\emergencystretch}{[% safe_options.tex_emergencystretch %]} |
937
|
|
|
|
|
|
|
|
938
|
|
|
|
|
|
|
% (try to) forbid widows/orphans |
939
|
|
|
|
|
|
|
\clubpenalty=10000 |
940
|
|
|
|
|
|
|
\widowpenalty=10000 |
941
|
|
|
|
|
|
|
|
942
|
|
|
|
|
|
|
|
943
|
|
|
|
|
|
|
[% IF safe_options.fussy_last_word %] |
944
|
|
|
|
|
|
|
% http://tex.stackexchange.com/questions/304802/how-not-to-hyphenate-the-last-word-of-a-paragraph |
945
|
|
|
|
|
|
|
\finalhyphendemerits=10000 |
946
|
|
|
|
|
|
|
[% END %] |
947
|
|
|
|
|
|
|
|
948
|
|
|
|
|
|
|
|
949
|
|
|
|
|
|
|
% given that we said footinclude=false, this should be safe |
950
|
|
|
|
|
|
|
\setlength{\footskip}{2\baselineskip} |
951
|
|
|
|
|
|
|
\setlength{\parindent}{[% safe_options.parindent %]pt} |
952
|
|
|
|
|
|
|
|
953
|
|
|
|
|
|
|
\title{[% doc.header_as_latex.title %]} |
954
|
|
|
|
|
|
|
\date{[% doc.header_as_latex.date %]} |
955
|
|
|
|
|
|
|
\author{[% doc.header_as_latex.author %]} |
956
|
|
|
|
|
|
|
\subtitle{[% doc.header_as_latex.subtitle %]} |
957
|
|
|
|
|
|
|
|
958
|
|
|
|
|
|
|
[% IF safe_options.nobold %] |
959
|
|
|
|
|
|
|
\let\textbf\emph |
960
|
|
|
|
|
|
|
\let\bfseries\normalfont |
961
|
|
|
|
|
|
|
[% END %] |
962
|
|
|
|
|
|
|
|
963
|
|
|
|
|
|
|
[% IF safe_options.linespacing %] |
964
|
|
|
|
|
|
|
\renewcommand{\baselinestretch}{[% safe_options.linespacing %]} |
965
|
|
|
|
|
|
|
[% END %] |
966
|
|
|
|
|
|
|
|
967
|
|
|
|
|
|
|
[% IF tex_metadata %] |
968
|
|
|
|
|
|
|
% https://groups.google.com/d/topic/comp.text.tex/6fYmcVMbSbQ/discussion |
969
|
|
|
|
|
|
|
\hypersetup{% |
970
|
|
|
|
|
|
|
pdfencoding=auto, |
971
|
|
|
|
|
|
|
pdftitle={[% tex_metadata.title %]},% |
972
|
|
|
|
|
|
|
pdfauthor={[% tex_metadata.author %]},% |
973
|
|
|
|
|
|
|
pdfsubject={[% tex_metadata.subject %]},% |
974
|
|
|
|
|
|
|
pdfkeywords={[% tex_metadata.keywords %]}% |
975
|
|
|
|
|
|
|
} |
976
|
|
|
|
|
|
|
[% END %] |
977
|
|
|
|
|
|
|
|
978
|
|
|
|
|
|
|
\begin{document} |
979
|
|
|
|
|
|
|
[% IF doc.hyphenation %] |
980
|
|
|
|
|
|
|
\hyphenation{ [% doc.hyphenation %] } |
981
|
|
|
|
|
|
|
[% END %] |
982
|
|
|
|
|
|
|
|
983
|
|
|
|
|
|
|
|
984
|
|
|
|
|
|
|
[% UNLESS safe_options.body_only %] |
985
|
|
|
|
|
|
|
|
986
|
|
|
|
|
|
|
[% IF safe_options.start_with_empty_page %] |
987
|
|
|
|
|
|
|
% start with an empty page |
988
|
|
|
|
|
|
|
\thispagestyle{empty} |
989
|
|
|
|
|
|
|
\strut |
990
|
|
|
|
|
|
|
\cleardoublepage |
991
|
|
|
|
|
|
|
[% END %] |
992
|
|
|
|
|
|
|
|
993
|
|
|
|
|
|
|
|
994
|
|
|
|
|
|
|
[% IF safe_options.nocoverpage %] |
995
|
|
|
|
|
|
|
\thispagestyle{empty} |
996
|
|
|
|
|
|
|
[% ELSE %] |
997
|
|
|
|
|
|
|
\begin{titlepage} |
998
|
|
|
|
|
|
|
[% END %] |
999
|
|
|
|
|
|
|
|
1000
|
|
|
|
|
|
|
\strut\vskip 2em |
1001
|
|
|
|
|
|
|
\begin{center} |
1002
|
|
|
|
|
|
|
[% IF doc.wants_preamble %] |
1003
|
|
|
|
|
|
|
{\usekomafont{title}{\huge [% doc.header_as_latex.title %]\par}}% |
1004
|
|
|
|
|
|
|
\vskip 1em |
1005
|
|
|
|
|
|
|
[% IF doc.header_defined.subtitle %] |
1006
|
|
|
|
|
|
|
{\usekomafont{subtitle}{[% doc.header_as_latex.subtitle %]\par}}% |
1007
|
|
|
|
|
|
|
[% END %] |
1008
|
|
|
|
|
|
|
\vskip 2em |
1009
|
|
|
|
|
|
|
[% IF doc.header_defined.author %] |
1010
|
|
|
|
|
|
|
{\usekomafont{author}{[% doc.header_as_latex.author %]\par}}% |
1011
|
|
|
|
|
|
|
[% END %] |
1012
|
|
|
|
|
|
|
\vskip 1.5em |
1013
|
|
|
|
|
|
|
[% ELSE %] |
1014
|
|
|
|
|
|
|
\strut |
1015
|
|
|
|
|
|
|
[% END %] |
1016
|
|
|
|
|
|
|
|
1017
|
|
|
|
|
|
|
[% UNLESS safe_options.nocoverpage %] |
1018
|
|
|
|
|
|
|
[% IF safe_options.cover %] |
1019
|
|
|
|
|
|
|
[% UNLESS safe_options.ignore_cover %] |
1020
|
|
|
|
|
|
|
\vskip 3em |
1021
|
|
|
|
|
|
|
\includegraphics[keepaspectratio=true,height=0.5\textheight,width=[% safe_options.coverwidth %]\textwidth]{[% safe_options.cover %]} |
1022
|
|
|
|
|
|
|
[% END %] |
1023
|
|
|
|
|
|
|
[% END %] |
1024
|
|
|
|
|
|
|
\vfill |
1025
|
|
|
|
|
|
|
[% END %] |
1026
|
|
|
|
|
|
|
|
1027
|
|
|
|
|
|
|
[% IF doc.wants_preamble %] |
1028
|
|
|
|
|
|
|
[% IF doc.header_defined.date %] |
1029
|
|
|
|
|
|
|
{\usekomafont{date}{[% doc.header_as_latex.date %]\par}}% |
1030
|
|
|
|
|
|
|
[% ELSE %] |
1031
|
|
|
|
|
|
|
\strut\par |
1032
|
|
|
|
|
|
|
[% END %] |
1033
|
|
|
|
|
|
|
[% ELSE %] |
1034
|
|
|
|
|
|
|
\strut |
1035
|
|
|
|
|
|
|
[% END %] |
1036
|
|
|
|
|
|
|
|
1037
|
|
|
|
|
|
|
\end{center} |
1038
|
|
|
|
|
|
|
|
1039
|
|
|
|
|
|
|
[% IF safe_options.nocoverpage %] |
1040
|
|
|
|
|
|
|
\vskip 3em |
1041
|
|
|
|
|
|
|
\par |
1042
|
|
|
|
|
|
|
[% ELSE %] |
1043
|
|
|
|
|
|
|
\end{titlepage} |
1044
|
|
|
|
|
|
|
[% IF safe_options.impressum %] |
1045
|
|
|
|
|
|
|
% impressum |
1046
|
|
|
|
|
|
|
\thispagestyle{empty} |
1047
|
|
|
|
|
|
|
\begin{center} |
1048
|
|
|
|
|
|
|
\begin{small} |
1049
|
|
|
|
|
|
|
\strut |
1050
|
|
|
|
|
|
|
\vfill |
1051
|
|
|
|
|
|
|
|
1052
|
|
|
|
|
|
|
[% IF doc.header_defined.seriesname %] |
1053
|
|
|
|
|
|
|
[% IF doc.header_defined.seriesnumber %] |
1054
|
|
|
|
|
|
|
[% doc.header_as_latex.seriesname %] [% doc.header_as_latex.seriesnumber %] |
1055
|
|
|
|
|
|
|
\vfill |
1056
|
|
|
|
|
|
|
[% END %] |
1057
|
|
|
|
|
|
|
[% END %] |
1058
|
|
|
|
|
|
|
|
1059
|
|
|
|
|
|
|
[% IF doc.header_defined.notes %] |
1060
|
|
|
|
|
|
|
[% doc.header_as_latex.notes %] |
1061
|
|
|
|
|
|
|
\bigskip |
1062
|
|
|
|
|
|
|
[% END %] |
1063
|
|
|
|
|
|
|
|
1064
|
|
|
|
|
|
|
[% IF doc.header_defined.rights %] |
1065
|
|
|
|
|
|
|
[% doc.header_as_latex.rights %] |
1066
|
|
|
|
|
|
|
\bigskip |
1067
|
|
|
|
|
|
|
[% END %] |
1068
|
|
|
|
|
|
|
|
1069
|
|
|
|
|
|
|
[% IF doc.header_defined.isbn %] |
1070
|
|
|
|
|
|
|
ISBN [% doc.header_as_latex.isbn %] |
1071
|
|
|
|
|
|
|
\bigskip |
1072
|
|
|
|
|
|
|
[% END %] |
1073
|
|
|
|
|
|
|
|
1074
|
|
|
|
|
|
|
[% IF doc.header_defined.publisher %] |
1075
|
|
|
|
|
|
|
[% doc.header_as_latex.publisher %] |
1076
|
|
|
|
|
|
|
\bigskip |
1077
|
|
|
|
|
|
|
[% END %] |
1078
|
|
|
|
|
|
|
|
1079
|
|
|
|
|
|
|
[% IF doc.header_defined.colophon %] |
1080
|
|
|
|
|
|
|
[% doc.header_as_latex.colophon %] |
1081
|
|
|
|
|
|
|
\bigskip |
1082
|
|
|
|
|
|
|
[% END %] |
1083
|
|
|
|
|
|
|
|
1084
|
|
|
|
|
|
|
|
1085
|
|
|
|
|
|
|
\strut |
1086
|
|
|
|
|
|
|
\end{small} |
1087
|
|
|
|
|
|
|
\end{center} |
1088
|
|
|
|
|
|
|
[% END %] |
1089
|
|
|
|
|
|
|
\cleardoublepage |
1090
|
|
|
|
|
|
|
[% END %] |
1091
|
|
|
|
|
|
|
|
1092
|
|
|
|
|
|
|
[% END %] |
1093
|
|
|
|
|
|
|
|
1094
|
|
|
|
|
|
|
[% IF safe_options.wants_toc %] |
1095
|
|
|
|
|
|
|
\tableofcontents |
1096
|
|
|
|
|
|
|
% start a new right-handed page |
1097
|
|
|
|
|
|
|
[% IF safe_options.nocoverpage %] |
1098
|
|
|
|
|
|
|
\vskip 3em |
1099
|
|
|
|
|
|
|
[% ELSE %] |
1100
|
|
|
|
|
|
|
\cleardoublepage |
1101
|
|
|
|
|
|
|
[% END %] |
1102
|
|
|
|
|
|
|
[% END %] |
1103
|
|
|
|
|
|
|
|
1104
|
|
|
|
|
|
|
[% latex_body %] |
1105
|
|
|
|
|
|
|
|
1106
|
|
|
|
|
|
|
[% FOREACH idx IN tex_indexes %] |
1107
|
|
|
|
|
|
|
\printindex[[% idx.name %]] |
1108
|
|
|
|
|
|
|
[% END %] |
1109
|
|
|
|
|
|
|
|
1110
|
|
|
|
|
|
|
|
1111
|
|
|
|
|
|
|
[% UNLESS safe_options.body_only %] |
1112
|
|
|
|
|
|
|
|
1113
|
|
|
|
|
|
|
[% UNLESS safe_options.nofinalpage %] |
1114
|
|
|
|
|
|
|
% begin final page |
1115
|
|
|
|
|
|
|
|
1116
|
|
|
|
|
|
|
\clearpage |
1117
|
|
|
|
|
|
|
|
1118
|
|
|
|
|
|
|
[% IF safe_options.twoside %] |
1119
|
|
|
|
|
|
|
% if we are on an odd page, add another one, otherwise when imposing |
1120
|
|
|
|
|
|
|
% the page would be odd on an even one. |
1121
|
|
|
|
|
|
|
\ifthispageodd{\strut\thispagestyle{empty}\clearpage}{} |
1122
|
|
|
|
|
|
|
[% END %] |
1123
|
|
|
|
|
|
|
|
1124
|
|
|
|
|
|
|
% new page for the colophon |
1125
|
|
|
|
|
|
|
|
1126
|
|
|
|
|
|
|
\thispagestyle{empty} |
1127
|
|
|
|
|
|
|
|
1128
|
|
|
|
|
|
|
\begin{center} |
1129
|
|
|
|
|
|
|
[% IF safe_options.sitename %] |
1130
|
|
|
|
|
|
|
[% safe_options.sitename %] |
1131
|
|
|
|
|
|
|
[% END %] |
1132
|
|
|
|
|
|
|
|
1133
|
|
|
|
|
|
|
[% IF safe_options.siteslogan %] |
1134
|
|
|
|
|
|
|
\smallskip |
1135
|
|
|
|
|
|
|
[% safe_options.siteslogan %] |
1136
|
|
|
|
|
|
|
[% END %] |
1137
|
|
|
|
|
|
|
|
1138
|
|
|
|
|
|
|
[% IF safe_options.logo %] |
1139
|
|
|
|
|
|
|
\bigskip |
1140
|
|
|
|
|
|
|
\includegraphics[width=0.25\textwidth]{[% safe_options.logo %]} |
1141
|
|
|
|
|
|
|
\bigskip |
1142
|
|
|
|
|
|
|
[% ELSE %] |
1143
|
|
|
|
|
|
|
\strut |
1144
|
|
|
|
|
|
|
[% END %] |
1145
|
|
|
|
|
|
|
\end{center} |
1146
|
|
|
|
|
|
|
|
1147
|
|
|
|
|
|
|
\strut |
1148
|
|
|
|
|
|
|
|
1149
|
|
|
|
|
|
|
\vfill |
1150
|
|
|
|
|
|
|
|
1151
|
|
|
|
|
|
|
\begin{center} |
1152
|
|
|
|
|
|
|
|
1153
|
|
|
|
|
|
|
[% IF doc.wants_preamble %] |
1154
|
|
|
|
|
|
|
[% doc.header_as_latex.author %] |
1155
|
|
|
|
|
|
|
|
1156
|
|
|
|
|
|
|
[% doc.header_as_latex.title %] |
1157
|
|
|
|
|
|
|
|
1158
|
|
|
|
|
|
|
[% doc.header_as_latex.subtitle %] |
1159
|
|
|
|
|
|
|
|
1160
|
|
|
|
|
|
|
[% doc.header_as_latex.date %] |
1161
|
|
|
|
|
|
|
[% ELSE %] |
1162
|
|
|
|
|
|
|
\strut |
1163
|
|
|
|
|
|
|
[% END %] |
1164
|
|
|
|
|
|
|
|
1165
|
|
|
|
|
|
|
\bigskip |
1166
|
|
|
|
|
|
|
|
1167
|
|
|
|
|
|
|
[% IF doc.wants_postamble %] |
1168
|
|
|
|
|
|
|
[% doc.header_as_latex.source %] |
1169
|
|
|
|
|
|
|
[% UNLESS safe_options.impressum %] |
1170
|
|
|
|
|
|
|
|
1171
|
|
|
|
|
|
|
[% IF doc.header_defined.seriesname %] |
1172
|
|
|
|
|
|
|
[% IF doc.header_defined.seriesnumber %] |
1173
|
|
|
|
|
|
|
\noindent [% doc.header_as_latex.seriesname %] [% doc.header_as_latex.seriesnumber %] |
1174
|
|
|
|
|
|
|
[% END %] |
1175
|
|
|
|
|
|
|
[% END %] |
1176
|
|
|
|
|
|
|
|
1177
|
|
|
|
|
|
|
[% IF doc.header_defined.notes %] |
1178
|
|
|
|
|
|
|
[% doc.header_as_latex.notes %] |
1179
|
|
|
|
|
|
|
[% END %] |
1180
|
|
|
|
|
|
|
|
1181
|
|
|
|
|
|
|
[% IF doc.header_defined.rights %] |
1182
|
|
|
|
|
|
|
[% doc.header_as_latex.rights %] |
1183
|
|
|
|
|
|
|
\bigskip |
1184
|
|
|
|
|
|
|
[% END %] |
1185
|
|
|
|
|
|
|
|
1186
|
|
|
|
|
|
|
[% IF doc.header_defined.isbn %] |
1187
|
|
|
|
|
|
|
ISBN [% doc.header_as_latex.isbn %] |
1188
|
|
|
|
|
|
|
\bigskip |
1189
|
|
|
|
|
|
|
[% END %] |
1190
|
|
|
|
|
|
|
|
1191
|
|
|
|
|
|
|
[% IF doc.header_defined.publisher %] |
1192
|
|
|
|
|
|
|
[% doc.header_as_latex.publisher %] |
1193
|
|
|
|
|
|
|
\bigskip |
1194
|
|
|
|
|
|
|
[% END %] |
1195
|
|
|
|
|
|
|
|
1196
|
|
|
|
|
|
|
[% IF doc.header_defined.colophon %] |
1197
|
|
|
|
|
|
|
[% doc.header_as_latex.colophon %] |
1198
|
|
|
|
|
|
|
\bigskip |
1199
|
|
|
|
|
|
|
[% END %] |
1200
|
|
|
|
|
|
|
|
1201
|
|
|
|
|
|
|
[% END %] |
1202
|
|
|
|
|
|
|
[% ELSE %] |
1203
|
|
|
|
|
|
|
\strut |
1204
|
|
|
|
|
|
|
[% END %] |
1205
|
|
|
|
|
|
|
|
1206
|
|
|
|
|
|
|
[% IF safe_options.site %] |
1207
|
|
|
|
|
|
|
\bigskip |
1208
|
|
|
|
|
|
|
\textbf{[% safe_options.site %]} |
1209
|
|
|
|
|
|
|
[% END %] |
1210
|
|
|
|
|
|
|
|
1211
|
|
|
|
|
|
|
\end{center} |
1212
|
|
|
|
|
|
|
|
1213
|
|
|
|
|
|
|
% end final page with colophon |
1214
|
|
|
|
|
|
|
[% END %] |
1215
|
|
|
|
|
|
|
|
1216
|
|
|
|
|
|
|
% end closing pages |
1217
|
|
|
|
|
|
|
|
1218
|
|
|
|
|
|
|
[% END %] |
1219
|
|
|
|
|
|
|
|
1220
|
|
|
|
|
|
|
\end{document} |
1221
|
|
|
|
|
|
|
|
1222
|
|
|
|
|
|
|
[% IF safe_options.format_id.DEFAULT %] |
1223
|
|
|
|
|
|
|
% No format ID passed. |
1224
|
|
|
|
|
|
|
[% END %] |
1225
|
|
|
|
|
|
|
|
1226
|
|
|
|
|
|
|
EOF |
1227
|
243
|
|
|
|
|
841
|
return \$latex; |
1228
|
|
|
|
|
|
|
} |
1229
|
|
|
|
|
|
|
|
1230
|
|
|
|
|
|
|
sub slides { |
1231
|
9
|
|
|
9
|
1
|
262
|
my $self = shift; |
1232
|
9
|
50
|
|
|
|
43
|
if (my $ref = $self->ttref('slides')) { |
1233
|
0
|
|
|
|
|
0
|
return $ref; |
1234
|
|
|
|
|
|
|
} |
1235
|
9
|
|
|
|
|
20
|
my $slides =<<'LATEX'; |
1236
|
|
|
|
|
|
|
\documentclass[ignorenonframetext]{beamer} |
1237
|
|
|
|
|
|
|
[% tex_setup_langs %] |
1238
|
|
|
|
|
|
|
[% IF enable_secondary_footnotes %] |
1239
|
|
|
|
|
|
|
\usepackage[fragile]{bigfoot} |
1240
|
|
|
|
|
|
|
\usepackage{perpage} |
1241
|
|
|
|
|
|
|
\DeclareNewFootnote{default} |
1242
|
|
|
|
|
|
|
[% IF safe_options.secondary_footnotes_alpha %] |
1243
|
|
|
|
|
|
|
\DeclareNewFootnote{B}[alph] |
1244
|
|
|
|
|
|
|
\MakeSortedPerPage[1]{footnoteB} |
1245
|
|
|
|
|
|
|
[% ELSE %] |
1246
|
|
|
|
|
|
|
\DeclareNewFootnote{B} |
1247
|
|
|
|
|
|
|
\MakeSorted{footnoteB} |
1248
|
|
|
|
|
|
|
\renewcommand*\thefootnoteB{(\arabic{footnoteB})} |
1249
|
|
|
|
|
|
|
[% END %] |
1250
|
|
|
|
|
|
|
[% END %] |
1251
|
|
|
|
|
|
|
\usetheme{[% safe_options.beamertheme %]} |
1252
|
|
|
|
|
|
|
\usecolortheme{[% safe_options.beamercolortheme %]} |
1253
|
|
|
|
|
|
|
|
1254
|
|
|
|
|
|
|
[% IF doc.is_rtl %] |
1255
|
|
|
|
|
|
|
\setbeamertemplate{frametitle}[default][right] |
1256
|
|
|
|
|
|
|
[% END %] |
1257
|
|
|
|
|
|
|
|
1258
|
|
|
|
|
|
|
% remove the numbering |
1259
|
|
|
|
|
|
|
\setcounter{secnumdepth}{-2} |
1260
|
|
|
|
|
|
|
|
1261
|
|
|
|
|
|
|
\title{[% doc.header_as_latex.title %]} |
1262
|
|
|
|
|
|
|
\date{[% doc.header_as_latex.date %]} |
1263
|
|
|
|
|
|
|
\author{[% doc.header_as_latex.author %]} |
1264
|
|
|
|
|
|
|
\subtitle{[% doc.header_as_latex.subtitle %]} |
1265
|
|
|
|
|
|
|
\begin{document} |
1266
|
|
|
|
|
|
|
[% IF doc.hyphenation %] |
1267
|
|
|
|
|
|
|
\hyphenation{ [% doc.hyphenation %] } |
1268
|
|
|
|
|
|
|
[% END %] |
1269
|
|
|
|
|
|
|
|
1270
|
|
|
|
|
|
|
\begin{document} |
1271
|
|
|
|
|
|
|
\begin{frame} |
1272
|
|
|
|
|
|
|
\titlepage |
1273
|
|
|
|
|
|
|
\end{frame} |
1274
|
|
|
|
|
|
|
|
1275
|
|
|
|
|
|
|
[% doc.as_beamer %] |
1276
|
|
|
|
|
|
|
|
1277
|
|
|
|
|
|
|
\end{document} |
1278
|
|
|
|
|
|
|
|
1279
|
|
|
|
|
|
|
LATEX |
1280
|
9
|
|
|
|
|
26
|
return \$slides; |
1281
|
|
|
|
|
|
|
} |
1282
|
|
|
|
|
|
|
|
1283
|
|
|
|
|
|
|
|
1284
|
|
|
|
|
|
|
sub bare_latex { |
1285
|
58
|
|
|
58
|
1
|
1086
|
my $self = shift; |
1286
|
58
|
100
|
|
|
|
201
|
if (my $ref = $self->ttref('bare_latex')) { |
1287
|
5
|
|
|
|
|
15
|
return $ref; |
1288
|
|
|
|
|
|
|
} |
1289
|
53
|
|
|
|
|
114
|
my $latex =<<'LATEX'; |
1290
|
|
|
|
|
|
|
[% IF doc.hyphenation %] |
1291
|
|
|
|
|
|
|
\hyphenation{ [% doc.hyphenation %] } |
1292
|
|
|
|
|
|
|
[% END %] |
1293
|
|
|
|
|
|
|
|
1294
|
|
|
|
|
|
|
\cleardoublepage |
1295
|
|
|
|
|
|
|
|
1296
|
|
|
|
|
|
|
[% IF doc.wants_preamble %] |
1297
|
|
|
|
|
|
|
% start titlepage |
1298
|
|
|
|
|
|
|
|
1299
|
|
|
|
|
|
|
[% IF doc.wants_toc %] |
1300
|
|
|
|
|
|
|
\strut |
1301
|
|
|
|
|
|
|
\thispagestyle{empty} |
1302
|
|
|
|
|
|
|
\vspace{0.1\textheight} |
1303
|
|
|
|
|
|
|
[% END %] |
1304
|
|
|
|
|
|
|
|
1305
|
|
|
|
|
|
|
\phantomsection |
1306
|
|
|
|
|
|
|
\addcontentsline{toc}{part}{[% doc.header_as_latex.title %]} |
1307
|
|
|
|
|
|
|
|
1308
|
|
|
|
|
|
|
\begin{center} |
1309
|
|
|
|
|
|
|
\strut\vskip 2em |
1310
|
|
|
|
|
|
|
{\usekomafont{title}{\huge [% doc.header_as_latex.title %]\par}}% |
1311
|
|
|
|
|
|
|
\vskip 1em |
1312
|
|
|
|
|
|
|
[% IF doc.header_defined.subtitle %] |
1313
|
|
|
|
|
|
|
{\usekomafont{subtitle}{[% doc.header_as_latex.subtitle %]\par}}% |
1314
|
|
|
|
|
|
|
[% END %] |
1315
|
|
|
|
|
|
|
\vskip 2em |
1316
|
|
|
|
|
|
|
[% IF doc.header_defined.author %] |
1317
|
|
|
|
|
|
|
{\usekomafont{author}{[% doc.header_as_latex.author %]\par}}% |
1318
|
|
|
|
|
|
|
[% END %] |
1319
|
|
|
|
|
|
|
\vskip 1.5em |
1320
|
|
|
|
|
|
|
[% IF doc.header_defined.date %] |
1321
|
|
|
|
|
|
|
{\usekomafont{date}{[% doc.header_as_latex.date %]\par}}% |
1322
|
|
|
|
|
|
|
[% END %] |
1323
|
|
|
|
|
|
|
\end{center} |
1324
|
|
|
|
|
|
|
|
1325
|
|
|
|
|
|
|
% end titlepage |
1326
|
|
|
|
|
|
|
|
1327
|
|
|
|
|
|
|
[% IF doc.wants_toc %] |
1328
|
|
|
|
|
|
|
\cleardoublepage |
1329
|
|
|
|
|
|
|
[% ELSE %] |
1330
|
|
|
|
|
|
|
\strut\vskip 2em |
1331
|
|
|
|
|
|
|
[% END %] |
1332
|
|
|
|
|
|
|
|
1333
|
|
|
|
|
|
|
[% END %] |
1334
|
|
|
|
|
|
|
|
1335
|
|
|
|
|
|
|
[% doc.as_latex %] |
1336
|
|
|
|
|
|
|
|
1337
|
|
|
|
|
|
|
[% IF doc.wants_postamble %] |
1338
|
|
|
|
|
|
|
\strut |
1339
|
|
|
|
|
|
|
\vfill |
1340
|
|
|
|
|
|
|
|
1341
|
|
|
|
|
|
|
[% IF doc.header_defined.source %] |
1342
|
|
|
|
|
|
|
\begin{center} |
1343
|
|
|
|
|
|
|
[% doc.header_as_latex.source %] |
1344
|
|
|
|
|
|
|
\end{center} |
1345
|
|
|
|
|
|
|
[% END %] |
1346
|
|
|
|
|
|
|
|
1347
|
|
|
|
|
|
|
[% IF doc.header_defined.notes %] |
1348
|
|
|
|
|
|
|
\begin{center} |
1349
|
|
|
|
|
|
|
[% doc.header_as_latex.notes %] |
1350
|
|
|
|
|
|
|
\end{center} |
1351
|
|
|
|
|
|
|
[% END %] |
1352
|
|
|
|
|
|
|
|
1353
|
|
|
|
|
|
|
[% END %] |
1354
|
|
|
|
|
|
|
|
1355
|
|
|
|
|
|
|
LATEX |
1356
|
53
|
|
|
|
|
425
|
return \$latex; |
1357
|
|
|
|
|
|
|
} |
1358
|
|
|
|
|
|
|
|
1359
|
|
|
|
|
|
|
=head1 EXPORT |
1360
|
|
|
|
|
|
|
|
1361
|
|
|
|
|
|
|
None. |
1362
|
|
|
|
|
|
|
|
1363
|
|
|
|
|
|
|
=cut |
1364
|
|
|
|
|
|
|
|
1365
|
|
|
|
|
|
|
1; |