generator-latex-template 0.4.0 → 0.7.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.
Files changed (30) hide show
  1. package/README.md +9 -11
  2. package/generators/app/index.js +58 -16
  3. package/generators/app/templates/.github/workflows/check.yml +43 -0
  4. package/generators/app/templates/Dockerfile.reitzig +24 -12
  5. package/generators/app/templates/README.en.md +35 -15
  6. package/generators/app/templates/Texlivefile +30 -0
  7. package/generators/app/templates/acronyms.de.tex +6 -0
  8. package/generators/app/templates/acronyms.en.tex +5 -0
  9. package/generators/app/templates/acronyms.example.de.tex +24 -0
  10. package/generators/app/templates/acronyms.example.en.tex +24 -0
  11. package/generators/app/templates/acronyms.preamble.en.tex +15 -0
  12. package/generators/app/templates/biblatex.preamble.de.tex +9 -0
  13. package/generators/app/templates/biblatex.preamble.en.tex +61 -0
  14. package/generators/app/templates/cleveref.example.en.tex +1 -1
  15. package/generators/app/templates/figure.example.de.tex +0 -4
  16. package/generators/app/templates/figure.example.en.tex +2 -6
  17. package/generators/app/templates/latexmkrc +8 -6
  18. package/generators/app/templates/listings.example.de.tex +0 -17
  19. package/generators/app/templates/listings.example.en.tex +6 -6
  20. package/generators/app/templates/main.de.tex +141 -19
  21. package/generators/app/templates/main.en.tex +154 -64
  22. package/generators/app/templates/minted.example.en.tex +5 -5
  23. package/generators/app/templates/minted.preamble.en.tex +13 -2
  24. package/generators/app/templates/refcheck.example.en.tex +36 -0
  25. package/generators/app/templates/refcheck.preamble.en.tex +4 -0
  26. package/generators/app/templates/scientific-thesis-cover.preamble.de.tex +12 -0
  27. package/generators/app/templates/scientific-thesis-cover.preamble.en.tex +12 -0
  28. package/generators/app/templates/{splncsnat.bst → splncs04nat.bst} +156 -118
  29. package/generators/app/templates/subfloat.example.en.tex +2 -2
  30. package/package.json +11 -11
package/README.md CHANGED
@@ -1,6 +1,6 @@
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
- > Generates latextemplates (e.g., for thesis, workshops, conferences, IEEEtran, LNCS, ...) out of "micro-templates"
3
+ > Generates latex templates (e.g., for thesis, workshops, conferences, IEEEtran, LNCS, ...) out of "micro-templates"
4
4
 
5
5
  See the **[talk about the generator](https://github.com/dante-ev/Vortraege_Tagungen/blob/master/2019-Herbst/Oliver%20Kopp%20-%20The%20LaTeX%20Template%20Generator%20-%20dante2019-herbst.pdf)** for an overview on the aims and the general concept.
6
6
 
@@ -40,7 +40,7 @@ npx -p yo -p generator-latex-template -c 'yo latex-template'
40
40
 
41
41
  ### Installing `generator-latex-template`
42
42
 
43
- In case one wants to have the generator installed permanently or `npx` does work as exepcted, one can install `generator-latex-template` using following command:
43
+ In case one wants to have the generator installed permanently or `npx` does work as expected, one can install `generator-latex-template` using following command:
44
44
 
45
45
  ```bash
46
46
  npm install -g generator-latex-template
@@ -108,16 +108,16 @@ In the long run, the contents of the `paper.tex` (and similar) files in reposito
108
108
  - Run `npx yo <path-to-git-repository>`
109
109
  - Windows: `npx yo c:\git-repositories\latextemplates\generator-latex-template`
110
110
  - Parameters can be set using command line
111
- - Linux: `npx yo /tmp/repo --documentclass=lncs --texlive=2021 --latexcompiler=pdflatex --bibtextool=bibtex --docker=false --language=en --font=default --listings=listings --cleveref=true --enquotes=csquotes --tweak_outerquote=babel --todo=pdfcomment --howtotext=true --examples=true`
112
- - Windows: `npx yo c:\git-repositories\latextemplates\generator-latex-template --documentclass=scientific-thesis --texlive=2021 --latexcompiler=pdflatex --bibtextool=bibtex --docker=false --language=en --font=default --listings=listings --cleveref=true --enquotes=csquotes --tweak_outerquote=babel --todo=pdfcomment --howtotext=true --examples=true`
113
- - Windows automatic generation of a LNCS template (with pdflatex and bibtex): `npx yo c:\git-repositories\latextemplates\generator-latex-template --documentclass=lncs --texlive=2021 --latexcompiler=pdflatex --bibtextool=bibtex --docker=false --language=en --font=default --listings=listings --cleveref=true --enquotes=csquotes --tweak_outerquote=babel --todo=pdfcomment --howtotext=true --examples=true`
111
+ - Linux: `npx yo /tmp/repo --documentclass=lncs --papersize=a4 --latexcompiler=pdflatex --bibtextool=bibtex --overleaf=false --texlive=2022 --docker=false --language=en --font=default --listings=listings --enquotes=csquotes --tweak_outerquote=babel --todo=pdfcomment --examples=true --howtotext=true`
112
+ - Windows: `npx yo c:\git-repositories\latextemplates\generator-latex-template --documentclass=scientific-thesis --papersize=a4 --latexcompiler=pdflatex --bibtextool=bibtex --overleaf=false --texlive=2022 --language=en --font=default --listings=listings --enquotes=csquotes --tweak_outerquote=babel --todo=pdfcomment --examples=true --howtotext=true`
113
+ - Windows automatic generation of a LNCS template (with pdflatex and bibtex): `npx yo c:\git-repositories\latextemplates\generator-latex-template --documentclass=lncs ---papersize=a4 --latexcompiler=pdflatex --bibtextool=bibtex --overleaf=false --texlive=2022 --docker=false --language=en --font=default --listings=listings --enquotes=csquotes --tweak_outerquote=babel --todo=pdfcomment --examples=true --howtotext=true`
114
114
  - Run `latexmk` to build the PDF
115
115
  - Update npm dependencies
116
116
  - `npx npm-update-all`. See [FreeCodeCamp](https://www.freecodecamp.org/news/10-npm-tricks-that-will-make-you-a-pro-a945982afb25/) for more details.
117
117
  - `npx npm-check-updates -u`. [[Source](https://www.carlrippon.com/upgrading-npm-dependencies/)]
118
118
  - See <https://github.com/yeoman/generator/releases> for changes in the generator.
119
119
  - When one encounters `Cannot find module 'yeoman-generator'`, please update the npm dependencies.
120
- That error ocurred when using version `4.13.0` and `5.4.2` was available.
120
+ That error occurred when using version `4.13.0` and `5.4.2` was available.
121
121
  - In case of the error "Error: EACCES, permission denied '/root/.config/configstore/insight-yo.json'", one needs to execute `chmod g+rwx /root /root/.config /root/.config/configstore`
122
122
  - Check GitHub actions
123
123
  - Use [actionlint](https://github.com/rhysd/actionlint#readme)
@@ -144,10 +144,6 @@ In the long run, the contents of the `paper.tex` (and similar) files in reposito
144
144
  <% break; } -%>
145
145
  ```
146
146
 
147
- ```ejs
148
- <% if (cleveref) { %>\cref<% } else if (documentclass == 'lncs') { %>Sect.~<% } else { %>Section~<% } %>{sec:relatedwork}
149
- ```
150
-
151
147
  ### Debugging
152
148
 
153
149
  A `launch.json` configured for Windows and Visual Studio Code is included.
@@ -171,6 +167,8 @@ ejslint.cmd c:\git-repositories\latextemplates\generator-latex-template\generato
171
167
  The code is licensed [0BSD](https://choosealicense.com/licenses/0bsd/#), the snippets (both LaTeX and text) 0BSD, too.
172
168
  See [benbalter/talks#15](https://github.com/benbalter/talks/issues/15#issuecomment-599704662), for a reasoning, why [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/) cannot be used.
173
169
 
170
+ `generators/app/templates/splncs04nat.bst` is taken from [tpavlic/splncs04nat](https://github.com/tpavlic/splncs04nat) and is MIT-licensed.
171
+
174
172
  [hyperref]: https://ctan.org/pkg/hyperref
175
173
  [listings]: https://ctan.org/pkg/listings
176
174
  [minted]: https://ctan.org/pkg/minted
@@ -130,9 +130,6 @@ module.exports = class extends Generator {
130
130
  {
131
131
  type: 'list',
132
132
  name: 'papersize',
133
- when: function(response) {
134
- return response.documentclass === 'ieee';
135
- },
136
133
  message: 'Which paper size to use?',
137
134
  choices: [
138
135
  {
@@ -144,19 +141,42 @@ module.exports = class extends Generator {
144
141
  value: "letter"
145
142
  }
146
143
  ],
147
- default: "a4paper"
144
+ default: "a4"
145
+ },
146
+ {
147
+ type: 'list',
148
+ name: 'overleaf',
149
+ message: 'Overleaf compatibility?',
150
+ choices: [
151
+ {
152
+ name: "yes",
153
+ value: true
154
+ },
155
+ {
156
+ name: "no",
157
+ value: false
158
+ }
159
+ ],
160
+ default: true
148
161
  },
149
162
  {
150
163
  type: 'list',
151
164
  name: 'texlive',
152
- message: 'Which TeXLive compatiblity?',
165
+ when: function(response) {
166
+ return (!response.overleaf || (response.overleaf == "false"));
167
+ },
168
+ message: 'Which TeXLive compatibility?',
153
169
  choices: [
154
170
  {
155
171
  name: "TeXLive 2021",
156
172
  value: 2021
173
+ },
174
+ {
175
+ name: "TeXLive 2022",
176
+ value: 2022
157
177
  }
158
178
  ],
159
- default: 2021
179
+ default: 2022
160
180
  },
161
181
  {
162
182
  type: 'list',
@@ -165,7 +185,7 @@ module.exports = class extends Generator {
165
185
  choices: ["pdflatex", "lualatex"],
166
186
  default: "pdflatex",
167
187
  when: function(response) {
168
- return !((response.documentclass === 'ieee') && (response.texlive == 2021));
188
+ return !(response.documentclass === 'ieee');
169
189
  }
170
190
  },
171
191
  {
@@ -290,12 +310,6 @@ module.exports = class extends Generator {
290
310
  ],
291
311
  default: "listings"
292
312
  },
293
- {
294
- type: 'confirm',
295
- name: 'cleveref',
296
- message: 'Use cleveref?',
297
- default: true
298
- },
299
313
  {
300
314
  type: 'list',
301
315
  name: 'enquotes',
@@ -394,6 +408,11 @@ module.exports = class extends Generator {
394
408
  // To access props later use this.props.someAnswer;
395
409
  this.props = props;
396
410
 
411
+ if (this.props.overleaf) {
412
+ // we do not prompt for texlive version in case of overleaf
413
+ this.props.texlive = 2021;
414
+ }
415
+
397
416
  // somehow texlive is not routed through
398
417
  // special handling
399
418
  if (this.params.options.texlive) {
@@ -428,6 +447,7 @@ module.exports = class extends Generator {
428
447
  this.props.cleveref = (this.props.cleveref === true) || (this.props.cleveref === 'true')
429
448
  this.props.examples = (this.props.examples === true) || (this.props.examples === 'true')
430
449
  this.props.howtotext = (this.props.howtotext === true) || (this.props.howtotext === 'true')
450
+ this.props.overleaf = (this.props.overleaf === true) || (this.props.overleaf === 'true')
431
451
 
432
452
  if (this.props.examples) {
433
453
  this.props.useExampleEnvironment = true;
@@ -455,6 +475,9 @@ module.exports = class extends Generator {
455
475
 
456
476
  this.props.requiresShellEscape = (this.props.listings === 'minted');
457
477
 
478
+ this.props.feature = {};
479
+ this.props.feature.acronyms = (this.props.documentclass === 'scientific-thesis');
480
+
458
481
  this.props.isPaper = (this.props.documentclass === 'acmart') || (this.props.documentclass === 'ieee') || (this.props.documentclass === 'lncs');
459
482
  if (this.props.isPaper) {
460
483
  // this sets filenames.main and filenames.bib
@@ -510,7 +533,7 @@ module.exports = class extends Generator {
510
533
  );
511
534
  global.fs.copyTpl(
512
535
  global.templatePath('latexmkrc'),
513
- global.destinationPath('latexmkrc'),
536
+ global.destinationPath(global.props.overleaf ? '_latexmkrc' : 'latexmkrc'),
514
537
  global.props
515
538
  );
516
539
  global.fs.copyTpl(
@@ -530,8 +553,8 @@ module.exports = class extends Generator {
530
553
  );
531
554
  if (global.props.documentclass === 'lncs') {
532
555
  global.fs.copy(
533
- global.templatePath('splncsnat.bst'),
534
- global.destinationPath('splncsnat.bst')
556
+ global.templatePath('splncs04nat.bst'),
557
+ global.destinationPath('splncs04nat.bst')
535
558
  );
536
559
  }
537
560
  if (global.props.language === 'de') {
@@ -540,6 +563,12 @@ module.exports = class extends Generator {
540
563
  global.destinationPath(global.props.filenames.main + ".tex"),
541
564
  global.props
542
565
  );
566
+ if (global.props.documentclass === 'scientific-thesis') {
567
+ global.fs.copy(
568
+ global.templatePath('acronyms.de.tex'),
569
+ global.destinationPath('acronyms.tex')
570
+ );
571
+ }
543
572
  if (!global.props.githubpublish) {
544
573
  // we keep the English README.md in case of GitHub publish
545
574
  global.fs.copyTpl(
@@ -554,6 +583,12 @@ module.exports = class extends Generator {
554
583
  global.destinationPath(global.props.filenames.main + ".tex"),
555
584
  global.props
556
585
  );
586
+ if (global.props.documentclass === 'scientific-thesis') {
587
+ global.fs.copy(
588
+ global.templatePath('acronyms.en.tex'),
589
+ global.destinationPath('acronyms.tex')
590
+ );
591
+ }
557
592
  global.fs.copyTpl(
558
593
  global.templatePath('README.en.md'),
559
594
  global.destinationPath('README.md'),
@@ -589,6 +624,13 @@ module.exports = class extends Generator {
589
624
  );
590
625
  break;
591
626
  }
627
+ if (global.props.docker) {
628
+ global.fs.copyTpl(
629
+ global.templatePath('.github/workflows/check.yml'),
630
+ global.destinationPath('.github/workflows/check.yml'),
631
+ global.props
632
+ );
633
+ }
592
634
  }
593
635
 
594
636
  install() {
@@ -0,0 +1,43 @@
1
+ on:
2
+ push:
3
+ workflow_dispatch:
4
+ concurrency:
5
+ group: check
6
+ cancel-in-progress: true
7
+ jobs:
8
+ check:
9
+ runs-on: ubuntu-latest
10
+ services:
11
+ registry:
12
+ image: registry:2
13
+ ports:
14
+ - 5000:5000
15
+ steps:
16
+ - name: Set up QEMU
17
+ uses: docker/setup-qemu-action@v2
18
+ - name: Set up Docker Buildx
19
+ uses: docker/setup-buildx-action@v2
20
+ with:
21
+ driver-opts: network=host
22
+ - name: Cache Docker layers
23
+ uses: actions/cache@v2
24
+ with:
25
+ path: /tmp/.buildx-cache
26
+ key: ${{ runner.os }}-buildx
27
+ - name: Build Docker image
28
+ uses: docker/build-push-action@v3
29
+ with:
30
+ push: true
31
+ tags: localhost:5000/name/app:latest
32
+ - name: Set up Git repository
33
+ uses: actions/checkout@v3
34
+ - run: |
35
+ mkdir /tmp/out
36
+ mkdir /tmp/res
37
+ - run: docker run -v $(pwd):/work/src -v /tmp/out:/work/out localhost:5000/name/app:latest work "latexmk -pdf -pdflatex='<% if ((latexcompiler == "pdflatex") || githubpublish) { %>pdflatex<% } else { %>lualatex<% } %> --interaction=nonstopmode' <%= filenames.main %>"
38
+ - run: mv /tmp/out/*.pdf /tmp/res
39
+ - uses: actions/upload-artifact@v2
40
+ with:
41
+ name: test-result
42
+ path: |
43
+ /tmp/res/*.pdf
@@ -3,23 +3,35 @@ FROM reitzig/texlive-<% switch (latexcompiler) {
3
3
  case "lualatex": %>base-luatex<% break;
4
4
  default: %>base<% break;
5
5
  } -%>:<% switch (texlive) {
6
- case 2021: %>2021.5<% break;
6
+ case 2022: %>2022.2<% break;
7
+ case 2021: %>2021.10<% break;
7
8
  } -%>
8
9
 
9
10
  RUN apk update && apk add --no-cache bash perl python3 py3-pip
10
11
  RUN pip3 install pygments
11
12
 
12
- COPY Texlivefile /work/src
13
-
14
13
  # Emulate "Install dependencies" of "entrypoint work ..."
15
- <% if (texlive < 2021) { -%>
16
- RUN xargs tlmgr install --repository ftp://ftp.math.utah.edu/pub/tex/historic/systems/texlive/<%= texlive %>/tlnet-final < "/work/src/Texlivefile" && \
14
+ <% if (texlive < 2022) { -%>
15
+ RUN tlmgr update --self --repository http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/<%= texlive %>/tlnet-final
16
+ COPY Texlivefile /work/src
17
+ RUN xargs tlmgr install --repository http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/<%= texlive %>/tlnet-final < "/work/src/Texlivefile" && \
17
18
  <% } 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" && \
19
+ RUN tlmgr update --self --repository https://mirror.mwt.me/ctan/systems/texlive/tlnet
20
+ COPY Texlivefile /work/src
21
+ RUN xargs tlmgr install --repository https://mirror.mwt.me/ctan/systems/texlive/tlnet < "/work/src/Texlivefile" && \
20
22
  <% } -%>
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
23
+ sha256sum "/work/src/Texlivefile" > "/work/tmp/Texlivefile.sha" && \
24
+ #
25
+ # make <% if (bibtextool == "biblatex") { %>biber, <% } %>latexmk and texlogsieve available
26
+ <% if (bibtextool == "biblatex") { -%>
27
+ cp /usr/local/texlive/<%= texlive %>/bin/x86_64-linuxmusl/biber /usr/local/bin && \
28
+ <% } -%>
29
+ cp /usr/local/texlive/<%= texlive %>/bin/x86_64-linuxmusl/latexmk /usr/local/bin && \
30
+ cp /usr/local/texlive/<%= texlive %>/bin/x86_64-linuxmusl/texlogsieve /usr/local/bin && \
31
+ <% if (latexcompiler === "lualatex") { -%>
32
+ #
33
+ # update font index
34
+ luaotfload-tool --update && \
35
+ <% } -%>
36
+ # use latest texlogsieve
37
+ 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; }
@@ -65,11 +85,9 @@ Following features are enabled in this template:
65
85
  <% if (howtotext) { -%>
66
86
  - Hints on writing an abstract and thesis by Dirk Fahland.
67
87
  <% } -%>
68
- <% if (cleveref || githubpublish) { -%>
69
- - <% if (githubpublish) { -%>(Optional) <% } %>Automatic setting of "Fig." and "Section"/"Sect." according to the LNCS style.
88
+ - Automatic setting of "Fig." and "Section"/"Sect." according to the LNCS style.
70
89
  Just use `\Cref{sec:xy}` at the beginning of a sentence and `\cref{sec:xy}` in the middle of a sentence.
71
90
  Thanx to [cleveref].
72
- <% } -%>
73
91
  <% if (font == "default" || githubpublish) { -%>
74
92
  - Sharper font (still compatible with Springer's requirements).
75
93
  <% } -%>
@@ -88,7 +106,7 @@ Following features are enabled in this template:
88
106
  - <% if (githubpublish) { -%>(Optional) <% } %>Support todos as pdf annotations. This is enabled by the [pdfcomment] package.
89
107
  <% } -%>
90
108
  - [microtypographic extensions](https://www.ctan.org/pkg/microtype) for a better look of the paper.
91
- - Modern packages such as [microtype]<% if (cleveref || githubpublish) { %>, [cleveref]<% } %><% if (enquotes == "csquotes" || githubpublish) { %>, [csquotes]<% } %><% if (documentclass != 'lncs') { %>, [paralist]<% } %>, [hyperref], [hypcap], [upquote]<% if (documentclass == 'lncs') { %>, [natbib]<% } %>, [booktabs].
109
+ - Modern packages such as [microtype], [cleveref]<% if (enquotes == "csquotes" || githubpublish) { %>, [csquotes]<% } %><% if (documentclass != 'lncs') { %>, [paralist]<% } %>, [hyperref], [hypcap], [upquote]<% if (documentclass == 'lncs') { %>, [natbib]<% } %>, [booktabs].
92
110
  <% if (latexcompiler == "lualatex" || githubpublish) { -%>
93
111
  - <% if (githubpublish) { -%>(Optional) <% } %>LaTeX compilation using the modern lualatex compiler.
94
112
  <% } -%>
@@ -110,11 +128,6 @@ You can <% if (!githubpublish) { %>re<% } %>run the [latex template generator] t
110
128
  Contains a fix to increase compatibility with Babel.
111
129
  See <https://tex.stackexchange.com/a/441701/9075> for details.
112
130
  <% } -%>
113
- <% if (cleveref) { missingFeatures = true; -%>
114
- - Automatic setting of "Fig." and "Section"/"Sect." according to the LNCS style.
115
- Just use `\Cref{sec:xy}` at the beginning of a sentence and `\cref{sec:xy}` in the middle of a sentence.
116
- Thanx to [cleveref].
117
- <% } -%>
118
131
  <% } -%>
119
132
  <% if (listings != "minted") { missingFeatures = true; -%>
120
133
  - Typesetting of listings using advanced highlighting powered by the [minted] package.
@@ -122,8 +135,8 @@ You can <% if (!githubpublish) { %>re<% } %>run the [latex template generator] t
122
135
  <% if (todo == "none") { missingFeatures = true; -%>
123
136
  - Support todos as pdf annotations. This is enabled by the [pdfcomment] package.
124
137
  <% } -%>
125
- <% if (!cleveref || enquotes == "plainlatex") { -%>
126
- - Modern packages such as <% if (!cleveref) { missingFeatures = true; %>, [cleveref]<% } %><% if (enquotes == "plainlatex") { missingFeatures = true; %>, [csquotes]<% } %>.
138
+ <% if (enquotes == "plainlatex") { -%>
139
+ - Modern packages such as <% if (enquotes == "plainlatex") { missingFeatures = true; %>[csquotes]<% } %>.
127
140
  <% } -%>
128
141
  <% if (latexcompiler != "lualatex") { -%>
129
142
  - LaTeX compilation using the modern lualatex compiler.
@@ -155,10 +168,17 @@ Deep link: <ftp://ftp.springernature.com/cs-proceeding/llncs/llncs2e.zip>.
155
168
  - Edit [paper.tex](paper.tex).
156
169
  - `latexmk paper`.
157
170
 
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.
171
+ When using on overleaf, you have to add the file `llncs.cls` manually:
172
+
173
+ 1. Navigate to "Add Files"
174
+ 2. Select "From External URL"
175
+ 3. Paste <https://latextemplates.github.io/stys-for-overleaf/llncs.cls> into the field "URL to fetch the file from"
176
+ 4. Click "Create"
177
+
178
+ As you see on GitHub actions, the paper compiles out of the box.
179
+ There is no need to adjust the packages or to remove some of them.
180
+ This might lead to undesiered results such as hyperlinks not working any more or no good microtypographic features.
181
+ In case you think, a package needs to be altered or added, feel free to open an issue.
162
182
  <% break; case "ieee": -%>
163
183
 
164
184
  ## 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}