generator-latex-template 2026.6.30 → 2026.9.23
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 +15 -0
- package/generators/app/index.js +96 -6
- package/generators/app/options.js +35 -2
- package/generators/app/templates/.github/workflows/check.yml +32 -1
- package/generators/app/templates/README.de.md +6 -0
- package/generators/app/templates/README.en.md +99 -29
- package/generators/app/templates/Texlivefile +28 -1
- package/generators/app/templates/biblatex.example.en.tex +1 -1
- package/generators/app/templates/biblatex.preamble.en.tex +11 -2
- package/generators/app/templates/bibliography.bib +13 -0
- package/generators/app/templates/docs/thesis-checklist.md +51 -0
- package/generators/app/templates/dot.aspell.conf +14 -0
- package/generators/app/templates/dot.aspell.de.pws +13 -1
- package/generators/app/templates/dot.aspell.en.pws +5 -1
- package/generators/app/templates/dot.textlintrc.json +17 -0
- package/generators/app/templates/embedfile.preamble.en.tex +4 -0
- package/generators/app/templates/floats.example.de.tex +2 -2
- package/generators/app/templates/floats.example.en.tex +2 -2
- package/generators/app/templates/hyperref.preamble.en.tex +1 -1
- package/generators/app/templates/hyphenation.example.en.tex +1 -1
- package/generators/app/templates/impnattypo.preamble.en.tex +9 -0
- package/generators/app/templates/listings.example.de.tex +5 -5
- package/generators/app/templates/listings.example.en.tex +5 -5
- package/generators/app/templates/listings.preamble.de.tex +7 -0
- package/generators/app/templates/listings.preamble.en.tex +7 -0
- package/generators/app/templates/main.de.tex +92 -52
- package/generators/app/templates/main.en.tex +92 -52
- package/generators/app/templates/math.example.en.tex +1 -1
- package/generators/app/templates/minted.example.en.tex +3 -3
- package/generators/app/templates/minted.preamble.en.tex +1 -1
- package/generators/app/templates/mwe-main.de.tex +116 -0
- package/generators/app/templates/mwe-main.en.tex +115 -0
- package/generators/app/templates/mwe-manuscript.de.md +57 -0
- package/generators/app/templates/mwe-manuscript.en.md +56 -0
- package/generators/app/templates/paragraphs.example.en.tex +1 -1
- package/generators/app/templates/rectangularparagraphs.preamble.en.tex +14 -0
- package/generators/app/templates/subfig.example.en.tex +3 -3
- package/generators/app/templates/theorems.example.en.tex +38 -0
- package/generators/app/templates/thesis-additions.examples.en.tex +4 -4
- package/generators/app/templates/tikz.example.en.tex +1 -1
- package/generators/app/templates/todos.example.en.tex +1 -1
- package/generators/app/templates/varioref.preamble.de.tex +1 -1
- package/generators/app/templates/varioref.preamble.en.tex +1 -1
- package/generators/app/templates/zref-clever.example.en.tex +33 -0
- package/generators/app/templates/zref-clever.preamble.en.tex +21 -0
- package/generators/app/templates/zref-vario.example.en.tex +12 -0
- package/package.json +3 -3
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.
|
package/generators/app/index.js
CHANGED
|
@@ -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,40 @@ 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
|
+
|
|
160
|
+
// `crossref` is a plain CLI flag (no prompt): zref-clever (default, works
|
|
161
|
+
// with PDF tagging) or the legacy cleveref. Templates write references as
|
|
162
|
+
// <%- cref %>{…} / <%- Cref %>{…} (sentence start) and <%- vref %>/<%- Vref %>.
|
|
163
|
+
this.props.crossref =
|
|
164
|
+
this.options.crossref === "cleveref" ? "cleveref" : "zref-clever";
|
|
165
|
+
if (this.props.crossref === "cleveref") {
|
|
166
|
+
this.props.cref = "\\cref";
|
|
167
|
+
this.props.Cref = "\\Cref";
|
|
168
|
+
this.props.vref = "\\vref";
|
|
169
|
+
this.props.Vref = "\\Vref";
|
|
170
|
+
} else {
|
|
171
|
+
this.props.cref = "\\zcref";
|
|
172
|
+
this.props.Cref = "\\Zcref";
|
|
173
|
+
this.props.vref = "\\zvref";
|
|
174
|
+
this.props.Vref = "\\zvref[S]";
|
|
175
|
+
}
|
|
176
|
+
|
|
127
177
|
// Only minted and the PlantUML UML example need shell-escape; tikz-uml and the
|
|
128
178
|
// remaining thesis content do not.
|
|
129
179
|
this.props.requiresShellEscape =
|
|
@@ -152,6 +202,22 @@ export default class extends Generator {
|
|
|
152
202
|
}
|
|
153
203
|
|
|
154
204
|
function isPaperHandling(props) {
|
|
205
|
+
if (props.documentclass === "mwe") {
|
|
206
|
+
// The mwe quick start is neither a paper nor a thesis. Its wrapper main
|
|
207
|
+
// (mwe-main.<lang>.tex) pulls the prose from an external Markdown file
|
|
208
|
+
// (mwe-manuscript.<lang>.md) via \markdownInput. English keeps the plain
|
|
209
|
+
// names main.tex / manuscript.md; German gets a -de suffix so both
|
|
210
|
+
// languages can coexist in one repo (like scientific-thesis below) with
|
|
211
|
+
// each wrapper referencing its own manuscript -- no rename needed.
|
|
212
|
+
props.isPaper = false;
|
|
213
|
+
props.isThesis = false;
|
|
214
|
+
props.filenames = {
|
|
215
|
+
main: props.language === "en" ? "main" : "main-de",
|
|
216
|
+
manuscript: props.language === "en" ? "manuscript" : "manuscript-de",
|
|
217
|
+
bib: "bibliography",
|
|
218
|
+
};
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
155
221
|
props.isPaper =
|
|
156
222
|
props.documentclass === "acmart" ||
|
|
157
223
|
props.documentclass === "ieee" ||
|
|
@@ -255,6 +321,13 @@ export default class extends Generator {
|
|
|
255
321
|
this.templatePath("dot.aspell.conf"),
|
|
256
322
|
this.destinationPath(".aspell.conf"),
|
|
257
323
|
);
|
|
324
|
+
// The mwe quick start lints Markdown with its own (template-managed) config
|
|
325
|
+
if (this.props.documentclass !== "mwe") {
|
|
326
|
+
this.fs.copy(
|
|
327
|
+
this.templatePath("dot.textlintrc.json"),
|
|
328
|
+
this.destinationPath(".textlintrc.json"),
|
|
329
|
+
);
|
|
330
|
+
}
|
|
258
331
|
if (this.props.language == "de" || this.props.githubpublish) {
|
|
259
332
|
this.fs.copy(
|
|
260
333
|
this.templatePath("dot.aspell.de.pws"),
|
|
@@ -290,12 +363,26 @@ export default class extends Generator {
|
|
|
290
363
|
);
|
|
291
364
|
}
|
|
292
365
|
|
|
366
|
+
// The mwe quick start has its own minimal Markdown main; every other class
|
|
367
|
+
// shares the big main.<lang>.tex.
|
|
368
|
+
const mainTemplate =
|
|
369
|
+
this.props.documentclass === "mwe" ? "mwe-main." : "main.";
|
|
293
370
|
this.fs.copyTpl(
|
|
294
|
-
this.templatePath(
|
|
371
|
+
this.templatePath(mainTemplate + this.props.language + ".tex"),
|
|
295
372
|
this.destinationPath(this.props.filenames.main + ".tex"),
|
|
296
373
|
this.props,
|
|
297
374
|
);
|
|
298
375
|
|
|
376
|
+
// The mwe wrapper main pulls its prose from an external Markdown file so it
|
|
377
|
+
// can be edited and linted as plain Markdown (see mwe-main.<lang>.tex).
|
|
378
|
+
if (this.props.documentclass === "mwe") {
|
|
379
|
+
this.fs.copyTpl(
|
|
380
|
+
this.templatePath("mwe-manuscript." + this.props.language + ".md"),
|
|
381
|
+
this.destinationPath(this.props.filenames.manuscript + ".md"),
|
|
382
|
+
this.props,
|
|
383
|
+
);
|
|
384
|
+
}
|
|
385
|
+
|
|
299
386
|
if (this.props.feature.abbreviations) {
|
|
300
387
|
this.fs.copy(
|
|
301
388
|
this.templatePath("abbreviations." + this.props.language + ".tex"),
|
|
@@ -303,11 +390,14 @@ export default class extends Generator {
|
|
|
303
390
|
);
|
|
304
391
|
}
|
|
305
392
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
this.
|
|
309
|
-
|
|
310
|
-
|
|
393
|
+
// mwe-main does not \input{commands}; keep the quick start minimal.
|
|
394
|
+
if (this.props.documentclass !== "mwe") {
|
|
395
|
+
this.fs.copyTpl(
|
|
396
|
+
this.templatePath("commands.tex"),
|
|
397
|
+
this.destinationPath("commands.tex"),
|
|
398
|
+
this.props,
|
|
399
|
+
);
|
|
400
|
+
}
|
|
311
401
|
|
|
312
402
|
if (this.props.documentclass == "ustutt") {
|
|
313
403
|
/*
|
|
@@ -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" &&
|
|
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
|
|
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,35 @@ 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
|
+
textlint:
|
|
186
|
+
runs-on: ubuntu-latest
|
|
187
|
+
steps:
|
|
188
|
+
- name: Set up Git repository
|
|
189
|
+
uses: actions/checkout@v7
|
|
190
|
+
- uses: actions/setup-node@v7
|
|
191
|
+
with:
|
|
192
|
+
node-version: '22'
|
|
193
|
+
- name: Lint English prose with textlint
|
|
194
|
+
run: |
|
|
195
|
+
# Report-only: findings show up as annotations, the job does not fail.
|
|
196
|
+
# Rules come from .textlintrc.json. Only English documents (marked by
|
|
197
|
+
# "% !TeX spellcheck = en-US") are linted: write-good targets English.
|
|
198
|
+
files=$(grep -l '^% !TeX spellcheck = en' *.tex || true)
|
|
199
|
+
if [ -z "$files" ]; then
|
|
200
|
+
echo "No English .tex files to lint." >> "$GITHUB_STEP_SUMMARY"
|
|
201
|
+
exit 0
|
|
202
|
+
fi
|
|
203
|
+
npx --yes \
|
|
204
|
+
--package textlint \
|
|
205
|
+
--package textlint-plugin-latex2e \
|
|
206
|
+
--package textlint-filter-rule-allowlist \
|
|
207
|
+
--package textlint-rule-terminology \
|
|
208
|
+
--package textlint-rule-write-good \
|
|
209
|
+
textlint --format github $files \
|
|
210
|
+
| sed "s|${GITHUB_WORKSPACE}/||g" | tee annotations.txt || true
|
|
211
|
+
count=$(grep -c '^::\(error\|warning\)' annotations.txt || true)
|
|
212
|
+
echo "textlint reported ${count} finding(s) in: ${files//$'\n'/, }" >> "$GITHUB_STEP_SUMMARY"
|
|
213
|
+
<% } -%>
|
|
183
214
|
indent:
|
|
184
215
|
runs-on: ubuntu-latest
|
|
185
216
|
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 >
|
|
7
|
+
<% if (texlive > 2025) { -%>
|
|
8
8
|
|
|
9
|
-
Please be aware that this template is optimized for overleaf, which is based on TeXLive
|
|
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 >
|
|
18
|
-
Please be aware that this template is optimized for overleaf, which is based on TeXLive
|
|
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,47 @@ 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; } } -%>
|
|
138
|
+
<% if (isThesis) { -%>
|
|
139
|
+
|
|
140
|
+
## Writing your thesis
|
|
141
|
+
|
|
142
|
+
- Read [Student Thesis Projects](https://vdf.ch/product/student-thesis-projects-en.html) by Lichter, Ludewig, Deininger, and Schneider.
|
|
143
|
+
The open-access book explains how to organize, conduct, write, and present a thesis.
|
|
144
|
+
- Before handing in, work through the [thesis checklist](docs/thesis-checklist.md).
|
|
145
|
+
<% } -%>
|
|
108
146
|
|
|
109
147
|
## Usage
|
|
110
148
|
|
|
@@ -163,10 +201,38 @@ On the command line, there are additional features:
|
|
|
163
201
|
- `latexmk -C` or `make clean` for cleaning up
|
|
164
202
|
- `make format` to reformat the `.tex` files (one sentence per line and indent)
|
|
165
203
|
- `make aspell` for interactive spell checking
|
|
166
|
-
- `make stand`: Creates a new PDF with the current status of the
|
|
204
|
+
- `make stand`: Creates a new PDF with the current status of the document.
|
|
167
205
|
- `make view`: Opens the configured viewer
|
|
168
206
|
- `make mrproper`: Cleans up and removes also editor backup files.
|
|
207
|
+
<% if (documentclass != "mwe") { -%>
|
|
208
|
+
|
|
209
|
+
The `textlint` job of the `Check` workflow reports weakening words (e.g., "clearly", "just") in the English `.tex` files as annotations.
|
|
210
|
+
Run it locally with `npx` (needs Node.js; rules come from `.textlintrc.json`):
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
npx --yes --package textlint --package textlint-plugin-latex2e --package textlint-filter-rule-allowlist --package textlint-rule-terminology --package textlint-rule-write-good textlint <%= filenames.main %>.tex
|
|
214
|
+
```
|
|
215
|
+
<% } -%>
|
|
216
|
+
<% if (documentclass == "mwe") { -%>
|
|
217
|
+
|
|
218
|
+
### Linting your Markdown
|
|
219
|
+
|
|
220
|
+
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`).
|
|
221
|
+
|
|
222
|
+
Run textlint locally with `npx` (needs Node.js; rules come from `.textlintrc.json`):
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
npx --yes --package textlint --package textlint-rule-terminology --package textlint-rule-write-good textlint <%= filenames.manuscript %>.md
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
For Vale, install it (`brew install vale` / `choco install vale`, or see <https://vale.sh/docs>) and point it at the file:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
vale <%= filenames.manuscript %>.md
|
|
232
|
+
```
|
|
233
|
+
<% } -%>
|
|
169
234
|
|
|
235
|
+
<% if (documentclass != "mwe") { -%>
|
|
170
236
|
## Benefits
|
|
171
237
|
|
|
172
238
|
Following features are enabled in this template:
|
|
@@ -190,8 +256,8 @@ Following features are enabled in this template:
|
|
|
190
256
|
See <https://tex.stackexchange.com/a/441701/9075> for details.
|
|
191
257
|
<% } -%>
|
|
192
258
|
- Automatic setting of "Fig." and "Section"/"Sect." according to the LNCS style.
|
|
193
|
-
Just use
|
|
194
|
-
Thanx to [
|
|
259
|
+
Just use `<%- Cref %>{sec:xy}` at the beginning of a sentence and `<%- cref %>{sec:xy}` in the middle of a sentence.
|
|
260
|
+
Thanx to [<%= crossref %>].
|
|
195
261
|
<% if (font == "default" || githubpublish) { -%>
|
|
196
262
|
- Sharper font (still compatible with Springer's requirements).
|
|
197
263
|
<% } -%>
|
|
@@ -215,7 +281,7 @@ Following features are enabled in this template:
|
|
|
215
281
|
- <% if (githubpublish && !isThesis) { -%>(Optional) <% } %>Support todos as pdf annotations. This is enabled by the [pdfcomment] package.
|
|
216
282
|
<% } -%>
|
|
217
283
|
- [microtypographic extensions](https://www.ctan.org/pkg/microtype) for a better look of the paper.
|
|
218
|
-
- Modern packages such as [microtype], [
|
|
284
|
+
- Modern packages such as [microtype], [<%= crossref %>]<% if (enquotes == "csquotes" || githubpublish) { %>, [csquotes]<% } %><% if (documentclass != 'lncs') { %>, [paralist]<% } %>, [hyperref], [hypcap], [upquote]<% if (documentclass == 'lncs') { %>, [natbib]<% } %>, [booktabs].
|
|
219
285
|
<% if ((reallatexcompiler.startsWith("lualatex")) || githubpublish) { -%>
|
|
220
286
|
- <% if (githubpublish && !isThesis) { -%>(Optional) <% } %>LaTeX compilation using the modern [lualatex] compiler.
|
|
221
287
|
For older systems, [pdflatex](https://en.wikipedia.org/wiki/PdfTeX) is still supported.
|
|
@@ -266,8 +332,9 @@ Congratulations. You chose to use all available features.
|
|
|
266
332
|
<% } -%>
|
|
267
333
|
|
|
268
334
|
<% switch (documentclass) { case "lncs": -%>
|
|
269
|
-
|
|
270
|
-
|
|
335
|
+
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).
|
|
336
|
+
|
|
337
|
+
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
338
|
|
|
272
339
|
<% break; case "ieee": -%>
|
|
273
340
|
There is currently no official biblatex support.
|
|
@@ -275,16 +342,10 @@ A first step towards that is done at the [biblatex-ieee package](https://ctan.or
|
|
|
275
342
|
|
|
276
343
|
<% break; default: -%>
|
|
277
344
|
<% break; } -%>
|
|
345
|
+
<% } -%>
|
|
278
346
|
<% if (githubpublish) {
|
|
279
347
|
switch (documentclass) {
|
|
280
348
|
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
349
|
## Background
|
|
289
350
|
|
|
290
351
|
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 +365,6 @@ This might lead to undesired results such as hyperlinks not working any more or
|
|
|
304
365
|
In case you think, a package needs to be altered or added, feel free to open an issue.
|
|
305
366
|
|
|
306
367
|
<% 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
368
|
## Quick start
|
|
313
369
|
|
|
314
370
|
- Click on `Download ZIP` or [here](https://github.com/latextemplates/IEEE/archive/main.zip).
|
|
@@ -357,6 +413,21 @@ Statement from IEEE:
|
|
|
357
413
|
<% break; default: -%>
|
|
358
414
|
<% break; }
|
|
359
415
|
} else { -%>
|
|
416
|
+
<% } -%>
|
|
417
|
+
<% if (isPaper) { -%>
|
|
418
|
+
## Final submission
|
|
419
|
+
|
|
420
|
+
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".
|
|
421
|
+
Some publishers' final-submission checks (e.g., IEEE PDF eXpress or PDF/A validation) reject PDFs containing file attachments.
|
|
422
|
+
If your submission system complains, comment out the `\embedfile` line in `<%= filenames.main %>.tex` for the camera-ready version.
|
|
423
|
+
|
|
424
|
+
### arXiv
|
|
425
|
+
|
|
426
|
+
The first line of `<%= filenames.main %>.tex` is `\ifdefined\pdfoutput\pdfoutput=1\fi`.
|
|
427
|
+
Keep it when uploading to arXiv: arXiv scans the first lines for `\pdfoutput=1` to decide between `pdflatex` and DVI-producing `latex`.
|
|
428
|
+
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'`.
|
|
429
|
+
See [this question on TeX.SE](https://tex.stackexchange.com/q/584702/9075) for details.
|
|
430
|
+
|
|
360
431
|
<% } -%>
|
|
361
432
|
## Tool hints
|
|
362
433
|
|
|
@@ -480,7 +551,7 @@ Alternatively, just copy and paste the contents of the [vscode.settings.json](vs
|
|
|
480
551
|
|
|
481
552
|
You can manually trigger compilation by hitting the green button in the extension or using other methods provided by LaTeX Workshop.
|
|
482
553
|
|
|
483
|
-
Please remove the magic comments (`% !TeX program ...`) at the top of the
|
|
554
|
+
Please remove the magic comments (`% !TeX program ...`) at the top of the `<%= filenames.main %>.tex` file.
|
|
484
555
|
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
556
|
Without the magic comments, compilation works.
|
|
486
557
|
|
|
@@ -536,6 +607,7 @@ docker build -t ltg .
|
|
|
536
607
|
|
|
537
608
|
<% break; default: -%>
|
|
538
609
|
<% break; } -%>
|
|
610
|
+
<% if (documentclass != "mwe") { -%>
|
|
539
611
|
## Contained Directories and Files
|
|
540
612
|
|
|
541
613
|
### Directories
|
|
@@ -816,15 +888,13 @@ We are collecting alternatives at the issue [#25](https://github.com/latextempla
|
|
|
816
888
|
You did not setup the [plantuml package](https://www.ctan.org/pkg/plantuml) correctly.
|
|
817
889
|
Please head to <https://koppor.github.io/plantuml/> for installation instructions.
|
|
818
890
|
|
|
891
|
+
<% } -%>
|
|
819
892
|
<% } -%>
|
|
820
893
|
## Further information
|
|
821
894
|
|
|
822
895
|
<% if (documentclass == 'lncs') { -%>
|
|
823
896
|
- tex.stackexchange.com questions regarding LNCS: <https://tex.stackexchange.com/questions/tagged/lncs>
|
|
824
|
-
|
|
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
|
-
<% } -%>
|
|
897
|
+
- 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
898
|
<% } -%>
|
|
829
899
|
- Other templates: <https://latextemplates.github.io/>
|
|
830
900
|
- For German users, go to <https://texfragen.de/>.
|
|
@@ -848,7 +918,7 @@ Any derived work can freely be relicensed and can omit original copyright and li
|
|
|
848
918
|
[biblatex]: http://tex.stackexchange.com/tags/biblatex/info
|
|
849
919
|
[bibtex]: https://www.ctan.org/pkg/bibtex
|
|
850
920
|
[booktabs]: https://ctan.org/pkg/booktabs
|
|
851
|
-
[
|
|
921
|
+
[<%= crossref %>]: https://ctan.org/pkg/<%= crossref %>
|
|
852
922
|
[csquotes]: https://www.ctan.org/pkg/csquotes
|
|
853
923
|
[hypcap]: https://www.ctan.org/pkg/hypcap
|
|
854
924
|
[hyperref]: https://ctan.org/pkg/hyperref
|
|
@@ -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
|
<% } -%>
|
|
@@ -42,7 +48,9 @@ cfr-lm
|
|
|
42
48
|
<% if (githubpublish || (documentclass == "ustutt")) { -%>
|
|
43
49
|
charter<%# required by mathdesign-charter%>
|
|
44
50
|
<% } -%>
|
|
51
|
+
<% if (githubpublish || (crossref == "cleveref")) { -%>
|
|
45
52
|
cleveref
|
|
53
|
+
<% } -%>
|
|
46
54
|
cm-super
|
|
47
55
|
<% if (githubpublish || (documentclass == "acmart")) { -%>
|
|
48
56
|
cmap
|
|
@@ -63,6 +71,9 @@ datetime2-german
|
|
|
63
71
|
dehyph-exptl
|
|
64
72
|
<% } -%>
|
|
65
73
|
diagbox
|
|
74
|
+
<% if (githubpublish || (documentclass != "mwe")) { -%>
|
|
75
|
+
embedfile
|
|
76
|
+
<% } -%>
|
|
66
77
|
<% if (githubpublish || isThesis) { -%>
|
|
67
78
|
enumitem
|
|
68
79
|
<% } -%>
|
|
@@ -99,7 +110,7 @@ fontspec
|
|
|
99
110
|
footmisc
|
|
100
111
|
<% } -%>
|
|
101
112
|
gettitlestring
|
|
102
|
-
<% if (githubpublish || (documentclass == 'ustutt') || (documentclass == 'scientific-thesis')) { -%>
|
|
113
|
+
<% if (githubpublish || (documentclass == 'ustutt') || (documentclass == 'scientific-thesis') || (documentclass == 'mwe')) { -%>
|
|
103
114
|
glossaries
|
|
104
115
|
<% if (githubpublish || (lang == "en")) { -%>
|
|
105
116
|
glossaries-english
|
|
@@ -131,6 +142,9 @@ ifmtarg<%# required by acmart at least %>
|
|
|
131
142
|
ifplatform
|
|
132
143
|
<% } -%>
|
|
133
144
|
iftex
|
|
145
|
+
<% if (githubpublish || (isPaper && reallatexcompiler.startsWith("lualatex"))) { -%>
|
|
146
|
+
impnattypo
|
|
147
|
+
<% } -%>
|
|
134
148
|
inconsolata<%# required by ustutt, scientific-thesis, acm%>
|
|
135
149
|
infwarerr
|
|
136
150
|
intcalc
|
|
@@ -176,6 +190,13 @@ luaxml<%# required by spelling %>
|
|
|
176
190
|
ly1<%# required by mathdesign-font %>
|
|
177
191
|
<% } -%>
|
|
178
192
|
marginnote
|
|
193
|
+
<% if (githubpublish || (documentclass == "mwe")) { -%>
|
|
194
|
+
markdown<%# markdown-as-input quick-start (mwe documentclass) %>
|
|
195
|
+
<%# markdown's default LaTeX theme pulls these in (else e.g. "csvsimple.sty not found") %>
|
|
196
|
+
csvsimple
|
|
197
|
+
fancyvrb
|
|
198
|
+
verse<%# used when a Markdown blockquote/verse is present %>
|
|
199
|
+
<% } -%>
|
|
179
200
|
<% if (githubpublish || isThesis) { -%>
|
|
180
201
|
mathdesign
|
|
181
202
|
<% } -%>
|
|
@@ -322,3 +343,9 @@ xpatch
|
|
|
322
343
|
<% } -%>
|
|
323
344
|
xstring<%# this includes stfloats; required by textcomp %>
|
|
324
345
|
zref
|
|
346
|
+
<% if (githubpublish || (documentclass == "mwe") || (crossref == "zref-clever")) { -%>
|
|
347
|
+
zref-clever
|
|
348
|
+
<% } -%>
|
|
349
|
+
<% if (githubpublish || (isThesis && (crossref == "zref-clever"))) { -%>
|
|
350
|
+
zref-vario
|
|
351
|
+
<% } -%>
|
|
@@ -11,4 +11,4 @@ In case one wants to name the author: \textcite{mwe} shows a minimal \LaTeX{} ex
|
|
|
11
11
|
Note that \texttt{\textbackslash textcite\{mwe\}} prints both the author and the reference to the bibliography entry.
|
|
12
12
|
|
|
13
13
|
Remember that you have to call \texttt{biber <%= filenames.main %>} to generate the bibliography data for \texttt{<%= reallatexcompiler %>}.
|
|
14
|
-
You will need to run \texttt{<%= reallatexcompiler %>} twice
|
|
14
|
+
You will need to run \texttt{<%= reallatexcompiler %>} twice so that the page numbers are up to date.
|