wortsammler 1.0.3 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +46 -4
  3. data/.gitpod.Dockerfile +32 -0
  4. data/.gitpod.yml +1 -0
  5. data/.idea/.name +1 -0
  6. data/.idea/.rakeTasks +7 -0
  7. data/.idea/202_wortsammler-gem.iml +119 -0
  8. data/.idea/compiler.xml +22 -0
  9. data/.idea/encodings.xml +6 -0
  10. data/.idea/inspectionProfiles/profiles_settings.xml +7 -0
  11. data/.idea/misc.xml +4 -0
  12. data/.idea/modules.xml +9 -0
  13. data/.idea/vcs.xml +7 -0
  14. data/Gemfile +1 -0
  15. data/README.md +25 -28
  16. data/Rakefile +3 -3
  17. data/changelog.md +17 -1
  18. data/lib/wortsammler.rb +61 -54
  19. data/lib/wortsammler/class.Traceable.md.rb +9 -7
  20. data/lib/wortsammler/class.Traceable.rb +74 -60
  21. data/lib/wortsammler/class.proolib.rb +1102 -982
  22. data/lib/wortsammler/mdTraceParser.treetop +2 -2
  23. data/lib/wortsammler/version.rb +1 -1
  24. data/resources/default.wortsammler.latex +4 -3
  25. data/resources/main.md +1 -1
  26. data/resources/pandocdefault.docx +0 -0
  27. data/resources/pandocdefault.epub +70 -0
  28. data/resources/pandocdefault.html +73 -0
  29. data/resources/pandocdefault.latex +403 -0
  30. data/resources/sample_the-sample-document.yaml +27 -1
  31. data/spec/TC_EXP_001.md +2 -1
  32. data/spec/Zupfnoter.jpg +0 -0
  33. data/spec/tc_exp_003_reference.txt +14 -29
  34. data/spec/test_beautify.md +13 -1
  35. data/spec/test_beautify_reference.md +17 -3
  36. data/spec/test_mkindex_reference.txt +9 -38
  37. data/spec/test_slides.md +38 -0
  38. data/spec/wortsammler_spec.rb +186 -150
  39. data/testproject.xx/30_Sources/001_Main/main.md +273 -0
  40. data/testproject.xx/30_Sources/900_snippets/snippets.xlsx +0 -0
  41. data/testproject.xx/30_Sources/ZGEN_Documents/RS_Main_compact.docx +0 -0
  42. data/testproject.xx/30_Sources/ZGEN_Documents/RS_Main_compact.html +145 -0
  43. data/testproject.xx/30_Sources/ZGEN_Documents/RS_Main_compact.latex +416 -0
  44. data/testproject.xx/30_Sources/ZGEN_Documents/RS_Main_compact.pdf +0 -0
  45. data/testproject.xx/30_Sources/ZGEN_Documents/RS_Main_folien.beamer.pdf +0 -0
  46. data/testproject.xx/30_Sources/ZGEN_Documents/RS_Main_folien.docx +0 -0
  47. data/testproject.xx/30_Sources/ZGEN_Documents/RS_Main_folien.html +145 -0
  48. data/testproject.xx/30_Sources/ZGEN_Documents/RS_Main_folien.latex +416 -0
  49. data/testproject.xx/30_Sources/ZGEN_Documents/RS_Main_folien.pdf +0 -0
  50. data/testproject.xx/30_Sources/ZGEN_Documents/RS_Main_mieter.docx +0 -0
  51. data/testproject.xx/30_Sources/ZGEN_Documents/RS_Main_mieter.html +145 -0
  52. data/testproject.xx/30_Sources/ZGEN_Documents/RS_Main_mieter.latex +416 -0
  53. data/testproject.xx/30_Sources/ZGEN_Documents/RS_Main_mieter.pdf +0 -0
  54. data/testproject.xx/30_Sources/ZGEN_Documents/RS_Main_review.latex +582 -0
  55. data/testproject.xx/30_Sources/ZGEN_Documents/RS_Main_review.pdf +0 -0
  56. data/testproject.xx/30_Sources/ZGEN_RequirementsTracing/RS_Main.traces.md +56 -0
  57. data/testproject.xx/30_Sources/ZGEN_RequirementsTracing/ZGEN_Reqtrace.graphml +119 -0
  58. data/testproject.xx/30_Sources/ZGEN_RequirementsTracing/ZGEN_Reqtrace.md +50 -0
  59. data/testproject.xx/30_Sources/ZGEN_RequirementsTracing/ZGEN_ReqtraceCompare.txt +52 -0
  60. data/testproject.xx/30_Sources/ZSUPP_Manifests/sample_the-sample-document.yaml +79 -0
  61. data/testproject.xx/30_Sources/ZSUPP_Styles/default.wortsammler.latex +321 -0
  62. data/testproject.xx/30_Sources/ZSUPP_Styles/logo.jpg +0 -0
  63. data/testproject.xx/30_Sources/ZSUPP_Tools/rakefile.rb +5 -0
  64. data/testresults/wortsammler_testresults.html +49 -466
  65. data/uninstall-pandoc.pl +79 -0
  66. data/wortsammler.gemspec +7 -4
  67. metadata +84 -14
  68. data/testresults/wortsammler_testresults.log +0 -325
  69. data/wortsammler-gem.sublime-project +0 -8
@@ -25,12 +25,12 @@ grammar TraceInMarkdown
25
25
  end
26
26
 
27
27
  rule traceId
28
- "[" payload:label "]"
28
+ ("[" / "\\[") payload:label ("]" / "\\]")
29
29
  end
30
30
 
31
31
 
32
32
  rule label
33
- [a-zA-Z]+ "_" [a-zA-Z]+ "_" [0-9]+
33
+ [a-zA-Z]+ ("_" / "\\_") [a-zA-Z]+ ("_" / "\\_") [0-9]+
34
34
  end
35
35
 
36
36
  rule traceHead
@@ -1,4 +1,4 @@
1
1
  module Wortsammler
2
2
  PROGNAME="wortsammler"
3
- VERSION = "1.0.3"
3
+ VERSION = "2.0.1"
4
4
  end
@@ -65,7 +65,7 @@ $if(fancy-enums)$
65
65
  }\makeatother
66
66
  \usepackage{enumerate}
67
67
  $endif$
68
- \usepackage{longtable}
68
+ \usepackage{longtable,booktabs}
69
69
  \usepackage{float} % provides the H option for float placement
70
70
  \usepackage{graphicx}
71
71
  % We will generate all images so they have a width \maxwidth. This means
@@ -256,10 +256,11 @@ $if(linenumbers)$
256
256
  \setlength\linenumbersep{1mm}
257
257
  \modulolinenumbers[5]
258
258
  $endif$
259
-
259
+ \providecommand{\tightlist}{%
260
+ \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
260
261
  \usepackage{makeidx}
261
262
  \makeindex
262
-
263
+ %
263
264
  %
264
265
  %\renewcommand{Befehl der Gliederungsebene z.B. \chapter}{\@startsection{Name z.B. chapter}{Ebene z.B. 0}{Einrückung z.B. 0pt}{Abstand zum vorigen Text z.B. 3.5ex plus 1ex minus 0pt\relax}{Abstand zum nachfolgenden Text z.B. 2.5ex plus 0.5ex minus 0pt\relax}{Schrift z.B. \normalfont\Large\bfseries}}
265
266
  %
@@ -236,7 +236,7 @@ Paragraphs like starting with
236
236
 
237
237
  `~~MD "lib/01234/xxxx/yyyy.md"~~`
238
238
 
239
- will be replaced by the content of the argument. It shold even work
239
+ will be replaced by the content of the argument. It should even work
240
240
  inline.
241
241
 
242
242
  }(RS_Comp_003)
File without changes
@@ -0,0 +1,70 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html>
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"$if(lang)$ xml:lang="$lang$"$endif$>
4
+ <head>
5
+ <meta charset="utf-8" />
6
+ <meta name="generator" content="pandoc" />
7
+ <title>$pagetitle$</title>
8
+ <style type="text/css">
9
+ code{white-space: pre-wrap;}
10
+ span.smallcaps{font-variant: small-caps;}
11
+ span.underline{text-decoration: underline;}
12
+ div.line-block{white-space: pre-line;}
13
+ div.column{display: inline-block; vertical-align: top; width: 50%;}
14
+ $if(quotes)$
15
+ q { quotes: "“" "”" "‘" "’"; }
16
+ $endif$
17
+ </style>
18
+ $if(highlighting-css)$
19
+ <style type="text/css">
20
+ $highlighting-css$
21
+ </style>
22
+ $endif$
23
+ $for(css)$
24
+ <link rel="stylesheet" type="text/css" href="$css$" />
25
+ $endfor$
26
+ $for(header-includes)$
27
+ $header-includes$
28
+ $endfor$
29
+ </head>
30
+ <body$if(coverpage)$ id="cover"$endif$>
31
+ $if(titlepage)$
32
+ <section epub:type="titlepage">
33
+ $for(title)$
34
+ $if(title.type)$
35
+ <h1 class="$title.type$">$title.text$</h1>
36
+ $else$
37
+ <h1 class="title">$title$</h1>
38
+ $endif$
39
+ $endfor$
40
+ $if(subtitle)$
41
+ <p class="subtitle">$subtitle$</p>
42
+ $endif$
43
+ $for(author)$
44
+ <p class="author">$author$</p>
45
+ $endfor$
46
+ $for(creator)$
47
+ <p class="$creator.role$">$creator.text$</p>
48
+ $endfor$
49
+ $if(publisher)$
50
+ <p class="publisher">$publisher$</p>
51
+ $endif$
52
+ $if(date)$
53
+ <p class="date">$date$</p>
54
+ $endif$
55
+ $if(rights)$
56
+ <div class="rights">$rights$</div>
57
+ $endif$
58
+ </section>
59
+ $else$
60
+ $for(include-before)$
61
+ $include-before$
62
+ $endfor$
63
+ $body$
64
+ $for(include-after)$
65
+ $include-after$
66
+ $endfor$
67
+ $endif$
68
+ </body>
69
+ </html>
70
+
@@ -0,0 +1,73 @@
1
+ <!DOCTYPE html>
2
+ <html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="generator" content="pandoc" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
7
+ $for(author-meta)$
8
+ <meta name="author" content="$author-meta$" />
9
+ $endfor$
10
+ $if(date-meta)$
11
+ <meta name="dcterms.date" content="$date-meta$" />
12
+ $endif$
13
+ $if(keywords)$
14
+ <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
15
+ $endif$
16
+ <title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
17
+ <style type="text/css">
18
+ code{white-space: pre-wrap;}
19
+ span.smallcaps{font-variant: small-caps;}
20
+ span.underline{text-decoration: underline;}
21
+ div.line-block{white-space: pre-line;}
22
+ div.column{display: inline-block; vertical-align: top; width: 50%;}
23
+ $if(quotes)$
24
+ q { quotes: "“" "”" "‘" "’"; }
25
+ $endif$
26
+ </style>
27
+ $if(highlighting-css)$
28
+ <style type="text/css">
29
+ $highlighting-css$
30
+ </style>
31
+ $endif$
32
+ $for(css)$
33
+ <link rel="stylesheet" href="$css$">
34
+ $endfor$
35
+ $if(math)$
36
+ $math$
37
+ $endif$
38
+ <!--[if lt IE 9]>
39
+ <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
40
+ <![endif]-->
41
+ $for(header-includes)$
42
+ $header-includes$
43
+ $endfor$
44
+ </head>
45
+ <body>
46
+ $for(include-before)$
47
+ $include-before$
48
+ $endfor$
49
+ $if(title)$
50
+ <header>
51
+ <h1 class="title">$title$</h1>
52
+ $if(subtitle)$
53
+ <p class="subtitle">$subtitle$</p>
54
+ $endif$
55
+ $for(author)$
56
+ <p class="author">$author$</p>
57
+ $endfor$
58
+ $if(date)$
59
+ <p class="date">$date$</p>
60
+ $endif$
61
+ </header>
62
+ $endif$
63
+ $if(toc)$
64
+ <nav id="$idprefix$TOC">
65
+ $table-of-contents$
66
+ </nav>
67
+ $endif$
68
+ $body$
69
+ $for(include-after)$
70
+ $include-after$
71
+ $endfor$
72
+ </body>
73
+ </html>
@@ -0,0 +1,403 @@
1
+ \PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere
2
+ \PassOptionsToPackage{hyphens}{url}
3
+ $if(colorlinks)$
4
+ \PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor}
5
+ $endif$
6
+ %
7
+ \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$if(beamer)$ignorenonframetext,$if(handout)$handout,$endif$$if(aspectratio)$aspectratio=$aspectratio$,$endif$$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$}
8
+ $if(beamer)$
9
+ \setbeamertemplate{caption}[numbered]
10
+ \setbeamertemplate{caption label separator}{: }
11
+ \setbeamercolor{caption name}{fg=normal text.fg}
12
+ \beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$
13
+ $endif$
14
+ $if(beamerarticle)$
15
+ \usepackage{beamerarticle} % needs to be loaded first
16
+ $endif$
17
+ $if(fontfamily)$
18
+ \usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
19
+ $else$
20
+ \usepackage{lmodern}
21
+ $endif$
22
+ $if(linestretch)$
23
+ \usepackage{setspace}
24
+ \setstretch{$linestretch$}
25
+ $endif$
26
+ \usepackage{amssymb,amsmath}
27
+ \usepackage{ifxetex,ifluatex}
28
+ \usepackage{fixltx2e} % provides \textsubscript
29
+ \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
30
+ \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
31
+ \usepackage[utf8]{inputenc}
32
+ \usepackage{textcomp} % provides euro and other symbols
33
+ \else % if luatex or xelatex
34
+ $if(mathspec)$
35
+ \ifxetex
36
+ \usepackage{mathspec}
37
+ \else
38
+ \usepackage{unicode-math}
39
+ \fi
40
+ $else$
41
+ \usepackage{unicode-math}
42
+ $endif$
43
+ \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
44
+ $for(fontfamilies)$
45
+ \newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$}
46
+ $endfor$
47
+ $if(mainfont)$
48
+ \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
49
+ $endif$
50
+ $if(sansfont)$
51
+ \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
52
+ $endif$
53
+ $if(monofont)$
54
+ \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$}
55
+ $endif$
56
+ $if(mathfont)$
57
+ $if(mathspec)$
58
+ \ifxetex
59
+ \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
60
+ \else
61
+ \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
62
+ \fi
63
+ $else$
64
+ \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
65
+ $endif$
66
+ $endif$
67
+ $if(CJKmainfont)$
68
+ \ifxetex
69
+ \usepackage{xeCJK}
70
+ \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
71
+ \fi
72
+ $endif$
73
+ $if(luatexjapresetoptions)$
74
+ \ifluatex
75
+ \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset}
76
+ \fi
77
+ $endif$
78
+ $if(CJKmainfont)$
79
+ \ifluatex
80
+ \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec}
81
+ \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
82
+ \fi
83
+ $endif$
84
+ \fi
85
+ $if(beamer)$
86
+ $if(theme)$
87
+ \usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$}
88
+ $endif$
89
+ $if(colortheme)$
90
+ \usecolortheme{$colortheme$}
91
+ $endif$
92
+ $if(fonttheme)$
93
+ \usefonttheme{$fonttheme$}
94
+ $endif$
95
+ $if(mainfont)$
96
+ \usefonttheme{serif} % use mainfont rather than sansfont for slide text
97
+ $endif$
98
+ $if(innertheme)$
99
+ \useinnertheme{$innertheme$}
100
+ $endif$
101
+ $if(outertheme)$
102
+ \useoutertheme{$outertheme$}
103
+ $endif$
104
+ $endif$
105
+ % use upquote if available, for straight quotes in verbatim environments
106
+ \IfFileExists{upquote.sty}{\usepackage{upquote}}{}
107
+ % use microtype if available
108
+ \IfFileExists{microtype.sty}{%
109
+ \usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype}
110
+ \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
111
+ }{}
112
+ $if(indent)$
113
+ $else$
114
+ \IfFileExists{parskip.sty}{%
115
+ \usepackage{parskip}
116
+ }{% else
117
+ \setlength{\parindent}{0pt}
118
+ \setlength{\parskip}{6pt plus 2pt minus 1pt}
119
+ }
120
+ $endif$
121
+ $if(verbatim-in-note)$
122
+ \usepackage{fancyvrb}
123
+ $endif$
124
+ $if(colorlinks)$
125
+ \usepackage{xcolor}
126
+ $endif$
127
+ \usepackage{hyperref}
128
+ \hypersetup{
129
+ $if(title-meta)$
130
+ pdftitle={$title-meta$},
131
+ $endif$
132
+ $if(author-meta)$
133
+ pdfauthor={$author-meta$},
134
+ $endif$
135
+ $if(keywords)$
136
+ pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},
137
+ $endif$
138
+ $if(colorlinks)$
139
+ colorlinks=true,
140
+ linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
141
+ citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
142
+ urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$,
143
+ $else$
144
+ pdfborder={0 0 0},
145
+ $endif$
146
+ breaklinks=true}
147
+ \urlstyle{same} % don't use monospace font for urls
148
+ $if(verbatim-in-note)$
149
+ \VerbatimFootnotes % allows verbatim text in footnotes
150
+ $endif$
151
+ $if(geometry)$
152
+ \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
153
+ $endif$
154
+ $if(beamer)$
155
+ \newif\ifbibliography
156
+ $endif$
157
+ $if(listings)$
158
+ \usepackage{listings}
159
+ \newcommand{\passthrough}[1]{#1}
160
+ $endif$
161
+ $if(lhs)$
162
+ \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
163
+ $endif$
164
+ $if(highlighting-macros)$
165
+ $highlighting-macros$
166
+ $endif$
167
+ $if(tables)$
168
+ \usepackage{longtable,booktabs}
169
+ $if(beamer)$
170
+ \usepackage{caption}
171
+ % These lines are needed to make table captions work with longtable:
172
+ \makeatletter
173
+ \def\fnum@table{\tablename~\thetable}
174
+ \makeatother
175
+ $else$
176
+ % Fix footnotes in tables (requires footnote package)
177
+ \IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{longtable}}{}
178
+ $endif$
179
+ $endif$
180
+ $if(graphics)$
181
+ \usepackage{graphicx,grffile}
182
+ \makeatletter
183
+ \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
184
+ \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
185
+ \makeatother
186
+ % Scale images if necessary, so that they will not overflow the page
187
+ % margins by default, and it is still possible to overwrite the defaults
188
+ % using explicit options in \includegraphics[width, height, ...]{}
189
+ \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
190
+ $endif$
191
+ $if(beamer)$
192
+ % Prevent slide breaks in the middle of a paragraph:
193
+ \widowpenalties 1 10000
194
+ \raggedbottom
195
+ $if(section-titles)$
196
+ \AtBeginPart{
197
+ \let\insertpartnumber\relax
198
+ \let\partname\relax
199
+ \frame{\partpage}
200
+ }
201
+ \AtBeginSection{
202
+ \ifbibliography
203
+ \else
204
+ \let\insertsectionnumber\relax
205
+ \let\sectionname\relax
206
+ \frame{\sectionpage}
207
+ \fi
208
+ }
209
+ \AtBeginSubsection{
210
+ \let\insertsubsectionnumber\relax
211
+ \let\subsectionname\relax
212
+ \frame{\subsectionpage}
213
+ }
214
+ $endif$
215
+ $endif$
216
+ $if(links-as-notes)$
217
+ % Make links footnotes instead of hotlinks:
218
+ \DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}}
219
+ $endif$
220
+ $if(strikeout)$
221
+ \usepackage[normalem]{ulem}
222
+ % avoid problems with \sout in headers with hyperref:
223
+ \pdfstringdefDisableCommands{\renewcommand{\sout}{}}
224
+ $endif$
225
+ \setlength{\emergencystretch}{3em} % prevent overfull lines
226
+ \providecommand{\tightlist}{%
227
+ \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
228
+ $if(numbersections)$
229
+ \setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$}
230
+ $else$
231
+ \setcounter{secnumdepth}{0}
232
+ $endif$
233
+ $if(beamer)$
234
+ $else$
235
+ $if(subparagraph)$
236
+ $else$
237
+ % Redefines (sub)paragraphs to behave more like sections
238
+ \ifx\paragraph\undefined\else
239
+ \let\oldparagraph\paragraph
240
+ \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
241
+ \fi
242
+ \ifx\subparagraph\undefined\else
243
+ \let\oldsubparagraph\subparagraph
244
+ \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
245
+ \fi
246
+ $endif$
247
+ $endif$
248
+ $if(pagestyle)$
249
+ \pagestyle{$pagestyle$}
250
+ $endif$
251
+
252
+ % set default figure placement to htbp
253
+ \makeatletter
254
+ \def\fps@figure{htbp}
255
+ \makeatother
256
+
257
+ $for(header-includes)$
258
+ $header-includes$
259
+ $endfor$
260
+ $if(lang)$
261
+ \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
262
+ \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
263
+ $if(babel-newcommands)$
264
+ $babel-newcommands$
265
+ $endif$
266
+ \else
267
+ % load polyglossia as late as possible as it *could* call bidi if RTL lang (e.g. Hebrew or Arabic)
268
+ \usepackage{polyglossia}
269
+ \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$}
270
+ $for(polyglossia-otherlangs)$
271
+ \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$}
272
+ $endfor$
273
+ \fi
274
+ $endif$
275
+ $if(dir)$
276
+ \ifxetex
277
+ % load bidi as late as possible as it modifies e.g. graphicx
278
+ $if(latex-dir-rtl)$
279
+ \usepackage[RTLdocument]{bidi}
280
+ $else$
281
+ \usepackage{bidi}
282
+ $endif$
283
+ \fi
284
+ \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
285
+ \TeXXeTstate=1
286
+ \newcommand{\RL}[1]{\beginR #1\endR}
287
+ \newcommand{\LR}[1]{\beginL #1\endL}
288
+ \newenvironment{RTL}{\beginR}{\endR}
289
+ \newenvironment{LTR}{\beginL}{\endL}
290
+ \fi
291
+ $endif$
292
+ $if(natbib)$
293
+ \usepackage[$natbiboptions$]{natbib}
294
+ \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
295
+ $endif$
296
+ $if(biblatex)$
297
+ \usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex}
298
+ $for(bibliography)$
299
+ \addbibresource{$bibliography$}
300
+ $endfor$
301
+ $endif$
302
+
303
+ $if(title)$
304
+ \title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
305
+ $endif$
306
+ $if(subtitle)$
307
+ \providecommand{\subtitle}[1]{}
308
+ \subtitle{$subtitle$}
309
+ $endif$
310
+ $if(author)$
311
+ \author{$for(author)$$author$$sep$ \and $endfor$}
312
+ $endif$
313
+ $if(institute)$
314
+ \providecommand{\institute}[1]{}
315
+ \institute{$for(institute)$$institute$$sep$ \and $endfor$}
316
+ $endif$
317
+ \date{$date$}
318
+ $if(beamer)$
319
+ $if(titlegraphic)$
320
+ \titlegraphic{\includegraphics{$titlegraphic$}}
321
+ $endif$
322
+ $if(logo)$
323
+ \logo{\includegraphics{$logo$}}
324
+ $endif$
325
+ $endif$
326
+
327
+ \begin{document}
328
+ $if(title)$
329
+ $if(beamer)$
330
+ \frame{\titlepage}
331
+ $else$
332
+ \maketitle
333
+ $endif$
334
+ $if(abstract)$
335
+ \begin{abstract}
336
+ $abstract$
337
+ \end{abstract}
338
+ $endif$
339
+ $endif$
340
+
341
+ $for(include-before)$
342
+ $include-before$
343
+
344
+ $endfor$
345
+ $if(toc)$
346
+ $if(beamer)$
347
+ \begin{frame}
348
+ \tableofcontents[hideallsubsections]
349
+ \end{frame}
350
+ $else$
351
+ {
352
+ $if(colorlinks)$
353
+ \hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$}
354
+ $endif$
355
+ \setcounter{tocdepth}{$toc-depth$}
356
+ \tableofcontents
357
+ }
358
+ $endif$
359
+ $endif$
360
+ $if(lot)$
361
+ \listoftables
362
+ $endif$
363
+ $if(lof)$
364
+ \listoffigures
365
+ $endif$
366
+ $body$
367
+
368
+ $if(natbib)$
369
+ $if(bibliography)$
370
+ $if(biblio-title)$
371
+ $if(book-class)$
372
+ \renewcommand\bibname{$biblio-title$}
373
+ $else$
374
+ \renewcommand\refname{$biblio-title$}
375
+ $endif$
376
+ $endif$
377
+ $if(beamer)$
378
+ \begin{frame}[allowframebreaks]{$biblio-title$}
379
+ \bibliographytrue
380
+ $endif$
381
+ \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
382
+ $if(beamer)$
383
+ \end{frame}
384
+ $endif$
385
+
386
+ $endif$
387
+ $endif$
388
+ $if(biblatex)$
389
+ $if(beamer)$
390
+ \begin{frame}[allowframebreaks]{$biblio-title$}
391
+ \bibliographytrue
392
+ \printbibliography[heading=none]
393
+ \end{frame}
394
+ $else$
395
+ \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
396
+ $endif$
397
+
398
+ $endif$
399
+ $for(include-after)$
400
+ $include-after$
401
+
402
+ $endfor$
403
+ \end{document}