generator-latex-template 0.4.0 → 0.5.0

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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # generator-latex-template [![npm version](http://img.shields.io/npm/v/generator-latex-template.svg?style=flat)](https://npmjs.org/package/generator-latex-template "View this project on npm")
1
+ # LaTeX Template Generator [![npm version](http://img.shields.io/npm/v/generator-latex-template.svg?style=flat)](https://npmjs.org/package/generator-latex-template "View this project on npm")
2
2
 
3
3
  > Generates latextemplates (e.g., for thesis, workshops, conferences, IEEEtran, LNCS, ...) out of "micro-templates"
4
4
 
@@ -455,6 +455,9 @@ module.exports = class extends Generator {
455
455
 
456
456
  this.props.requiresShellEscape = (this.props.listings === 'minted');
457
457
 
458
+ this.props.feature = {};
459
+ this.props.feature.acronyms = (this.props.documentclass === 'scientific-thesis');
460
+
458
461
  this.props.isPaper = (this.props.documentclass === 'acmart') || (this.props.documentclass === 'ieee') || (this.props.documentclass === 'lncs');
459
462
  if (this.props.isPaper) {
460
463
  // this sets filenames.main and filenames.bib
@@ -540,6 +543,12 @@ module.exports = class extends Generator {
540
543
  global.destinationPath(global.props.filenames.main + ".tex"),
541
544
  global.props
542
545
  );
546
+ if (global.props.documentclass === 'scientific-thesis') {
547
+ global.fs.copy(
548
+ global.templatePath('acronyms.de.tex'),
549
+ global.destinationPath('acronyms.tex')
550
+ );
551
+ }
543
552
  if (!global.props.githubpublish) {
544
553
  // we keep the English README.md in case of GitHub publish
545
554
  global.fs.copyTpl(
@@ -554,6 +563,12 @@ module.exports = class extends Generator {
554
563
  global.destinationPath(global.props.filenames.main + ".tex"),
555
564
  global.props
556
565
  );
566
+ if (global.props.documentclass === 'scientific-thesis') {
567
+ global.fs.copy(
568
+ global.templatePath('acronyms.en.tex'),
569
+ global.destinationPath('acronyms.tex')
570
+ );
571
+ }
557
572
  global.fs.copyTpl(
558
573
  global.templatePath('README.en.md'),
559
574
  global.destinationPath('README.md'),
@@ -9,17 +9,27 @@ FROM reitzig/texlive-<% switch (latexcompiler) {
9
9
  RUN apk update && apk add --no-cache bash perl python3 py3-pip
10
10
  RUN pip3 install pygments
11
11
 
12
- COPY Texlivefile /work/src
13
-
14
12
  # Emulate "Install dependencies" of "entrypoint work ..."
15
13
  <% if (texlive < 2021) { -%>
14
+ COPY Texlivefile /work/src
16
15
  RUN xargs tlmgr install --repository ftp://ftp.math.utah.edu/pub/tex/historic/systems/texlive/<%= texlive %>/tlnet-final < "/work/src/Texlivefile" && \
17
16
  <% } else { -%>
18
- RUN tlmgr update --self --repository https://mirror.mwt.me/ctan/systems/texlive/tlnet && \
19
- xargs tlmgr install --repository https://mirror.mwt.me/ctan/systems/texlive/tlnet < "/work/src/Texlivefile" && \
17
+ RUN tlmgr update --self --repository https://mirror.mwt.me/ctan/systems/texlive/tlnet
18
+ COPY Texlivefile /work/src
19
+ RUN xargs tlmgr install --repository https://mirror.mwt.me/ctan/systems/texlive/tlnet < "/work/src/Texlivefile" && \
20
20
  <% } -%>
21
- sha256sum "/work/src/Texlivefile" > "/work/tmp/Texlivefile.sha"
22
-
23
- # make latexmk and texlogsieve available
24
- RUN cp /usr/local/texlive/<%= texlive %>/bin/x86_64-linuxmusl/latexmk /usr/local/bin && \
25
- cp /usr/local/texlive/<%= texlive %>/bin/x86_64-linuxmusl/texlogsieve /usr/local/bin
21
+ sha256sum "/work/src/Texlivefile" > "/work/tmp/Texlivefile.sha" && \
22
+ #
23
+ # make <% if (bibtextool == "biblatex") { %>biber, <% } %>latexmk and texlogsieve available
24
+ <% if (bibtextool == "biblatex") { -%>
25
+ cp /usr/local/texlive/<%= texlive %>/bin/x86_64-linuxmusl/biber /usr/local/bin && \
26
+ <% } -%>
27
+ cp /usr/local/texlive/<%= texlive %>/bin/x86_64-linuxmusl/latexmk /usr/local/bin && \
28
+ cp /usr/local/texlive/<%= texlive %>/bin/x86_64-linuxmusl/texlogsieve /usr/local/bin && \
29
+ <% if (latexcompiler === "lualatex") { -%>
30
+ #
31
+ # update font index
32
+ luaotfload-tool --update && \
33
+ <% } -%>
34
+ # use latest texlogsieve
35
+ cd /usr/local/bin && wget https://gitlab.com/lago/texlogsieve/-/raw/main/texlogsieve?inline=false
@@ -26,6 +26,26 @@ This template does it.
26
26
  This template is for the conferences.
27
27
  It is based on the `bare_conf_compsoc.tex` distributed by IEEE.
28
28
  In case you need other configurations, please adapt `paper-conference.tex` or run the [latex template generator].
29
+ <% break; case "scientific-thesis": -%>
30
+ # LaTeX Template for a Scientific Thesis
31
+
32
+ This template is a general template for scientific theses.
33
+ Currently, it is the unofficial LaTeX template for Master, Bachelor, Diploma, and Student Theses at following institutions:
34
+
35
+ - University of Stuttgart, Computer Science
36
+ - [English example](https://latextemplates.github.io/scientific-thesis-template/main-english.pdf)
37
+ - [German example](https://latextemplates.github.io/scientific-thesis-template/main-german.pdf)
38
+ - [German example with minted and PlantUML](https://latextemplates.github.io/scientific-thesis-template/main-minted-german.pdf)
39
+ <!--
40
+ - Paderborn University, Computer Science - to be confirmed.
41
+ - [English example](https://latextemplates.github.io/scientific-thesis-template/main-paderborn-english.pdf)
42
+ - [German example](https://latextemplates.github.io/scientific-thesis-template/main-paderborn-german.pdf)
43
+ -->
44
+
45
+ The template will be extended to support theses from different institutions.
46
+
47
+ For [architectural decision records](https://adr.github.io) see [docs/adr](https://latextemplates.github.io/scientific-thesis-template/adr/).
48
+
29
49
  <% break; default: -%>
30
50
  # LaTeX Document
31
51
  <% break; }
@@ -155,10 +175,17 @@ Deep link: <ftp://ftp.springernature.com/cs-proceeding/llncs/llncs2e.zip>.
155
175
  - Edit [paper.tex](paper.tex).
156
176
  - `latexmk paper`.
157
177
 
158
- As you see on GitHub actions, the paper compiles out of the box.
159
- There is no need to adjust the packages or to remove some of them.
160
- This might lead to undesiered results such as hyperlinks not working any more or no good microtypographic features.
161
- In case you think, a package needs to be altered or added, feel free to open an issue.
178
+ When using on overleaf, you have to add the file `llncs.cls` manually:
179
+
180
+ 1. Navigate to "Add Files"
181
+ 2. Select "From External URL"
182
+ 3. Paste <https://latextemplates.github.io/stys-for-overleaf/llncs.cls> into the field "URL to fetch the file from"
183
+ 4. Click "Create"
184
+
185
+ As you see on GitHub actions, the paper compiles out of the box.
186
+ There is no need to adjust the packages or to remove some of them.
187
+ This might lead to undesiered results such as hyperlinks not working any more or no good microtypographic features.
188
+ In case you think, a package needs to be altered or added, feel free to open an issue.
162
189
  <% break; case "ieee": -%>
163
190
 
164
191
  ## Examples
@@ -5,8 +5,12 @@ atveryend
5
5
  auxhook
6
6
  babel
7
7
  babel-english
8
+ <%# german needed for some TeX source code input hacks -%>
8
9
  babel-german
10
+ <% if (bibtextool == "biblatex") { -%>
11
+ biblatex
9
12
  biber
13
+ <% } -%>
10
14
  bigintcalc
11
15
  bitset
12
16
  blindtext
@@ -19,9 +23,16 @@ comment
19
23
  csquotes
20
24
  currfile
21
25
  datetime2
26
+ <% if (githubpublish || (language == "de")) { -%>
22
27
  datetime2-german
28
+ <% } -%>
23
29
  datetime2-english
30
+ <% if (documentclass == "scientific-thesis") { -%>
31
+ datatool
32
+ <% } -%>
33
+ <% if (githubpublish || (language == "de")) { -%>
24
34
  dehyph-exptl
35
+ <% } -%>
25
36
  diagbox
26
37
  environ
27
38
  etexcmds
@@ -30,15 +41,25 @@ floatflt
30
41
  framed
31
42
  fvextra
32
43
  gettitlestring
44
+ glossaries
45
+ glossaries-extra
33
46
  graphics
34
47
  hyperref
35
48
  hyperxmp
36
49
  hyph-utf8
50
+ hyphen-english
51
+ <% if (githubpublish || (language == "de")) { -%>
52
+ hyphen-german
53
+ <% } -%>
54
+ hyphenex
37
55
  inconsolata
38
56
  ieeetran
39
57
  ifmtarg
40
58
  infwarerr
41
59
  intcalc
60
+ <% if (documentclass == "scientific-thesis") { -%>
61
+ koma-script
62
+ <% } -%>
42
63
  kvdefinekeys
43
64
  kvoptions
44
65
  kvsetkeys
@@ -52,6 +73,9 @@ listings
52
73
  llncs
53
74
  ltxcmds
54
75
  marginnote
76
+ <% if (documentclass == "scientific-thesis") { -%>
77
+ mfirstuc
78
+ <% } -%>
55
79
  microtype
56
80
  mindflow
57
81
  minted
@@ -75,6 +99,9 @@ preprint
75
99
  refcount
76
100
  regexpatch
77
101
  rerunfilecheck
102
+ <% if (documentclass == "scientific-thesis") { -%>
103
+ scientific-thesis-cover
104
+ <% } -%>
78
105
  siunitx
79
106
  snapshot
80
107
  soul
@@ -93,6 +120,9 @@ uniquecounter
93
120
  upquote
94
121
  url
95
122
  xcolor
123
+ <% if (documentclass == "scientific-thesis") { -%>
124
+ xfor
125
+ <% } -%>
96
126
  xkeyval
97
127
  xstring
98
128
  zref
@@ -0,0 +1,6 @@
1
+ % Hier stehen alle Abkürzungen
2
+ \newabbreviation{er}{ER}{error rate}
3
+ \newabbreviation{fr}{FR}{Fehlerrate}
4
+ \newabbreviation[shortplural={RDBMS},longplural={RDBMS}]{rdbms}{RDBMS}{Relational Database Management System}
5
+ \newabbreviation[category=abbreviationdot]{dante}{DANTE e.V.}{Deutschsprachige Anwendervereinigung \TeX\ e.V.}
6
+ \newabbreviation{gp}{G.P.}{General Practitioner}
@@ -0,0 +1,5 @@
1
+ \newabbreviation{er}{ER}{error rate}
2
+ \newabbreviation{fr}{FR}{Fehlerrate}
3
+ \newabbreviation[shortplural={RDBMS},longplural={RDBMS}]{rdbms}{RDBMS}{Relational Database Management System}
4
+ \newabbreviation[category=abbreviationdot]{dante}{DANTE e.V.}{Deutschsprachige Anwendervereinigung \TeX\ e.V.}
5
+ \newabbreviation{gp}{G.P.}{General Practitioner}
@@ -0,0 +1,24 @@
1
+ <%= heading2 %>{Abkürzungen}
2
+
3
+ Mit \verb+\gls{...}+ können Abkürzungen eingebaut werden, beim ersten Aufrufen wird die lange Form eingesetzt.
4
+ Beim wiederholten Verwenden von \verb+\gls{...}+ wird automatisch die Kurzform angezeigt.
5
+ Außerdem wird die Abkürzung automatisch in die Abkürzungsliste eingefügt.
6
+ Mit \verb+\glspl{...}+ wird die Pluralform verwendet.
7
+ Möchte man, dass bei der ersten Verwendung direkt die Kurzform erscheint, so kann man mit \verb+\glsunset{...}+ eine Abkürzung als bereits verwendet markieren.
8
+ Das Gegenteil erreicht man mit \verb+\glsreset{...}+.
9
+
10
+ Definiert werden Abkürzungen in der Datei \textit{acronyms.tex} mithilfe von \verb+\newacronym{...}{...}{...}+.
11
+
12
+ Mehr Infos unter: \url{https://ctan.org/pkg/bib2gls}.
13
+
14
+ <%- bexample %>
15
+ Beim ersten Durchlauf betrug die \gls{fr} 5.
16
+ Beim zweiten Durchlauf war die \gls{fr} 3.
17
+ Die Pluralform sieht man hier: \glspl{er}.
18
+ Um zu demonstrieren, wie das Abkürzungsverzeichnis bei längeren Beschreibungstexten aussieht, muss hier noch \glspl{rdbms} erwähnt werden.
19
+
20
+ \gls{dante} is a local \TeX\ user group.
21
+ The German-speaking local \TeX\ user group is \gls{dante}.
22
+ A \gls{gp} is a medical doctor.
23
+ I went to my surgery to see the \gls{gp}.
24
+ <%- eexample %>
@@ -0,0 +1,24 @@
1
+ <%= heading2 %>{Abbreviations}
2
+
3
+ With \verb+\gls{...}+ you can enter abbreviations, the first time you call it, the long form is used.
4
+ When reusing \verb+\gls{..}+ the short form is automatically displayed.
5
+ The abbreviation is also automatically inserted in the abbreviation list.
6
+ With \verb+\glspl{...}+ the plural form is used.
7
+ If you want the short form to appear directly at the first use, you can use \verb+\glsunset{..}+ to mark an abbreviation as already used.
8
+ The opposite is achieved with \verb+\glsreset{..}+.
9
+
10
+ Abbreviations are defined in \verb+\content\ausarbeitung.tex+ by means of \verb+\newacronym{...}{...}{...}+.
11
+
12
+ More information at: \url{https://ctan.org/pkg/bib2gls}.
13
+
14
+ <%- bexample %>
15
+ At the first pass the \gls{fr} was 5.
16
+ At the second pass was \gls{fr} 3.
17
+ The plural form can be seen here: \glspl{er}.
18
+ To demonstrate what the list of abbreviations looks like for longer description texts, \glspl{rdbms} must be mentioned here.
19
+
20
+ \gls{dante} is a local \TeX\ user group.
21
+ The German-speaking local \TeX\ user group is \gls{dante}.
22
+ A \gls{gp} is a medical doctor.
23
+ I went to my surgery to see the \gls{gp}.
24
+ <%- eexample %>
@@ -0,0 +1,15 @@
1
+ \usepackage[
2
+ abbreviations, % create "abbreviations" glossary
3
+ nomain, % don't create "main" glossary
4
+ stylemods=longbooktabs % do the adjustments for the longbooktabs styles
5
+ ]{glossaries-extra}
6
+ \setglossarystyle{long3col-booktabs}
7
+
8
+ % Hint by https://tex.stackexchange.com/a/463188/9075
9
+ % \usepackage{glossary-longextra}
10
+
11
+ % Following is required if the abbreviation list should be sorted automatically (\printglossary)
12
+ % Not required, if we printed the entries in-order (using \printunsrtglossaries)
13
+ \makeglossaries
14
+
15
+ \input{acronyms}
@@ -0,0 +1,9 @@
1
+ <%- include('biblatex.preamble.en.tex', this); -%>
2
+
3
+ \DefineBibliographyStrings{ngerman}{
4
+ backrefpage = {zitiert auf S\adddot},
5
+ backrefpages = {zitiert auf S\adddot},
6
+ andothers = {et\ \addabbrvspace al\adddot},
7
+ %Tipp von http://www.mrunix.de/forums/showthread.php?64665-biblatex-Kann-%DCberschrift-vom-Inhaltsverzeichnis-nicht-%E4ndern&p=293656&viewfull=1#post293656
8
+ bibliography = {Literaturverzeichnis}
9
+ }
@@ -0,0 +1,61 @@
1
+ \usepackage[
2
+ backend = biber, %biber does not work with 64x versions alternative: bibtex8
3
+ %minalphanames only works with biber backend
4
+ sortcites = true,
5
+ bibstyle = alphabetic,
6
+ citestyle = alphabetic,
7
+ giveninits = true,
8
+ useprefix = false, %"von, van, etc." will be printed, too. See below.
9
+ minnames = 1,
10
+ minalphanames = 3,
11
+ maxalphanames = 4,
12
+ maxbibnames = 99,
13
+ maxcitenames = 2,
14
+ natbib = true,
15
+ eprint = true,
16
+ url = true,
17
+ doi = true,
18
+ isbn = true,
19
+ backref = true]{biblatex}
20
+
21
+ % enable more breaks at URLs. See https://tex.stackexchange.com/a/134281.
22
+ \setcounter{biburllcpenalty}{7000}
23
+ \setcounter{biburlucpenalty}{8000}
24
+
25
+ \bibliography{<%= filenames.bib %>}
26
+ %\addbibresource[datatype=bibtex]{\bibliography{<%= filenames.bib %>}}
27
+
28
+ % Do not put "vd" in the label, but put it at "\citeauthor"
29
+ % Source: http://tex.stackexchange.com/a/30277/9075
30
+ \makeatletter
31
+ \AtBeginDocument{\toggletrue{blx@useprefix}}
32
+ \AtBeginBibliography{\togglefalse{blx@useprefix}}
33
+ \makeatother
34
+
35
+ % Thin spaces between initials
36
+ % http://tex.stackexchange.com/a/11083/9075
37
+ \renewrobustcmd*{\bibinitdelim}{\,}
38
+
39
+ % Keep first and last name together in the bibliography
40
+ % http://tex.stackexchange.com/a/196192/9075
41
+ \renewcommand*\bibnamedelimc{\addnbspace}
42
+ \renewcommand*\bibnamedelimd{\addnbspace}
43
+
44
+ % Replace last "and" by comma in bibliography
45
+ % See http://tex.stackexchange.com/a/41532/9075
46
+ \AtBeginBibliography{%
47
+ \renewcommand*{\finalnamedelim}{\addcomma\space}%
48
+ }
49
+
50
+ % enable hyperlinked author names when using \citeauthor
51
+ % source: http://tex.stackexchange.com/a/75916/9075
52
+ \DeclareCiteCommand{\citeauthor}
53
+ {\boolfalse{citetracker}%
54
+ \boolfalse{pagetracker}%
55
+ \usebibmacro{prenote}}
56
+ {\ifciteindex
57
+ {\indexnames{labelname}}
58
+ {}%
59
+ \printtext[bibhyperref]{\printnames{labelname}}}
60
+ {\multicitedelim}
61
+ {\usebibmacro{postnote}}
@@ -5,7 +5,7 @@ Cleveref demonstration: Cref at beginning of sentence, cref in all other cases.
5
5
 
6
6
  \begin{figure}
7
7
  \centering
8
- \includegraphics[width=.75\columnwidth]{example-image-a}
8
+ \includegraphics[width=.75\linewidth]{example-image-a}
9
9
  \caption{Example figure for cref demo}
10
10
  \label{fig:ex:cref}
11
11
  \end{figure}
@@ -11,21 +11,23 @@ $preview_mode = 0;
11
11
  #automatically call lualatex/pdflatex (instead of latex)
12
12
  $pdf_mode = 1;
13
13
 
14
+ # enable deletion of *.bbl when calling "latexmk -c"
15
+ $bibtex_use = 2;
16
+
17
+ # Glossaries inclusion inspired by https://tex.stackexchange.com/a/44316/9075
14
18
  add_cus_dep('glo', 'gls', 0, 'run_makeglossaries');
15
19
  add_cus_dep('acn', 'acr', 0, 'run_makeglossaries');
16
20
 
17
21
  sub run_makeglossaries {
18
22
  if ( $silent ) {
19
- system "makeglossaries", "-q", $_[0];
23
+ # we use -lite to avoid an installation of perl
24
+ system "makeglossaries-lite", "-q", $_[0];
20
25
  }
21
26
  else {
22
- system "makeglossaries", $_[0];
27
+ system "makeglossaries-lite", $_[0];
23
28
  };
24
29
  }
25
30
 
26
- # enable deletion of *.bbl when calling "latexmk -c"
27
- $bibtex_use = 2;
28
-
29
31
  #remove more files than in the default configuration
30
- @generated_exts = qw(acn acr alg aux code ist fls glg glo gls glsdefs idx ind lof lot out thm toc tpt wrt upa upb synctex);
32
+ @generated_exts = qw(acn acr alg aux code fls glg glo glo-abr gls glsdefs idx ind ist lof lol lot out run.xml synctex thm toc tpt upa upb wrt);
31
33
  $clean_ext .= ' %R.ist %R.xdy';
@@ -2,7 +2,7 @@
2
2
  \RequirePackage{snapshot}
3
3
  <% } -%>
4
4
  <% if (documentclass == 'lncs') { -%>
5
- % Dieses Template wurde mit der "LLNCS DOCUMENT CLASS -- version 2.20 (10-Mar-2018)" getestet
5
+ % Dieses Template wurde mit der "LLNCS DOCUMENT CLASS -- version 2.21 (12-Jan-2022)" getestet
6
6
 
7
7
  <% } -%>
8
8
  % !TeX spellcheck = de-DE
@@ -28,7 +28,7 @@
28
28
  % "runningheads" zeigt Author + Titel auf jeder Seite.
29
29
  % Diese Option nach Aufforderung durch die Herausgeber entfernen.
30
30
  % Während des Schreibens und das Review des Papers hilft das, um z.B. auf konkrete Seitenzahlen einfach verweisen zu können.
31
- \documentclass[ngerman,runningheads,a4paper]{llncs}[2018/03/10]
31
+ \documentclass[runningheads,a4paper,ngerman]{llncs}[2022/01/12]
32
32
  <% } else {-%>
33
33
  \documentclass[
34
34
  % fontsize=11pt is the standard
@@ -43,8 +43,8 @@
43
43
  a4paper, % Standard format - only KOMAScript uses paper=a4 - https://tex.stackexchange.com/a/61044/9075
44
44
  twoside, % we are optimizing for both screen and two-side printing. So the page numbers will jump, but the content is configured to stay in the middle (by using the geometry package)
45
45
  bibliography=totoc,
46
- % idxtotoc, % Index ins Inhaltsverzeichnis
47
- % liststotoc, % List of X ins Inhaltsverzeichnis, mit liststotocnumbered werden die Abbildungsverzeichnisse nummeriert
46
+ % idxtotoc, % Index ins Inhaltsverzeichnis
47
+ % liststotoc, % List of X ins Inhaltsverzeichnis, mit liststotocnumbered werden die Abbildungsverzeichnisse nummeriert
48
48
  headsepline,
49
49
  cleardoublepage=empty,
50
50
  parskip=half,
@@ -136,7 +136,7 @@
136
136
  \usepackage[math]{blindtext}
137
137
  \usepackage{mwe}
138
138
  <% if (useExampleEnvironment) { -%>
139
- \usepackage{currfile}
139
+ \usepackage[realmainfile]{currfile}
140
140
  \usepackage{tcolorbox}
141
141
  \tcbuselibrary{<%= listings %>}
142
142
  <% } -%>
@@ -169,6 +169,11 @@
169
169
  \llncs{book editors and title}{0042} %% 0042 is the start page
170
170
  \fi
171
171
  <% } -%>
172
+ <% if (documentclass == 'scientific-thesis') { -%>
173
+
174
+ <% if (feature.acronyms) { -%><%- include('acronyms.preamble.en.tex', this); %><% } -%>
175
+ <%- include('scientific-thesis-cover.preamble.de.tex', this); %>
176
+ <% } -%>
172
177
  <% if (latexcompiler == "pdflatex") { -%>
173
178
 
174
179
  % Enable copy and paste of text from the PDF
@@ -185,8 +190,7 @@
185
190
  <% } -%>
186
191
 
187
192
  \begin{document}
188
- <% switch (documentclass) {
189
- case "lncs": -%>
193
+ <% switch (documentclass) { case "lncs": -%>
190
194
 
191
195
  \title{Paper Title}
192
196
  % If Title is too long, use \titlerunning
@@ -241,10 +245,106 @@ Winery~\cite{Winery} is a graphical \commentontext{modeling}{modeling with one `
241
245
  The whole idea of TOSCA is explained by <% if (available.citet) { %>\citet<% } else { %>Binz et al.~\cite<% } %>{Binz2009}.
242
246
  <% break;
243
247
  default: -%>
244
- \lipsum[1]
245
- <%
246
- break;
247
- } -%>
248
+ \pagenumbering{arabic}
249
+ \Titelblatt
250
+
251
+ %Eigener Seitenstil fuer die Kurzfassung und das Inhaltsverzeichnis
252
+ \deftriplepagestyle{preamble}{}{}{}{}{}{\pagemark}
253
+ %Doku zu deftriplepagestyle: scrguide.pdf
254
+ \pagestyle{preamble}
255
+ \renewcommand*{\chapterpagestyle}{preamble}
256
+
257
+ %Kurzfassung / abstract
258
+ %auch im Stil vom Inhaltsverzeichnis
259
+ \section*{Kurzfassung}
260
+
261
+ <Kurzfassung der Arbeit>
262
+
263
+ \cleardoublepage
264
+
265
+ \microtypesetup{protrusion=false}
266
+
267
+ % In case you have trouble with headings reaching into the page numbers, enable the following three lines.
268
+ % Hint by http://golatex.de/inhaltsverzeichnis-schreibt-ueber-rand-t3106.html
269
+ %
270
+ %\makeatletter
271
+ %\renewcommand{\@pnumwidth}{2em}
272
+ %\makeatother
273
+ %
274
+ % Bei einem ungünstigen Seitenumbruch im Inhaltsverzeichnis, kann dieser mit
275
+ % \addtocontents{toc}{\protect\newpage}
276
+ % an der passenden Stelle im Fließtext erzwungen werden.
277
+ \tableofcontents
278
+
279
+ \listoffigures
280
+
281
+ \listoftables
282
+ <% if (listings == 'listings') { -%>
283
+
284
+ % We use lstlisting environments with caption paramters.
285
+ % Thus, we need that command.
286
+ % Alternative: \listof{Listing}{List of Listings}
287
+ \lstlistoflistings
288
+ <% } else { -%>
289
+
290
+ \listof{Listing}{Verzeichnis der Listings}
291
+ <% } -%>
292
+
293
+ %mittels \newfloat wurde die Algorithmus-Gleitumgebung definiert.
294
+ %Mit folgendem Befehl werden alle floats dieses Typs ausgegeben
295
+ %\listof{Algorithmus}{Verzeichnis der Algorithmen}
296
+ %\listofalgorithms %Ist nur für Algorithmen, die mittels \begin{algorithm} umschlossen werden, nötig
297
+
298
+ % Abkürzungsverzeichnis
299
+ \printnoidxglossaries
300
+
301
+ \microtypesetup{protrusion=true}
302
+
303
+ % Headline and footline
304
+ \renewcommand*{\chapterpagestyle}{scrplain}
305
+ \pagestyle{scrheadings}
306
+ \pagestyle{scrheadings}
307
+ \ihead[]{}
308
+ \chead[]{}
309
+ \ohead[]{\headmark}
310
+ \cfoot[]{}
311
+ \ofoot[\usekomafont{pagenumber}\thepage]{\usekomafont{pagenumber}\thepage}
312
+ \ifoot[]{}
313
+
314
+ \chapter{Einleitung}
315
+ In diesem Kapitel steht die Einleitung zu dieser Arbeit.
316
+ Sie soll nur als Beispiel dienen und hat nichts mit dem Buch \cite{WSPA} zu tun.
317
+ Nun viel Erfolg bei der Arbeit!
318
+
319
+ Bei \LaTeX\ werden Absätze durch freie Zeilen angegeben.
320
+ Da die Arbeit über ein Versionskontrollsystem versioniert wird, ist es sinnvoll, pro \emph{Satz} eine neue Zeile im \texttt{.tex}-Dokument anzufangen.
321
+ So kann einfacher ein Vergleich von Versionsständen vorgenommen werden.
322
+
323
+ Die Arbeit ist in folgender Weise gegliedert:
324
+ In \cref{chap:k2} werden die Grundlagen dieser Arbeit beschrieben.
325
+ Schließlich fasst \cref{chap:zusfas} die Ergebnisse der Arbeit zusammen und stellt Anknüpfungspunkte vor.
326
+
327
+
328
+ \chapter{Kapitel zwei}
329
+ \label{chap:k2}
330
+
331
+ Hier wird der Hauptteil stehen.
332
+ Falls mehrere Kapitel gewünscht, entweder mehrmals \texttt{\textbackslash{}chapter} benutzen oder pro Kapitel eine eigene Datei anlegen und \texttt{ausarbeitung.tex} anpassen.
333
+
334
+ LaTeX-Hinweise stehen in \cref{chap:latextipps}.
335
+
336
+ %noch etwas Fülltext
337
+ \blinddocument
338
+
339
+ \chapter{Verwandte Arbeiten}
340
+ Eine Beschreibung relevanter wissenschaftlicher Arbeiten mit Bezug zur eigenen Arbeit. Der Abschnitt kann je nach Kontext auch an anderer Stelle stehen.
341
+
342
+ \chapter{Zusammenfassung und Ausblick}\label{chap:zusfas}
343
+ Hier bitte einen kurzen Durchgang durch die Arbeit.
344
+
345
+ \section*{Ausblick}
346
+ ...und anschließend einen Ausblick
347
+ <% break; } -%>
248
348
 
249
349
  <% if (examples) { -%>
250
350
  <%= heading1 %>{LaTeX Hinweise}
@@ -318,6 +418,8 @@ Hier sollen allgemeine \LaTeX-Hinweise gegeben werden, damit man Minimalbeispiel
318
418
  <%- include('minted.example.en.tex', this); %>
319
419
  <% } -%>
320
420
  <%- include('paralist.example.en.tex', this); %>
421
+ <% if (feature.acronyms) { %><%- include('acronyms.example.de.tex', this); %>
422
+ <% } -%>
321
423
  <%- include('otherfeatures.example.en.tex', this); %>
322
424
  <% } -%>
323
425
 
@@ -350,5 +452,22 @@ See \url{https://help.jabref.org/en/CleanupEntries} for an overview of the clean
350
452
  %
351
453
  Alle Links wurden zuletzt am 29.03.2021 geprüft.
352
454
  <% } -%>
455
+ <% if (documentclass == 'scientific-thesis') { -%>
353
456
 
457
+ %%% ===============================================================================
458
+ \appendix
459
+ \addcontentsline{toc}{chapter}{Anhang}
460
+
461
+ %\listoffigures
462
+ %\listoftables
463
+ %%% ===============================================================================
464
+
465
+ %%% ===============================================================================
466
+ %<%= heading1 %>{My first appendix}\label{sec:appendix1}
467
+ %%% ===============================================================================
468
+
469
+ \pagestyle{empty}
470
+ \renewcommand*{\chapterpagestyle}{empty}
471
+ \Versicherung
472
+ <% } -%>
354
473
  \end{document}
@@ -2,7 +2,7 @@
2
2
  \RequirePackage{snapshot}
3
3
  <% } -%>
4
4
  <% switch (documentclass) { case "lncs": -%>
5
- % This template has been tested with LLNCS DOCUMENT CLASS -- version 2.20 (10-Mar-2018)
5
+ % This template has been tested with LLNCS DOCUMENT CLASS -- version 2.21 (12-Jan-2022)
6
6
 
7
7
  <% break; case "ieee": -%>
8
8
  % This template has been tested with IEEEtran of 2015.
@@ -37,7 +37,7 @@
37
37
  % it is good to have title printed on the pages, too.
38
38
  %
39
39
  % To disable outputting page headers and footers, remove "runningheads"
40
- \documentclass[runningheads,a4paper,english]{llncs}[2018/03/10]
40
+ \documentclass[runningheads,a4paper,english]{llncs}[2022/01/12]
41
41
  <% break; case "acmart": -%>
42
42
 
43
43
  <% if (texlive >= 2021) { -%>
@@ -59,7 +59,6 @@
59
59
  % Balance the last page using the balance package (see https://ctan.org/pkg/balance)
60
60
  \usepackage{balance}
61
61
  <% } -%>
62
-
63
62
  <% break; case "scientific-thesis": -%>
64
63
 
65
64
  % EN: The following package allows \\ at the title page
@@ -80,6 +79,13 @@
80
79
  % draft % um zu sehen, wo noch nachgebessert werden muss - wichtig, da Bindungskorrektur mit drin
81
80
  draft=false
82
81
  ]{scrbook}
82
+ \usepackage{scrlayer-scrpage}
83
+ \ihead[]{}
84
+ \chead[]{}
85
+ \ohead[]{\headmark}
86
+ \cfoot[]{}
87
+ \ofoot[\usekomafont{pagenumber}\thepage]{\usekomafont{pagenumber}\thepage}
88
+ \ifoot[]{}
83
89
  <% break; default: -%>
84
90
 
85
91
  % not yet supported template. Please report to the author of generator-latex-template
@@ -122,15 +128,19 @@
122
128
  <%- include('booktabs.preamble.en.tex', this); -%>
123
129
 
124
130
  <%- include('paralist.preamble.en.tex', this); -%>
125
- <% if (documentclass == 'acmart' || documentclass == 'ieee' || documentclass == 'lncs') { -%>
131
+ <% switch (documentclass) {
132
+ case "acmart":
133
+ case "ieee":
134
+ case "lncs": -%>
126
135
 
127
136
  <%- include('natbib.preamble.en.tex', this); -%>
128
- <% } -%>
129
- <% if (documentclass == 'acmart') { -%>
137
+ <% break; case "scientific-thesis": -%>
138
+ <%- include('biblatex.preamble.en.tex', this); -%>
139
+ <% break; } -%>
140
+ <% switch (documentclass) { case "acmart": -%>
130
141
 
131
142
  \citestyle{acmnumeric} % alternative: acmauthoryear
132
- <% } -%>
133
- <% if (documentclass == 'lncs') { -%>
143
+ <% break; case "lncs": -%>
134
144
 
135
145
  % Prepare more space-saving rendering of the bibliography
136
146
  % Source: https://tex.stackexchange.com/a/280936/9075
@@ -143,7 +153,7 @@
143
153
  { }
144
154
 
145
155
  <%- include('floatflt.preamble.en.tex', this); -%>
146
- <% } -%>
156
+ <% break; } -%>
147
157
  <% if (todo == 'pdfcomment') { -%>
148
158
 
149
159
  <%- include('pdfcomment.preamble.en.tex', this); -%>
@@ -172,7 +182,7 @@
172
182
  \usepackage[math]{blindtext}
173
183
  \usepackage{mwe}
174
184
  <% if (useExampleEnvironment) { -%>
175
- \usepackage{currfile}
185
+ \usepackage[realmainfile]{currfile}
176
186
  \usepackage{tcolorbox}
177
187
  \tcbuselibrary{<%= listings %>}
178
188
  <% } -%>
@@ -193,6 +203,11 @@
193
203
  % Definition of "= taken from http://mirror.ctan.org/macros/latex/contrib/babel-contrib/german/ngermanb.dtx
194
204
  \makeatother
195
205
 
206
+ % Add manual adapted hyphenation of English words
207
+ % See https://ctan.org/pkg/hyphenex and https://tex.stackexchange.com/a/22892/9075 for details
208
+ % Could not work on MiKTeX
209
+ \input{ushyphex}
210
+
196
211
  % correct bad hyphenation here
197
212
  \hyphenation{op-tical net-works semi-conduc-tor}
198
213
  <% switch (documentclass) { case "acmart": -%>
@@ -215,6 +230,10 @@
215
230
  %example: llncs{Anonymous et al. (eds). \emph{Proceedings of the International Conference on \LaTeX-Hacks}, LNCS~42. Some Publisher, 2016.}{0042}
216
231
  \llncs{book editors and title}{0042} %% 0042 is the start page
217
232
  \fi
233
+ <% break; case "scientific-thesis": -%>
234
+
235
+ <% if (feature.acronyms) { -%><%- include('acronyms.preamble.en.tex', this); %><% } -%>
236
+ <%- include('scientific-thesis-cover.preamble.en.tex', this); %>
218
237
  <% break; } -%>
219
238
  <% if (latexcompiler == "pdflatex") { -%>
220
239
 
@@ -324,6 +343,15 @@
324
343
  \fi
325
344
 
326
345
  \begin{abstract}
346
+ <% break; case "scientific-thesis": -%>
347
+ \pagenumbering{arabic}
348
+ \Titelblatt
349
+
350
+ \pagestyle{plain.scrheadings}
351
+ \renewcommand*{\chapterpagestyle}{plain.scrheadings}
352
+
353
+ % Kurzfassung / abstract
354
+ % auch im Stil vom Inhaltsverzeichnis
327
355
  <% break; default: -%>
328
356
  \section*{Abstract}
329
357
  <% break; } -%>
@@ -366,6 +394,49 @@
366
394
  % For peerreview papers, this IEEEtran command inserts a page break and
367
395
  % creates the second title. It will be ignored for other modes.
368
396
  \IEEEpeerreviewmaketitle
397
+ <% break; case "scientific-thesis": -%>
398
+
399
+ \microtypesetup{protrusion=false}
400
+
401
+ % In case you have trouble with headings reaching into the page numbers, enable the following three lines.
402
+ % Hint by http://golatex.de/inhaltsverzeichnis-schreibt-ueber-rand-t3106.html
403
+ %
404
+ %\makeatletter
405
+ %\renewcommand{\@pnumwidth}{2em}
406
+ %\makeatother
407
+ %
408
+ % In case of a strange break in the table of contents,
409
+ % a page break can be inserted by issuing the following command at the "right" place in the main text:
410
+ % \addtocontents{toc}{\protect\newpage}
411
+ \tableofcontents
412
+
413
+ \listoffigures
414
+
415
+ \listoftables
416
+ <% if (listings == 'listings') { -%>
417
+
418
+ % We use lstlisting environments with caption paramters.
419
+ % Thus, we need that command.
420
+ % Alternative: \listof{Listing}{List of Listings}
421
+ \lstlistoflistings
422
+ <% } else { -%>
423
+ \listof{Listing}{List of Listings}
424
+ <% } -%>
425
+
426
+ %mittels \newfloat wurde die Algorithmus-Gleitumgebung definiert.
427
+ %Mit folgendem Befehl werden alle floats dieses Typs ausgegeben
428
+ %\listof{Algorithmus}{List of Algorithms}
429
+ %\listofalgorithms %Ist nur für Algorithmen, die mittels \begin{algorithm} umschlossen werden, nötig
430
+
431
+ % Abbreviations
432
+ \printglossaries
433
+ % \printunsrtglossaries cannot be used, because then no indexing happens; source: https://tex.stackexchange.com/a/287128/9075
434
+
435
+ \microtypesetup{protrusion=true}
436
+
437
+ % Headline and footline
438
+ \renewcommand*{\chapterpagestyle}{scrplain}
439
+ \pagestyle{scrheadings}
369
440
  <% break; default: -%>
370
441
 
371
442
  \tableofcontents
@@ -706,6 +777,8 @@ It focuses on minimal examples, which can be directly adapted to the content
706
777
  <%- include('minted.example.en.tex', this); %>
707
778
  <% } -%>
708
779
  <%- include('paralist.example.en.tex', this); %>
780
+ <% if (feature.acronyms) { %><%- include('acronyms.example.en.tex', this); %>
781
+ <% } -%>
709
782
  <%- include('otherfeatures.example.en.tex', this); %>
710
783
  <% } -%>
711
784
  <% if (howtotext) { -%>
@@ -794,6 +867,9 @@ See \url{https://help.jabref.org/en/CleanupEntries} for an overview of the clean
794
867
  \bibliographystyle{IEEEtranN} % IEEEtranN is the natbib compatible bst file
795
868
  % argument is your BibTeX string definitions and bibliography database(s)
796
869
  \bibliography{<%= filenames.bib %>}
870
+ <% break; case "scientific-thesis": -%>
871
+
872
+ \printbibliography
797
873
  <% break; default: -%>
798
874
 
799
875
  \bibliographystyle{plain}
@@ -804,7 +880,8 @@ See \url{https://help.jabref.org/en/CleanupEntries} for an overview of the clean
804
880
  \ \\
805
881
  %
806
882
  All links were last followed on October 5, 2020.
807
- <% if (documentclass != 'lncs') { -%>
883
+
884
+ <% switch (documentclass) { case "lncs": -%>
808
885
 
809
886
  %%% ===============================================================================
810
887
  %\appendix
@@ -817,6 +894,22 @@ All links were last followed on October 5, 2020.
817
894
  %%% ===============================================================================
818
895
  %<%= heading1 %>{My first appendix}\label{sec:appendix1}
819
896
  %%% ===============================================================================
820
- <% } -%>
897
+ <% break; case "scientific-thesis": -%>
898
+
899
+ %%% ===============================================================================
900
+ \appendix
901
+ \addcontentsline{toc}{chapter}{Appendices}
902
+
903
+ %\listoffigures
904
+ %\listoftables
905
+ %%% ===============================================================================
906
+
907
+ %%% ===============================================================================
908
+ %<%= heading1 %>{My first appendix}\label{sec:appendix1}
909
+ %%% ===============================================================================
821
910
 
911
+ \pagestyle{empty}
912
+ \renewcommand*{\chapterpagestyle}{empty}
913
+ \Versicherung
914
+ <% break; } -%>
822
915
  \end{document}
@@ -0,0 +1,12 @@
1
+ % Package URL: https://ctan.org/pkg/scientific-thesis-cover
2
+ \usepackage[
3
+ title={Förderungswürdigkeit der F\"{o}rderung von Öl},
4
+ author={Lars K.},
5
+ type=bachelor,
6
+ institute=iaas, % oder einfach {Demo\\Demo...}
7
+ course={Medieninformatik},
8
+ examiner={Prof.\ Dr.\ Uwe Fessor},
9
+ supervisor={Dipl.-Inf.\ Roman Tiker,\\Dipl.-Inf.\ Laura Stern,\\Otto Normalverbraucher,\ M.Sc.},
10
+ startdate={5.\ Juli 2013},
11
+ enddate={5.\ Januar 2014}
12
+ ]{scientific-thesis-cover}
@@ -0,0 +1,12 @@
1
+ % Package URL: https://ctan.org/pkg/scientific-thesis-cover
2
+ \usepackage[
3
+ title={Is Oil the future?},
4
+ author={Lars K.},
5
+ type=bachelor,
6
+ institute=iaas, % or other institute names - or just a plain string using {Demo\\Demo...}
7
+ course={Medieninformatik},
8
+ examiner={Prof.\ Dr.\ Uwe Fessor},
9
+ supervisor={Dipl.-Inf.\ Roman Tiker,\\Dipl.-Inf.\ Laura Stern,\\Otto Normalverbraucher,\ M.Sc.},
10
+ startdate={July 5, 2018},
11
+ enddate={January 5, 2019}
12
+ ]{scientific-thesis-cover}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-latex-template",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Generates a latex template to be used as start for writing scientific works (papers, articles, theses)",
5
5
  "homepage": "https://github.com/latextemplates/generator-latex-template",
6
6
  "author": {