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.
- package/README.md +19 -17
- package/generators/app/index.js +222 -568
- package/generators/app/options.js +375 -0
- package/generators/app/templates/Dockerfile.dante +3 -1
- package/generators/app/templates/Dockerfile.iot +14 -0
- package/generators/app/templates/Dockerfile.reitzig +12 -11
- package/generators/app/templates/README.en.md +4 -10
- package/generators/app/templates/Texlivefile +28 -3
- package/generators/app/templates/babel.preamble.de.tex +3 -1
- package/generators/app/templates/babel.preamble.en.tex +1 -1
- package/generators/app/templates/csquotes.example.de.tex +1 -1
- package/generators/app/templates/csquotes.example.en.tex +1 -1
- package/generators/app/templates/csquotes.preamble.en.tex +1 -1
- package/generators/app/templates/figure.example.de.tex +18 -0
- package/generators/app/templates/hyphenation.example.en.tex +1 -1
- package/generators/app/templates/latexmkrc +1 -3
- package/generators/app/templates/main.de.tex +581 -139
- package/generators/app/templates/main.en.tex +11 -17
- package/generators/app/templates/microtype.preamble.de.tex +5 -0
- package/generators/app/templates/natbib.preamble.en.tex +1 -1
- package/generators/app/templates/siunitx.example.en.tex +1 -1
- package/generators/app/templates/siunitx.preamble.de.tex +2 -0
- package/generators/app/templates/siunitx.preamble.en.tex +0 -1
- package/generators/app/templates/subfig.preamble.en.tex +1 -1
- package/generators/app/templates/url.preamble.de.tex +2 -0
- package/package.json +15 -16
- package/generators/app/templates/refcheck.example.en.tex +0 -36
- 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://
|
|
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
|
-
|
|
31
|
+
### Precondition for the generator
|
|
31
32
|
|
|
32
|
-
One has to install [Node.js](https://nodejs.org/en/) version
|
|
33
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
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
|
-
|
|
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
|
|
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 --
|
|
112
|
-
- Windows: `npx yo c:\git-repositories\latextemplates\generator-latex-template --documentclass=scientific-thesis --papersize=a4 --latexcompiler=pdflatex --bibtextool=bibtex --overleaf=false --texlive=2022 --
|
|
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 --
|
|
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
|
|
129
|
-
4. copy `Texlivefile` to the root of the
|
|
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
|