generator-latex-template 2026.6.30 → 2026.7.29

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
@@ -26,6 +26,21 @@ and a generation into templates:
26
26
  2. Support for separate documents which require `--shell-escape` and not.
27
27
  3. Support for integrated pdflatex and lualatex documents
28
28
 
29
+ ### Markdown quick start (`mwe`)
30
+
31
+ Besides the paper and thesis document classes, the generator offers a **minimal Markdown quick start**, selectable as the `mwe` document class — for people who want a fast start with writing rather than a full thesis with all the tricks.
32
+
33
+ - Content is written in **Markdown** inside a `\begin{markdown} … \end{markdown}` block in `main.tex` (via the [`markdown`](https://ctan.org/pkg/markdown) package): `#` becomes a chapter, `##` a section; citations (`[@key]`), footnotes, task lists, pipe tables, and images work out of the box.
34
+ - It compiles with **LuaLaTeX + biber** (the `markdown` package needs Lua; the bibliography uses biblatex).
35
+ - [`zref-clever`](https://ctan.org/pkg/zref-clever) turns the Markdown `{#id}` identifiers into smart `\zcref` cross-references that print the type name (e.g. "Figure 1.1" / "Abbildung 1.1").
36
+ - It generates a single minimal `main.tex` — no thesis scaffolding, abbreviations, or `commands.tex` — hides the paper/thesis-only prompts, and ships a trimmed, quick-start README.
37
+
38
+ Generate it non-interactively with:
39
+
40
+ ```bash
41
+ yo latex-template --documentclass=mwe --lang=en
42
+ ```
43
+
29
44
  ### Precondition for the generator
30
45
 
31
46
  One has to install [Node.js](https://nodejs.org/en/) version 18 (or later) to get this generator running.
@@ -53,6 +53,22 @@ export default class extends Generator {
53
53
  this.props.font = "default";
54
54
  }
55
55
 
56
+ if (this.props.documentclass === "mwe") {
57
+ // Minimal Markdown quick start: a fixed, self-contained feature set. The
58
+ // matching prompts are hidden in options.js, so pin every value here (this
59
+ // also makes non-interactive `yo --documentclass=mwe` robust regardless of
60
+ // any flags that leak through).
61
+ this.props.bibtextool = "biblatex";
62
+ this.props.font = "default";
63
+ this.props.latexcompiler = "lualatex"; // Markdown + fontspec need LuaLaTeX
64
+ this.props.listings = "listings";
65
+ this.props.enquotes = "csquotes";
66
+ this.props.tweakouterquote = "babel";
67
+ this.props.todo = "none";
68
+ this.props.howtotext = false;
69
+ this.props.examples = false;
70
+ }
71
+
56
72
  // --language does not work properly, therefore, we used "lang" above. The templates still use "language"
57
73
  this.props.language = this.props.lang;
58
74
 
@@ -124,6 +140,23 @@ export default class extends Generator {
124
140
  ? true
125
141
  : this.options.longtable === true || this.options.longtable === "true";
126
142
 
143
+ // `authoryear` is a plain CLI flag (no prompt): switch citations to
144
+ // author-year globally. Maps to biblatex's authoryear style (theses, lncs)
145
+ // and \citestyle{acmauthoryear} (acmart); the mwe quick start is
146
+ // author-year already. IEEE mandates numeric citations, so it is forced
147
+ // off there.
148
+ this.props.authoryear =
149
+ this.options.authoryear === true || this.options.authoryear === "true";
150
+ if (this.props.documentclass === "ieee") {
151
+ this.props.authoryear = false;
152
+ }
153
+ if (this.props.documentclass === "lncs" && this.props.authoryear) {
154
+ // natbib + splncs04nat is numeric-only; author-year for LNCS goes
155
+ // through biblatex (llncs's own citeauthoryear option needs Springer
156
+ // .bst files that are not in TeX Live)
157
+ this.props.bibtextool = "biblatex";
158
+ }
159
+
127
160
  // Only minted and the PlantUML UML example need shell-escape; tikz-uml and the
128
161
  // remaining thesis content do not.
129
162
  this.props.requiresShellEscape =
@@ -152,6 +185,22 @@ export default class extends Generator {
152
185
  }
153
186
 
154
187
  function isPaperHandling(props) {
188
+ if (props.documentclass === "mwe") {
189
+ // The mwe quick start is neither a paper nor a thesis. Its wrapper main
190
+ // (mwe-main.<lang>.tex) pulls the prose from an external Markdown file
191
+ // (mwe-manuscript.<lang>.md) via \markdownInput. English keeps the plain
192
+ // names main.tex / manuscript.md; German gets a -de suffix so both
193
+ // languages can coexist in one repo (like scientific-thesis below) with
194
+ // each wrapper referencing its own manuscript -- no rename needed.
195
+ props.isPaper = false;
196
+ props.isThesis = false;
197
+ props.filenames = {
198
+ main: props.language === "en" ? "main" : "main-de",
199
+ manuscript: props.language === "en" ? "manuscript" : "manuscript-de",
200
+ bib: "bibliography",
201
+ };
202
+ return;
203
+ }
155
204
  props.isPaper =
156
205
  props.documentclass === "acmart" ||
157
206
  props.documentclass === "ieee" ||
@@ -290,12 +339,26 @@ export default class extends Generator {
290
339
  );
291
340
  }
292
341
 
342
+ // The mwe quick start has its own minimal Markdown main; every other class
343
+ // shares the big main.<lang>.tex.
344
+ const mainTemplate =
345
+ this.props.documentclass === "mwe" ? "mwe-main." : "main.";
293
346
  this.fs.copyTpl(
294
- this.templatePath("main." + this.props.language + ".tex"),
347
+ this.templatePath(mainTemplate + this.props.language + ".tex"),
295
348
  this.destinationPath(this.props.filenames.main + ".tex"),
296
349
  this.props,
297
350
  );
298
351
 
352
+ // The mwe wrapper main pulls its prose from an external Markdown file so it
353
+ // can be edited and linted as plain Markdown (see mwe-main.<lang>.tex).
354
+ if (this.props.documentclass === "mwe") {
355
+ this.fs.copyTpl(
356
+ this.templatePath("mwe-manuscript." + this.props.language + ".md"),
357
+ this.destinationPath(this.props.filenames.manuscript + ".md"),
358
+ this.props,
359
+ );
360
+ }
361
+
299
362
  if (this.props.feature.abbreviations) {
300
363
  this.fs.copy(
301
364
  this.templatePath("abbreviations." + this.props.language + ".tex"),
@@ -303,11 +366,14 @@ export default class extends Generator {
303
366
  );
304
367
  }
305
368
 
306
- this.fs.copyTpl(
307
- this.templatePath("commands.tex"),
308
- this.destinationPath("commands.tex"),
309
- this.props,
310
- );
369
+ // mwe-main does not \input{commands}; keep the quick start minimal.
370
+ if (this.props.documentclass !== "mwe") {
371
+ this.fs.copyTpl(
372
+ this.templatePath("commands.tex"),
373
+ this.destinationPath("commands.tex"),
374
+ this.props,
375
+ );
376
+ }
311
377
 
312
378
  if (this.props.documentclass == "ustutt") {
313
379
  /*
@@ -24,6 +24,10 @@ export const options = [
24
24
  name: "PhD Thesis Template (University of Stuttgart)",
25
25
  value: "ustutt",
26
26
  },
27
+ {
28
+ name: "Minimal quick start — write your content in Markdown (LuaLaTeX + biber)",
29
+ value: "mwe",
30
+ },
27
31
  ],
28
32
  default: "acmart",
29
33
  },
@@ -181,6 +185,10 @@ export const options = [
181
185
  {
182
186
  type: "list",
183
187
  name: "latexcompiler",
188
+ when(response) {
189
+ // The mwe quick start is Markdown + fontspec, hence LuaLaTeX-only (forced in index.js).
190
+ return response.documentclass !== "mwe";
191
+ },
184
192
  message: "Which latex compiler should be used?",
185
193
  choices(state) {
186
194
  const res = [
@@ -218,7 +226,8 @@ export const options = [
218
226
  return (
219
227
  response.documentclass !== "acmart" &&
220
228
  response.documentclass !== "ieee" &&
221
- response.documentclass !== "ustutt"
229
+ response.documentclass !== "ustutt" &&
230
+ response.documentclass !== "mwe"
222
231
  );
223
232
  },
224
233
  type: "list",
@@ -324,13 +333,19 @@ export const options = [
324
333
  default: "default",
325
334
  when(response) {
326
335
  return (
327
- response.documentclass !== "ieee" && response.documentclass !== "ustutt"
336
+ response.documentclass !== "ieee" &&
337
+ response.documentclass !== "ustutt" &&
338
+ response.documentclass !== "mwe"
328
339
  );
329
340
  },
330
341
  },
331
342
  {
332
343
  type: "list",
333
344
  name: "listings",
345
+ when(response) {
346
+ // The mwe quick start has no code listings.
347
+ return response.documentclass !== "mwe";
348
+ },
334
349
  message: "Which package to typeset listings?",
335
350
  choices: [
336
351
  {
@@ -347,6 +362,10 @@ export const options = [
347
362
  {
348
363
  type: "list",
349
364
  name: "enquotes",
365
+ when(response) {
366
+ // The mwe quick start fixes csquotes (forced in index.js).
367
+ return response.documentclass !== "mwe";
368
+ },
350
369
  message: 'Which package to use to "enquote" text?',
351
370
  choices(state) {
352
371
  const res = [];
@@ -380,6 +399,9 @@ export const options = [
380
399
  {
381
400
  type: "list",
382
401
  name: "tweakouterquote",
402
+ when(response) {
403
+ return response.documentclass !== "mwe";
404
+ },
383
405
  message:
384
406
  'Enable hyphenation tweak (e.g., application"=specific for app-lication-specific at a linebreak) or enable easy quotation (e.g., "application"; not common in default latex setups)?',
385
407
  choices: [
@@ -397,6 +419,10 @@ export const options = [
397
419
  {
398
420
  type: "list",
399
421
  name: "todo",
422
+ when(response) {
423
+ // The mwe quick start has no TODO markers.
424
+ return response.documentclass !== "mwe";
425
+ },
400
426
  message: "Which package to mark TODOs?",
401
427
  choices: [
402
428
  {
@@ -421,12 +447,19 @@ export const options = [
421
447
  {
422
448
  type: "confirm",
423
449
  name: "howtotext",
450
+ when(response) {
451
+ return response.documentclass !== "mwe";
452
+ },
424
453
  message: "Include hints on text (e.g., how to write an abstract)?",
425
454
  default: true,
426
455
  },
427
456
  {
428
457
  type: "confirm",
429
458
  name: "examples",
459
+ when(response) {
460
+ // The mwe document *is* the example; the LaTeX-hints chapter does not apply.
461
+ return response.documentclass !== "mwe";
462
+ },
430
463
  message: "Include minimal LaTeX examples?",
431
464
  default: true,
432
465
  },
@@ -122,11 +122,13 @@ jobs:
122
122
  path: |
123
123
  texcount.txt
124
124
  texcount.html
125
+ <%# The mwe class writes Markdown, which aspell cannot parse; the check-markdown (Vale) workflow lints its prose instead, so the aspell spell-check job is omitted here. -%>
126
+ <% if (documentclass !== "mwe") { -%>
125
127
  spell-check:
126
128
  # This is based on https://github.com/mh61503891/action-paper-aspell/tree/master
127
129
  #
128
130
  <% if (documentclass === "scientific-thesis") { -%>
129
- # Disabled for scientific-thesis: the example content trips too many aspell false positives to maintain
131
+ # Disabled: the example content trips too many aspell false positives to maintain
130
132
  if: false
131
133
  <% } -%>
132
134
  runs-on: ubuntu-latest
@@ -180,6 +182,7 @@ jobs:
180
182
  echo 'If you want to ignore words, add them to `.aspell.<%= language %>.pws` (your personal aspell dictionary)' >> $GITHUB_STEP_SUMMARY
181
183
  exit 1
182
184
  fi
185
+ <% } -%>
183
186
  indent:
184
187
  runs-on: ubuntu-latest
185
188
  steps:
@@ -1,4 +1,10 @@
1
1
  # LaTeX Dokument
2
+ <% if (documentclass == "mwe") { -%>
3
+
4
+ Ein **minimaler Markdown-Schnellstart**: Schreibe deinen Inhalt als reines Markdown in `<%= filenames.manuscript %>.md`. Der schlanke Rahmen `<%= filenames.main %>.tex` bindet ihn per `\markdownInput` ein, LaTeX macht daraus ein PDF.
5
+ <% } -%>
6
+
7
+ Die in dieser Vorlage verwendeten LaTeX-Snippets können unter <https://latextemplates.github.io/latex-snippets/> eingesehen werden.
2
8
 
3
9
  Kompiliere es mittels
4
10
  <% if (latexcompiler == "pdflatex") { %>
@@ -4,9 +4,9 @@
4
4
  # Enhanced LNCS Template
5
5
 
6
6
  > Quick start for modern LaTeXing with [LNCS](http://www.springer.com/computer/lncs).
7
- <% if (texlive > 2024) { -%>
7
+ <% if (texlive > 2025) { -%>
8
8
 
9
- Please be aware that this template is optimized for overleaf, which is based on TeXLive 2024.
9
+ Please be aware that this template is optimized for overleaf, which is based on TeXLive 2025.
10
10
  In case you are running a later TeXLive version (or use MiKTeX), please regenerate the template with the help of the [latex template generator].
11
11
  <% } -%>
12
12
  <% break; case "ieee": -%>
@@ -14,8 +14,8 @@ In case you are running a later TeXLive version (or use MiKTeX), please regenera
14
14
 
15
15
  > Quick start for modern LaTeXing for an IEEE conference, based on the [Manuscript Template for Conference Proceedings](https://www.ieee.org/conferences_events/conferences/publishing/templates.html).
16
16
 
17
- <% if (texlive > 2024) { -%>
18
- Please be aware that this template is optimized for overleaf, which is based on TeXLive 2024.
17
+ <% if (texlive > 2025) { -%>
18
+ Please be aware that this template is optimized for overleaf, which is based on TeXLive 2025.
19
19
  In case you are running a later TeXLive version (or use MiKTeX), please regenerate the template with the help of the [latex template generator].
20
20
 
21
21
  <% } -%>
@@ -102,9 +102,39 @@ See [docs/overleaf](docs/overleaf/).
102
102
  <% break; default: -%>
103
103
  # LaTeX Document
104
104
  <% break; }
105
- } else { -%>
105
+ } else if (documentclass == "mwe") { -%>
106
+ # LaTeX Document — Markdown Quick Start
107
+ <% } else { -%>
106
108
  # LaTeX Document
107
109
  <% } -%>
110
+ <% if (documentclass == "mwe") { -%>
111
+
112
+ This is a **minimal Markdown quick start**. Write your content as plain Markdown in [`<%= filenames.manuscript %>.md`](<%= filenames.manuscript %>.md); the thin wrapper [`<%= filenames.main %>.tex`](<%= filenames.main %>.tex) pulls it in with `\markdownInput` and LaTeX turns it into a PDF — no thesis scaffolding, just the essentials: headings, citations, footnotes, tables, figures, smart cross-references (`\zcref`), and acronyms (defined once in the wrapper, recognized automatically in the running text and collected in an acronym list). Keeping the prose in a real `.md` file means your editor treats it as Markdown and the spell-/prose-checkers below lint it directly.
113
+ <% } -%>
114
+
115
+ The LaTeX snippets this template is assembled from can be inspected at <https://latextemplates.github.io/latex-snippets/>.
116
+ <% if (githubpublish) { switch (documentclass) { case "lncs": -%>
117
+
118
+ ## Examples
119
+
120
+ - [paper.pdf](https://latextemplates.github.io/lncs-enhanced/paper.pdf) - normal paper.
121
+ - [paper-minted.pdf](https://latextemplates.github.io/lncs-enhanced/paper-minted.pdf) - paper showing minted in action.
122
+ - [paper-newtx.pdf](http://latextemplates.github.io/lncs-enhanced/paper-newtx.pdf) - paper typeset in Times Roman to save some space.
123
+ - [paper-minted-newtx.pdf](http://latextemplates.github.io/lncs-enhanced/paper-minted-newtx.pdf) - paper typeset in Times Roman to save some space.
124
+ <% break; case "ieee": -%>
125
+
126
+ ## Examples
127
+
128
+ - [paper.pdf](https://latextemplates.github.io/ieee-enhanced/paper.pdf) - regular conference paper.
129
+ - [paper-minted.pdf](https://latextemplates.github.io/ieee-enhanced/paper-minted.pdf) - conference paper showing minted in action.
130
+ <% break; case "acmart": -%>
131
+
132
+ ## Examples
133
+
134
+ - [paper.pdf](https://latextemplates.github.io/acm-enhanced/paper.pdf) - regular conference paper.
135
+ - [paper-minted.pdf](https://latextemplates.github.io/acm-enhanced/paper-minted.pdf) - conference paper showing minted in action.
136
+ <% break; default: -%>
137
+ <% break; } } -%>
108
138
 
109
139
  ## Usage
110
140
 
@@ -163,10 +193,29 @@ On the command line, there are additional features:
163
193
  - `latexmk -C` or `make clean` for cleaning up
164
194
  - `make format` to reformat the `.tex` files (one sentence per line and indent)
165
195
  - `make aspell` for interactive spell checking
166
- - `make stand`: Creates a new PDF with the current status of the thesis.
196
+ - `make stand`: Creates a new PDF with the current status of the document.
167
197
  - `make view`: Opens the configured viewer
168
198
  - `make mrproper`: Cleans up and removes also editor backup files.
199
+ <% if (documentclass == "mwe") { -%>
200
+
201
+ ### Linting your Markdown
169
202
 
203
+ Because the prose is a plain Markdown file, the text linters run on it directly — no extraction, and the reported line numbers point straight at `<%= filenames.manuscript %>.md`. Two workflows lint it and post inline annotations: `check-markdown` runs [Vale](https://vale.sh) (spelling, repetition), and `check-textlint` runs [textlint](https://github.com/textlint/textlint) (`write-good` + `terminology`).
204
+
205
+ Run textlint locally with `npx` (needs Node.js; rules come from `.textlintrc.json`):
206
+
207
+ ```bash
208
+ npx --yes --package textlint --package textlint-rule-terminology --package textlint-rule-write-good textlint <%= filenames.manuscript %>.md
209
+ ```
210
+
211
+ For Vale, install it (`brew install vale` / `choco install vale`, or see <https://vale.sh/docs>) and point it at the file:
212
+
213
+ ```bash
214
+ vale <%= filenames.manuscript %>.md
215
+ ```
216
+ <% } -%>
217
+
218
+ <% if (documentclass != "mwe") { -%>
170
219
  ## Benefits
171
220
 
172
221
  Following features are enabled in this template:
@@ -266,8 +315,9 @@ Congratulations. You chose to use all available features.
266
315
  <% } -%>
267
316
 
268
317
  <% switch (documentclass) { case "lncs": -%>
269
- There is currently no official biblatex support.
270
- A first step towards that is done at [biblatex-lncs](https://ctan.org/pkg/biblatex-lncs).
318
+ Besides the default BibTeX setup (natbib + `splncs04nat`), biblatex is supported: generate with `--bibtextool=biblatex` to use the [biblatex-lncs](https://ctan.org/pkg/biblatex-lncs) style (numeric, mimicking Springer's `splncs04` look, processed with biber).
319
+
320
+ For **author-year citations** (this template's answer to `llncs`'s `citeauthoryear` option, whose Springer `.bst` files are not part of TeX Live), generate with `--authoryear=true`: this switches to biblatex with the `authoryear` style, so `\citep{key}` renders as "(Author, year)" and `\citet{key}` as "Author (year)".
271
321
 
272
322
  <% break; case "ieee": -%>
273
323
  There is currently no official biblatex support.
@@ -275,16 +325,10 @@ A first step towards that is done at the [biblatex-ieee package](https://ctan.or
275
325
 
276
326
  <% break; default: -%>
277
327
  <% break; } -%>
328
+ <% } -%>
278
329
  <% if (githubpublish) {
279
330
  switch (documentclass) {
280
331
  case "lncs": -%>
281
- ## Examples
282
-
283
- - [paper.pdf](https://latextemplates.github.io/lncs-enhanced/paper.pdf) - normal paper.
284
- - [paper-minted.pdf](https://latextemplates.github.io/lncs-enhanced/paper-minted.pdf) - paper showing minted in action.
285
- - [paper-newtx.pdf](http://latextemplates.github.io/lncs-enhanced/paper-newtx.pdf) - paper typeset in Times Roman to save some space.
286
- - [paper-minted-newtx.pdf](http://latextemplates.github.io/lncs-enhanced/paper-minted-newtx.pdf) - paper typeset in Times Roman to save some space.
287
-
288
332
  ## Background
289
333
 
290
334
  The official template is available at <https://www.springer.com/gp/computer-science/lncs/conference-proceedings-guidelines> --> "Templates, samples files & useful links" --> "LaTeX2e Proceedings Templates (zip)"
@@ -304,11 +348,6 @@ This might lead to undesired results such as hyperlinks not working any more or
304
348
  In case you think, a package needs to be altered or added, feel free to open an issue.
305
349
 
306
350
  <% break; case "ieee": -%>
307
- ## Examples
308
-
309
- - [paper.pdf](https://latextemplates.github.io/ieee-enhanced/paper.pdf) - regular conference paper.
310
- - [paper-minted.pdf](https://latextemplates.github.io/ieee-enhanced/paper-minted.pdf) - conference paper showing minted in action.
311
-
312
351
  ## Quick start
313
352
 
314
353
  - Click on `Download ZIP` or [here](https://github.com/latextemplates/IEEE/archive/main.zip).
@@ -357,6 +396,21 @@ Statement from IEEE:
357
396
  <% break; default: -%>
358
397
  <% break; }
359
398
  } else { -%>
399
+ <% } -%>
400
+ <% if (isPaper) { -%>
401
+ ## Final submission
402
+
403
+ The compiled PDF embeds the `<%= filenames.bib %>.bib` file (via the [embedfile](https://ctan.org/pkg/embedfile) package), so readers can extract the reference data from the PDF, e.g., with JabRef via "Import into library".
404
+ Some publishers' final-submission checks (e.g., IEEE PDF eXpress or PDF/A validation) reject PDFs containing file attachments.
405
+ If your submission system complains, comment out the `\embedfile` line in `<%= filenames.main %>.tex` for the camera-ready version.
406
+
407
+ ### arXiv
408
+
409
+ The first line of `<%= filenames.main %>.tex` is `\ifdefined\pdfoutput\pdfoutput=1\fi`.
410
+ Keep it when uploading to arXiv: arXiv scans the first lines for `\pdfoutput=1` to decide between `pdflatex` and DVI-producing `latex`.
411
+ Without the line, arXiv falls back to `latex`, which cannot build the modern fonts (they ship without Metafont sources) and aborts with an error such as `! I can't find file 'clmr28t10+20'`.
412
+ See [this question on TeX.SE](https://tex.stackexchange.com/q/584702/9075) for details.
413
+
360
414
  <% } -%>
361
415
  ## Tool hints
362
416
 
@@ -480,7 +534,7 @@ Alternatively, just copy and paste the contents of the [vscode.settings.json](vs
480
534
 
481
535
  You can manually trigger compilation by hitting the green button in the extension or using other methods provided by LaTeX Workshop.
482
536
 
483
- Please remove the magic comments (`% !TeX program ...`) at the top of the `main-....tex` file.
537
+ Please remove the magic comments (`% !TeX program ...`) at the top of the `<%= filenames.main %>.tex` file.
484
538
  Although [LaTeX-Workshop supports magic comments](https://github.com/James-Yu/LaTeX-Workshop/blob/master/README.md#magic-comments), it currently does not work reliably.
485
539
  Without the magic comments, compilation works.
486
540
 
@@ -536,6 +590,7 @@ docker build -t ltg .
536
590
 
537
591
  <% break; default: -%>
538
592
  <% break; } -%>
593
+ <% if (documentclass != "mwe") { -%>
539
594
  ## Contained Directories and Files
540
595
 
541
596
  ### Directories
@@ -816,15 +871,13 @@ We are collecting alternatives at the issue [#25](https://github.com/latextempla
816
871
  You did not setup the [plantuml package](https://www.ctan.org/pkg/plantuml) correctly.
817
872
  Please head to <https://koppor.github.io/plantuml/> for installation instructions.
818
873
 
874
+ <% } -%>
819
875
  <% } -%>
820
876
  ## Further information
821
877
 
822
878
  <% if (documentclass == 'lncs') { -%>
823
879
  - tex.stackexchange.com questions regarding LNCS: <https://tex.stackexchange.com/questions/tagged/lncs>
824
- <% if (githubpublish) { -%>
825
- - Original LNCS demonstration (without the improvements): [llncs-dem.pdf](llncs-dem.pdf)
826
- - Original LNCS documentation (without the improvements): [llncs-doc.pdf](llncs-doc.pdf)
827
- <% } -%>
880
+ - Original LNCS documentation (without the improvements): [llncsdoc.pdf](https://mirrors.ctan.org/macros/latex/contrib/llncs/llncsdoc.pdf) from the [llncs CTAN package](https://ctan.org/pkg/llncs). The old `llncs.dem` demonstration is no longer part of that package; the official sample paper (`samplepaper.tex`) is contained in Springer's [LaTeX2e Proceedings Templates (zip)](https://www.springer.com/gp/computer-science/lncs/conference-proceedings-guidelines).
828
881
  <% } -%>
829
882
  - Other templates: <https://latextemplates.github.io/>
830
883
  - For German users, go to <https://texfragen.de/>.
@@ -3,6 +3,9 @@ latexindent
3
3
  latexmk
4
4
  texlogsieve
5
5
 
6
+ <% if (githubpublish || (listings == 'listings')) { -%>
7
+ accsupp<%# gray hook marker on soft-wrapped listings lines %>
8
+ <% } -%>
6
9
  <% if (githubpublish || (documentclass == "acmart")) { -%>
7
10
  acmart
8
11
  <% } -%>
@@ -24,6 +27,9 @@ babel-german
24
27
  biber
25
28
  biblatex
26
29
  <% } -%>
30
+ <% if (githubpublish || ((documentclass == "lncs") && (bibtextool == "biblatex") && !authoryear)) { -%>
31
+ biblatex-lncs
32
+ <% } -%>
27
33
  <% if (githubpublish || isThesis) { -%>
28
34
  bigfoot<%# provides perpage%>
29
35
  <% } -%>
@@ -63,6 +69,9 @@ datetime2-german
63
69
  dehyph-exptl
64
70
  <% } -%>
65
71
  diagbox
72
+ <% if (githubpublish || (documentclass != "mwe")) { -%>
73
+ embedfile
74
+ <% } -%>
66
75
  <% if (githubpublish || isThesis) { -%>
67
76
  enumitem
68
77
  <% } -%>
@@ -99,7 +108,7 @@ fontspec
99
108
  footmisc
100
109
  <% } -%>
101
110
  gettitlestring
102
- <% if (githubpublish || (documentclass == 'ustutt') || (documentclass == 'scientific-thesis')) { -%>
111
+ <% if (githubpublish || (documentclass == 'ustutt') || (documentclass == 'scientific-thesis') || (documentclass == 'mwe')) { -%>
103
112
  glossaries
104
113
  <% if (githubpublish || (lang == "en")) { -%>
105
114
  glossaries-english
@@ -131,6 +140,9 @@ ifmtarg<%# required by acmart at least %>
131
140
  ifplatform
132
141
  <% } -%>
133
142
  iftex
143
+ <% if (githubpublish || (isPaper && reallatexcompiler.startsWith("lualatex"))) { -%>
144
+ impnattypo
145
+ <% } -%>
134
146
  inconsolata<%# required by ustutt, scientific-thesis, acm%>
135
147
  infwarerr
136
148
  intcalc
@@ -176,6 +188,13 @@ luaxml<%# required by spelling %>
176
188
  ly1<%# required by mathdesign-font %>
177
189
  <% } -%>
178
190
  marginnote
191
+ <% if (githubpublish || (documentclass == "mwe")) { -%>
192
+ markdown<%# markdown-as-input quick-start (mwe documentclass) %>
193
+ <%# markdown's default LaTeX theme pulls these in (else e.g. "csvsimple.sty not found") %>
194
+ csvsimple
195
+ fancyvrb
196
+ verse<%# used when a Markdown blockquote/verse is present %>
197
+ <% } -%>
179
198
  <% if (githubpublish || isThesis) { -%>
180
199
  mathdesign
181
200
  <% } -%>
@@ -322,3 +341,6 @@ xpatch
322
341
  <% } -%>
323
342
  xstring<%# this includes stfloats; required by textcomp %>
324
343
  zref
344
+ <% if (githubpublish || (documentclass == "mwe")) { -%>
345
+ zref-clever<%# smart \zcref cross-references in the mwe quick-start %>
346
+ <% } -%>
@@ -1,13 +1,17 @@
1
+ <%# style axis: authoryear (global --authoryear flag) > lncs (biblatex-lncs) > alphabetic (theses default) -%>
2
+ <% var blxstyle = authoryear ? "authoryear" : (documentclass == "lncs" ? "lncs" : "alphabetic"); -%>
1
3
  \usepackage[
2
4
  backend = biber, %biber does not work with 64x versions alternative: bibtex8; minalphanames only works with biber backend
3
5
  sortcites = true,
4
- bibstyle = alphabetic,
5
- citestyle = alphabetic,
6
+ bibstyle = <%= blxstyle %>,
7
+ citestyle = <%= blxstyle %>,
6
8
  giveninits = true,
7
9
  useprefix = false, %"von, van, etc." will be printed, too. See below.
8
10
  minnames = 1,
11
+ <% if (blxstyle == "alphabetic") { -%>
9
12
  minalphanames = 3,
10
13
  maxalphanames = 4,
14
+ <% } -%>
11
15
  maxbibnames = 99,
12
16
  maxcitenames = 2,
13
17
  natbib = true,
@@ -67,3 +71,8 @@
67
71
  % Reduce size of bib font: http://tex.stackexchange.com/questions/329/how-to-change-font-size-for-bibliography
68
72
  \renewcommand{\bibfont}{\normalfont\small}
69
73
  <% } -%>
74
+ <% if (documentclass == "lncs" && authoryear) { -%>
75
+
76
+ % Match the LNCS bibliography font size (the biblatex-lncs style sets this itself)
77
+ \renewcommand{\bibfont}{\normalfont\footnotesize}
78
+ <% } -%>
@@ -10,14 +10,19 @@ add-tex-command FXRegisterAuthor ppp
10
10
  add-tex-command PassOptionsToPackage pp
11
11
  add-tex-command RequirePackage op
12
12
  add-tex-command begin pop
13
+ add-tex-command BeginAccSupp p
14
+ add-tex-command EndAccSupp p
13
15
  add-tex-command bibliographystyle p
16
+ add-tex-command boolfalse p
14
17
  add-tex-command captionsetup op
15
18
  add-tex-command citep op
16
19
  add-tex-command citet op
17
20
  add-tex-command color p
18
21
  add-tex-command cref p
22
+ add-tex-command embedfile op
19
23
  add-tex-command frac pp
20
24
  add-tex-command hypersetup p
25
+ add-tex-command indexnames p
21
26
  add-tex-command label p
22
27
  add-tex-command languageshorthands p
23
28
  add-tex-command lstset ppppppppppppppppppppppp
@@ -25,6 +30,8 @@ add-tex-command mathit p
25
30
  add-tex-command newcommand pp
26
31
  add-tex-command oname p
27
32
  add-tex-command patchcmd ppp
33
+ add-tex-command printnames p
34
+ add-tex-command printtext op
28
35
  add-tex-command renewcommand pp
29
36
  add-tex-command restoresymbol pp
30
37
  add-tex-command savesymbol p
@@ -37,6 +44,7 @@ add-tex-command tcbinputlisting ppppppppppppppppppppppp
37
44
  add-tex-command texttt p
38
45
  add-tex-command tikzpicture op
39
46
  add-tex-command tikzset p
47
+ add-tex-command usebibmacro p
40
48
  add-tex-command usemintedstyle p
41
49
  add-tex-command usepackage oooooop
42
50
  add-tex-command usetikzlibrary p
@@ -0,0 +1,4 @@
1
+ % Embed the bibliography data into the PDF so that readers can extract it
2
+ % (e.g., with JabRef via "Import into library" on the PDF)
3
+ \usepackage{embedfile}
4
+ \embedfile[mimetype=application/x-bibtex,desc=BibTeX entries of all references]{<%= filenames.bib %>.bib}
@@ -0,0 +1,9 @@
1
+ % Avoid a lone short word (or hyphenated fragment) as the last line of a paragraph.
2
+ % LuaTeX only: impnattypo's lastparline feature vetoes the offending line break in
3
+ % each affected paragraph. The package's pdfTeX fallback instead stretches
4
+ % \parfillskip globally, which loosens interword spacing everywhere -- the reason
5
+ % the package was once reverted, see
6
+ % https://github.com/latextemplates/lncs-enhanced/issues/16
7
+ \ifdefined\directlua
8
+ \usepackage[lastparline]{impnattypo}
9
+ \fi
@@ -1,6 +1,9 @@
1
1
  % Code Listings
2
2
  \usepackage{listings}
3
3
 
4
+ % accsupp hält den Pfeil (siehe postbreak unten) aus dem kopierten Text heraus
5
+ \usepackage{accsupp}
6
+
4
7
  \definecolor{eclipseStrings}{RGB}{42,0.0,255}
5
8
  \definecolor{eclipseKeywords}{RGB}{127,0,85}
6
9
  \colorlet{numb}{magenta!60!black}
@@ -67,6 +70,10 @@
67
70
  %
68
71
  breaklines=true, % Zeilen werden umbrochen
69
72
  %
73
+ % Umbrochene Zeilen mit einem grauen Pfeil markieren. Dank accsupp wird der
74
+ % Pfeil nicht in den kopierten Text übernommen. Quelle: https://tex.stackexchange.com/a/649475/9075
75
+ postbreak=\raisebox{0ex}[0ex][0ex]{\BeginAccSupp{ActualText={}}\ensuremath{\color{gray}\hookrightarrow\space}\EndAccSupp{}},
76
+ %
70
77
  breakatwhitespace=true,
71
78
  %
72
79
  % Alternative: fixed
@@ -1,6 +1,9 @@
1
1
  % Code Listings
2
2
  \usepackage{listings}
3
3
 
4
+ % accsupp keeps the soft-wrap arrow (see postbreak below) out of the copied text
5
+ \usepackage{accsupp}
6
+
4
7
  \definecolor{eclipseStrings}{RGB}{42,0.0,255}
5
8
  \definecolor{eclipseKeywords}{RGB}{127,0,85}
6
9
  \colorlet{numb}{magenta!60!black}
@@ -67,6 +70,10 @@
67
70
  %
68
71
  breaklines=true, % Lines are wrapped
69
72
  %
73
+ % Mark a soft-wrapped line with a gray hook arrow that stays out of the
74
+ % copied and extracted text. Source: https://tex.stackexchange.com/a/649475/9075
75
+ postbreak=\raisebox{0ex}[0ex][0ex]{\BeginAccSupp{ActualText={}}\ensuremath{\color{gray}\hookrightarrow\space}\EndAccSupp{}},
76
+ %
70
77
  breakatwhitespace=true,
71
78
  %
72
79
  % alternative: fixed
@@ -1,3 +1,6 @@
1
+ <% if (isPaper) { -%>
2
+ \ifdefined\pdfoutput\pdfoutput=1\fi % zwingt arXiv, diese Datei mit pdflatex statt dem DVI-erzeugenden "latex" zu übersetzen; siehe README-Abschnitt "Final submission"
3
+ <% } -%>
1
4
  <% if (preparereitzig) { -%>
2
5
  \RequirePackage{snapshot}
3
6
  \RequirePackage[dependency-file=Texlivefile]{depp}
@@ -141,6 +144,12 @@
141
144
  <%- include('microtype.preamble.de.tex', this); -%>
142
145
 
143
146
  <%- include('nowidow.preamble.en.tex', this); -%>
147
+ <% if (isPaper) { -%>
148
+
149
+ <%- include('impnattypo.preamble.en.tex', this); -%>
150
+
151
+ <%- include('rectangularparagraphs.preamble.en.tex', this); -%>
152
+ <% } -%>
144
153
 
145
154
  % Fuer deutsche Texte: Weniger Silbentrennung durch mehr frei Raum zwischen den Worten
146
155
  \setlength{\emergencystretch}{3em}
@@ -197,16 +206,24 @@
197
206
  <%- include('paralist.preamble.en.tex', this); -%>
198
207
  <% switch (documentclass) {
199
208
  case "acmart":
200
- case "ieee":
201
- case "lncs": -%>
209
+ case "ieee": -%>
210
+
211
+ <%- include('natbib.preamble.en.tex', this); -%>
212
+ <% break; case "lncs": -%>
213
+ <% if (bibtextool == 'biblatex') { -%>
214
+ <%- include('biblatex.preamble.en.tex', this); -%>
215
+ <% } else { -%>
202
216
 
203
217
  <%- include('natbib.preamble.en.tex', this); -%>
218
+ <% } -%>
204
219
  <% break; case "scientific-thesis": case "ustutt": -%>
205
220
  <%- include('biblatex.preamble.en.tex', this); -%>
206
221
  <% break; } -%>
222
+
223
+ <%- include('embedfile.preamble.en.tex', this); -%>
207
224
  <% switch (documentclass) { case "acmart": -%>
208
225
 
209
- \citestyle{acmnumeric} % alternative: acmauthoryear
226
+ \citestyle{<%= authoryear ? "acmauthoryear" : "acmnumeric" %>} % alternative: <%= authoryear ? "acmnumeric" : "acmauthoryear" %>
210
227
  <% break; case "lncs": -%>
211
228
 
212
229
  % Prepare more space-saving rendering of the bibliography
@@ -1075,7 +1092,7 @@ Schließlich fasst \cref{sec:outlook} die Ergebnisse der Arbeit zusammen und ste
1075
1092
  Eine Beschreibung relevanter wissenschaftlicher Arbeiten mit Bezug zur eigenen Arbeit.
1076
1093
  Der Abschnitt kann je nach Kontext auch an anderer Stelle stehen.
1077
1094
 
1078
- Winery~\cite{Winery} is a graphical \textcomment{modeling}{modeling with one ``l'', because of American English} tool.
1095
+ Winery~\citep{Winery} is a graphical \textcomment{modeling}{modeling with one ``l'', because of American English} tool.
1079
1096
  The whole idea of TOSCA is explained by <% if (available.citet) { %>\citet<% } else { %>Binz et al.~\cite<% } %>{Binz2009}.
1080
1097
  <% } -%>
1081
1098
  <% if (examples) { -%>
@@ -1152,6 +1169,10 @@ Hier sollen allgemeine \LaTeX-Hinweise gegeben werden, damit man Minimalbeispiel
1152
1169
  <%# The math example uses \mathbb etc.; only show it where math.preamble.en.tex (its config) is loaded. -%>
1153
1170
  <%- include('math.example.en.tex', this); -%>
1154
1171
  <% } -%>
1172
+ <% if (documentclass == 'lncs') { -%>
1173
+
1174
+ <%- include('theorems.example.en.tex', this); -%>
1175
+ <% } -%>
1155
1176
 
1156
1177
  <%- include('floats.example.de.tex', this); -%>
1157
1178
 
@@ -1317,6 +1338,12 @@ Hier bitte einen kurzen Durchgang durch die Arbeit.
1317
1338
  %%% ===============================================================================
1318
1339
 
1319
1340
  <% switch (documentclass) { case "lncs": -%>
1341
+ <% if (bibtextool == 'biblatex') { -%>
1342
+ \begingroup
1343
+ \microtypecontext{expansion=sloppy}
1344
+ \printbibliography
1345
+ \endgroup
1346
+ <% } else { -%>
1320
1347
  \renewcommand{\bibsection}{\section*{Literatur}} % requried for natbib to have "References" printed and as section*, not chapter*
1321
1348
  % Use natbib compatbile splncs04nat style.
1322
1349
  % It does provide all features of splncs03, but is developed in a clean way.
@@ -1327,6 +1354,7 @@ Hier bitte einen kurzen Durchgang durch die Arbeit.
1327
1354
  \small % ensure correct font size for the bibliography
1328
1355
  \bibliography{<%= filenames.bib %>}
1329
1356
  \endgroup
1357
+ <% } -%>
1330
1358
  <% break; case "acmart": -%>
1331
1359
 
1332
1360
  \bibliographystyle{ACM-Reference-Format}
@@ -1,3 +1,6 @@
1
+ <% if (isPaper) { -%>
2
+ \ifdefined\pdfoutput\pdfoutput=1\fi % forces arXiv to process this file with pdflatex instead of DVI-producing "latex"; see README section "Final submission"
3
+ <% } -%>
1
4
  <% if (preparereitzig) { -%>
2
5
  \RequirePackage{snapshot}
3
6
  \RequirePackage[dependency-file=Texlivefile]{depp}
@@ -133,6 +136,12 @@
133
136
  <%- include('microtype.preamble.en.tex', this); -%>
134
137
 
135
138
  <%- include('nowidow.preamble.en.tex', this); -%>
139
+ <% if (isPaper) { -%>
140
+
141
+ <%- include('impnattypo.preamble.en.tex', this); -%>
142
+
143
+ <%- include('rectangularparagraphs.preamble.en.tex', this); -%>
144
+ <% } -%>
136
145
 
137
146
  <% if (documentclass == 'ustutt') { -%>
138
147
  <%- include('ustutt-pagestyle.preamble.en.tex', this); %>
@@ -185,16 +194,24 @@
185
194
  <%- include('paralist.preamble.en.tex', this); -%>
186
195
  <% switch (documentclass) {
187
196
  case "acmart":
188
- case "ieee":
189
- case "lncs": -%>
197
+ case "ieee": -%>
198
+
199
+ <%- include('natbib.preamble.en.tex', this); -%>
200
+ <% break; case "lncs": -%>
201
+ <% if (bibtextool == 'biblatex') { -%>
202
+ <%- include('biblatex.preamble.en.tex', this); -%>
203
+ <% } else { -%>
190
204
 
191
205
  <%- include('natbib.preamble.en.tex', this); -%>
206
+ <% } -%>
192
207
  <% break; case "scientific-thesis": case "ustutt": -%>
193
208
  <%- include('biblatex.preamble.en.tex', this); -%>
194
209
  <% break; } -%>
210
+
211
+ <%- include('embedfile.preamble.en.tex', this); -%>
195
212
  <% switch (documentclass) { case "acmart": -%>
196
213
 
197
- \citestyle{acmnumeric} % alternative: acmauthoryear
214
+ \citestyle{<%= authoryear ? "acmauthoryear" : "acmnumeric" %>} % alternative: <%= authoryear ? "acmnumeric" : "acmauthoryear" %>
198
215
  <% break; case "lncs": -%>
199
216
 
200
217
  % Prepare more space-saving rendering of the bibliography
@@ -1043,7 +1060,7 @@ Finally, a conclusion is drawn and outlook on future work is made (\cref{sec:out
1043
1060
  <%= heading1 %>{Related Work}
1044
1061
  \label{sec:relatedwork}
1045
1062
 
1046
- Winery~\cite{Winery} is a graphical \textcomment{modeling}{modeling with one ``l'', because of American English} tool.
1063
+ Winery~\citep{Winery} is a graphical \textcomment{modeling}{modeling with one ``l'', because of American English} tool.
1047
1064
  The whole idea of TOSCA is explained by <% if (available.citet) { %>\citet<% } else { %>Binz et al.~\cite<% } %>{Binz2009}.
1048
1065
  <% } -%>
1049
1066
  <% if (examples) { -%>
@@ -1121,6 +1138,10 @@ It focuses on minimal examples, which can be directly adapted to the content
1121
1138
  <%# The math example uses \mathbb etc.; only show it where math.preamble.en.tex (its config) is loaded. -%>
1122
1139
  <%- include('math.example.en.tex', this); -%>
1123
1140
  <% } -%>
1141
+ <% if (documentclass == 'lncs') { -%>
1142
+
1143
+ <%- include('theorems.example.en.tex', this); -%>
1144
+ <% } -%>
1124
1145
 
1125
1146
  <%- include('floats.example.en.tex', this); -%>
1126
1147
 
@@ -1285,6 +1306,12 @@ Be specific in the sense that your arguments for future work should be based on
1285
1306
  %%% ===============================================================================
1286
1307
 
1287
1308
  <% switch (documentclass) { case "lncs": -%>
1309
+ <% if (bibtextool == 'biblatex') { -%>
1310
+ \begingroup
1311
+ \microtypecontext{expansion=sloppy}
1312
+ \printbibliography
1313
+ \endgroup
1314
+ <% } else { -%>
1288
1315
  \renewcommand{\bibsection}{\section*{References}} % requried for natbib to have "References" printed and as section*, not chapter*
1289
1316
  % Use natbib compatbile splncs04nat style.
1290
1317
  % It does provide all features of splncs04.bst, but is developed in a clean way.
@@ -1295,6 +1322,7 @@ Be specific in the sense that your arguments for future work should be based on
1295
1322
  \small % ensure correct font size for the bibliography
1296
1323
  \bibliography{<%= filenames.bib %>}
1297
1324
  \endgroup
1325
+ <% } -%>
1298
1326
  <% break; case "acmart": -%>
1299
1327
  \bibliographystyle{ACM-Reference-Format}
1300
1328
  \bibliography{<%= filenames.bib %>}
@@ -0,0 +1,116 @@
1
+ % !TeX program = lualatex
2
+ % !TeX encoding = utf8
3
+ % !TeX spellcheck = de-DE
4
+ % LTeX: language=de-DE
5
+ % -*- coding:utf-8 mod:LaTeX -*-
6
+ %
7
+ % Minimale Schnellstart-Vorlage: Inhalt in Markdown schreiben und ein LaTeX-PDF
8
+ % erhalten. Kein Thesis-Ballast, nur das Wesentliche. Übersetzt mit LuaLaTeX +
9
+ % biber -- eine fertige latexmkrc liegt bei, ein einfaches "latexmk" genügt.
10
+
11
+ \documentclass[
12
+ fontsize=11pt,
13
+ paper=<%= papersize %>,
14
+ twoside,
15
+ open=right,
16
+ parskip=half,
17
+ numbers=noenddot,
18
+ ]{scrbook}
19
+
20
+ % --- LuaLaTeX-Schrift-/Typografie-Setup ---
21
+ \usepackage{fontspec}
22
+ \usepackage{microtype}
23
+ \usepackage[ngerman]{babel}
24
+ \usepackage{csquotes} % empfohlener Begleiter für babel + biblatex
25
+
26
+ % Backticks (`) werden in verbatim-Umgebungen als solche dargestellt
27
+ % (siehe https://tex.stackexchange.com/a/341057/9075)
28
+ \usepackage{upquote}
29
+
30
+ % --- Markdown als Texteingabe, großzügiger Funktionsumfang ---
31
+ % Die Optionsnamen folgen dem markdown-Paket v3.x.
32
+ \usepackage[
33
+ citations, % [@key] Zitationssyntax
34
+ hybrid, % rohes LaTeX durchreichen (z. B. \zcref im Manuskript)
35
+ notes, % [^label] referenzierte Fußnoten
36
+ inlineNotes, % ^[Inline-Fußnotentext]
37
+ pipeTables, % | a | b | Tabellen
38
+ tableCaptions, % : Beschriftungstext unter einer Tabelle
39
+ tableAttributes, % {#id} Bezeichner an einer Tabellenbeschriftung
40
+ hashEnumerators, % 1) 2) 3) Aufzählungen
41
+ taskLists, % - [ ] / - [x] Checkbox-Listen
42
+ headerAttributes, % {#id} Bezeichner an einer Überschrift
43
+ linkAttributes, % {#id} Attribute an Links/Bildern
44
+ relativeReferences, % <#id> zum Referenzieren einer via {#id} definierten Id
45
+ bracketedSpans, % [Text]{.klasse} Spans, z. B. explizite Akronym-Auszeichnung
46
+ ]{markdown}
47
+
48
+ % --- Literatur: Autor-Jahr über biblatex/biber ---
49
+ \usepackage[
50
+ style=authoryear,
51
+ backend=biber,
52
+ autolang=hyphen,
53
+ sorting=nyt,
54
+ ]{biblatex}
55
+ \addbibresource{<%= filenames.bib %>.bib}
56
+
57
+ % --- Abbildungen + intelligente Querverweise ---
58
+ \usepackage{graphicx}
59
+ \usepackage{zref-clever}
60
+ \zcsetup{cap = true} % Typnamen groß schreiben: "Kapitel", "Abbildung", "Tabelle"
61
+
62
+ % Wie die Marken funktionieren (Antwort auf "Können wir nicht die Markdown-Marken nutzen?"):
63
+ % Das markdown-Paket macht aus `{#id}` (an Überschriften, Bildern und Tabellen) ein
64
+ % *reguläres* \label{id}. Der `labelhook` von zref-clever (standardmäßig an) macht
65
+ % jedes \label zusätzlich zu einer zref-Marke, sodass \zcref{id} direkt mit
66
+ % Markdowns eigenen Bezeichnern funktioniert -- ohne rohes \zlabel oder Handarbeit.
67
+
68
+ % --- Alles anklickbar: hyperref ZULETZT laden -----------------------------
69
+ % Macht Inhaltsverzeichnis, \zcref, native <#id>-Verweise, [@Zitate] und Fußnoten
70
+ % anklickbar. zref-clever lädt zref-hyperref selbst, sobald es hyperref sieht, sodass
71
+ % \zcref-Links kein weiteres Setup brauchen. `hidelinks` hält Links anklickbar, ohne
72
+ % farbige Kästen (statt dessen `colorlinks=true` für sichtbare farbige Links am Bildschirm).
73
+ \usepackage[hidelinks, unicode, pdfusetitle]{hyperref}
74
+
75
+ % --- Akronyme: einmal definieren, überall im Markdown-Text nutzen ---------
76
+ % glossaries ist die klassische Ausnahme von "hyperref zuletzt": NACH hyperref
77
+ % laden, damit Akronym-Verwendungen und das Abkürzungsverzeichnis verlinkt sind.
78
+ \usepackage[acronym, nopostdot]{glossaries}
79
+ \makeglossaries
80
+ \setacronymstyle{long-short} % wie \gls Einträge setzt; das markdown-Theme selbst druckt immer die Kurzform
81
+ \newacronym{html}{HTML}{HyperText Markup Language}
82
+ \newacronym{yaml}{YAML}{YAML Ain't Markup Language}
83
+ % Das markdown-Paket erkennt die oben definierten Akronyme direkt im laufenden
84
+ % Markdown-Text -- keine \gls-Aufrufe im Manuskript nötig. Explizite Auszeichnung
85
+ % wie [JSON]{.acronym} funktioniert ebenfalls, auch für nicht definierte Akronyme.
86
+ % Hintergrund: https://github.com/Witiko/markdown/issues/615
87
+ \markdownSetup{
88
+ import = witiko/glossaries@v1,
89
+ snippet = witiko/glossaries/import-acronyms,
90
+ }
91
+
92
+ \title{Mein Buch}
93
+ \author{Martha Mildenhall}
94
+ \date{\today}
95
+
96
+ \begin{document}
97
+
98
+ \frontmatter
99
+ \maketitle
100
+ \tableofcontents
101
+
102
+ \mainmatter
103
+
104
+ % Der Fließtext liegt in einer separaten, reinen Markdown-Datei -- so sieht der
105
+ % Editor Markdown (kein LaTeX) und die Rechtschreib-/Stilprüfer (Vale, textlint)
106
+ % prüfen ihn direkt. `hybrid` (oben gesetzt) lässt darin weiterhin rohes LaTeX
107
+ % wie \zcref durch.
108
+ \markdownInput{<%= filenames.manuscript %>.md}
109
+
110
+ \backmatter
111
+
112
+ \printacronyms
113
+
114
+ \printbibliography
115
+
116
+ \end{document}
@@ -0,0 +1,115 @@
1
+ % !TeX program = lualatex
2
+ % !TeX encoding = utf8
3
+ % !TeX spellcheck = en-US
4
+ % LTeX: language=en-US
5
+ % -*- coding:utf-8 mod:LaTeX -*-
6
+ %
7
+ % Minimal quick-start template: write your content in Markdown and get a LaTeX
8
+ % PDF. No thesis scaffolding, just the essentials. Compile with LuaLaTeX + biber
9
+ % -- a ready-made latexmkrc is included, so a plain "latexmk" does everything.
10
+
11
+ \documentclass[
12
+ fontsize=11pt,
13
+ paper=<%= papersize %>,
14
+ twoside,
15
+ open=right,
16
+ parskip=half,
17
+ numbers=noenddot,
18
+ ]{scrbook}
19
+
20
+ % --- LuaLaTeX font/typography setup ---
21
+ \usepackage{fontspec}
22
+ \usepackage{microtype}
23
+ \usepackage[english]{babel}
24
+ \usepackage{csquotes} % recommended companion for babel + biblatex
25
+
26
+ % backticks (`) are rendered as such in verbatim environments
27
+ % (see https://tex.stackexchange.com/a/341057/9075)
28
+ \usepackage{upquote}
29
+
30
+ % --- Markdown as text input, generous feature set ---
31
+ % Option names follow the markdown package v3.x.
32
+ \usepackage[
33
+ citations, % [@key] citation syntax
34
+ hybrid, % pass raw LaTeX through (e.g. \zcref in the manuscript)
35
+ notes, % [^label] referenced footnotes
36
+ inlineNotes, % ^[inline footnote text]
37
+ pipeTables, % | a | b | style tables
38
+ tableCaptions, % : Caption text below a table
39
+ tableAttributes, % {#id} identifier on a table caption
40
+ hashEnumerators, % 1) 2) 3) style enumerators
41
+ taskLists, % - [ ] / - [x] checkbox lists
42
+ headerAttributes, % {#id} identifier on a heading
43
+ linkAttributes, % {#id} attributes on links/images
44
+ relativeReferences, % <#id> to reference an id defined via {#id}
45
+ bracketedSpans, % [text]{.class} spans, e.g. explicit acronym markup
46
+ ]{markdown}
47
+
48
+ % --- Bibliography: author-year via biblatex/biber ---
49
+ \usepackage[
50
+ style=authoryear,
51
+ backend=biber,
52
+ autolang=hyphen,
53
+ sorting=nyt,
54
+ ]{biblatex}
55
+ \addbibresource{<%= filenames.bib %>.bib}
56
+
57
+ % --- Figures + smart cross-references ---
58
+ \usepackage{graphicx}
59
+ \usepackage{zref-clever}
60
+ \zcsetup{cap = true} % capitalise type names: "Chapter", "Figure", "Table"
61
+
62
+ % How the labels work (answer to "can't we use the markdown labels?"):
63
+ % The markdown package turns `{#id}` (on headings, images and tables) into a
64
+ % *standard* \label{id}. zref-clever's `labelhook` (on by default) makes every
65
+ % \label additionally a zref label, so \zcref{id} works out of the box with
66
+ % markdown's own identifiers -- no raw-LaTeX \zlabel or manual bridge needed.
67
+
68
+ % --- Clickable everything: load hyperref LAST -----------------------------
69
+ % Makes the TOC, \zcref, native <#id> refs, [@citations] and footnotes clickable.
70
+ % zref-clever auto-loads zref-hyperref once it sees hyperref, so \zcref links
71
+ % need no extra setup. `hidelinks` keeps links clickable without coloured boxes
72
+ % (swap for `colorlinks=true` if you prefer visible coloured links on screen).
73
+ \usepackage[hidelinks, unicode, pdfusetitle]{hyperref}
74
+
75
+ % --- Acronyms: define once, use anywhere in the Markdown text -------------
76
+ % glossaries is the classic exception to "hyperref last": load it AFTER
77
+ % hyperref so acronym uses and the acronym list are hyperlinked.
78
+ \usepackage[acronym, nopostdot]{glossaries}
79
+ \makeglossaries
80
+ \setacronymstyle{long-short} % how \gls renders entries; the markdown theme itself always prints the short form
81
+ \newacronym{html}{HTML}{HyperText Markup Language}
82
+ \newacronym{yaml}{YAML}{YAML Ain't Markup Language}
83
+ % Make the markdown package recognize the acronyms defined above right in the
84
+ % running Markdown text -- no \gls calls needed in the manuscript. Explicit
85
+ % markup like [JSON]{.acronym} also works, even for undefined acronyms.
86
+ % See https://github.com/Witiko/markdown/issues/615 for background.
87
+ \markdownSetup{
88
+ import = witiko/glossaries@v1,
89
+ snippet = witiko/glossaries/import-acronyms,
90
+ }
91
+
92
+ \title{My Book}
93
+ \author{Martha Mildenhall}
94
+ \date{\today}
95
+
96
+ \begin{document}
97
+
98
+ \frontmatter
99
+ \maketitle
100
+ \tableofcontents
101
+
102
+ \mainmatter
103
+
104
+ % The prose lives in a separate, pure-Markdown file so your editor sees Markdown
105
+ % (not LaTeX) and the spell-/prose-checkers (Vale, textlint) lint it directly.
106
+ % `hybrid` (set above) still lets the file pass raw LaTeX such as \zcref through.
107
+ \markdownInput{<%= filenames.manuscript %>.md}
108
+
109
+ \backmatter
110
+
111
+ \printacronyms
112
+
113
+ \printbibliography
114
+
115
+ \end{document}
@@ -0,0 +1,57 @@
1
+ # Einleitung {#cha:einleitung}
2
+
3
+ Dieser gesamte Buchinhalt ist in **Markdown** geschrieben. Überschriften
4
+ der obersten Ebene (`#`) werden automatisch zu Kapiteln, `##` zu
5
+ Abschnitten, passend zur `scrbook`-Dokumentklasse. Diese Überschrift trägt
6
+ die Markdown-Id `{#cha:einleitung}`, aus der das Paket ein `\label` erzeugt.
7
+
8
+ Ein Zitat sieht so aus [@mwe], und hier eine Fußnote.^[Dies
9
+ ist eine Inline-Fußnote.] Referenzierte Fußnoten funktionieren
10
+ ebenfalls[^detail].
11
+
12
+ [^detail]: Dies ist eine ausführlichere Fußnote am Ende des Abschnitts.
13
+
14
+ ## Motivation
15
+
16
+ - erster Punkt
17
+ - zweiter Punkt
18
+ - Unterpunkt
19
+ 1) erstens
20
+ 2) zweitens
21
+
22
+ Auch Aufgabenlisten (`taskLists`) sind möglich:
23
+
24
+ - [ ] noch offener Punkt
25
+ - [x] bereits erledigter Punkt
26
+
27
+ Wie in \zcref{fig:example} gezeigt, lassen sich Bilder direkt in Markdown
28
+ referenzieren. Die reine Markdown-Referenz `<#fig:example>` liefert dagegen
29
+ nur die nackte Nummer (<#fig:example>), ohne den Typnamen Abbildung.
30
+
31
+ ![Ein Beispielbild](example-image "Ein Beispielbild"){#fig:example}
32
+
33
+ ## Eine Tabelle
34
+
35
+ \zcref{tbl:beispiel} zeigt die vier Ausrichtungsvarianten von `pipeTables`.
36
+
37
+ | Rechts | Links | Standard | Zentriert |
38
+ |-------:|:------|----------|:---------:|
39
+ | 12 | 12 | 12 | 12 |
40
+ | 123 | 123 | 123 | 123 |
41
+
42
+ : Beispieltabelle mit Ausrichtungen {#tbl:beispiel}
43
+
44
+ ## Akronyme
45
+
46
+ Einmal in der `.tex`-Hülle definierte Akronyme werden im laufenden Text
47
+ automatisch erkannt und als Akronyme gesetzt -- wie HTML und YAML genau hier --
48
+ und jede Verwendung landet im Abkürzungsverzeichnis am Ende, wo die Langform
49
+ ausgeschrieben ist. Explizite Auszeichnung geht auch: [JSON]{.acronym} wird
50
+ als Akronym gesetzt, obwohl es nirgends definiert ist.
51
+
52
+ # Ein weiteres Kapitel
53
+
54
+ Text mit Verweis auf das vorige Kapitel: \zcref{cha:einleitung}. Weil die
55
+ Überschrift die Markdown-Id `{#cha:einleitung}` trägt und jede `\label`
56
+ zusätzlich ein `\zlabel` erzeugt, funktioniert `\zcref` hier ganz ohne rohes
57
+ \LaTeX{} zum Setzen der Marke -- z.\,B. auch auf \zcref{tbl:beispiel}.
@@ -0,0 +1,56 @@
1
+ # Introduction {#cha:introduction}
2
+
3
+ You write this entire book in **Markdown**. Top-level headings (`#`)
4
+ automatically become chapters, `##` become sections, matching the `scrbook`
5
+ document class. This heading carries the Markdown identifier `{#cha:introduction}`,
6
+ from which the package generates a `\label`.
7
+
8
+ A citation looks like this [@mwe], and here is a footnote.^[This is an inline
9
+ footnote.] Referenced footnotes work as well[^detail].
10
+
11
+ [^detail]: This is a more detailed footnote at the end of the section.
12
+
13
+ ## Motivation
14
+
15
+ - first point
16
+ - second point
17
+ - sub-point
18
+ 1) firstly
19
+ 2) secondly
20
+
21
+ Task lists (`taskLists`) are possible too:
22
+
23
+ - [ ] a still-open item
24
+ - [x] an already-completed item
25
+
26
+ As \zcref{fig:example} shows, you can reference images directly from
27
+ Markdown. The plain Markdown reference `<#fig:example>` yields the bare
28
+ number (<#fig:example>), without the type name Figure.
29
+
30
+ ![An example image](example-image "An example image"){#fig:example}
31
+
32
+ ## A Table
33
+
34
+ \zcref{tbl:example} shows the four alignment variants of `pipeTables`.
35
+
36
+ | Right | Left | Default | Centred |
37
+ |------:|:-----|---------|:-------:|
38
+ | 12 | 12 | 12 | 12 |
39
+ | 123 | 123 | 123 | 123 |
40
+
41
+ : Example table with alignments {#tbl:example}
42
+
43
+ ## Acronyms
44
+
45
+ Acronyms defined once in the wrapper `.tex` file are recognized automatically
46
+ in the running text and typeset as acronyms -- like HTML and YAML right here --
47
+ and every use lands in the acronym list at the end, where the long form is
48
+ spelled out. Explicit markup is also possible: [JSON]{.acronym} is typeset as
49
+ an acronym although it has not been defined anywhere.
50
+
51
+ # Another Chapter
52
+
53
+ Text referring to the previous chapter: \zcref{cha:introduction}. Because the
54
+ heading carries the Markdown identifier `{#cha:introduction}` and every `\label`
55
+ also becomes a `\zlabel`, `\zcref` works here without any raw \LaTeX{}
56
+ to set the mark -- e.g. also on \zcref{tbl:example}.
@@ -0,0 +1,14 @@
1
+ % --- Rectangular ("block") paragraphs -------------------------------------
2
+ % When enabled, the last line of every paragraph is stretched to the full
3
+ % column width, so each paragraph forms a perfect rectangle. This is
4
+ % demanding typography: paragraphs whose last line is naturally short get
5
+ % visibly wide interword spaces, and good results usually require rewording
6
+ % sentences until every paragraph fits (copy fitting). The lone-word tweak
7
+ % above (impnattypo) becomes irrelevant while this is active.
8
+ % Enable by uncommenting the \rectangularparagraphstrue line:
9
+ \newif\ifrectangularparagraphs
10
+ %\rectangularparagraphstrue
11
+ \ifrectangularparagraphs
12
+ \setlength{\parfillskip}{0pt} % force the last line to reach the margin
13
+ \setlength{\emergencystretch}{3em} % soften overfull lines this may cause
14
+ \fi
@@ -0,0 +1,38 @@
1
+ <%= heading2 %>{Theorem-like Environments and Mathematics}
2
+
3
+ The \texttt{llncs} class already provides the theorem-like environments \texttt{theorem}, \texttt{proposition}, \texttt{lemma}, \texttt{corollary}, \texttt{definition}, \texttt{example}, \texttt{exercise}, \texttt{note}, \texttt{problem}, \texttt{question}, \texttt{remark}, and \texttt{solution} as well as the unnumbered \texttt{proof} environment -- no additional package is required.
4
+
5
+ <%- bexample %>
6
+ \begin{definition}[Idempotence]
7
+ An operation $f$ is \emph{idempotent} if $f(f(x)) = f(x)$ holds for all inputs $x$.
8
+ \end{definition}
9
+
10
+ \begin{proposition}
11
+ The identity operation is idempotent.
12
+ \end{proposition}
13
+
14
+ \begin{lemma}\label{lem:fixed}
15
+ An idempotent operation fixes every element of its image.
16
+ \end{lemma}
17
+
18
+ \begin{theorem}\label{thm:idempotent-composition}
19
+ If two idempotent operations $f$ and $g$ commute, their composition $f \circ g$ is idempotent.
20
+ \end{theorem}
21
+
22
+ \begin{proof}
23
+ Since $f$ and $g$ commute and are idempotent,
24
+ \begin{equation}
25
+ (f \circ g)\bigl((f \circ g)(x)\bigr) = f\bigl(f(g(g(x)))\bigr) = f(g(x)) = (f \circ g)(x).
26
+ \label{eq:idempotent-composition}
27
+ \end{equation}
28
+ \qed
29
+ \end{proof}
30
+
31
+ \begin{corollary}
32
+ Applying $f \circ g$ a second time yields no further change, as \cref{eq:idempotent-composition} shows.
33
+ \end{corollary}
34
+
35
+ \begin{example}
36
+ Trimming spaces in a string is idempotent: \cref{lem:fixed} applies to every already-trimmed string.
37
+ \end{example}
38
+ <%- eexample %>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-latex-template",
3
- "version": "2026.6.30",
3
+ "version": "2026.7.29",
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": {
@@ -35,7 +35,7 @@
35
35
  "npm": ">= 4.0.0"
36
36
  },
37
37
  "dependencies": {
38
- "chalk": "^5.6.2",
38
+ "chalk": "^6.0.0",
39
39
  "minimist": "^1.2.8",
40
40
  "patch-package": "^8.0.1",
41
41
  "yeoman-environment": "^6.0.0",