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