generator-latex-template 2026.11.1 → 2026.11.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/generators/app/CLAUDE.md +15 -0
  2. package/generators/app/index.js +65 -2
  3. package/generators/app/templates/.github/workflows/check.yml +119 -0
  4. package/generators/app/templates/IEEEtranN-doi.bst +18 -3
  5. package/generators/app/templates/IEEEtranN-doi.bst.patch +52 -25
  6. package/generators/app/templates/Makefile +6 -2
  7. package/generators/app/templates/README.en.md +180 -6
  8. package/generators/app/templates/Texlivefile +13 -0
  9. package/generators/app/templates/abbreviations.example.de.tex +4 -2
  10. package/generators/app/templates/abbreviations.example.en.tex +8 -5
  11. package/generators/app/templates/affirmation.de.tex +26 -0
  12. package/generators/app/templates/affirmation.en.tex +27 -0
  13. package/generators/app/templates/babel.preamble.de.tex +2 -1
  14. package/generators/app/templates/babel.preamble.en.tex +2 -1
  15. package/generators/app/templates/biblatex.preamble.en.tex +1 -1
  16. package/generators/app/templates/bibliography.bib +20 -0
  17. package/generators/app/templates/chickenize.preamble.en.tex +8 -0
  18. package/generators/app/templates/comparison-abstract.en.tex +3 -0
  19. package/generators/app/templates/comparison-body.acmart.tex +27 -0
  20. package/generators/app/templates/comparison-body.ieee.tex +23 -0
  21. package/generators/app/templates/comparison-body.lncs.tex +19 -0
  22. package/generators/app/templates/comparison-build.sh +41 -0
  23. package/generators/app/templates/comparison-plain.acmart.tex +9 -0
  24. package/generators/app/templates/comparison-plain.ieee.tex +12 -0
  25. package/generators/app/templates/comparison-plain.lncs.tex +11 -0
  26. package/generators/app/templates/comparison-text.en.tex +66 -0
  27. package/generators/app/templates/csquotes.example.en.tex +1 -1
  28. package/generators/app/templates/csquotes.preamble.en.tex +2 -2
  29. package/generators/app/templates/diagbox.example.en.tex +8 -9
  30. package/generators/app/templates/dot.aspell.de.pws +80 -59
  31. package/generators/app/templates/dot.aspell.en.pws +71 -56
  32. package/generators/app/templates/dot.chktexrc +27 -0
  33. package/generators/app/templates/dot.gitignore +6 -0
  34. package/generators/app/templates/floats.example.de.tex +1 -1
  35. package/generators/app/templates/floats.example.en.tex +1 -1
  36. package/generators/app/templates/font.preamble.en.tex +31 -9
  37. package/generators/app/templates/gitver.preamble.en.tex +1 -1
  38. package/generators/app/templates/hyperref.preamble.en.tex +2 -0
  39. package/generators/app/templates/hyphenation.example.en.tex +1 -1
  40. package/generators/app/templates/ieee-nfss-fonts.preamble.en.tex +21 -0
  41. package/generators/app/templates/latexmkrc +8 -0
  42. package/generators/app/templates/listings.example.en.tex +8 -1
  43. package/generators/app/templates/listings.preamble.de.tex +18 -10
  44. package/generators/app/templates/listings.preamble.en.tex +18 -11
  45. package/generators/app/templates/longtable.example.en.tex +10 -7
  46. package/generators/app/templates/main.de.tex +94 -37
  47. package/generators/app/templates/main.en.tex +112 -46
  48. package/generators/app/templates/minted.example.en.tex +8 -1
  49. package/generators/app/templates/minted.preamble.en.tex +4 -1
  50. package/generators/app/templates/mwe-main.de.tex +2 -0
  51. package/generators/app/templates/mwe-main.en.tex +2 -0
  52. package/generators/app/templates/powerset.preamble.en.tex +5 -5
  53. package/generators/app/templates/subfig.example.en.tex +1 -1
  54. package/generators/app/templates/tables.example.en.tex +23 -0
  55. package/generators/app/templates/tables.preamble.en.tex +9 -0
  56. package/generators/app/templates/template-version.preamble.en.tex +4 -0
  57. package/generators/app/templates/thesis-additions.en.tex +4 -4
  58. package/generators/app/templates/thesis-additions.examples.en.tex +2 -2
  59. package/generators/app/templates/todos.preamble.en.tex +1 -1
  60. package/generators/app/templates/uml.example.en.tex +1 -1
  61. package/package.json +2 -2
@@ -120,3 +120,18 @@ formats) catch things a single local `yo` + compile does not. Two that have bitt
120
120
  `\gls` entries language-exclusive breaks the other language's variant with
121
121
  ``Glossary entry `…' has not been defined``. The same single-shared-file logic applies to
122
122
  other `this.fs.copy`'d siblings (`commands.tex`, …).
123
+
124
+ ## `IEEEtranN-doi.bst` is a versioned modification of IEEEtranN.bst
125
+
126
+ `generators/app/templates/IEEEtranN-doi.bst` is TeX Live's `IEEEtranN.bst` (1.14, 2015/08/26) plus
127
+ `IEEEtranN-doi.bst.patch`; the patch is the record, the `.bst` is what the templates ship. The file
128
+ carries its **own** version (`doi.bst.version`/`doi.bst.date` next to Michael Shell's unchanged
129
+ `bst.file.version`), which the BibTeX terminal banner and the first `.bbl` line print, so a `.bbl`
130
+ never claims to come from an unmodified IEEEtranN.bst. When you change the `.bst`:
131
+
132
+ 1. Bump `doi.bst.version` and `doi.bst.date`, and add the change to the version list in the file header.
133
+ 2. Regenerate the patch from TeX Live's original (labels must stay `IEEEtranN.bst`/`IEEEtranN-doi.bst`):
134
+ `cp "$(kpsewhich IEEEtranN.bst)" /tmp && diff -u --label IEEEtranN.bst --label IEEEtranN-doi.bst /tmp/IEEEtranN.bst generators/app/templates/IEEEtranN-doi.bst > generators/app/templates/IEEEtranN-doi.bst.patch`
135
+ (in the TeX Live docker image when the host has no TeX Live).
136
+ 3. Keep every `write$` line of `begin.bib` under 79 characters, or BibTeX wraps it and the rest of
137
+ the banner is typeset before the first reference (`req~ieee-bst-banner~1`).
@@ -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
@@ -191,6 +197,18 @@ export default class extends Generator {
191
197
  // stamp in the header of the ustutt thesis). minted 3 (TeX Live 2025 and later)
192
198
  // runs latexminted, which TeX Live permits in restricted shell escape; minted 2
193
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
+
194
212
  this.props.requiresShellEscape =
195
213
  (this.props.listings == "minted" && this.props.texlive < 2025) ||
196
214
  this.props.uml == "plantuml" ||
@@ -529,6 +547,11 @@ export default class extends Generator {
529
547
  this.destinationPath(".editorconfig"),
530
548
  this.props,
531
549
  );
550
+ this.fs.copyTpl(
551
+ this.templatePath("dot.chktexrc"),
552
+ this.destinationPath(".chktexrc"),
553
+ this.props,
554
+ );
532
555
  this.fs.copyTpl(
533
556
  this.templatePath("bibliography.bib"),
534
557
  this.destinationPath(this.props.filenames.bib + ".bib"),
@@ -582,9 +605,16 @@ export default class extends Generator {
582
605
 
583
606
  // The word lists of aspell (.aspell.<lang>.pws), LTeX+ (.vscode/ltex.dictionary.<language>.txt), and
584
607
  // TeXtidote (.textidote.dict) contain the same words. "make dictionaries" merges them in the generated
585
- // repository the same way (sorted like "LC_ALL=C sort -u"), so its first run changes nothing.
608
+ // repository the same way (sorted like "LC_ALL=C sort -u | LC_ALL=C sort -f": ASCII case folded, ties in
609
+ // byte order), so its first run changes nothing. A different order makes the "Update files" bot and the
610
+ // "Dictionaries" workflow rewrite the files in turns.
586
611
  // LTeX+ (VS Code extension, see .vscode/extensions.json) reads its file automatically; "Add to dictionary" writes there.
587
- const sortedUnique = (words) => [...new Set(words)].sort();
612
+ const fold = (word) => word.replace(/[a-z]/g, (c) => c.toUpperCase());
613
+ const byteOrder = (a, b) => (a < b ? -1 : a > b ? 1 : 0);
614
+ const sortedUnique = (words) =>
615
+ [...new Set(words)].sort(
616
+ (a, b) => byteOrder(fold(a), fold(b)) || byteOrder(a, b),
617
+ );
588
618
  const aspellWords = (lang) =>
589
619
  this.fs
590
620
  .read(this.templatePath(`dot.aspell.${lang}.pws`))
@@ -635,6 +665,21 @@ export default class extends Generator {
635
665
  );
636
666
  }
637
667
 
668
+ // Side-by-side comparison of the publisher's class as distributed with this template (README, gh-pages)
669
+ if (this.props.githubpublish && this.props.isPaper) {
670
+ for (const [src, dest] of [
671
+ [`comparison-body.${this.props.documentclass}.tex`, "body.tex"],
672
+ [`comparison-plain.${this.props.documentclass}.tex`, "plain.tex"],
673
+ ["comparison-build.sh", "build.sh"],
674
+ ]) {
675
+ this.fs.copyTpl(
676
+ this.templatePath(src),
677
+ this.destinationPath(`comparison/${dest}`),
678
+ this.props,
679
+ );
680
+ }
681
+ }
682
+
638
683
  if (this.props.documentclass === "lncs") {
639
684
  this.fs.copy(
640
685
  this.templatePath("splncs04nat.bst"),
@@ -644,6 +689,7 @@ export default class extends Generator {
644
689
 
645
690
  if (this.props.documentclass === "ieee") {
646
691
  this.fs.copy(
692
+ // [impl->req~ieee-bst-banner~1]
647
693
  this.templatePath("IEEEtranN-doi.bst"),
648
694
  this.destinationPath("IEEEtranN-doi.bst"),
649
695
  );
@@ -722,6 +768,23 @@ export default class extends Generator {
722
768
  );
723
769
  }
724
770
 
771
+ // The declaration at the end of a University of Stuttgart thesis is a file of the template, so its
772
+ // text can be adapted (scientific-thesis-template#119)
773
+ if (
774
+ this.props.documentclass === "scientific-thesis" &&
775
+ this.props.thesisvariant === "ustutt"
776
+ ) {
777
+ // English and German thesis share one repository on GitHub, so the file name carries the language
778
+ this.fs.copy(
779
+ this.templatePath("affirmation." + this.props.language + ".tex"),
780
+ this.destinationPath(
781
+ this.props.language === "en"
782
+ ? "affirmation.tex"
783
+ : "affirmation-de.tex",
784
+ ),
785
+ );
786
+ }
787
+
725
788
  // mwe-main does not \input{commands}; keep the quick start minimal.
726
789
  if (this.props.documentclass !== "mwe") {
727
790
  this.fs.copyTpl(
@@ -94,6 +94,73 @@ 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
+ <% if (examples) { -%>
98
+ - name: Install pdftotext
99
+ uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
100
+ with:
101
+ packages: poppler-utils
102
+ version: 1.0
103
+ <%# [impl->req~ligatures-copyable~1] -%>
104
+ - name: Check that words with ligatures can be copied from the PDF
105
+ # The example "Other features" typesets "workflow" and "dwarflike". A wrong font setup
106
+ # gives "work?ow" or the ligature characters U+FB00 to U+FB06 when the text is copied.
107
+ run: |
108
+ pdftotext <%= filenames.main %>.pdf <%= filenames.main %>.txt
109
+ grep -q workflow <%= filenames.main %>.txt
110
+ grep -q dwarflike <%= filenames.main %>.txt
111
+ ! LC_ALL=C grep -qP '\xef\xac[\x80-\x86]' <%= filenames.main %>.txt
112
+ <% } -%>
113
+ <% } -%>
114
+ <% 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]; -%>
115
+ - name: Install pdftoppm and ImageMagick
116
+ # A TeX Live update can change the output (line breaks, fonts, spacing) without an error.
117
+ # On the weekly run, the PDF published from main is the baseline; pages that differ are
118
+ # rendered side by side in the artifact "pdf-diff". A difference is a warning, not a failure.
119
+ if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
120
+ uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
121
+ with:
122
+ packages: poppler-utils imagemagick
123
+ version: 1.0
124
+ execute_install_scripts: true # creates the "compare" alternative
125
+ <%# [impl->req~pdf-diff-weekly~1] -%>
126
+ - name: Compare with the published PDF
127
+ if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
128
+ run: |
129
+ if ! curl -sSfL -o published.pdf https://latextemplates.github.io/<%= templateRepo %>/<%= filenames.main %>.pdf; then
130
+ echo "No published <%= filenames.main %>.pdf to compare with." >> "$GITHUB_STEP_SUMMARY"
131
+ exit 0
132
+ fi
133
+ pages() { pdfinfo "$1" | awk '/^Pages:/ { print $2 }'; }
134
+ published=$(pages published.pdf)
135
+ built=$(pages <%= filenames.main %>.pdf)
136
+ mkdir pdf-diff
137
+ changed=0
138
+ for i in $(seq 1 $(( published > built ? published : built ))); do
139
+ if [ "$i" -gt "$published" ] || [ "$i" -gt "$built" ]; then
140
+ changed=$((changed + 1))
141
+ continue
142
+ fi
143
+ pdftoppm -r 50 -f "$i" -l "$i" -png -singlefile published.pdf "pdf-diff/page-$i-published"
144
+ pdftoppm -r 50 -f "$i" -l "$i" -png -singlefile <%= filenames.main %>.pdf "pdf-diff/page-$i-built"
145
+ # "compare" exits with 1 when the pages differ and writes the differences in red
146
+ 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
147
+ rm "pdf-diff/page-$i-published.png" "pdf-diff/page-$i-built.png" "pdf-diff/page-$i-diff.png"
148
+ else
149
+ changed=$((changed + 1))
150
+ fi
151
+ done
152
+ if [ "$changed" -eq 0 ]; then
153
+ echo "<%= filenames.main %>.pdf is identical to the published one ($built pages)." >> "$GITHUB_STEP_SUMMARY"
154
+ rmdir pdf-diff
155
+ else
156
+ echo "::warning::<%= filenames.main %>.pdf differs from the published one on $changed page(s); see the artifact pdf-diff"
157
+ 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"
158
+ fi
159
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
160
+ if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && hashFiles('pdf-diff/*.png') != ''
161
+ with:
162
+ name: pdf-diff
163
+ path: pdf-diff/
97
164
  <% } -%>
98
165
  - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
99
166
  with:
@@ -102,7 +169,41 @@ jobs:
102
169
  <%= filenames.main %>.pdf
103
170
  <%= filenames.main %>.log
104
171
  <%= filenames.main %>.fls
172
+ <% if (githubpublish && isPaper) { -%>
173
+ <%# [impl->req~publisher-comparison~1] -%>
174
+ comparison:
175
+ # The publisher's class as distributed next to this template, same content (see comparison/build.sh and the README)
176
+ name: comparison (comparison/build.sh)
177
+ runs-on: ubuntu-latest
178
+ steps:
179
+ - name: Set up Git repository
180
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
181
+ - name: Install TeX Live
182
+ uses: zauguin/install-texlive@c9f3ea3d51b2e04d092c4f9d208a19542d5dabcf # v4.5.0
183
+ with:
184
+ package_file: '${{ github.workspace }}/Texlivefile'
185
+ texlive_version: <%= texlive %>
186
+ - name: Prepare latexmk
187
+ run: |
188
+ updmap -sys
189
+ texhash
190
+ tlmgr generate language --rebuild-sys
191
+ - name: Install pdftoppm and ImageMagick
192
+ uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
193
+ with:
194
+ packages: poppler-utils imagemagick
195
+ version: 1.0
196
+ execute_install_scripts: true # creates the "convert" alternative
197
+ - run: ./comparison/build.sh
198
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
199
+ with:
200
+ name: comparison
201
+ path: |
202
+ comparison-*.png
203
+ comparison-*.pdf
204
+ <% } -%>
105
205
  <% if (isThesis) { -%>
206
+ <%# [impl->req~chapter-standalone~1] -%>
106
207
  chapter:
107
208
  # One chapter compiled on its own (package subfiles, see chapters-<%= language %>/README.md)
108
209
  name: chapter (latexmk "<%= firstChapter %>")
@@ -129,6 +230,24 @@ jobs:
129
230
  chapters-<%= language %>/<%= firstChapter.replace(/\s+/g, '') %>.pdf
130
231
  chapters-<%= language %>/<%= firstChapter.replace(/\s+/g, '') %>.log
131
232
  <% } -%>
233
+ <%# [impl->req~chktex-clean~1] -%>
234
+ chktex:
235
+ runs-on: ubuntu-latest
236
+ steps:
237
+ - name: Set up Git repository
238
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
239
+ - name: Install TeX Live
240
+ uses: zauguin/install-texlive@c9f3ea3d51b2e04d092c4f9d208a19542d5dabcf # v4.5.0
241
+ with:
242
+ package_file: '${{ github.workspace }}/Texlivefile'
243
+ texlive_version: <%= texlive %>
244
+ - name: Check the LaTeX sources with ChkTeX (configuration in .chktexrc)
245
+ run: |
246
+ find . -maxdepth 2 \( -name '<%= isPaper ? "paper" : ((documentclass == "ustutt") ? "thesis-example" : "main") %>*.tex' -o -path './chapters-*/*.tex' \) -exec chktex -q {} + | tee chktex.txt
247
+ if [ -s chktex.txt ]; then
248
+ { echo "## ChkTeX"; echo; echo '```'; cat chktex.txt; echo '```'; } >> "$GITHUB_STEP_SUMMARY"
249
+ exit 1
250
+ fi
132
251
  word-count:
133
252
  runs-on: ubuntu-latest
134
253
  steps:
@@ -1,5 +1,5 @@
1
1
  %%
2
- %% IEEEtranN-doi.bst
2
+ %% IEEEtranN-doi.bst, version 3 (2026/11/03)
3
3
  %% IEEEtranN.bst (version 1.14) modified to output the DOI as
4
4
  %% ", doi: 10.xxx" before the URL (also after a note) and to repeat the names
5
5
  %% of the previous entry instead of a dash, as the IEEE Reference Guide
@@ -7,6 +7,11 @@
7
7
  %% https://github.com/latextemplates/generator-latex-template;
8
8
  %% report problems there, not to the original author.
9
9
  %%
10
+ %% Versions of the modification (the IEEEtranN.bst version stays 1.14):
11
+ %% 3 (2026/11/03): banners name this file and its version, not only IEEEtranN.bst
12
+ %% 2 (2026/11/03): repeated names written out instead of a dash
13
+ %% 1 (2026/10/19): DOI output
14
+ %%
10
15
  %% Original header of IEEEtranN.bst:
11
16
  %%
12
17
  %% BibTeX Bibliography Style file
@@ -172,10 +177,18 @@ FUNCTION {is.print.banners.to.terminal} { #1 }
172
177
  FUNCTION{bst.file.version} { "1.14" }
173
178
  FUNCTION{bst.file.date} { "2015/08/26" }
174
179
  FUNCTION{bst.file.website} { "http://www.michaelshell.org/tex/ieeetran/bibtex/" }
180
+ FUNCTION{doi.bst.version} { "3" }
181
+ FUNCTION{doi.bst.date} { "2026/11/03" }
182
+ FUNCTION{doi.bst.website} { "https://github.com/latextemplates/generator-latex-template" }
175
183
 
176
184
  FUNCTION {banner.message}
177
185
  { is.print.banners.to.terminal
178
- { "-- IEEEtranN.bst version" " " * bst.file.version *
186
+ { "-- IEEEtranN-doi.bst version" " " * doi.bst.version *
187
+ " (" * doi.bst.date * ") " * "by the latextemplates project," *
188
+ top$
189
+ "-- " doi.bst.website *
190
+ top$
191
+ "-- based on IEEEtranN.bst version" " " * bst.file.version *
179
192
  " (" * bst.file.date * ") " * "by Michael Shell." *
180
193
  top$
181
194
  "-- " bst.file.website *
@@ -1136,7 +1149,9 @@ FUNCTION {start.entry}
1136
1149
  % the other gurus on comp.text.tex for their help and advice on the topic of
1137
1150
  % \selectlanguage, Babel and BibTeX.
1138
1151
  FUNCTION {begin.bib}
1139
- { "% Generated by IEEEtranN-doi.bst, based on IEEEtranN.bst version: " bst.file.version * " (" * bst.file.date * ")" *
1152
+ { "% Generated by IEEEtranN-doi.bst, version: " doi.bst.version * " (" * doi.bst.date * ")" *
1153
+ write$ newline$
1154
+ "% based on IEEEtranN.bst, version: " bst.file.version * " (" * bst.file.date * ")" *
1140
1155
  write$ newline$
1141
1156
  preamble$ empty$ 'skip$
1142
1157
  { preamble$ write$ newline$ }
@@ -1,9 +1,9 @@
1
1
  --- IEEEtranN.bst
2
2
  +++ IEEEtranN-doi.bst
3
- @@ -1,5 +1,14 @@
3
+ @@ -1,5 +1,19 @@
4
4
  %%
5
5
  -%% IEEEtranN.bst
6
- +%% IEEEtranN-doi.bst
6
+ +%% IEEEtranN-doi.bst, version 3 (2026/11/03)
7
7
  +%% IEEEtranN.bst (version 1.14) modified to output the DOI as
8
8
  +%% ", doi: 10.xxx" before the URL (also after a note) and to repeat the names
9
9
  +%% of the previous entry instead of a dash, as the IEEE Reference Guide
@@ -11,12 +11,17 @@
11
11
  +%% https://github.com/latextemplates/generator-latex-template;
12
12
  +%% report problems there, not to the original author.
13
13
  +%%
14
+ +%% Versions of the modification (the IEEEtranN.bst version stays 1.14):
15
+ +%% 3 (2026/11/03): banners name this file and its version, not only IEEEtranN.bst
16
+ +%% 2 (2026/11/03): repeated names written out instead of a dash
17
+ +%% 1 (2026/10/19): DOI output
18
+ +%%
14
19
  +%% Original header of IEEEtranN.bst:
15
20
  +%%
16
21
  %% BibTeX Bibliography Style file
17
22
  %% Natbib version of IEEEtran.bst
18
23
  %% *** Not for normal IEEE work ***
19
- @@ -130,7 +139,8 @@
24
+ @@ -130,7 +144,8 @@
20
25
  % #0 turns off the "dashification" of repeated (i.e., identical to those
21
26
  % of the previous entry) names. The IEEE normally does this.
22
27
  % #1 enables
@@ -26,7 +31,27 @@
26
31
 
27
32
 
28
33
  % The default name format control string.
29
- @@ -296,6 +306,7 @@
34
+ @@ -162,10 +177,18 @@
35
+ FUNCTION{bst.file.version} { "1.14" }
36
+ FUNCTION{bst.file.date} { "2015/08/26" }
37
+ FUNCTION{bst.file.website} { "http://www.michaelshell.org/tex/ieeetran/bibtex/" }
38
+ +FUNCTION{doi.bst.version} { "3" }
39
+ +FUNCTION{doi.bst.date} { "2026/11/03" }
40
+ +FUNCTION{doi.bst.website} { "https://github.com/latextemplates/generator-latex-template" }
41
+
42
+ FUNCTION {banner.message}
43
+ { is.print.banners.to.terminal
44
+ - { "-- IEEEtranN.bst version" " " * bst.file.version *
45
+ + { "-- IEEEtranN-doi.bst version" " " * doi.bst.version *
46
+ + " (" * doi.bst.date * ") " * "by the latextemplates project," *
47
+ + top$
48
+ + "-- " doi.bst.website *
49
+ + top$
50
+ + "-- based on IEEEtranN.bst version" " " * bst.file.version *
51
+ " (" * bst.file.date * ") " * "by Michael Shell." *
52
+ top$
53
+ "-- " bst.file.website *
54
+ @@ -296,6 +319,7 @@
30
55
  volume
31
56
  year
32
57
  yearfiled
@@ -34,16 +59,18 @@
34
59
  CTLuse_article_number
35
60
  CTLuse_paper
36
61
  CTLuse_url
37
- @@ -1125,7 +1136,7 @@
62
+ @@ -1125,7 +1149,9 @@
38
63
  % the other gurus on comp.text.tex for their help and advice on the topic of
39
64
  % \selectlanguage, Babel and BibTeX.
40
65
  FUNCTION {begin.bib}
41
66
  -{ "% Generated by IEEEtranN.bst, version: " bst.file.version * " (" * bst.file.date * ")" *
42
- +{ "% Generated by IEEEtranN-doi.bst, based on IEEEtranN.bst version: " bst.file.version * " (" * bst.file.date * ")" *
67
+ +{ "% Generated by IEEEtranN-doi.bst, version: " doi.bst.version * " (" * doi.bst.date * ")" *
68
+ + write$ newline$
69
+ + "% based on IEEEtranN.bst, version: " bst.file.version * " (" * bst.file.date * ")" *
43
70
  write$ newline$
44
71
  preamble$ empty$ 'skip$
45
72
  { preamble$ write$ newline$ }
46
- @@ -1140,6 +1151,8 @@
73
+ @@ -1140,6 +1166,8 @@
47
74
  write$ newline$
48
75
  "\providecommand{\newblock}{\relax}"
49
76
  write$ newline$
@@ -52,7 +79,7 @@
52
79
  "\providecommand{\bibinfo}[2]{#2}"
53
80
  write$ newline$
54
81
  "\providecommand{\BIBentrySTDinterwordspacing}{\spaceskip=0pt\relax}"
55
- @@ -1965,6 +1978,21 @@
82
+ @@ -1965,6 +1993,21 @@
56
83
 
57
84
 
58
85
 
@@ -74,7 +101,7 @@
74
101
  %% URL
75
102
 
76
103
  FUNCTION {format.url}
77
- @@ -2012,6 +2040,7 @@
104
+ @@ -2012,6 +2055,7 @@
78
105
  format.pages output
79
106
  format.date "year" output.warn
80
107
  format.note output
@@ -82,7 +109,7 @@
82
109
  format.url output
83
110
  fin.entry
84
111
  if.url.std.interword.spacing
85
- @@ -2036,6 +2065,7 @@
112
+ @@ -2036,6 +2080,7 @@
86
113
  format.volume output
87
114
  format.number output
88
115
  format.note output
@@ -90,7 +117,7 @@
90
117
  format.url output
91
118
  fin.entry
92
119
  if.url.std.interword.spacing
93
- @@ -2053,6 +2083,7 @@
120
+ @@ -2053,6 +2098,7 @@
94
121
  format.address "address" bibinfo.check output
95
122
  format.date output
96
123
  format.note output
@@ -98,7 +125,7 @@
98
125
  format.url output
99
126
  fin.entry
100
127
  if.url.std.interword.spacing
101
- @@ -2070,6 +2101,7 @@
128
+ @@ -2070,6 +2116,7 @@
102
129
  format.organization "organization" bibinfo.check output
103
130
  format.address "address" bibinfo.check output
104
131
  format.note output
@@ -106,7 +133,7 @@
106
133
  format.url output
107
134
  fin.entry
108
135
  empty.entry.warn
109
- @@ -2093,6 +2125,7 @@
136
+ @@ -2093,6 +2140,7 @@
110
137
  format.chapter output
111
138
  format.pages output
112
139
  format.note output
@@ -114,7 +141,7 @@
114
141
  format.url output
115
142
  fin.entry
116
143
  if.url.std.interword.spacing
117
- @@ -2114,6 +2147,7 @@
144
+ @@ -2114,6 +2162,7 @@
118
145
  format.chapter output
119
146
  format.pages output
120
147
  format.note output
@@ -122,7 +149,7 @@
122
149
  format.url output
123
150
  fin.entry
124
151
  if.url.std.interword.spacing
125
- @@ -2140,6 +2174,7 @@
152
+ @@ -2140,6 +2189,7 @@
126
153
  format.paper output
127
154
  format.pages output
128
155
  format.note output
@@ -130,7 +157,7 @@
130
157
  format.url output
131
158
  fin.entry
132
159
  if.url.std.interword.spacing
133
- @@ -2157,6 +2192,7 @@
160
+ @@ -2157,6 +2207,7 @@
134
161
  format.address "address" bibinfo.check output
135
162
  format.date output
136
163
  format.note output
@@ -138,7 +165,7 @@
138
165
  format.url output
139
166
  fin.entry
140
167
  if.url.std.interword.spacing
141
- @@ -2174,6 +2210,7 @@
168
+ @@ -2174,6 +2225,7 @@
142
169
  format.address "address" bibinfo.check output
143
170
  format.date "year" output.warn
144
171
  format.note output
@@ -146,7 +173,7 @@
146
173
  format.url output
147
174
  fin.entry
148
175
  if.url.std.interword.spacing
149
- @@ -2192,6 +2229,7 @@
176
+ @@ -2192,6 +2244,7 @@
150
177
  format.pages output
151
178
  format.date output
152
179
  format.note output
@@ -154,7 +181,7 @@
154
181
  format.url output
155
182
  fin.entry
156
183
  empty.entry.warn
157
- @@ -2208,6 +2246,7 @@
184
+ @@ -2208,6 +2261,7 @@
158
185
  format.patent.nationality.type.number output
159
186
  format.patent.date output
160
187
  format.note output
@@ -162,7 +189,7 @@
162
189
  format.url output
163
190
  fin.entry
164
191
  empty.entry.warn
165
- @@ -2227,6 +2266,7 @@
192
+ @@ -2227,6 +2281,7 @@
166
193
  format.organization "organization" bibinfo.check output
167
194
  format.date "year" output.warn
168
195
  format.note output
@@ -170,7 +197,7 @@
170
197
  format.url output
171
198
  fin.entry
172
199
  if.url.std.interword.spacing
173
- @@ -2244,6 +2284,7 @@
200
+ @@ -2244,6 +2299,7 @@
174
201
  format.address "address" bibinfo.check output
175
202
  format.date "year" output.warn
176
203
  format.note output
@@ -178,7 +205,7 @@
178
205
  format.url output
179
206
  fin.entry
180
207
  if.url.std.interword.spacing
181
- @@ -2266,6 +2307,7 @@
208
+ @@ -2266,6 +2322,7 @@
182
209
  }
183
210
  if$
184
211
  format.note output
@@ -186,7 +213,7 @@
186
213
  format.url output
187
214
  fin.entry
188
215
  if.url.std.interword.spacing
189
- @@ -2283,6 +2325,7 @@
216
+ @@ -2283,6 +2340,7 @@
190
217
  format.revision output
191
218
  format.date output
192
219
  format.note output
@@ -194,7 +221,7 @@
194
221
  format.url output
195
222
  fin.entry
196
223
  if.url.std.interword.spacing
197
- @@ -2301,6 +2344,7 @@
224
+ @@ -2301,6 +2359,7 @@
198
225
  format.tech.report.number output.nonnull
199
226
  format.date "year" output.warn
200
227
  format.note output
@@ -202,7 +229,7 @@
202
229
  format.url output
203
230
  fin.entry
204
231
  if.url.std.interword.spacing
205
- @@ -2315,6 +2359,7 @@
232
+ @@ -2315,6 +2374,7 @@
206
233
  format.article.title "title" output.warn
207
234
  format.date output
208
235
  format.note "note" output.warn
@@ -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