generator-latex-template 0.3.0 → 0.4.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 +14 -3
- package/generators/app/index.js +161 -100
- package/generators/app/templates/Dockerfile.dante +9 -0
- package/generators/app/templates/Dockerfile.reitzig +25 -0
- package/generators/app/templates/Makefile +0 -13
- package/generators/app/templates/README.en.md +30 -22
- package/generators/app/templates/Texlivefile +98 -0
- package/generators/app/templates/bibliography.bib +11 -0
- package/generators/app/templates/dot.dockerignore +429 -0
- package/generators/app/templates/figure.example.en.tex +1 -1
- package/generators/app/templates/font.preamble.en.tex +1 -4
- package/generators/app/templates/{dot.latexmkrc → latexmkrc} +3 -3
- package/generators/app/templates/main.de.tex +3 -0
- package/generators/app/templates/main.en.tex +42 -23
- package/generators/app/templates/siunitx.preamble.en.tex +0 -5
- package/package.json +9 -9
- package/CHANGELOG.md +0 -76
- package/generators/app/templates/bibliography.bib.bak +0 -37
- package/generators/app/templates/main.de.pdf +0 -0
- package/generators/app/templates/main.de.synctex.gz +0 -0
- package/generators/app/templates/main.en.aux +0 -3
- package/generators/app/templates/main.en.fdb_latexmk +0 -38
- package/generators/app/templates/main.en.fls +0 -52
- package/generators/app/templates/main.en.log +0 -251
- package/generators/app/templates/main.en.pdf +0 -0
- package/generators/app/templates/main.en.synctex.gz +0 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# generator-latex-template
|
|
1
|
+
# generator-latex-template [](https://npmjs.org/package/generator-latex-template "View this project on npm")
|
|
2
2
|
|
|
3
3
|
> Generates latextemplates (e.g., for thesis, workshops, conferences, IEEEtran, LNCS, ...) out of "micro-templates"
|
|
4
4
|
|
|
@@ -108,8 +108,9 @@ In the long run, the contents of the `paper.tex` (and similar) files in reposito
|
|
|
108
108
|
- Run `npx yo <path-to-git-repository>`
|
|
109
109
|
- Windows: `npx yo c:\git-repositories\latextemplates\generator-latex-template`
|
|
110
110
|
- Parameters can be set using command line
|
|
111
|
-
-
|
|
112
|
-
- Windows
|
|
111
|
+
- Linux: `npx yo /tmp/repo --documentclass=lncs --texlive=2021 --latexcompiler=pdflatex --bibtextool=bibtex --docker=false --language=en --font=default --listings=listings --cleveref=true --enquotes=csquotes --tweak_outerquote=babel --todo=pdfcomment --howtotext=true --examples=true`
|
|
112
|
+
- Windows: `npx yo c:\git-repositories\latextemplates\generator-latex-template --documentclass=scientific-thesis --texlive=2021 --latexcompiler=pdflatex --bibtextool=bibtex --docker=false --language=en --font=default --listings=listings --cleveref=true --enquotes=csquotes --tweak_outerquote=babel --todo=pdfcomment --howtotext=true --examples=true`
|
|
113
|
+
- Windows automatic generation of a LNCS template (with pdflatex and bibtex): `npx yo c:\git-repositories\latextemplates\generator-latex-template --documentclass=lncs --texlive=2021 --latexcompiler=pdflatex --bibtextool=bibtex --docker=false --language=en --font=default --listings=listings --cleveref=true --enquotes=csquotes --tweak_outerquote=babel --todo=pdfcomment --howtotext=true --examples=true`
|
|
113
114
|
- Run `latexmk` to build the PDF
|
|
114
115
|
- Update npm dependencies
|
|
115
116
|
- `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,6 +118,16 @@ In the long run, the contents of the `paper.tex` (and similar) files in reposito
|
|
|
117
118
|
- See <https://github.com/yeoman/generator/releases> for changes in the generator.
|
|
118
119
|
- When one encounters `Cannot find module 'yeoman-generator'`, please update the npm dependencies.
|
|
119
120
|
That error ocurred when using version `4.13.0` and `5.4.2` was available.
|
|
121
|
+
- 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`
|
|
122
|
+
- Check GitHub actions
|
|
123
|
+
- Use [actionlint](https://github.com/rhysd/actionlint#readme)
|
|
124
|
+
- Use [vs.code GitHub actions plugin](https://marketplace.visualstudio.com/items?itemName=cschleiden.vscode-github-actions)
|
|
125
|
+
- When adding a new package:
|
|
126
|
+
1. execute `npx` with `--generatereitzig`
|
|
127
|
+
2. run `pdflatex`
|
|
128
|
+
3. run `.../generate-texlivefile.sh`
|
|
129
|
+
4. copy `Texlivefile` to the root of the source repository
|
|
130
|
+
5. adapt `Texlivefile` as required
|
|
120
131
|
|
|
121
132
|
### Useful snippets
|
|
122
133
|
|
package/generators/app/index.js
CHANGED
|
@@ -60,6 +60,50 @@ module.exports = class extends Generator {
|
|
|
60
60
|
],
|
|
61
61
|
default: "scientific-thesis"
|
|
62
62
|
},
|
|
63
|
+
{
|
|
64
|
+
type: 'list',
|
|
65
|
+
name: 'acm_format',
|
|
66
|
+
when: function(response) {
|
|
67
|
+
return response.documentclass === 'acm';
|
|
68
|
+
},
|
|
69
|
+
message: 'Which format of ACM?',
|
|
70
|
+
choices: [
|
|
71
|
+
{
|
|
72
|
+
value: "manuscript",
|
|
73
|
+
name: "A manuscript. This is the default.",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
value: "acmsmall",
|
|
77
|
+
name: "Small single-column format. Used for CIE, CSUR, JACM, JDIQ, JEA, JERIC, JETC, PACMCGIT, PACMHCI, PACMPL, TAAS, TACCESS, TACO, TALG, TALLIP (formerly TALIP), TCPS, TDS, TEAC, TECS, TELO, THRI, TIIS, TIOT, TISSEC, TIST, TKDD, TMIS, TOCE, TOCHI, TOCL, TOCS, TOCT, TODAES, TODS, TOIS, TOIT, TOMACS, TOMM (formerly TOMCCAP), TOMPECS, TOMS, TOPC, TOPLAS, TOPS, TOS, TOSEM, TOSN, TQC, TRETS, TSAS, TSC, TSLP and TWEB, including special issues.",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
value: "acmlarge",
|
|
81
|
+
name: "Large single-column format. Used for DTRAP, HEALTH, IMWUT, JOCCH, POMACS and TAP, including special issues.",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
value: "acmtog",
|
|
85
|
+
name: "Large double-column format. Used for TOG, including annual conference Technical Papers.",
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
value: "sigconf",
|
|
89
|
+
name: "Proceedings format for most ACM conferences (with the exceptionslisted below) and all ICPS volumes.",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
value: "sigplan",
|
|
93
|
+
name: "Proceedings format for SIGPLAN conferences",
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
default: "sigconf"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
type: 'confirm',
|
|
100
|
+
name: 'acm_review',
|
|
101
|
+
when: function(response) {
|
|
102
|
+
return response.documentclass === 'acm';
|
|
103
|
+
},
|
|
104
|
+
message: 'Format as document to review?',
|
|
105
|
+
default: true
|
|
106
|
+
},
|
|
63
107
|
{
|
|
64
108
|
type: 'list',
|
|
65
109
|
name: 'ieee_variant',
|
|
@@ -105,25 +149,24 @@ module.exports = class extends Generator {
|
|
|
105
149
|
{
|
|
106
150
|
type: 'list',
|
|
107
151
|
name: 'texlive',
|
|
108
|
-
message: 'Which
|
|
152
|
+
message: 'Which TeXLive compatiblity?',
|
|
109
153
|
choices: [
|
|
110
154
|
{
|
|
111
155
|
name: "TeXLive 2021",
|
|
112
156
|
value: 2021
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
name: "TeXLive 2019",
|
|
116
|
-
value: 2019
|
|
117
157
|
}
|
|
118
158
|
],
|
|
119
|
-
default:
|
|
159
|
+
default: 2021
|
|
120
160
|
},
|
|
121
161
|
{
|
|
122
162
|
type: 'list',
|
|
123
163
|
name: 'latexcompiler',
|
|
124
164
|
message: 'Which latex compiler should be used?',
|
|
125
165
|
choices: ["pdflatex", "lualatex"],
|
|
126
|
-
default: "pdflatex"
|
|
166
|
+
default: "pdflatex",
|
|
167
|
+
when: function(response) {
|
|
168
|
+
return !((response.documentclass === 'ieee') && (response.texlive == 2021));
|
|
169
|
+
}
|
|
127
170
|
},
|
|
128
171
|
{
|
|
129
172
|
when: function(response) {
|
|
@@ -153,6 +196,26 @@ module.exports = class extends Generator {
|
|
|
153
196
|
}
|
|
154
197
|
},
|
|
155
198
|
},
|
|
199
|
+
{
|
|
200
|
+
type: 'list',
|
|
201
|
+
name: 'docker',
|
|
202
|
+
message: 'Should a Dockerfile be generated?',
|
|
203
|
+
choices: [
|
|
204
|
+
{
|
|
205
|
+
name: "no",
|
|
206
|
+
value: false
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
name: "yes (Reiztig)",
|
|
210
|
+
value: "reitzig"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
name: "yes (DANTE e.V.)",
|
|
214
|
+
value: "dante"
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
default: false,
|
|
218
|
+
},
|
|
156
219
|
{
|
|
157
220
|
type: 'list',
|
|
158
221
|
name: 'language',
|
|
@@ -331,12 +394,20 @@ module.exports = class extends Generator {
|
|
|
331
394
|
// To access props later use this.props.someAnswer;
|
|
332
395
|
this.props = props;
|
|
333
396
|
|
|
334
|
-
|
|
397
|
+
// somehow texlive is not routed through
|
|
398
|
+
// special handling
|
|
399
|
+
if (this.params.options.texlive) {
|
|
400
|
+
this.props.texlive = parseInt(this.params.options.texlive)
|
|
401
|
+
}
|
|
335
402
|
|
|
336
403
|
// Command line argument "--githubpublish" switches the generator to generate a template deployable on a GitHub repository (causing e.g., a refined README.md)
|
|
337
404
|
this.props.githubpublish = this.params.options.githubpublish;
|
|
338
405
|
this.props.githubpublish = (this.props.githubpublish === true) || (this.props.githubpublish === 'true')
|
|
339
406
|
|
|
407
|
+
// Command line argument "--preparereitzig" switches the generator to generate a template to be used to generate Texlivefile required by https://github.com/reitzig/texlive-docker
|
|
408
|
+
this.props.preparereitzig = this.params.options.preparereitzig;
|
|
409
|
+
this.props.preparereitzig = (this.props.preparereitzig === true) || (this.props.preparereitzig === 'true')
|
|
410
|
+
|
|
340
411
|
// Ensure all values are set - even if the user was not asked
|
|
341
412
|
if ((this.props.documentclass === 'acmart') || (this.props.documentclass === 'ieee')) {
|
|
342
413
|
this.props.bibtextool = 'bibtex';
|
|
@@ -348,6 +419,11 @@ module.exports = class extends Generator {
|
|
|
348
419
|
// In 2021 this is not used any more, all papers are the "normal" IEEE format
|
|
349
420
|
this.props.ieee_compsoc = false;
|
|
350
421
|
|
|
422
|
+
// As of 2021-12-24 the IEEE setup does not work on TeXLive 2021 and lualatex (TeXLive 2019 and 2020 work)
|
|
423
|
+
if ((this.props.documentclass === 'ieee') && (this.props.texlive == 2021)) {
|
|
424
|
+
this.props.latexcompiler = 'pdflatex';
|
|
425
|
+
}
|
|
426
|
+
|
|
351
427
|
// convert "String" Boolean command line options
|
|
352
428
|
this.props.cleveref = (this.props.cleveref === true) || (this.props.cleveref === 'true')
|
|
353
429
|
this.props.examples = (this.props.examples === true) || (this.props.examples === 'true')
|
|
@@ -379,8 +455,9 @@ module.exports = class extends Generator {
|
|
|
379
455
|
|
|
380
456
|
this.props.requiresShellEscape = (this.props.listings === 'minted');
|
|
381
457
|
|
|
382
|
-
this.props.isPaper = (this.props.documentclass === 'ieee') || (this.props.documentclass === 'lncs');
|
|
458
|
+
this.props.isPaper = (this.props.documentclass === 'acmart') || (this.props.documentclass === 'ieee') || (this.props.documentclass === 'lncs');
|
|
383
459
|
if (this.props.isPaper) {
|
|
460
|
+
// this sets filenames.main and filenames.bib
|
|
384
461
|
this.props.filenames = {
|
|
385
462
|
"main": "paper",
|
|
386
463
|
"bib": "paper"
|
|
@@ -413,121 +490,105 @@ module.exports = class extends Generator {
|
|
|
413
490
|
}
|
|
414
491
|
|
|
415
492
|
writing() {
|
|
416
|
-
var promise = new Promise(function(resolve, reject) {resolve();});
|
|
417
|
-
if ((this.props.documentclass === "lncs") && !fs.existsSync('llncs.cls')) {
|
|
418
|
-
if (!fs.existsSync('llncs2e.zip')) {
|
|
419
|
-
console.log("Need to llncs2e.zip from Springer");
|
|
420
|
-
const ftp = require("basic-ftp");
|
|
421
|
-
const client = new ftp.Client()
|
|
422
|
-
client.ftp.verbose = true
|
|
423
|
-
promise = client.access({
|
|
424
|
-
host: "ftp.springernature.com",
|
|
425
|
-
user: "anonymous",
|
|
426
|
-
password: "anonymous",
|
|
427
|
-
secure: false
|
|
428
|
-
}).then(function() {
|
|
429
|
-
return client.ensureDir("cs-proceeding/llncs")
|
|
430
|
-
}).then(function() {
|
|
431
|
-
return client.downloadTo("llncs2e.zip", "llncs2e.zip")
|
|
432
|
-
}).then(function() {
|
|
433
|
-
return new Promise(function(resolve, reject) {
|
|
434
|
-
console.log("Downloaded");
|
|
435
|
-
client.close();
|
|
436
|
-
resolve();
|
|
437
|
-
});
|
|
438
|
-
});
|
|
439
|
-
} else {
|
|
440
|
-
console.log("llncs2e.zip already exists. Needs to be extracted.");
|
|
441
|
-
promise = new Promise(function(resolve, reject) {resolve();});
|
|
442
|
-
}
|
|
443
|
-
var oldPromise = promise;
|
|
444
|
-
promise = oldPromise.then(function() {
|
|
445
|
-
return fs.createReadStream('llncs2e.zip')
|
|
446
|
-
.pipe(unzipper.Parse())
|
|
447
|
-
.on('entry', function (entry) {
|
|
448
|
-
const fileName = entry.path;
|
|
449
|
-
const type = entry.type; // 'Directory' or 'File'
|
|
450
|
-
const size = entry.vars.uncompressedSize; // There is also compressedSize;
|
|
451
|
-
if ((fileName === "llncs.cls") || (fileName === "splncs04.bst")) {
|
|
452
|
-
entry.pipe(fs.createWriteStream(fileName));
|
|
453
|
-
} else {
|
|
454
|
-
entry.autodrain();
|
|
455
|
-
}
|
|
456
|
-
})
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
493
|
let global = this;
|
|
460
494
|
global.props.config = global.props;
|
|
461
|
-
|
|
495
|
+
global.fs.copy(
|
|
496
|
+
// .gitignore is not uploaded by npm publish
|
|
497
|
+
// Thus, we prefix it with `dot`.
|
|
498
|
+
global.templatePath('dot.gitignore'),
|
|
499
|
+
global.destinationPath('.gitignore')
|
|
500
|
+
);
|
|
501
|
+
global.fs.copyTpl(
|
|
502
|
+
global.templatePath('dot.editorconfig'),
|
|
503
|
+
global.destinationPath('.editorconfig'),
|
|
504
|
+
global.props
|
|
505
|
+
);
|
|
506
|
+
global.fs.copyTpl(
|
|
507
|
+
global.templatePath('bibliography.bib'),
|
|
508
|
+
global.destinationPath(global.props.filenames.bib + ".bib"),
|
|
509
|
+
global.props
|
|
510
|
+
);
|
|
511
|
+
global.fs.copyTpl(
|
|
512
|
+
global.templatePath('latexmkrc'),
|
|
513
|
+
global.destinationPath('latexmkrc'),
|
|
514
|
+
global.props
|
|
515
|
+
);
|
|
516
|
+
global.fs.copyTpl(
|
|
517
|
+
global.templatePath('localSettings.yaml'),
|
|
518
|
+
global.destinationPath('localSettings.yaml'),
|
|
519
|
+
global.props
|
|
520
|
+
);
|
|
521
|
+
global.fs.copyTpl(
|
|
522
|
+
global.templatePath('LICENSE'),
|
|
523
|
+
global.destinationPath('LICENSE'),
|
|
524
|
+
global.props
|
|
525
|
+
);
|
|
526
|
+
global.fs.copyTpl(
|
|
527
|
+
global.templatePath('Makefile'),
|
|
528
|
+
global.destinationPath('Makefile'),
|
|
529
|
+
global.props
|
|
530
|
+
);
|
|
531
|
+
if (global.props.documentclass === 'lncs') {
|
|
462
532
|
global.fs.copy(
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
global.templatePath('dot.gitignore'),
|
|
466
|
-
global.destinationPath('.gitignore')
|
|
467
|
-
);
|
|
468
|
-
global.fs.copyTpl(
|
|
469
|
-
global.templatePath('dot.editorconfig'),
|
|
470
|
-
global.destinationPath('.editorconfig'),
|
|
471
|
-
global.props
|
|
472
|
-
);
|
|
473
|
-
global.fs.copyTpl(
|
|
474
|
-
global.templatePath('dot.latexmkrc'),
|
|
475
|
-
global.destinationPath('.latexmkrc'),
|
|
476
|
-
global.props
|
|
477
|
-
);
|
|
478
|
-
global.fs.copyTpl(
|
|
479
|
-
global.templatePath('bibliography.bib'),
|
|
480
|
-
global.destinationPath(global.props.filenames.bib + ".bib"),
|
|
481
|
-
global.props
|
|
533
|
+
global.templatePath('splncsnat.bst'),
|
|
534
|
+
global.destinationPath('splncsnat.bst')
|
|
482
535
|
);
|
|
536
|
+
}
|
|
537
|
+
if (global.props.language === 'de') {
|
|
483
538
|
global.fs.copyTpl(
|
|
484
|
-
global.templatePath('
|
|
485
|
-
global.destinationPath(
|
|
539
|
+
global.templatePath('main.de.tex'),
|
|
540
|
+
global.destinationPath(global.props.filenames.main + ".tex"),
|
|
486
541
|
global.props
|
|
487
542
|
);
|
|
543
|
+
if (!global.props.githubpublish) {
|
|
544
|
+
// we keep the English README.md in case of GitHub publish
|
|
545
|
+
global.fs.copyTpl(
|
|
546
|
+
global.templatePath('README.de.md'),
|
|
547
|
+
global.destinationPath('README.md'),
|
|
548
|
+
global.props
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
} else {
|
|
488
552
|
global.fs.copyTpl(
|
|
489
|
-
global.templatePath('
|
|
490
|
-
global.destinationPath(
|
|
553
|
+
global.templatePath('main.en.tex'),
|
|
554
|
+
global.destinationPath(global.props.filenames.main + ".tex"),
|
|
491
555
|
global.props
|
|
492
556
|
);
|
|
493
557
|
global.fs.copyTpl(
|
|
494
|
-
global.templatePath('
|
|
495
|
-
global.destinationPath('
|
|
558
|
+
global.templatePath('README.en.md'),
|
|
559
|
+
global.destinationPath('README.md'),
|
|
496
560
|
global.props
|
|
497
561
|
);
|
|
498
|
-
|
|
562
|
+
}
|
|
563
|
+
switch (global.props.docker) {
|
|
564
|
+
case "reitzig":
|
|
499
565
|
global.fs.copy(
|
|
500
|
-
global.templatePath('
|
|
501
|
-
global.destinationPath('
|
|
566
|
+
global.templatePath('dot.dockerignore'),
|
|
567
|
+
global.destinationPath('.dockerignore')
|
|
502
568
|
);
|
|
503
|
-
}
|
|
504
|
-
if (global.props.language === 'de') {
|
|
505
569
|
global.fs.copyTpl(
|
|
506
|
-
global.templatePath('
|
|
507
|
-
global.destinationPath(
|
|
570
|
+
global.templatePath('Dockerfile.reitzig'),
|
|
571
|
+
global.destinationPath('Dockerfile'),
|
|
508
572
|
global.props
|
|
509
573
|
);
|
|
510
|
-
if (!global.props.githubpublish) {
|
|
511
|
-
// we keep the English README.md in case of GitHub publish
|
|
512
|
-
global.fs.copyTpl(
|
|
513
|
-
global.templatePath('README.de.md'),
|
|
514
|
-
global.destinationPath('README.md'),
|
|
515
|
-
global.props
|
|
516
|
-
);
|
|
517
|
-
}
|
|
518
|
-
} else {
|
|
519
574
|
global.fs.copyTpl(
|
|
520
|
-
global.templatePath('
|
|
521
|
-
global.destinationPath(
|
|
575
|
+
global.templatePath('Texlivefile'),
|
|
576
|
+
global.destinationPath('Texlivefile'),
|
|
522
577
|
global.props
|
|
523
578
|
);
|
|
579
|
+
break;
|
|
580
|
+
case "dante":
|
|
581
|
+
global.fs.copy(
|
|
582
|
+
global.templatePath('dot.dockerignore'),
|
|
583
|
+
global.destinationPath('.dockerignore')
|
|
584
|
+
);
|
|
524
585
|
global.fs.copyTpl(
|
|
525
|
-
global.templatePath('
|
|
526
|
-
global.destinationPath('
|
|
586
|
+
global.templatePath('Dockerfile.dante'),
|
|
587
|
+
global.destinationPath('Dockerfile'),
|
|
527
588
|
global.props
|
|
528
589
|
);
|
|
529
|
-
|
|
530
|
-
}
|
|
590
|
+
break;
|
|
591
|
+
}
|
|
531
592
|
}
|
|
532
593
|
|
|
533
594
|
install() {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
FROM reitzig/texlive-<% switch (latexcompiler) {
|
|
2
|
+
case "pdflatex": %>base<% break;
|
|
3
|
+
case "lualatex": %>base-luatex<% break;
|
|
4
|
+
default: %>base<% break;
|
|
5
|
+
} -%>:<% switch (texlive) {
|
|
6
|
+
case 2021: %>2021.5<% break;
|
|
7
|
+
} -%>
|
|
8
|
+
|
|
9
|
+
RUN apk update && apk add --no-cache bash perl python3 py3-pip
|
|
10
|
+
RUN pip3 install pygments
|
|
11
|
+
|
|
12
|
+
COPY Texlivefile /work/src
|
|
13
|
+
|
|
14
|
+
# Emulate "Install dependencies" of "entrypoint work ..."
|
|
15
|
+
<% if (texlive < 2021) { -%>
|
|
16
|
+
RUN xargs tlmgr install --repository ftp://ftp.math.utah.edu/pub/tex/historic/systems/texlive/<%= texlive %>/tlnet-final < "/work/src/Texlivefile" && \
|
|
17
|
+
<% } else { -%>
|
|
18
|
+
RUN tlmgr update --self --repository https://mirror.mwt.me/ctan/systems/texlive/tlnet && \
|
|
19
|
+
xargs tlmgr install --repository https://mirror.mwt.me/ctan/systems/texlive/tlnet < "/work/src/Texlivefile" && \
|
|
20
|
+
<% } -%>
|
|
21
|
+
sha256sum "/work/src/Texlivefile" > "/work/tmp/Texlivefile.sha"
|
|
22
|
+
|
|
23
|
+
# make latexmk and texlogsieve available
|
|
24
|
+
RUN cp /usr/local/texlive/<%= texlive %>/bin/x86_64-linuxmusl/latexmk /usr/local/bin && \
|
|
25
|
+
cp /usr/local/texlive/<%= texlive %>/bin/x86_64-linuxmusl/texlogsieve /usr/local/bin
|
|
@@ -1,22 +1,9 @@
|
|
|
1
1
|
sources = <%= filenames.main %>.tex
|
|
2
|
-
<% if (documentclass == 'lncs') { -%>
|
|
3
|
-
llncs-class = llncs.cls
|
|
4
|
-
<% } -%>
|
|
5
2
|
|
|
6
3
|
.PHONY: clean reformat split-sentences indent
|
|
7
4
|
|
|
8
5
|
compile: $(sources)
|
|
9
6
|
latexmk $(sources)
|
|
10
|
-
<% if (documentclass == 'lncs') { -%>
|
|
11
|
-
|
|
12
|
-
$(sources): $(llncs-class)
|
|
13
|
-
$(llncs-class): download
|
|
14
|
-
|
|
15
|
-
download:
|
|
16
|
-
ifeq (,$(wildcard ./$(llncs-class)))
|
|
17
|
-
./download-llncs-files-from-springer.sh
|
|
18
|
-
endif
|
|
19
|
-
<% } -%>
|
|
20
7
|
|
|
21
8
|
format:
|
|
22
9
|
latexindent -l -s -sl -w $(sources)
|
|
@@ -4,11 +4,21 @@
|
|
|
4
4
|
# Simplified LNCS Template
|
|
5
5
|
|
|
6
6
|
> Quick start for modern LaTeXing with [LNCS](http://www.springer.com/computer/lncs).
|
|
7
|
+
<% if (texlive == 2020) { -%>
|
|
8
|
+
|
|
9
|
+
Please be aware that this template is optimized for overleaf, which [is based on TeXLive 2021](https://de.overleaf.com/blog/tex-live-2021-now-available).
|
|
10
|
+
In case you are running a later TeXLive version (or use MiKTeX), please regenerate the template with the help of the [latex template generator].
|
|
11
|
+
<% } -%>
|
|
7
12
|
<% break; case "ieee": -%>
|
|
8
13
|
# Simplified IEEE Template
|
|
9
14
|
|
|
10
15
|
> Quick start for modern LaTeXing for an IEEE conference, based on the [Manuscript Template for Conference Proceedings](https://www.ieee.org/conferences_events/conferences/publishing/templates.html).
|
|
11
16
|
|
|
17
|
+
<% if (texlive == 2020) { -%>
|
|
18
|
+
Please be aware that this template is optimized for overleaf, which [is based on TeXLive 2021](https://de.overleaf.com/blog/tex-live-2021-now-available).
|
|
19
|
+
In case you are running a later TeXLive version (or use MiKTeX), please regenerate the template with the help of the [latex template generator].
|
|
20
|
+
<% } -%>
|
|
21
|
+
|
|
12
22
|
The official template is distributed via CTAN as the [IEEEtran package](https://ctan.org/pkg/ieeetran), which is actively maintained.
|
|
13
23
|
However, de-facto configurations (hyperref) and modern features of latex (microtype) are not configured.
|
|
14
24
|
This template does it.
|
|
@@ -30,15 +40,12 @@ Note that this requires a working perl installation.
|
|
|
30
40
|
|
|
31
41
|
In case something goes wrong, you can instruct the LaTeX compiler to stop at the first error:
|
|
32
42
|
|
|
33
|
-
<% if (latexcompiler == "pdflatex")
|
|
43
|
+
<% if (latexcompiler == "pdflatex") { -%>
|
|
34
44
|
pdflatex <%= filenames.main %>
|
|
35
|
-
<%
|
|
36
|
-
} else {
|
|
37
|
-
%>
|
|
45
|
+
<% } else { -%>
|
|
38
46
|
lualatex <%= filenames.main %>
|
|
39
|
-
<%
|
|
40
|
-
|
|
41
|
-
%>
|
|
47
|
+
<% } -%>
|
|
48
|
+
|
|
42
49
|
## Benefits
|
|
43
50
|
|
|
44
51
|
Following features are enabled in this template:
|
|
@@ -141,24 +148,10 @@ Congratulations. You chose to use all available features.
|
|
|
141
148
|
The official template is available at <https://www.springer.com/gp/computer-science/lncs/conference-proceedings-guidelines> --> "Templates, samples files & useful links" --> "LaTeX2e Proceedings Templates (zip)"
|
|
142
149
|
Deep link: <ftp://ftp.springernature.com/cs-proceeding/llncs/llncs2e.zip>.
|
|
143
150
|
|
|
144
|
-
> **The class file authored by Springer is needed to get the template working:**
|
|
145
|
-
> `llncs.cls`
|
|
146
|
-
> You get it from inside the ZIP of `llncs2e.zip` available at <ftp://ftp.springernature.com/cs-proceeding/llncs/llncs2e.zip>.
|
|
147
|
-
|
|
148
|
-
Reason: Licensing restrictions of Springer do not allow distribution outside of springer.
|
|
149
|
-
See [message #47 for debian bug 31897](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=31897#47) for details.
|
|
150
|
-
Therefore, the required file `llncs.cls` has to be downloaded in some way.
|
|
151
|
-
Follow the quick start instructions.
|
|
152
|
-
|
|
153
151
|
## Quick start
|
|
154
152
|
|
|
155
153
|
- Click on `Download ZIP` or [here](https://github.com/latextemplates/LNCS/archive/main.zip).
|
|
156
154
|
- Extract `LNCS-main.zip` in the folder where you want to write your paper.
|
|
157
|
-
- Place `llncs.cls` into the directory
|
|
158
|
-
- Download `llncs2e.zip` from <ftp://ftp.springernature.com/cs-proceeding/llncs/llncs2e.zip> and extract it in the directory.
|
|
159
|
-
On Linux, just execute `download-llncs-files-from-springer.sh`.
|
|
160
|
-
- In case ftp does not work at your side, you can try online ftp services such as http://www.net2ftp.com/ to download the files.
|
|
161
|
-
Open the connection to `ftp.springernature.com` and navigate to `cs-proceeding`, `llncs`, and download the ZIP archive.
|
|
162
155
|
- Edit [paper.tex](paper.tex).
|
|
163
156
|
- `latexmk paper`.
|
|
164
157
|
|
|
@@ -230,7 +223,7 @@ Statement from IEEE:
|
|
|
230
223
|
|
|
231
224
|
<% switch (documentclass) { case "lncs": -%>
|
|
232
225
|
There is currently no official biblatex support.
|
|
233
|
-
A first step towards that is done at [biblatex-lncs](https://
|
|
226
|
+
A first step towards that is done at [biblatex-lncs](https://ctan.org/pkg/biblatex-lncs).
|
|
234
227
|
<% break; case "ieee": -%>
|
|
235
228
|
There is currently no official biblatex support.
|
|
236
229
|
A first step towards that is done at the [biblatex-ieee package](https://ctan.org/pkg/biblatex-ieee).
|
|
@@ -253,7 +246,22 @@ To have minted running properly, you have to do following steps on Windows:
|
|
|
253
246
|
3. When latexing, use `-shell-escape`: `pdflatex -shell-escape paper`.
|
|
254
247
|
You can also just execute `latexmk paper`.
|
|
255
248
|
<% } -%>
|
|
249
|
+
<% switch (docker) {
|
|
250
|
+
case "reitzig": -%>
|
|
256
251
|
|
|
252
|
+
## Usage with docker
|
|
253
|
+
|
|
254
|
+
The generated `Dockerfile` is based on the [Dockerfile by reitzig](https://github.com/reitzig/texlive-docker).
|
|
255
|
+
The idea of that system is to host the document sources in a directory separated from the output directory.
|
|
256
|
+
|
|
257
|
+
docker run --rm -v "c:\users\example\latex-document:/work/src" -v "c:\users\example\latex-document\out:/work/out" ltg work latexmk
|
|
258
|
+
|
|
259
|
+
Following one-time setup is requried:
|
|
260
|
+
|
|
261
|
+
docker build -t ltg .
|
|
262
|
+
|
|
263
|
+
<% break; default: -%>
|
|
264
|
+
<% break; } -%>
|
|
257
265
|
## FAQs
|
|
258
266
|
<% switch (documentclass) { case "lncs": -%>
|
|
259
267
|
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
amsmath
|
|
2
|
+
acmart
|
|
3
|
+
atbegshi
|
|
4
|
+
atveryend
|
|
5
|
+
auxhook
|
|
6
|
+
babel
|
|
7
|
+
babel-english
|
|
8
|
+
babel-german
|
|
9
|
+
biber
|
|
10
|
+
bigintcalc
|
|
11
|
+
bitset
|
|
12
|
+
blindtext
|
|
13
|
+
booktabs
|
|
14
|
+
caption
|
|
15
|
+
catchfile
|
|
16
|
+
cfr-lm
|
|
17
|
+
cleveref
|
|
18
|
+
comment
|
|
19
|
+
csquotes
|
|
20
|
+
currfile
|
|
21
|
+
datetime2
|
|
22
|
+
datetime2-german
|
|
23
|
+
datetime2-english
|
|
24
|
+
dehyph-exptl
|
|
25
|
+
diagbox
|
|
26
|
+
environ
|
|
27
|
+
etexcmds
|
|
28
|
+
etoolbox
|
|
29
|
+
floatflt
|
|
30
|
+
framed
|
|
31
|
+
fvextra
|
|
32
|
+
gettitlestring
|
|
33
|
+
graphics
|
|
34
|
+
hyperref
|
|
35
|
+
hyperxmp
|
|
36
|
+
hyph-utf8
|
|
37
|
+
inconsolata
|
|
38
|
+
ieeetran
|
|
39
|
+
ifmtarg
|
|
40
|
+
infwarerr
|
|
41
|
+
intcalc
|
|
42
|
+
kvdefinekeys
|
|
43
|
+
kvoptions
|
|
44
|
+
kvsetkeys
|
|
45
|
+
latexmk
|
|
46
|
+
letltxmacro
|
|
47
|
+
libertine
|
|
48
|
+
lineno
|
|
49
|
+
linenoamsmath
|
|
50
|
+
lipsum
|
|
51
|
+
listings
|
|
52
|
+
llncs
|
|
53
|
+
ltxcmds
|
|
54
|
+
marginnote
|
|
55
|
+
microtype
|
|
56
|
+
mindflow
|
|
57
|
+
minted
|
|
58
|
+
mnsymbol
|
|
59
|
+
mwe
|
|
60
|
+
natbib
|
|
61
|
+
ncctools
|
|
62
|
+
newcomputermodern
|
|
63
|
+
newtx
|
|
64
|
+
newtxtt
|
|
65
|
+
nfssext-cfr
|
|
66
|
+
nowidow
|
|
67
|
+
oberdiek
|
|
68
|
+
paralist
|
|
69
|
+
pbalance
|
|
70
|
+
pdfcomment
|
|
71
|
+
pdfescape
|
|
72
|
+
pdftexcmds
|
|
73
|
+
pict2e
|
|
74
|
+
preprint
|
|
75
|
+
refcount
|
|
76
|
+
regexpatch
|
|
77
|
+
rerunfilecheck
|
|
78
|
+
siunitx
|
|
79
|
+
snapshot
|
|
80
|
+
soul
|
|
81
|
+
soulpos
|
|
82
|
+
soulutf8
|
|
83
|
+
sttools
|
|
84
|
+
stringenc
|
|
85
|
+
subfig
|
|
86
|
+
svn-prov
|
|
87
|
+
tcolorbox
|
|
88
|
+
texlogsieve
|
|
89
|
+
totpages
|
|
90
|
+
tracklang
|
|
91
|
+
translator
|
|
92
|
+
uniquecounter
|
|
93
|
+
upquote
|
|
94
|
+
url
|
|
95
|
+
xcolor
|
|
96
|
+
xkeyval
|
|
97
|
+
xstring
|
|
98
|
+
zref
|
|
@@ -33,5 +33,16 @@
|
|
|
33
33
|
year = {2017},
|
|
34
34
|
url = {http://texdoc.net/mwe},
|
|
35
35
|
}
|
|
36
|
+
<% if ((documentclass == 'acmart') || (documentclass == 'lncs') || (documentclass == 'ieee')) { -%>
|
|
37
|
+
|
|
38
|
+
@Misc{acmart,
|
|
39
|
+
author = {Boris Veytsman},
|
|
40
|
+
year = {2021},
|
|
41
|
+
month = aug,
|
|
42
|
+
title = {LaTeX Class for the Association for Computing Machinery -- Acknowledgement Information},
|
|
43
|
+
lastaccessed = {September 17, 2021},
|
|
44
|
+
url = {https://github.com/borisveytsman/acmart/blob/1704c8bf7eee92a1515ff755f5118b6a22bb1f8e/samples/samples.dtx#L709},
|
|
45
|
+
}
|
|
46
|
+
<% } -%>
|
|
36
47
|
|
|
37
48
|
@Comment{jabref-meta: databaseType:bibtex;}
|