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
package/README.md CHANGED
@@ -25,30 +25,31 @@ and a generation into templates:
25
25
 
26
26
  ## Talks
27
27
 
28
- - [Oliver Kopp - The LaTeX Template Generator](https://github.com/dante-ev/Vortraege_Tagungen/blob/master/2019-Herbst/Oliver%20Kopp%20-%20The%20LaTeX%20Template%20Generator%20-%20dante2019-herbst.pdf) - a talk on the motivation, user experience, and the contribution
28
+ - [Oliver Kopp - The LaTeX Template Generator - TUG 2023](https://tug.org/tug2023/program.html) - first international presentation of the generator
29
+ - [Oliver Kopp - The LaTeX Template Generator - DANTE Herbsttagung 2019](https://github.com/dante-ev/Vortraege_Tagungen/blob/master/2019-Herbst/Oliver%20Kopp%20-%20The%20LaTeX%20Template%20Generator%20-%20dante2019-herbst.pdf) - a talk on the motivation, user experience, and the contribution
29
30
 
30
- ## Usage
31
+ ### Precondition for the generator
31
32
 
32
- One has to install [Node.js](https://nodejs.org/en/) version 14 to get this generator running.
33
- On Windows, one can just run `choco install nodejs-lts` to get the right version of Node.js.
33
+ One has to install [Node.js](https://nodejs.org/en/) version 18 (or later) to get this generator running.
34
+ For simple installation, just head to <https://nodejs.org/> and follow the installation instructions.
34
35
 
35
- On Linux, one can start using the generator directly using the node execution wrapper [npx](https://www.npmjs.com/package/npx):
36
+ ### Using the generator
37
+
38
+ One can start using the generator directly using the node execution wrapper [npx](https://www.npmjs.com/package/npx):
36
39
 
37
40
  ```bash
38
41
  npx -p yo -p generator-latex-template -c 'yo latex-template'
39
42
  ```
40
43
 
41
- ### Installing `generator-latex-template`
44
+ ### Permanent installation (and simpler command line usage)
42
45
 
43
- In case one wants to have the generator installed permanently or `npx` does work as expected, one can install `generator-latex-template` using following command:
46
+ In case one wants to have the generator installed permanently (or `npx` does work as expected), one can install `generator-latex-template` using following command:
44
47
 
45
48
  ```bash
46
49
  npm install -g generator-latex-template
47
50
  ```
48
51
 
49
- ### Using the generator
50
-
51
- One can run the generator by invoking this command on a command prompt:
52
+ Then, one can invoke the generator as follows:
52
53
 
53
54
  ```bash
54
55
  yo latex-template
@@ -98,7 +99,7 @@ In the long run, the contents of the `paper.tex` (and similar) files in reposito
98
99
  - Templating language: <https://ejs.co/>
99
100
  - Conditional questions: <https://stackoverflow.com/a/18706640/873282>.
100
101
  - Types of prompts: <https://github.com/SBoudrias/Inquirer.js#prompt-types>
101
- - E.g,. [Question](https://github.com/SBoudrias/Inquirer.js#question)
102
+ - E.g., [Question](https://github.com/SBoudrias/Inquirer.js#question)
102
103
  - Add a new question
103
104
  - Also adapt `__tests__/app.js`
104
105
  - Execute tests with `npx jest`
@@ -108,14 +109,15 @@ In the long run, the contents of the `paper.tex` (and similar) files in reposito
108
109
  - Run `npx yo <path-to-git-repository>`
109
110
  - Windows: `npx yo c:\git-repositories\latextemplates\generator-latex-template`
110
111
  - Parameters can be set using command line
111
- - Linux: `npx yo /tmp/repo --documentclass=lncs --papersize=a4 --latexcompiler=pdflatex --bibtextool=bibtex --overleaf=false --texlive=2022 --docker=false --language=en --font=default --listings=listings --enquotes=csquotes --tweak_outerquote=babel --todo=pdfcomment --examples=true --howtotext=true`
112
- - Windows: `npx yo c:\git-repositories\latextemplates\generator-latex-template --documentclass=scientific-thesis --papersize=a4 --latexcompiler=pdflatex --bibtextool=bibtex --overleaf=false --texlive=2022 --language=en --font=default --listings=listings --enquotes=csquotes --tweak_outerquote=babel --todo=pdfcomment --examples=true --howtotext=true`
113
- - Windows automatic generation of a LNCS template (with pdflatex and bibtex): `npx yo c:\git-repositories\latextemplates\generator-latex-template --documentclass=lncs ---papersize=a4 --latexcompiler=pdflatex --bibtextool=bibtex --overleaf=false --texlive=2022 --docker=false --language=en --font=default --listings=listings --enquotes=csquotes --tweak_outerquote=babel --todo=pdfcomment --examples=true --howtotext=true`
112
+ - Linux: `npx yo /tmp/repo --documentclass=lncs --papersize=a4 --latexcompiler=pdflatex --bibtextool=bibtex --overleaf=false --texlive=2022 --docker=false --lang=en --font=default --listings=listings --enquotes=csquotes --tweakouterquote=babel --todo=pdfcomment --examples=true --howtotext=true`
113
+ - Windows: `npx yo c:\git-repositories\latextemplates\generator-latex-template --documentclass=scientific-thesis --papersize=a4 --latexcompiler=pdflatex --bibtextool=bibtex --overleaf=false --texlive=2022 --lang=en --font=default --listings=listings --enquotes=csquotes --tweakouterquote=babel --todo=pdfcomment --examples=true --howtotext=true`
114
+ - Windows automatic generation of a LNCS template (with pdflatex and bibtex): `npx yo c:\git-repositories\latextemplates\generator-latex-template --documentclass=lncs ---papersize=a4 --latexcompiler=pdflatex --bibtextool=bibtex --overleaf=false --texlive=2022 --docker=false --lang=en --font=default --listings=listings --enquotes=csquotes --tweakouterquote=babel --todo=pdfcomment --examples=true --howtotext=true`
114
115
  - Run `latexmk` to build the PDF
115
116
  - Update npm dependencies
116
117
  - `npx npm-update-all`. See [FreeCodeCamp](https://www.freecodecamp.org/news/10-npm-tricks-that-will-make-you-a-pro-a945982afb25/) for more details.
117
118
  - `npx npm-check-updates -u`. [[Source](https://www.carlrippon.com/upgrading-npm-dependencies/)]
118
119
  - See <https://github.com/yeoman/generator/releases> for changes in the generator.
120
+ - Generate `package-lock.json` only: `npm i --package-lock-only`
119
121
  - When one encounters `Cannot find module 'yeoman-generator'`, please update the npm dependencies.
120
122
  That error occurred when using version `4.13.0` and `5.4.2` was available.
121
123
  - In case of the error "Error: EACCES, permission denied '/root/.config/configstore/insight-yo.json'", one needs to execute `chmod g+rwx /root /root/.config /root/.config/configstore`
@@ -123,10 +125,10 @@ In the long run, the contents of the `paper.tex` (and similar) files in reposito
123
125
  - Use [actionlint](https://github.com/rhysd/actionlint#readme)
124
126
  - Use [vs.code GitHub actions plugin](https://marketplace.visualstudio.com/items?itemName=cschleiden.vscode-github-actions)
125
127
  - When adding a new package:
126
- 1. execute `npx` with `--generatereitzig`
128
+ 1. execute `npx` with `--generatereitzig` (in a clean directory)
127
129
  2. run `pdflatex`
128
- 3. run `.../generate-texlivefile.sh`
129
- 4. copy `Texlivefile` to the root of the source repository
130
+ 3. run `{repository-root}/generate-texlivefile.sh`
131
+ 4. copy `Texlivefile` to the root of the `{repository-root}/generators/app/templates`
130
132
  5. adapt `Texlivefile` as required
131
133
 
132
134
  ### Useful snippets