generator-latex-template 2026.10.30 → 2026.11.3
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/generators/app/CLAUDE.md +1 -1
- package/generators/app/index.js +116 -8
- package/generators/app/templates/.github/workflows/check.yml +133 -3
- package/generators/app/templates/IEEEtranN-doi.bst +1 -1
- package/generators/app/templates/IEEEtranN-doi.bst.patch +1 -1
- package/generators/app/templates/Makefile +6 -2
- package/generators/app/templates/README.en.md +205 -6
- package/generators/app/templates/Texlivefile +20 -0
- package/generators/app/templates/abbreviations.example.de.tex +4 -2
- package/generators/app/templates/abbreviations.example.en.tex +8 -5
- package/generators/app/templates/affirmation.de.tex +26 -0
- package/generators/app/templates/affirmation.en.tex +27 -0
- package/generators/app/templates/babel.preamble.de.tex +2 -1
- package/generators/app/templates/babel.preamble.en.tex +2 -1
- package/generators/app/templates/biblatex.preamble.en.tex +1 -1
- package/generators/app/templates/bibliography.bib +20 -0
- package/generators/app/templates/chapters.README.de.md +8 -1
- package/generators/app/templates/chapters.README.en.md +8 -1
- package/generators/app/templates/chapters.dot.latexmkrc +9 -0
- package/generators/app/templates/chickenize.preamble.en.tex +8 -0
- package/generators/app/templates/comparison-abstract.en.tex +3 -0
- package/generators/app/templates/comparison-body.acmart.tex +27 -0
- package/generators/app/templates/comparison-body.ieee.tex +23 -0
- package/generators/app/templates/comparison-body.lncs.tex +19 -0
- package/generators/app/templates/comparison-build.sh +41 -0
- package/generators/app/templates/comparison-plain.acmart.tex +9 -0
- package/generators/app/templates/comparison-plain.ieee.tex +12 -0
- package/generators/app/templates/comparison-plain.lncs.tex +11 -0
- package/generators/app/templates/comparison-text.en.tex +66 -0
- package/generators/app/templates/csquotes.example.en.tex +1 -1
- package/generators/app/templates/csquotes.preamble.en.tex +2 -2
- package/generators/app/templates/diagbox.example.en.tex +8 -9
- package/generators/app/templates/dot.aspell.de.pws +77 -59
- package/generators/app/templates/dot.aspell.en.pws +68 -56
- package/generators/app/templates/dot.chktexrc +27 -0
- package/generators/app/templates/dot.gitignore +8 -0
- package/generators/app/templates/floats.example.de.tex +1 -1
- package/generators/app/templates/floats.example.en.tex +1 -1
- package/generators/app/templates/font.preamble.en.tex +38 -9
- package/generators/app/templates/gitver.preamble.en.tex +12 -0
- package/generators/app/templates/hyperref.preamble.en.tex +2 -0
- package/generators/app/templates/hyphenation.example.en.tex +1 -1
- package/generators/app/templates/latexmkrc +8 -0
- package/generators/app/templates/listings.example.en.tex +8 -1
- package/generators/app/templates/listings.preamble.de.tex +18 -10
- package/generators/app/templates/listings.preamble.en.tex +18 -11
- package/generators/app/templates/longtable.example.en.tex +10 -7
- package/generators/app/templates/main.de.tex +103 -41
- package/generators/app/templates/main.en.tex +119 -48
- package/generators/app/templates/minted.example.en.tex +8 -1
- package/generators/app/templates/minted.preamble.en.tex +1 -0
- package/generators/app/templates/mwe-main.de.tex +8 -0
- package/generators/app/templates/mwe-main.en.tex +8 -0
- package/generators/app/templates/powerset.preamble.en.tex +5 -5
- package/generators/app/templates/subfig.example.en.tex +1 -1
- package/generators/app/templates/subfiles.preamble.en.tex +6 -0
- package/generators/app/templates/tables.example.en.tex +23 -0
- package/generators/app/templates/tables.preamble.en.tex +9 -0
- package/generators/app/templates/template-version.preamble.en.tex +4 -0
- package/generators/app/templates/thesis-additions.en.tex +4 -4
- package/generators/app/templates/thesis-additions.examples.en.tex +2 -2
- package/generators/app/templates/todos.preamble.en.tex +1 -1
- package/generators/app/templates/uml.example.en.tex +1 -1
- package/generators/app/templates/ustutt-chapterstyle.preamble.en.tex +2 -1
- package/generators/app/templates/ustutt-pagestyle.preamble.en.tex +12 -7
- package/package.json +2 -2
package/generators/app/CLAUDE.md
CHANGED
|
@@ -34,7 +34,7 @@ the feature vanishes for some switch combination without any error.
|
|
|
34
34
|
3. **`Texlivefile`** — add the TeX Live package name, guarded (usually
|
|
35
35
|
`githubpublish || <condition>`; `githubpublish` deliberately bundles everything).
|
|
36
36
|
4. **Shell-escape is derived, never hardcoded.** It is the boolean
|
|
37
|
-
`requiresShellEscape` in `index.js` (`uml == "plantuml"`, and minted only up to TeX Live 2024:
|
|
37
|
+
`requiresShellEscape` in `index.js` (`uml == "plantuml"`/`"mermaid"`, `ustutt` for gitver, and minted only up to TeX Live 2024:
|
|
38
38
|
minted 3 runs `latexminted`, which TeX Live permits in restricted shell escape).
|
|
39
39
|
Extend that expression if the new package needs `\write18`; the `latexmkrc` and the
|
|
40
40
|
`main.*.tex` editor hints read the flag.
|
package/generators/app/index.js
CHANGED
|
@@ -149,6 +149,12 @@ export default class extends Generator {
|
|
|
149
149
|
? true
|
|
150
150
|
: this.options.longtable === true || this.options.longtable === "true";
|
|
151
151
|
|
|
152
|
+
// `pagenumbering` is a plain CLI flag (no prompt) for the theses: "continuous"
|
|
153
|
+
// (default, ISO 7144: arabic from the title page on) or "roman" (roman numerals
|
|
154
|
+
// for the front matter, arabic from 1 for the main matter). See ADR-0027.
|
|
155
|
+
this.props.pagenumbering =
|
|
156
|
+
this.options.pagenumbering === "roman" ? "roman" : "continuous";
|
|
157
|
+
|
|
152
158
|
// `authoryear` is a plain CLI flag (no prompt): switch citations to
|
|
153
159
|
// author-year globally. Maps to biblatex's authoryear style (theses, lncs)
|
|
154
160
|
// and \citestyle{acmauthoryear} (acmart); the mwe quick start is
|
|
@@ -187,13 +193,27 @@ export default class extends Generator {
|
|
|
187
193
|
this.props.bibrunner =
|
|
188
194
|
this.props.bibtextool === "biblatex" ? "biber" : "bibtex";
|
|
189
195
|
|
|
190
|
-
//
|
|
196
|
+
// The PlantUML/Mermaid UML examples need shell-escape, as does gitver (the version
|
|
197
|
+
// stamp in the header of the ustutt thesis). minted 3 (TeX Live 2025 and later)
|
|
191
198
|
// runs latexminted, which TeX Live permits in restricted shell escape; minted 2
|
|
192
199
|
// (TeX Live 2024) still needs shell-escape.
|
|
200
|
+
// Written into the main file header and the PDF properties (template-version.preamble.en.tex):
|
|
201
|
+
// the state of the template is a function of the generator version.
|
|
202
|
+
this.props.generatorVersion = this.rootGeneratorVersion();
|
|
203
|
+
this.props.templateRepo = {
|
|
204
|
+
acmart: "acm-enhanced",
|
|
205
|
+
ieee: "ieee-enhanced",
|
|
206
|
+
lncs: "lncs-enhanced",
|
|
207
|
+
"scientific-thesis": "scientific-thesis-template",
|
|
208
|
+
ustutt: "uni-stuttgart-dissertation-template",
|
|
209
|
+
mwe: "markdown-latex-quickstart",
|
|
210
|
+
}[this.props.documentclass];
|
|
211
|
+
|
|
193
212
|
this.props.requiresShellEscape =
|
|
194
213
|
(this.props.listings == "minted" && this.props.texlive < 2025) ||
|
|
195
214
|
this.props.uml == "plantuml" ||
|
|
196
|
-
this.props.uml == "mermaid"
|
|
215
|
+
this.props.uml == "mermaid" ||
|
|
216
|
+
this.props.documentclass == "ustutt";
|
|
197
217
|
|
|
198
218
|
// Two-column layouts (IEEE, and the ACM conference/journal formats) cannot use
|
|
199
219
|
// `longtable` ("longtable not in 1-column mode"), so the longtable example must
|
|
@@ -424,9 +444,47 @@ export default class extends Generator {
|
|
|
424
444
|
this.templatePath(`chapters.README.${language}.md`),
|
|
425
445
|
this.destinationPath(`chapters-${language}/README.md`),
|
|
426
446
|
);
|
|
447
|
+
// Each chapter compiles on its own (package subfiles): it names the main
|
|
448
|
+
// file whose preamble it loads. The template repositories rename the main
|
|
449
|
+
// file per variant (update-files.yml) and share the chapter files, so the
|
|
450
|
+
// chapters of a published template name the minted main file of their
|
|
451
|
+
// language and carry the other variants commented out.
|
|
452
|
+
const publishedMains = {
|
|
453
|
+
ustutt: {
|
|
454
|
+
en: ["thesis-example-en", "thesis-example-basic-listings-en"],
|
|
455
|
+
de: ["thesis-example", "thesis-example-basic-listings"],
|
|
456
|
+
},
|
|
457
|
+
"scientific-thesis": {
|
|
458
|
+
en: [
|
|
459
|
+
"main-english",
|
|
460
|
+
"main-basic-listings-english",
|
|
461
|
+
"main-english-thu",
|
|
462
|
+
"main-english-university-of-hamburg",
|
|
463
|
+
],
|
|
464
|
+
de: [
|
|
465
|
+
"main-german",
|
|
466
|
+
"main-basic-listings-german",
|
|
467
|
+
"main-german-thu",
|
|
468
|
+
"main-german-university-of-hamburg",
|
|
469
|
+
],
|
|
470
|
+
},
|
|
471
|
+
};
|
|
472
|
+
const mains = this.props.githubpublish
|
|
473
|
+
? publishedMains[this.props.documentclass][language]
|
|
474
|
+
: [this.props.filenames.main];
|
|
475
|
+
const chapterName = (index, chapter) =>
|
|
476
|
+
`${(index + 1) * 10} - ${chapter.name}`;
|
|
477
|
+
// The chapter the README names and check.yml compiles on its own
|
|
478
|
+
this.props.firstChapter = chapterName(0, chapters[0]);
|
|
479
|
+
this.fs.copyTpl(
|
|
480
|
+
this.templatePath("chapters.dot.latexmkrc"),
|
|
481
|
+
this.destinationPath(`chapters-${language}/.latexmkrc`),
|
|
482
|
+
{ example: this.props.firstChapter },
|
|
483
|
+
);
|
|
427
484
|
const includes = chapters.flatMap((chapter, index) => {
|
|
428
485
|
// Steps of 10 leave room to insert a chapter without renaming the others
|
|
429
|
-
const
|
|
486
|
+
const name = chapterName(index, chapter);
|
|
487
|
+
const base = `chapters-${language}/${name}`;
|
|
430
488
|
if (chapter.markdown) {
|
|
431
489
|
write(`${base}.md`, trim(chapter.lines));
|
|
432
490
|
return markdownInput(`${base}.md`);
|
|
@@ -439,8 +497,10 @@ export default class extends Generator {
|
|
|
439
497
|
if (match) {
|
|
440
498
|
sourceCode = { listings: match[1], lines: [] };
|
|
441
499
|
} else if (line === "%%LTG-SOURCECODE-END") {
|
|
442
|
-
const file = (listings) => `${
|
|
443
|
-
write(
|
|
500
|
+
const file = (listings) => `${name} - ${listings}`;
|
|
501
|
+
write(`${base} - ${sourceCode.listings}.tex`, trim(sourceCode.lines));
|
|
502
|
+
// The path is relative to this directory: subfiles reads the chapter
|
|
503
|
+
// through its import path, and a chapter compiled on its own runs here
|
|
444
504
|
chapterLines.push(
|
|
445
505
|
"% The main file loads either the minted or the listings package",
|
|
446
506
|
"\\ifdefined\\inputminted",
|
|
@@ -457,8 +517,17 @@ export default class extends Generator {
|
|
|
457
517
|
chapterLines.push(line);
|
|
458
518
|
}
|
|
459
519
|
}
|
|
460
|
-
write(`${base}.tex`,
|
|
461
|
-
|
|
520
|
+
write(`${base}.tex`, [
|
|
521
|
+
`% Compiles on its own: latexmk "${name}" (in this directory, see README.md).`,
|
|
522
|
+
"% The subfiles package loads the preamble of the main file named here.",
|
|
523
|
+
...mains.map(
|
|
524
|
+
(main, i) => `${i ? "%" : ""}\\documentclass[../${main}]{subfiles}`,
|
|
525
|
+
),
|
|
526
|
+
"\\begin{document}",
|
|
527
|
+
...trim(chapterLines),
|
|
528
|
+
"\\end{document}",
|
|
529
|
+
]);
|
|
530
|
+
return [`\\subfileinclude{${base}}`];
|
|
462
531
|
});
|
|
463
532
|
|
|
464
533
|
return [...lines.slice(0, start), ...includes, ...lines.slice(end + 1)];
|
|
@@ -478,6 +547,11 @@ export default class extends Generator {
|
|
|
478
547
|
this.destinationPath(".editorconfig"),
|
|
479
548
|
this.props,
|
|
480
549
|
);
|
|
550
|
+
this.fs.copyTpl(
|
|
551
|
+
this.templatePath("dot.chktexrc"),
|
|
552
|
+
this.destinationPath(".chktexrc"),
|
|
553
|
+
this.props,
|
|
554
|
+
);
|
|
481
555
|
this.fs.copyTpl(
|
|
482
556
|
this.templatePath("bibliography.bib"),
|
|
483
557
|
this.destinationPath(this.props.filenames.bib + ".bib"),
|
|
@@ -584,6 +658,21 @@ export default class extends Generator {
|
|
|
584
658
|
);
|
|
585
659
|
}
|
|
586
660
|
|
|
661
|
+
// Side-by-side comparison of the publisher's class as distributed with this template (README, gh-pages)
|
|
662
|
+
if (this.props.githubpublish && this.props.isPaper) {
|
|
663
|
+
for (const [src, dest] of [
|
|
664
|
+
[`comparison-body.${this.props.documentclass}.tex`, "body.tex"],
|
|
665
|
+
[`comparison-plain.${this.props.documentclass}.tex`, "plain.tex"],
|
|
666
|
+
["comparison-build.sh", "build.sh"],
|
|
667
|
+
]) {
|
|
668
|
+
this.fs.copyTpl(
|
|
669
|
+
this.templatePath(src),
|
|
670
|
+
this.destinationPath(`comparison/${dest}`),
|
|
671
|
+
this.props,
|
|
672
|
+
);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
|
|
587
676
|
if (this.props.documentclass === "lncs") {
|
|
588
677
|
this.fs.copy(
|
|
589
678
|
this.templatePath("splncs04nat.bst"),
|
|
@@ -593,6 +682,7 @@ export default class extends Generator {
|
|
|
593
682
|
|
|
594
683
|
if (this.props.documentclass === "ieee") {
|
|
595
684
|
this.fs.copy(
|
|
685
|
+
// [impl->req~ieee-bst-banner~1]
|
|
596
686
|
this.templatePath("IEEEtranN-doi.bst"),
|
|
597
687
|
this.destinationPath("IEEEtranN-doi.bst"),
|
|
598
688
|
);
|
|
@@ -640,7 +730,8 @@ export default class extends Generator {
|
|
|
640
730
|
const contentIndex = lines.indexOf("\\begin{document}");
|
|
641
731
|
const headingIndex = lines.findIndex(
|
|
642
732
|
(line, index) =>
|
|
643
|
-
index > contentIndex &&
|
|
733
|
+
index > contentIndex &&
|
|
734
|
+
/^\\(chapter|section|subfileinclude)\{/.test(line),
|
|
644
735
|
);
|
|
645
736
|
const heading = lines[headingIndex].replace(/\\label\{.*$/, "");
|
|
646
737
|
this.fs.write(
|
|
@@ -670,6 +761,23 @@ export default class extends Generator {
|
|
|
670
761
|
);
|
|
671
762
|
}
|
|
672
763
|
|
|
764
|
+
// The declaration at the end of a University of Stuttgart thesis is a file of the template, so its
|
|
765
|
+
// text can be adapted (scientific-thesis-template#119)
|
|
766
|
+
if (
|
|
767
|
+
this.props.documentclass === "scientific-thesis" &&
|
|
768
|
+
this.props.thesisvariant === "ustutt"
|
|
769
|
+
) {
|
|
770
|
+
// English and German thesis share one repository on GitHub, so the file name carries the language
|
|
771
|
+
this.fs.copy(
|
|
772
|
+
this.templatePath("affirmation." + this.props.language + ".tex"),
|
|
773
|
+
this.destinationPath(
|
|
774
|
+
this.props.language === "en"
|
|
775
|
+
? "affirmation.tex"
|
|
776
|
+
: "affirmation-de.tex",
|
|
777
|
+
),
|
|
778
|
+
);
|
|
779
|
+
}
|
|
780
|
+
|
|
673
781
|
// mwe-main does not \input{commands}; keep the quick start minimal.
|
|
674
782
|
if (this.props.documentclass !== "mwe") {
|
|
675
783
|
this.fs.copyTpl(
|
|
@@ -23,7 +23,7 @@ jobs:
|
|
|
23
23
|
submodules: recursive
|
|
24
24
|
<% } -%>
|
|
25
25
|
- name: Install TeX Live
|
|
26
|
-
uses: zauguin/install-texlive@
|
|
26
|
+
uses: zauguin/install-texlive@c9f3ea3d51b2e04d092c4f9d208a19542d5dabcf # v4.5.0
|
|
27
27
|
with:
|
|
28
28
|
package_file: '${{ github.workspace }}/Texlivefile'
|
|
29
29
|
texlive_version: <%= texlive %>
|
|
@@ -94,6 +94,57 @@ jobs:
|
|
|
94
94
|
echo '```' >> $GITHUB_STEP_SUMMARY
|
|
95
95
|
texlogsieve <%= filenames.main %>.log | tee -a "$GITHUB_STEP_SUMMARY" || true
|
|
96
96
|
echo '```' >> $GITHUB_STEP_SUMMARY
|
|
97
|
+
<% } -%>
|
|
98
|
+
<% if (githubpublish) { const templateRepo = { acmart: "acm-enhanced", ieee: "ieee-enhanced", lncs: "lncs-enhanced", "scientific-thesis": "scientific-thesis-template", ustutt: "uni-stuttgart-dissertation-template", mwe: "markdown-latex-quickstart" }[documentclass]; -%>
|
|
99
|
+
- name: Install pdftoppm and ImageMagick
|
|
100
|
+
# A TeX Live update can change the output (line breaks, fonts, spacing) without an error.
|
|
101
|
+
# On the weekly run, the PDF published from main is the baseline; pages that differ are
|
|
102
|
+
# rendered side by side in the artifact "pdf-diff". A difference is a warning, not a failure.
|
|
103
|
+
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
|
104
|
+
uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
|
|
105
|
+
with:
|
|
106
|
+
packages: poppler-utils imagemagick
|
|
107
|
+
version: 1.0
|
|
108
|
+
execute_install_scripts: true # creates the "compare" alternative
|
|
109
|
+
<%# [impl->req~pdf-diff-weekly~1] -%>
|
|
110
|
+
- name: Compare with the published PDF
|
|
111
|
+
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
|
112
|
+
run: |
|
|
113
|
+
if ! curl -sSfL -o published.pdf https://latextemplates.github.io/<%= templateRepo %>/<%= filenames.main %>.pdf; then
|
|
114
|
+
echo "No published <%= filenames.main %>.pdf to compare with." >> "$GITHUB_STEP_SUMMARY"
|
|
115
|
+
exit 0
|
|
116
|
+
fi
|
|
117
|
+
pages() { pdfinfo "$1" | awk '/^Pages:/ { print $2 }'; }
|
|
118
|
+
published=$(pages published.pdf)
|
|
119
|
+
built=$(pages <%= filenames.main %>.pdf)
|
|
120
|
+
mkdir pdf-diff
|
|
121
|
+
changed=0
|
|
122
|
+
for i in $(seq 1 $(( published > built ? published : built ))); do
|
|
123
|
+
if [ "$i" -gt "$published" ] || [ "$i" -gt "$built" ]; then
|
|
124
|
+
changed=$((changed + 1))
|
|
125
|
+
continue
|
|
126
|
+
fi
|
|
127
|
+
pdftoppm -r 50 -f "$i" -l "$i" -png -singlefile published.pdf "pdf-diff/page-$i-published"
|
|
128
|
+
pdftoppm -r 50 -f "$i" -l "$i" -png -singlefile <%= filenames.main %>.pdf "pdf-diff/page-$i-built"
|
|
129
|
+
# "compare" exits with 1 when the pages differ and writes the differences in red
|
|
130
|
+
if compare -metric AE "pdf-diff/page-$i-published.png" "pdf-diff/page-$i-built.png" "pdf-diff/page-$i-diff.png" 2>/dev/null; then
|
|
131
|
+
rm "pdf-diff/page-$i-published.png" "pdf-diff/page-$i-built.png" "pdf-diff/page-$i-diff.png"
|
|
132
|
+
else
|
|
133
|
+
changed=$((changed + 1))
|
|
134
|
+
fi
|
|
135
|
+
done
|
|
136
|
+
if [ "$changed" -eq 0 ]; then
|
|
137
|
+
echo "<%= filenames.main %>.pdf is identical to the published one ($built pages)." >> "$GITHUB_STEP_SUMMARY"
|
|
138
|
+
rmdir pdf-diff
|
|
139
|
+
else
|
|
140
|
+
echo "::warning::<%= filenames.main %>.pdf differs from the published one on $changed page(s); see the artifact pdf-diff"
|
|
141
|
+
echo "<%= filenames.main %>.pdf **differs** from the published one on $changed page(s) (published: $published pages, built: $built pages); the artifact \`pdf-diff\` shows the pages and their differences in red." >> "$GITHUB_STEP_SUMMARY"
|
|
142
|
+
fi
|
|
143
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
144
|
+
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && hashFiles('pdf-diff/*.png') != ''
|
|
145
|
+
with:
|
|
146
|
+
name: pdf-diff
|
|
147
|
+
path: pdf-diff/
|
|
97
148
|
<% } -%>
|
|
98
149
|
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
99
150
|
with:
|
|
@@ -102,13 +153,92 @@ jobs:
|
|
|
102
153
|
<%= filenames.main %>.pdf
|
|
103
154
|
<%= filenames.main %>.log
|
|
104
155
|
<%= filenames.main %>.fls
|
|
156
|
+
<% if (githubpublish && isPaper) { -%>
|
|
157
|
+
<%# [impl->req~publisher-comparison~1] -%>
|
|
158
|
+
comparison:
|
|
159
|
+
# The publisher's class as distributed next to this template, same content (see comparison/build.sh and the README)
|
|
160
|
+
name: comparison (comparison/build.sh)
|
|
161
|
+
runs-on: ubuntu-latest
|
|
162
|
+
steps:
|
|
163
|
+
- name: Set up Git repository
|
|
164
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
165
|
+
- name: Install TeX Live
|
|
166
|
+
uses: zauguin/install-texlive@c9f3ea3d51b2e04d092c4f9d208a19542d5dabcf # v4.5.0
|
|
167
|
+
with:
|
|
168
|
+
package_file: '${{ github.workspace }}/Texlivefile'
|
|
169
|
+
texlive_version: <%= texlive %>
|
|
170
|
+
- name: Prepare latexmk
|
|
171
|
+
run: |
|
|
172
|
+
updmap -sys
|
|
173
|
+
texhash
|
|
174
|
+
tlmgr generate language --rebuild-sys
|
|
175
|
+
- name: Install pdftoppm and ImageMagick
|
|
176
|
+
uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
|
|
177
|
+
with:
|
|
178
|
+
packages: poppler-utils imagemagick
|
|
179
|
+
version: 1.0
|
|
180
|
+
execute_install_scripts: true # creates the "convert" alternative
|
|
181
|
+
- run: ./comparison/build.sh
|
|
182
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
183
|
+
with:
|
|
184
|
+
name: comparison
|
|
185
|
+
path: |
|
|
186
|
+
comparison-*.png
|
|
187
|
+
comparison-*.pdf
|
|
188
|
+
<% } -%>
|
|
189
|
+
<% if (isThesis) { -%>
|
|
190
|
+
<%# [impl->req~chapter-standalone~1] -%>
|
|
191
|
+
chapter:
|
|
192
|
+
# One chapter compiled on its own (package subfiles, see chapters-<%= language %>/README.md)
|
|
193
|
+
name: chapter (latexmk "<%= firstChapter %>")
|
|
194
|
+
runs-on: ubuntu-latest
|
|
195
|
+
steps:
|
|
196
|
+
- name: Set up Git repository
|
|
197
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
198
|
+
- name: Install TeX Live
|
|
199
|
+
uses: zauguin/install-texlive@c9f3ea3d51b2e04d092c4f9d208a19542d5dabcf # v4.5.0
|
|
200
|
+
with:
|
|
201
|
+
package_file: '${{ github.workspace }}/Texlivefile'
|
|
202
|
+
texlive_version: <%= texlive %>
|
|
203
|
+
- name: Prepare latexmk
|
|
204
|
+
run: |
|
|
205
|
+
updmap -sys
|
|
206
|
+
texhash
|
|
207
|
+
tlmgr generate language --rebuild-sys
|
|
208
|
+
- run: latexmk "<%= firstChapter %>"
|
|
209
|
+
working-directory: chapters-<%= language %>
|
|
210
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
211
|
+
with:
|
|
212
|
+
name: chapter
|
|
213
|
+
path: |
|
|
214
|
+
chapters-<%= language %>/<%= firstChapter.replace(/\s+/g, '') %>.pdf
|
|
215
|
+
chapters-<%= language %>/<%= firstChapter.replace(/\s+/g, '') %>.log
|
|
216
|
+
<% } -%>
|
|
217
|
+
<%# [impl->req~chktex-clean~1] -%>
|
|
218
|
+
chktex:
|
|
219
|
+
runs-on: ubuntu-latest
|
|
220
|
+
steps:
|
|
221
|
+
- name: Set up Git repository
|
|
222
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
223
|
+
- name: Install TeX Live
|
|
224
|
+
uses: zauguin/install-texlive@c9f3ea3d51b2e04d092c4f9d208a19542d5dabcf # v4.5.0
|
|
225
|
+
with:
|
|
226
|
+
package_file: '${{ github.workspace }}/Texlivefile'
|
|
227
|
+
texlive_version: <%= texlive %>
|
|
228
|
+
- name: Check the LaTeX sources with ChkTeX (configuration in .chktexrc)
|
|
229
|
+
run: |
|
|
230
|
+
find . -maxdepth 2 \( -name '<%= isPaper ? "paper" : ((documentclass == "ustutt") ? "thesis-example" : "main") %>*.tex' -o -path './chapters-*/*.tex' \) -exec chktex -q {} + | tee chktex.txt
|
|
231
|
+
if [ -s chktex.txt ]; then
|
|
232
|
+
{ echo "## ChkTeX"; echo; echo '```'; cat chktex.txt; echo '```'; } >> "$GITHUB_STEP_SUMMARY"
|
|
233
|
+
exit 1
|
|
234
|
+
fi
|
|
105
235
|
word-count:
|
|
106
236
|
runs-on: ubuntu-latest
|
|
107
237
|
steps:
|
|
108
238
|
- name: Set up Git repository
|
|
109
239
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
110
240
|
- name: Install TeX Live
|
|
111
|
-
uses: zauguin/install-texlive@
|
|
241
|
+
uses: zauguin/install-texlive@c9f3ea3d51b2e04d092c4f9d208a19542d5dabcf # v4.5.0
|
|
112
242
|
with:
|
|
113
243
|
package_file: '${{ github.workspace }}/Texlivefile'
|
|
114
244
|
texlive_version: <%= texlive %>
|
|
@@ -287,7 +417,7 @@ jobs:
|
|
|
287
417
|
version: 1.0
|
|
288
418
|
execute_install_scripts: true
|
|
289
419
|
- name: Install latexindent
|
|
290
|
-
uses: zauguin/install-texlive@
|
|
420
|
+
uses: zauguin/install-texlive@c9f3ea3d51b2e04d092c4f9d208a19542d5dabcf # v4.5.0
|
|
291
421
|
with:
|
|
292
422
|
packages: latexindent
|
|
293
423
|
texlive_version: <%= texlive %>
|
|
@@ -1136,7 +1136,7 @@ FUNCTION {start.entry}
|
|
|
1136
1136
|
% the other gurus on comp.text.tex for their help and advice on the topic of
|
|
1137
1137
|
% \selectlanguage, Babel and BibTeX.
|
|
1138
1138
|
FUNCTION {begin.bib}
|
|
1139
|
-
{ "% Generated by IEEEtranN-doi.bst, based on IEEEtranN.bst
|
|
1139
|
+
{ "% Generated by IEEEtranN-doi.bst, based on IEEEtranN.bst " bst.file.version * " (" * bst.file.date * ")" *
|
|
1140
1140
|
write$ newline$
|
|
1141
1141
|
preamble$ empty$ 'skip$
|
|
1142
1142
|
{ preamble$ write$ newline$ }
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
% \selectlanguage, Babel and BibTeX.
|
|
40
40
|
FUNCTION {begin.bib}
|
|
41
41
|
-{ "% Generated by IEEEtranN.bst, version: " bst.file.version * " (" * bst.file.date * ")" *
|
|
42
|
-
+{ "% Generated by IEEEtranN-doi.bst, based on IEEEtranN.bst
|
|
42
|
+
+{ "% Generated by IEEEtranN-doi.bst, based on IEEEtranN.bst " bst.file.version * " (" * bst.file.date * ")" *
|
|
43
43
|
write$ newline$
|
|
44
44
|
preamble$ empty$ 'skip$
|
|
45
45
|
{ preamble$ write$ newline$ }
|
|
@@ -154,6 +154,10 @@ spellcheck-textidote:
|
|
|
154
154
|
<% } -%>
|
|
155
155
|
|
|
156
156
|
<% } -%>
|
|
157
|
+
## Check the LaTeX sources for typographic and syntax issues with ChkTeX (configuration: .chktexrc)
|
|
158
|
+
chktex:
|
|
159
|
+
$(RUN) find . -maxdepth 2 \( -name '<%= isPaper ? "paper" : ((documentclass == "ustutt") ? "thesis-example" : "main") %>*.tex' -o -path './chapters-*/*.tex' \) -exec chktex -q {} +
|
|
160
|
+
|
|
157
161
|
## Merge the word lists of the spell checkers: a word added to .aspell.<language>.pws or (e.g., by
|
|
158
162
|
## "Add to dictionary" in VS Code) to .vscode/ltex.dictionary.<language>.txt ends up in both<% if (documentclass != "mwe") { %> and in .textidote.dict<% } %>.
|
|
159
163
|
## aspell word lists cannot contain hyphenated words; these words are added to the other lists.
|
|
@@ -163,14 +167,14 @@ dictionaries:
|
|
|
163
167
|
for pair in en:en-US de:de-DE; do \
|
|
164
168
|
lang=$${pair%%:*}; pws=".aspell.$$lang.pws"; ltex=".vscode/ltex.dictionary.$${pair#*:}.txt"; \
|
|
165
169
|
[ -e "$$pws" ] || continue; \
|
|
166
|
-
{ tail -n +2 "$$pws"; if [ -e "$$ltex" ]; then cat "$$ltex"; fi; printf '%s\n' $(HYPHENATED_WORDS); } | grep -v '^$$' | LC_ALL=C sort -u > "$$ltex.tmp"; \
|
|
170
|
+
{ tail -n +2 "$$pws"; if [ -e "$$ltex" ]; then cat "$$ltex"; fi; printf '%s\n' $(HYPHENATED_WORDS); } | grep -v '^$$' | LC_ALL=C sort -u | LC_ALL=C sort -f > "$$ltex.tmp"; \
|
|
167
171
|
mv "$$ltex.tmp" "$$ltex"; \
|
|
168
172
|
grep -v -e - "$$ltex" > "$$pws.tmp"; \
|
|
169
173
|
{ echo "personal_ws-1.1 $$lang $$(wc -l < "$$pws.tmp" | tr -d ' ') utf-8"; cat "$$pws.tmp"; } > "$$pws"; \
|
|
170
174
|
rm "$$pws.tmp"; \
|
|
171
175
|
done
|
|
172
176
|
<% if (documentclass != "mwe") { -%>
|
|
173
|
-
cat .vscode/ltex.dictionary.*.txt | LC_ALL=C sort -u > .textidote.dict
|
|
177
|
+
cat .vscode/ltex.dictionary.*.txt | LC_ALL=C sort -u | LC_ALL=C sort -f > .textidote.dict
|
|
174
178
|
<% } -%>
|
|
175
179
|
|
|
176
180
|
## Show only the relevant messages of the last LaTeX run
|