generator-latex-template 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/README.md +19 -17
  2. package/generators/app/index.js +222 -568
  3. package/generators/app/options.js +375 -0
  4. package/generators/app/templates/Dockerfile.dante +3 -1
  5. package/generators/app/templates/Dockerfile.iot +14 -0
  6. package/generators/app/templates/Dockerfile.reitzig +12 -11
  7. package/generators/app/templates/README.en.md +4 -10
  8. package/generators/app/templates/Texlivefile +28 -3
  9. package/generators/app/templates/babel.preamble.de.tex +3 -1
  10. package/generators/app/templates/babel.preamble.en.tex +1 -1
  11. package/generators/app/templates/csquotes.example.de.tex +1 -1
  12. package/generators/app/templates/csquotes.example.en.tex +1 -1
  13. package/generators/app/templates/csquotes.preamble.en.tex +1 -1
  14. package/generators/app/templates/figure.example.de.tex +18 -0
  15. package/generators/app/templates/hyphenation.example.en.tex +1 -1
  16. package/generators/app/templates/latexmkrc +1 -3
  17. package/generators/app/templates/main.de.tex +581 -139
  18. package/generators/app/templates/main.en.tex +11 -17
  19. package/generators/app/templates/microtype.preamble.de.tex +5 -0
  20. package/generators/app/templates/natbib.preamble.en.tex +1 -1
  21. package/generators/app/templates/siunitx.example.en.tex +1 -1
  22. package/generators/app/templates/siunitx.preamble.de.tex +2 -0
  23. package/generators/app/templates/siunitx.preamble.en.tex +0 -1
  24. package/generators/app/templates/subfig.preamble.en.tex +1 -1
  25. package/generators/app/templates/url.preamble.de.tex +2 -0
  26. package/package.json +15 -16
  27. package/generators/app/templates/refcheck.example.en.tex +0 -36
  28. package/generators/app/templates/refcheck.preamble.en.tex +0 -4
@@ -41,29 +41,21 @@
41
41
  \documentclass[runningheads,<%= papersize %>paper,english]{llncs}[2022/01/12]
42
42
  <% break; case "acmart": -%>
43
43
 
44
- <% if (texlive >= 2021) { -%>
45
- % We balance the last page using the package "pbalance" (see https://ctan.org/pkg/pbalance), because it "just works" (in contrast to balance.sty or other solutions)
46
- <% } -%>
47
- \documentclass[<%= acm_format %>,<% if (acm_review) { %>review,<% } %><%= papersize %>paper,<% if (texlive >= 2021) { %>pbalance<% } else { %>balance<% } %>]{acmart}
44
+ % Alternative to balance is the pbalance package (see https://ctan.org/pkg/pbalance), which sometimes works better
45
+ \documentclass[<%= acmformat %>,<% if (acmreview) { %>review,<% } %><%= papersize %>paper,balance]{acmart}
48
46
  <% break; case "ieee": -%>
49
47
 
50
48
  % DO NOT DOWNLOAD IEEEtran.cls - Use the one of your LaTeX distribution
51
49
  % For the final version, replace "draftcls" by "final"
52
- \documentclass[<%= ieee_variant %>,<%= papersize %>paper]{IEEEtran}[2015/08/26]
53
- <% if (texlive >= 2021) { -%>
54
-
55
- % Balance the last page
56
- % The pbalance package (see https://ctan.org/pkg/pbalance) "just works" (in contrast to balance.sty or other solutions)
57
- \usepackage{pbalance}
58
- <% } else { -%>
50
+ \documentclass[<%= ieeevariant %>,<%= papersize %>paper,english]{IEEEtran}[2015/08/26]
59
51
 
60
52
  % Balance the last page using the balance package (see https://ctan.org/pkg/balance)
53
+ % Alternative to balance is the pbalance package (see https://ctan.org/pkg/pbalance), which sometimes works better
61
54
  \usepackage{balance}
62
- <% } -%>
63
55
  <% break; case "scientific-thesis": -%>
64
56
 
65
- % EN: The following package allows \\ at the title page
66
- % For more information see https://github.com/latextemplates/scientific-thesis-cover/issues/4
57
+ % The following package allows \\ at the title page
58
+ % For more information see https://github.com/latextemplates/scientific-thesis-cover/issues/4
67
59
  \RequirePackage{kvoptions-patch}
68
60
  \documentclass[
69
61
  % fontsize=11pt is the standard
@@ -72,8 +64,8 @@
72
64
  a4paper, % Standard format - only KOMAScript uses paper=a4 - https://tex.stackexchange.com/a/61044/9075
73
65
  twoside, % we are optimizing for both screen and two-side printing. So the page numbers will jump, but the content is configured to stay in the middle (by using the geometry package)
74
66
  bibliography=totoc,
75
- % idxtotoc, %Index ins Inhaltsverzeichnis
76
- % liststotoc, %List of X ins Inhaltsverzeichnis, mit liststotocnumbered werden die Abbildungsverzeichnisse nummeriert
67
+ % idxtotoc, % Index ins Inhaltsverzeichnis
68
+ % liststotoc, % List of * ins Inhaltsverzeichnis, mit liststotocnumbered werden die Abbildungsverzeichnisse nummeriert
77
69
  headsepline,
78
70
  cleardoublepage=empty,
79
71
  parskip=half,
@@ -173,6 +165,7 @@
173
165
  <%- include('subfig.preamble.en.tex', this); %>
174
166
  <% if (texlive >= 2021) { %><%- include('mindflow.preamble.en.tex', this); %>
175
167
  <% } -%>
168
+ <% if (feature.acronyms) { -%>\usepackage{amsmath}<% } // acronyms load amsmath, which has to be loaded before cleveref -%>
176
169
  <%- include('cleveref.preamble.en.tex', this); %>
177
170
  \usepackage{lipsum}
178
171
  <% if (examples) { -%>
@@ -422,7 +415,7 @@
422
415
  % Alternative: \listof{Listing}{List of Listings}
423
416
  \lstlistoflistings
424
417
  <% } else { -%>
425
- \listof{Listing}{List of Listings}
418
+ \listoflistings
426
419
  <% } -%>
427
420
 
428
421
  %mittels \newfloat wurde die Algorithmus-Gleitumgebung definiert.
@@ -432,6 +425,7 @@
432
425
 
433
426
  % Abbreviations
434
427
  \printglossaries
428
+ % \printnoidxglossaries
435
429
  % \printunsrtglossaries cannot be used, because then no indexing happens; source: https://tex.stackexchange.com/a/287128/9075
436
430
 
437
431
  \microtypesetup{protrusion=true}
@@ -1,11 +1,16 @@
1
1
  % Optischer Randausgleich und Grauwertkorrektur. Siehe See http://www.ctan.org/tex-archive/macros/latex/contrib/microtype/
2
2
 
3
+ <% if (documentclass == 'acmart') { -%>
4
+ % microtype wird bereits von der ACM-Klasse geladen.
5
+ % Wir müssen "nur" ein paar Optionen anpassen.
6
+ <% } else { -%>
3
7
  \usepackage[
4
8
  babel=true,
5
9
  expansion=alltext,
6
10
  protrusion=alltext-nott,
7
11
  final
8
12
  ]{microtype}
13
+ <% } -%>
9
14
 
10
15
  % \texttt{test -- test} - diese Einstellung behält "--" bei (und konveriert sie nicht zu einem Bindestrich)
11
16
  \DisableLigatures{encoding = T1, family = tt* }
@@ -4,7 +4,7 @@
4
4
  % Alternative: \usepackage{cite}, which enables \cite{ref1, ref2} only (otherwise: Error message: "White space in argument")
5
5
 
6
6
  % Doc: http://texdoc.net/natbib
7
- <% if (ieee_compsoc) { -%>
7
+ <% if (ieeecompsoc) { -%>
8
8
  %\ifCLASSOPTIONcompsoc
9
9
  % IEEE Computer Society needs nocompress option at cite.sty
10
10
  % natbib includes the same functionality
@@ -1,7 +1,7 @@
1
1
  <%= heading2 %>{Typesetting Units}
2
2
 
3
3
  <%- bexample %>
4
- Numbers can written plain text (such as 100), by using the siunitx package like that:
4
+ Numbers can be written plain text (such as 100), by using the siunitx package as follows:
5
5
  \SI{100}{\km\per\hour},
6
6
  or by using plain \LaTeX{} (and math mode):
7
7
  $100 \frac{\mathit{km}}{h}$.
@@ -0,0 +1,2 @@
1
+ \usepackage[group-minimum-digits=4,per-mode=fraction]{siunitx}
2
+ \addto\extrasgerman{\sisetup{locale = DE}}
@@ -1,2 +1 @@
1
1
  \usepackage[group-minimum-digits=4,per-mode=fraction]{siunitx}
2
- \addto\extrasgerman{\sisetup{locale = DE}}
@@ -1,4 +1,4 @@
1
- <% if (ieee_compsoc) { -%>
1
+ <% if (ieeecompsoc) { -%>
2
2
  \usepackage[caption=false,font=footnotesize,labelfont=sf,textfont=sf]{subfig}
3
3
  <% } else { -%>
4
4
  \usepackage[caption=false,font=footnotesize]{subfig}
@@ -1,7 +1,9 @@
1
+ <% if (documentclass != 'acmart') { -%>
1
2
  % Links verhalten sich so, wie sie sollen
2
3
  % Zeilenumbrüche bei URLs auch bei Bindestrichen erlauben, auch wenn es verwirrend sein könnte: Gehört der Bindestrich zur URL oder ist es ein Trennstrich?
3
4
  % Siehe https://tex.stackexchange.com/a/3034/9075.
4
5
  \usepackage[hyphens]{url}
6
+ <% } -%>
5
7
  % \urlstyle{same}
6
8
  %
7
9
  % Hinweis von http://tex.stackexchange.com/a/10419/9075.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-latex-template",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Generates a latex template to be used as start for writing scientific works (papers, articles, theses)",
5
5
  "homepage": "https://github.com/latextemplates/generator-latex-template",
6
6
  "author": {
@@ -8,6 +8,7 @@
8
8
  "email": "kopp.dev@gmail.com",
9
9
  "url": "http://orcid.org/0000-0001-6962-4290"
10
10
  },
11
+ "type": "module",
11
12
  "files": [
12
13
  "generators"
13
14
  ],
@@ -20,26 +21,23 @@
20
21
  "yeoman-generator"
21
22
  ],
22
23
  "devDependencies": {
23
- "eslint": "^8.17.0",
24
- "eslint-config-prettier": "^8.5.0",
25
- "eslint-config-xo": "^0.41.0",
26
- "eslint-plugin-prettier": "^4.0.0",
27
- "husky": "^8.0.1",
28
- "jest": "^28.1.0",
29
- "lint-staged": "^13.0.0",
30
- "prettier": "^2.6.2",
31
- "yeoman-assert": "^3.1.1",
32
- "yeoman-test": "^6.3.0"
24
+ "eslint": "^8.44.0",
25
+ "eslint-config-prettier": "^8.8.0",
26
+ "eslint-config-xo": "^0.43.1",
27
+ "eslint-plugin-prettier": "^4.2.1",
28
+ "husky": "^8.0.3",
29
+ "jest": "^29.6.1",
30
+ "lint-staged": "^13.2.3",
31
+ "prettier": "^2.8.8"
33
32
  },
34
33
  "engines": {
35
34
  "npm": ">= 4.0.0"
36
35
  },
37
36
  "dependencies": {
38
- "basic-ftp": "^4.6.6",
39
37
  "chalk": "~4.1.2",
40
- "minimist": "^1.2.6",
41
- "unzipper": "^0.10.11",
42
- "yeoman-generator": "^5.6.1",
38
+ "minimist": "^1.2.8",
39
+ "patch-package": "^7.0.2",
40
+ "yeoman-generator": "~5.9.0",
43
41
  "yeoman-option-or-prompt": "^2.0.1",
44
42
  "yosay": "^2.0.2"
45
43
  },
@@ -74,7 +72,8 @@
74
72
  },
75
73
  "scripts": {
76
74
  "pretest": "eslint .",
77
- "test": "jest"
75
+ "test": "jest",
76
+ "postinstall": "patch-package"
78
77
  },
79
78
  "repository": "https://github.com/latextemplates/generator-latex-template.git",
80
79
  "license": "0BSD"
@@ -1,36 +0,0 @@
1
- <%= heading2 %>{Checking references}
2
-
3
- The package refcheck provides a) putting used labels into the margin and b) outputting in the log file if labels are unused.
4
- The features are disabled in the template, because users might not be used to it.
5
- From this section on, the feature is enabled.
6
-
7
- % Enable showing reference names
8
- \showrefnames
9
-
10
- <%- bexample %>
11
- \begin{figure}
12
- Minimal figure to demonstrate refcheck.
13
- \caption{Minimal figure to demonstrate refcheck.}
14
- \label{refcheckexamplefigure}
15
- \end{figure}
16
-
17
- See \ref{refcheckexamplefigure}.
18
- <%- eexample %>
19
-
20
-
21
- % Enable equation check feature
22
- \checkunlbld
23
-
24
- <%- bexample %>
25
- \begin{eqnarray}
26
- a & = & b\label{eq1}\\
27
- b & = & c\label{eq2}\\
28
- c & = & d\label{eq3}
29
- \end{eqnarray}
30
-
31
- See \ref{eq1}.
32
- <%- eexample %>
33
-
34
- % This shows the BibTeX keys in the margin
35
- % Cannot be demonstrated properly, thus not enabled
36
- % \showcitenames
@@ -1,4 +0,0 @@
1
- % Provides information on labels
2
- % Configured non-unintruisively to avoid WTFs of users
3
- % CTAN: https://ctan.org/pkg/refcheck
4
- \usepackage[norefs,nocites,msgs,ignoreunlbld]{refcheck}