generator-latex-template 0.5.0 → 0.6.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 CHANGED
@@ -108,9 +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
- - 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`
111
+ - Linux: `npx yo /tmp/repo --documentclass=lncs --overleaf=false --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 --overleaf=false --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 --overleaf=false --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`
114
114
  - Run `latexmk` to build the PDF
115
115
  - Update npm dependencies
116
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.
@@ -171,6 +171,8 @@ ejslint.cmd c:\git-repositories\latextemplates\generator-latex-template\generato
171
171
  The code is licensed [0BSD](https://choosealicense.com/licenses/0bsd/#), the snippets (both LaTeX and text) 0BSD, too.
172
172
  See [benbalter/talks#15](https://github.com/benbalter/talks/issues/15#issuecomment-599704662), for a reasoning, why [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/) cannot be used.
173
173
 
174
+ `generators/app/templates/splncs04nat.bst` is taken from [tpavlic/splncs04nat](https://github.com/tpavlic/splncs04nat) and is MIT-licensed.
175
+
174
176
  [hyperref]: https://ctan.org/pkg/hyperref
175
177
  [listings]: https://ctan.org/pkg/listings
176
178
  [minted]: https://ctan.org/pkg/minted
@@ -146,17 +146,40 @@ module.exports = class extends Generator {
146
146
  ],
147
147
  default: "a4paper"
148
148
  },
149
+ {
150
+ type: 'list',
151
+ name: 'overleaf',
152
+ message: 'Overleaf compatibility?',
153
+ choices: [
154
+ {
155
+ name: "yes",
156
+ value: true
157
+ },
158
+ {
159
+ name: "no",
160
+ value: false
161
+ }
162
+ ],
163
+ default: true
164
+ },
149
165
  {
150
166
  type: 'list',
151
167
  name: 'texlive',
152
- message: 'Which TeXLive compatiblity?',
168
+ when: function(response) {
169
+ return (!response.overleaf || (response.overleaf == "false"));
170
+ },
171
+ message: 'Which TeXLive compatibility?',
153
172
  choices: [
154
173
  {
155
174
  name: "TeXLive 2021",
156
175
  value: 2021
176
+ },
177
+ {
178
+ name: "TeXLive 2022",
179
+ value: 2022
157
180
  }
158
181
  ],
159
- default: 2021
182
+ default: 2022
160
183
  },
161
184
  {
162
185
  type: 'list',
@@ -165,7 +188,7 @@ module.exports = class extends Generator {
165
188
  choices: ["pdflatex", "lualatex"],
166
189
  default: "pdflatex",
167
190
  when: function(response) {
168
- return !((response.documentclass === 'ieee') && (response.texlive == 2021));
191
+ return !(response.documentclass === 'ieee');
169
192
  }
170
193
  },
171
194
  {
@@ -394,6 +417,11 @@ module.exports = class extends Generator {
394
417
  // To access props later use this.props.someAnswer;
395
418
  this.props = props;
396
419
 
420
+ if (this.props.overleaf) {
421
+ // we do not prompt for texlive version in case of overleaf
422
+ this.props.texlive = 2021;
423
+ }
424
+
397
425
  // somehow texlive is not routed through
398
426
  // special handling
399
427
  if (this.params.options.texlive) {
@@ -428,6 +456,7 @@ module.exports = class extends Generator {
428
456
  this.props.cleveref = (this.props.cleveref === true) || (this.props.cleveref === 'true')
429
457
  this.props.examples = (this.props.examples === true) || (this.props.examples === 'true')
430
458
  this.props.howtotext = (this.props.howtotext === true) || (this.props.howtotext === 'true')
459
+ this.props.overleaf = (this.props.overleaf === true) || (this.props.overleaf === 'true')
431
460
 
432
461
  if (this.props.examples) {
433
462
  this.props.useExampleEnvironment = true;
@@ -513,7 +542,7 @@ module.exports = class extends Generator {
513
542
  );
514
543
  global.fs.copyTpl(
515
544
  global.templatePath('latexmkrc'),
516
- global.destinationPath('latexmkrc'),
545
+ global.destinationPath(global.props.overleaf ? '_latexmkrc' : 'latexmkrc'),
517
546
  global.props
518
547
  );
519
548
  global.fs.copyTpl(
@@ -533,8 +562,8 @@ module.exports = class extends Generator {
533
562
  );
534
563
  if (global.props.documentclass === 'lncs') {
535
564
  global.fs.copy(
536
- global.templatePath('splncsnat.bst'),
537
- global.destinationPath('splncsnat.bst')
565
+ global.templatePath('splncs04nat.bst'),
566
+ global.destinationPath('splncs04nat.bst')
538
567
  );
539
568
  }
540
569
  if (global.props.language === 'de') {
@@ -604,6 +633,13 @@ module.exports = class extends Generator {
604
633
  );
605
634
  break;
606
635
  }
636
+ if (global.props.docker) {
637
+ global.fs.copyTpl(
638
+ global.templatePath('.github/workflows/check.yml'),
639
+ global.destinationPath('.github/workflows/check.yml'),
640
+ global.props
641
+ );
642
+ }
607
643
  }
608
644
 
609
645
  install() {
@@ -0,0 +1,43 @@
1
+ on:
2
+ push:
3
+ workflow_dispatch:
4
+ concurrency:
5
+ group: check
6
+ cancel-in-progress: true
7
+ jobs:
8
+ check:
9
+ runs-on: ubuntu-latest
10
+ services:
11
+ registry:
12
+ image: registry:2
13
+ ports:
14
+ - 5000:5000
15
+ steps:
16
+ - name: Set up QEMU
17
+ uses: docker/setup-qemu-action@v1
18
+ - name: Set up Docker Buildx
19
+ uses: docker/setup-buildx-action@v1
20
+ with:
21
+ driver-opts: network=host
22
+ - name: Cache Docker layers
23
+ uses: actions/cache@v2
24
+ with:
25
+ path: /tmp/.buildx-cache
26
+ key: ${{ runner.os }}-buildx
27
+ - name: Build Docker image
28
+ uses: docker/build-push-action@v2
29
+ with:
30
+ push: true
31
+ tags: localhost:5000/name/app:latest
32
+ - name: Set up Git repository
33
+ uses: actions/checkout@v3
34
+ - run: |
35
+ mkdir /tmp/out
36
+ mkdir /tmp/res
37
+ - run: docker run -v $(pwd):/work/src -v /tmp/out:/work/out localhost:5000/name/app:latest work "latexmk -pdf -pdflatex='<% if ((latexcompiler == "pdflatex") || githubpublish) { %>pdflatex<% } else { %>lualatex<% } %> --interaction=nonstopmode' <%= filenames.main %>"
38
+ - run: mv /tmp/out/*.pdf /tmp/res
39
+ - uses: actions/upload-artifact@v2
40
+ with:
41
+ name: test-result
42
+ path: |
43
+ /tmp/res/*.pdf
@@ -3,16 +3,18 @@ FROM reitzig/texlive-<% switch (latexcompiler) {
3
3
  case "lualatex": %>base-luatex<% break;
4
4
  default: %>base<% break;
5
5
  } -%>:<% switch (texlive) {
6
- case 2021: %>2021.5<% break;
6
+ case 2022: %>2022.2<% break;
7
+ case 2021: %>2021.10<% break;
7
8
  } -%>
8
9
 
9
10
  RUN apk update && apk add --no-cache bash perl python3 py3-pip
10
11
  RUN pip3 install pygments
11
12
 
12
13
  # Emulate "Install dependencies" of "entrypoint work ..."
13
- <% if (texlive < 2021) { -%>
14
+ <% if (texlive < 2022) { -%>
15
+ RUN tlmgr update --self --repository http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/<%= texlive %>/tlnet-final
14
16
  COPY Texlivefile /work/src
15
- RUN xargs tlmgr install --repository ftp://ftp.math.utah.edu/pub/tex/historic/systems/texlive/<%= texlive %>/tlnet-final < "/work/src/Texlivefile" && \
17
+ RUN xargs tlmgr install --repository http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/<%= texlive %>/tlnet-final < "/work/src/Texlivefile" && \
16
18
  <% } else { -%>
17
19
  RUN tlmgr update --self --repository https://mirror.mwt.me/ctan/systems/texlive/tlnet
18
20
  COPY Texlivefile /work/src
@@ -205,8 +205,8 @@
205
205
 
206
206
  % Add manual adapted hyphenation of English words
207
207
  % See https://ctan.org/pkg/hyphenex and https://tex.stackexchange.com/a/22892/9075 for details
208
- % Could not work on MiKTeX
209
- \input{ushyphex}
208
+ % Does not work on MiKTeX, therefore disabled - issue reported at https://github.com/MiKTeX/miktex-packaging/issues/271
209
+ % \input{ushyphex}
210
210
 
211
211
  % correct bad hyphenation here
212
212
  \hyphenation{op-tical net-works semi-conduc-tor}
@@ -373,11 +373,10 @@
373
373
  \lipsum[1]
374
374
  <% } -%>
375
375
  <% switch (documentclass) { case "lncs": -%>
376
+
377
+ \keywords{First keyword \and Second keyword \and Third keyword}
376
378
  \end{abstract}
377
379
 
378
- \begin{keywords}
379
- keyword1, keyword2
380
- \end{keywords}
381
380
  <% break; case "acmart": -%>
382
381
  \end{abstract}
383
382
 
@@ -683,8 +682,10 @@ An interpretation can only be followed after all results have been described. Th
683
682
  \lipsum[1-3]\todo{Refine me}
684
683
 
685
684
  The remainder of the paper starts with a presentation of related work (<% if (cleveref) { %>\cref<% } else if (documentclass == 'lncs') { %>Sect.~\ref<% } else { %>Section~\ref<% } %>{sec:relatedwork}).
686
- <% if (examples) { %>It is followed by a presentation of hints on \LaTeX{} (<% if (cleveref) { %>\cref<% } else if (documentclass == 'lncs') { %>Sect.~\ref<% } else { %>Section~\ref<% } %>{sec:latexhints}).<% } -%>
687
- <% if (!examples && (documentclass == 'ieee')) { %>Afterwards, we present some Lorem Ipsum (<% if (cleveref) { %>\cref<% } else if (documentclass == 'lncs') { %>Sect.~\ref<% } else { %>Section~\ref<% } %>{sec:loremipsum}).<% } -%>
685
+ <% if (examples) { %>It is followed by a presentation of hints on \LaTeX{} (<% if (cleveref) { %>\cref<% } else if (documentclass == 'lncs') { %>Sect.~\ref<% } else { %>Section~\ref<% } %>{sec:latexhints}).<% }
686
+ -%>
687
+ <% if (!examples && (documentclass == 'ieee')) { %>Afterwards, we present some Lorem Ipsum (<% if (cleveref) { %>\cref<% } else if (documentclass == 'lncs') { %>Sect.~\ref<% } else { %>Section~\ref<% } %>{sec:loremipsum}).<% }
688
+ -%>
688
689
  Finally, a conclusion is drawn and outlook on future work is made (<% if (cleveref) { %>\cref<% } else if (documentclass == 'lncs') { %>Sect.~\ref<% } else { %>Section~\ref<% } %>{sec:outlook}).
689
690
 
690
691
  <%= heading1 %>{Related Work}
@@ -696,11 +697,7 @@ The whole idea of TOSCA is explained by <% if (available.citet) { %>\citet<% } e
696
697
 
697
698
  <% if (examples) { -%>
698
699
  <%= heading1 %>{LaTeX Hints}
699
- <% if (documentclass == 'lncs') { -%>
700
700
  \label{sec:latexhints}
701
- <% } else { -%>
702
- \label{chap:latexhints}
703
- <% } -%>
704
701
 
705
702
  <% if (useExampleEnvironment) { -%>
706
703
  % Required for proper example rendering in the compiled PDF
@@ -839,9 +836,9 @@ See \url{https://help.jabref.org/en/CleanupEntries} for an overview of the clean
839
836
 
840
837
  \renewcommand{\bibsection}{\section*{References}} % requried for natbib to have "References" printed and as section*, not chapter*
841
838
  % Use natbib compatbile splncsnat style.
842
- % It does provide all features of splncs03, but is developed in a clean way.
843
- % Source: http://phaseportrait.blogspot.de/2011/02/natbib-compatible-bibtex-style-bst-file.html
844
- \bibliographystyle{splncsnat}
839
+ % It does provide all features of splncs04.bst, but is developed in a clean way.
840
+ % Source: https://github.com/tpavlic/splncs04nat
841
+ \bibliographystyle{splncs04nat}
845
842
  \begingroup
846
843
  \microtypecontext{expansion=sloppy}
847
844
  \small % ensure correct font size for the bibliography
@@ -882,7 +879,6 @@ See \url{https://help.jabref.org/en/CleanupEntries} for an overview of the clean
882
879
  All links were last followed on October 5, 2020.
883
880
 
884
881
  <% switch (documentclass) { case "lncs": -%>
885
-
886
882
  %%% ===============================================================================
887
883
  %\appendix
888
884
  %\addcontentsline{toc}{chapter}{APPENDICES}
@@ -895,7 +891,6 @@ All links were last followed on October 5, 2020.
895
891
  %<%= heading1 %>{My first appendix}\label{sec:appendix1}
896
892
  %%% ===============================================================================
897
893
  <% break; case "scientific-thesis": -%>
898
-
899
894
  %%% ===============================================================================
900
895
  \appendix
901
896
  \addcontentsline{toc}{chapter}{Appendices}
@@ -1,49 +1,14 @@
1
- %% natbib-compatible BibTeX bibliography style `splncsnat'
2
1
  %%
3
- %% BibTeX bibliography style for use with numbered references in
4
- %% Springer Verlag's "Lecture Notes in Computer Science" series.
5
- %% (See Springer's documentation for llncs.cls for
6
- %% more details of the suggested reference format.)
7
- %%
8
- %% Use
9
- %%
10
- %% \documentclass{llncs}
11
- %% \usepackage[numbers]{natbib}
12
- %% \bibliographystyle{splncsnat}
13
- %%
14
- %% and cite references with (e.g.)
15
- %%
16
- %% \cite{smith77} % to get a "[1]" in the text
17
- %% \citep{smith77} % to get a "[1]" in the text
18
- %% \citet{smith77} % to get a "Smith [1]" in the text
19
- %% \citeauthor{smith77} % to get a "Smith" in the text
20
- %%
21
- %% The changes below are inspired by similar changes made to
22
- %% splncs03.bst by Maurizio "Titto" Patrignani of
23
- %% Dipartimento di Informatica e Automazione Universita' Roma Tre.
24
- %% Unfortunately, splncs03.bst was not compatible with natbib (because it
25
- %% was not built with author-year capability).
26
- %%
27
- %% ================================================================================================
28
- %% MANUAL CHANGES
29
- %% (with respect to splncsnat-unpatched.bst produced from
30
- %% splncsnat-unpatched.dbj):
31
- %% [ search for ++++ to find the changes ]
32
- %% - Emptied \urlprefix by default
33
- %% - Added a new.sentence command to separate with a dot booktitle and series in the inproceedings
34
- %% - Commented all new.block commands before notes (to separate them with a comma)
35
- %% ================================================================================================
36
- %%
37
- %% This is derived from `splncsnat-unpatched.bst',
2
+ %% This is file `splncs04nat.bst',
38
3
  %% generated with the docstrip utility.
39
4
  %%
40
- %% The original source files for splncsnat-unpatched.bst were:
5
+ %% The original source files were:
41
6
  %%
42
- %% merlin.mbs (with options: `ay,nat,vonx,nm-rvvc,ed-rev,yr-par,aymth,note-yr,jttl-rm,volp-com,numser,ser-vol,jnm-x,btit-rm,bt-rm,edparxc,au-col,in-col,fin-bare,pp,ed,abr,mth-bare,xedn,jabr,and-com,and-com-ed,xand,url,url-nt,em-x,nfss,')
7
+ %% merlin.mbs (with options: `ay,nat,vonx,nm-rvvc,ed-rev,nmfted,yr-par,aymth,jttl-rm,vol-bf,volp-com,num-xser,numser,ser-vol,jnm-x,btit-rm,bt-rm,isbn,issn,doi,edparxc,blk-tit,au-col,in-col,fin-bare,pp,ed,abr,mth-bare,xedn,jabr,and-com,and-com-ed,xand,url,url-blk,em-x,nfss,')
43
8
  %% ----------------------------------------
44
- %% *** natbib-compatible .bst file for Springer LNCS ***
9
+ %% *** natbib-compatible splncs04 ***
45
10
  %%
46
- %% Copyright 1994-2007 Patrick W Daly
11
+ %% Copyright 1994-2011 Patrick W Daly
47
12
  % ===============================================================
48
13
  % IMPORTANT NOTICE:
49
14
  % This bibliographic style (bst) file has been generated from one or
@@ -55,7 +20,7 @@
55
20
  % version 1 of the License, or any later version.
56
21
  % ===============================================================
57
22
  % Name and version information of the main mbs file:
58
- % \ProvidesFile{merlin.mbs}[2007/04/24 4.20 (PWD, AO, DPC)]
23
+ % \ProvidesFile{merlin.mbs}[2011/11/18 4.33 (PWD, AO, DPC)]
59
24
  % For use with BibTeX version 0.99a or later
60
25
  %-------------------------------------------------------------------
61
26
  % This bibliography style file is intended for texts in ENGLISH
@@ -80,7 +45,7 @@
80
45
  % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
81
46
  % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
82
47
  % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
83
- % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
48
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., 1990, p. 32)
84
49
  % \citeauthor{key} ==>> Jones et al.
85
50
  % \citeauthor*{key} ==>> Jones, Baker, and Smith
86
51
  % \citeyear{key} ==>> 1990
@@ -91,11 +56,14 @@ ENTRY
91
56
  author
92
57
  booktitle
93
58
  chapter
59
+ doi
94
60
  edition
95
61
  editor
96
62
  eid
97
63
  howpublished
98
64
  institution
65
+ isbn
66
+ issn
99
67
  journal
100
68
  key
101
69
  month
@@ -192,7 +160,7 @@ FUNCTION {add.colon}
192
160
 
193
161
  FUNCTION {date.block}
194
162
  {
195
- new.block
163
+ skip$
196
164
  }
197
165
 
198
166
  FUNCTION {not}
@@ -211,17 +179,24 @@ FUNCTION {or}
211
179
  if$
212
180
  }
213
181
  STRINGS {z}
182
+
214
183
  FUNCTION {remove.dots}
215
184
  { 'z :=
216
- ""
217
- { z empty$ not }
218
- { z #1 #1 substring$
219
- z #2 global.max$ substring$ 'z :=
220
- duplicate$ "." = 'pop$
221
- { * }
222
- if$
223
- }
224
- while$
185
+ ""
186
+ { z empty$ not }
187
+ { z #1 #2 substring$
188
+ duplicate$ "\." =
189
+ { z #3 global.max$ substring$ 'z := * }
190
+ { pop$
191
+ z #1 #1 substring$
192
+ z #2 global.max$ substring$ 'z :=
193
+ duplicate$ "." = 'pop$
194
+ { * }
195
+ if$
196
+ }
197
+ if$
198
+ }
199
+ while$
225
200
  }
226
201
  FUNCTION {new.block.checkb}
227
202
  { empty$
@@ -239,6 +214,12 @@ FUNCTION {field.or.null}
239
214
  }
240
215
  FUNCTION {emphasize}
241
216
  { skip$ }
217
+ FUNCTION {bolden}
218
+ { duplicate$ empty$
219
+ { pop$ "" }
220
+ { "\textbf{" swap$ * "}" * }
221
+ if$
222
+ }
242
223
  FUNCTION {tie.or.space.prefix}
243
224
  { duplicate$ text.length$ #3 <
244
225
  { "~" }
@@ -407,6 +388,15 @@ FUNCTION {bibinfo.warn}
407
388
  }
408
389
  if$
409
390
  }
391
+ FUNCTION {format.url}
392
+ {
393
+ url
394
+ duplicate$ empty$
395
+ { pop$ "" }
396
+ { "\urlprefix\url{" swap$ * "}" * }
397
+ if$
398
+ }
399
+
410
400
  INTEGERS { nameptr namesleft numnames }
411
401
 
412
402
 
@@ -480,12 +470,34 @@ FUNCTION {format.editors}
480
470
  }
481
471
  if$
482
472
  }
473
+ FUNCTION {format.isbn}
474
+ { isbn "isbn" bibinfo.check
475
+ duplicate$ empty$ 'skip$
476
+ {
477
+ "ISBN " swap$ *
478
+ }
479
+ if$
480
+ }
481
+
482
+ FUNCTION {format.issn}
483
+ { issn "issn" bibinfo.check
484
+ duplicate$ empty$ 'skip$
485
+ {
486
+ "ISSN " swap$ *
487
+ }
488
+ if$
489
+ }
490
+
491
+ FUNCTION {format.doi}
492
+ { doi empty$
493
+ { "" }
494
+ {
495
+ "\doi{" doi * "}" *
496
+ }
497
+ if$
498
+ }
483
499
  FUNCTION {format.note}
484
500
  {
485
- url empty$
486
- 'skip$
487
- { "\urlprefix\url{" url * "}" * output }
488
- if$
489
501
  note empty$
490
502
  { "" }
491
503
  { note #1 #1 substring$
@@ -700,14 +712,14 @@ FUNCTION {format.number.series}
700
712
  { volume empty$
701
713
  { number empty$
702
714
  { series field.or.null }
703
- { output.state mid.sentence =
704
- { bbl.number }
705
- { bbl.number capitalize }
706
- if$
707
- number tie.or.space.prefix "number" bibinfo.check * *
708
- series empty$
709
- { "there's a number but no series in " cite$ * warning$ }
710
- { bbl.in space.word *
715
+ { series empty$
716
+ { number "number" bibinfo.check }
717
+ { output.state mid.sentence =
718
+ { bbl.number }
719
+ { bbl.number capitalize }
720
+ if$
721
+ number tie.or.space.prefix "number" bibinfo.check * *
722
+ bbl.in space.word *
711
723
  series "series" bibinfo.check *
712
724
  }
713
725
  if$
@@ -801,6 +813,7 @@ FUNCTION {format.vol.num.pages}
801
813
  "volume" bibinfo.check
802
814
  }
803
815
  if$
816
+ bolden
804
817
  number "number" bibinfo.check duplicate$ empty$ 'skip$
805
818
  {
806
819
  swap$ duplicate$ empty$
@@ -930,9 +943,8 @@ FUNCTION {article}
930
943
  format.authors "author" output.check
931
944
  author format.key output
932
945
  add.colon
933
- new.block
934
946
  format.title "title" output.check
935
- new.block
947
+ new.sentence
936
948
  crossref missing$
937
949
  {
938
950
  journal
@@ -946,7 +958,9 @@ FUNCTION {article}
946
958
  format.pages output
947
959
  }
948
960
  if$
949
- % new.block ++++ REMOVED (to get comma before note)
961
+ format.issn output
962
+ format.doi output
963
+ format.url output
950
964
  format.note output
951
965
  fin.entry
952
966
  }
@@ -965,23 +979,23 @@ FUNCTION {book}
965
979
  if$
966
980
  }
967
981
  if$
968
- new.block
969
982
  format.btitle "title" output.check
970
983
  crossref missing$
971
984
  { format.bvolume output
972
- new.block
973
- new.sentence
985
+ new.sentence
974
986
  format.number.series output
975
987
  format.publisher.address output
976
988
  }
977
989
  {
978
- new.block
990
+ new.sentence
979
991
  format.book.crossref output.nonnull
980
992
  }
981
993
  if$
982
994
  format.edition output
983
995
  format.date "year" output.check
984
- % new.block ++++ REMOVED (to get comma before note)
996
+ format.isbn output
997
+ format.doi output
998
+ format.url output
985
999
  format.note output
986
1000
  fin.entry
987
1001
  }
@@ -990,13 +1004,14 @@ FUNCTION {booklet}
990
1004
  format.authors output
991
1005
  author format.key output
992
1006
  add.colon
993
- new.block
994
1007
  format.title "title" output.check
995
- new.block
1008
+ new.sentence
996
1009
  howpublished "howpublished" bibinfo.check output
997
1010
  address "address" bibinfo.check output
998
1011
  format.date "year" output.check
999
- % new.block ++++ REMOVED (to get comma before note)
1012
+ format.isbn output
1013
+ format.doi output
1014
+ format.url output
1000
1015
  format.note output
1001
1016
  fin.entry
1002
1017
  }
@@ -1016,26 +1031,29 @@ FUNCTION {inbook}
1016
1031
  if$
1017
1032
  }
1018
1033
  if$
1019
- new.block
1020
1034
  format.btitle "title" output.check
1021
1035
  crossref missing$
1022
1036
  {
1023
1037
  format.bvolume output
1024
1038
  format.chapter.pages "chapter and pages" output.check
1025
- new.block
1026
- new.sentence
1039
+ new.sentence
1027
1040
  format.number.series output
1028
1041
  format.publisher.address output
1029
1042
  }
1030
1043
  {
1031
1044
  format.chapter.pages "chapter and pages" output.check
1032
- new.block
1045
+ new.sentence
1033
1046
  format.book.crossref output.nonnull
1034
1047
  }
1035
1048
  if$
1036
1049
  format.edition output
1037
1050
  format.date "year" output.check
1038
- % new.block ++++ REMOVED (to get comma before note)
1051
+ crossref missing$
1052
+ { format.isbn output }
1053
+ 'skip$
1054
+ if$
1055
+ format.doi output
1056
+ format.url output
1039
1057
  format.note output
1040
1058
  fin.entry
1041
1059
  }
@@ -1045,24 +1063,24 @@ FUNCTION {incollection}
1045
1063
  format.authors "author" output.check
1046
1064
  author format.key output
1047
1065
  add.colon
1048
- new.block
1049
1066
  format.title "title" output.check
1050
- new.block
1067
+ new.sentence
1051
1068
  crossref missing$
1052
1069
  { format.in.ed.booktitle "booktitle" output.check
1053
1070
  format.bvolume output
1054
1071
  format.chapter.pages output
1055
- new.sentence
1056
1072
  format.number.series output
1057
1073
  format.publisher.address output
1058
1074
  format.edition output
1059
1075
  format.date "year" output.check
1076
+ format.isbn output
1060
1077
  }
1061
1078
  { format.incoll.inproc.crossref output.nonnull
1062
1079
  format.chapter.pages output
1063
1080
  }
1064
1081
  if$
1065
- % new.block ++++ REMOVED (to get comma before note)
1082
+ format.doi output
1083
+ format.url output
1066
1084
  format.note output
1067
1085
  fin.entry
1068
1086
  }
@@ -1071,15 +1089,12 @@ FUNCTION {inproceedings}
1071
1089
  format.authors "author" output.check
1072
1090
  author format.key output
1073
1091
  add.colon
1074
- new.block
1075
1092
  format.title "title" output.check
1076
- new.block
1093
+ new.sentence
1077
1094
  crossref missing$
1078
1095
  { format.in.ed.booktitle "booktitle" output.check
1079
- new.sentence % ++++ ADDED (to get period b/w booktitle and series)
1080
1096
  format.bvolume output
1081
1097
  format.pages output
1082
- new.sentence
1083
1098
  format.number.series output
1084
1099
  publisher empty$
1085
1100
  { format.organization.address output }
@@ -1088,12 +1103,15 @@ FUNCTION {inproceedings}
1088
1103
  }
1089
1104
  if$
1090
1105
  format.date "year" output.check
1106
+ format.isbn output
1107
+ format.issn output
1091
1108
  }
1092
1109
  { format.incoll.inproc.crossref output.nonnull
1093
1110
  format.pages output
1094
1111
  }
1095
1112
  if$
1096
- % new.block ++++ REMOVED (to get comma before note)
1113
+ format.doi output
1114
+ format.url output
1097
1115
  format.note output
1098
1116
  fin.entry
1099
1117
  }
@@ -1103,14 +1121,14 @@ FUNCTION {manual}
1103
1121
  format.authors output
1104
1122
  author format.key output
1105
1123
  add.colon
1106
- new.block
1107
1124
  format.btitle "title" output.check
1108
- organization address new.block.checkb
1125
+ new.sentence
1109
1126
  organization "organization" bibinfo.check output
1110
1127
  address "address" bibinfo.check output
1111
1128
  format.edition output
1112
1129
  format.date "year" output.check
1113
- % new.block ++++ REMOVED (to get comma before note)
1130
+ format.doi output
1131
+ format.url output
1114
1132
  format.note output
1115
1133
  fin.entry
1116
1134
  }
@@ -1120,15 +1138,15 @@ FUNCTION {mastersthesis}
1120
1138
  format.authors "author" output.check
1121
1139
  author format.key output
1122
1140
  add.colon
1123
- new.block
1124
1141
  format.btitle
1125
1142
  "title" output.check
1126
- new.block
1143
+ new.sentence
1127
1144
  bbl.mthesis format.thesis.type output.nonnull
1128
1145
  school "school" bibinfo.warn output
1129
1146
  address "address" bibinfo.check output
1130
1147
  format.date "year" output.check
1131
- % new.block ++++ REMOVED (to get comma before note)
1148
+ format.doi output
1149
+ format.url output
1132
1150
  format.note output
1133
1151
  fin.entry
1134
1152
  }
@@ -1138,12 +1156,12 @@ FUNCTION {misc}
1138
1156
  format.authors output
1139
1157
  author format.key output
1140
1158
  add.colon
1141
- new.block
1142
1159
  format.title output
1143
- new.block
1160
+ new.sentence
1144
1161
  howpublished "howpublished" bibinfo.check output
1145
1162
  format.date "year" output.check
1146
- % new.block ++++ REMOVED (to get comma before note)
1163
+ format.doi output
1164
+ format.url output
1147
1165
  format.note output
1148
1166
  fin.entry
1149
1167
  }
@@ -1152,15 +1170,15 @@ FUNCTION {phdthesis}
1152
1170
  format.authors "author" output.check
1153
1171
  author format.key output
1154
1172
  add.colon
1155
- new.block
1156
1173
  format.btitle
1157
1174
  "title" output.check
1158
- new.block
1175
+ new.sentence
1159
1176
  bbl.phdthesis format.thesis.type output.nonnull
1160
1177
  school "school" bibinfo.warn output
1161
1178
  address "address" bibinfo.check output
1162
1179
  format.date "year" output.check
1163
- % new.block ++++ REMOVED (to get comma before note)
1180
+ format.doi output
1181
+ format.url output
1164
1182
  format.note output
1165
1183
  fin.entry
1166
1184
  }
@@ -1170,10 +1188,8 @@ FUNCTION {proceedings}
1170
1188
  format.editors output
1171
1189
  editor format.key output
1172
1190
  add.colon
1173
- new.block
1174
1191
  format.btitle "title" output.check
1175
1192
  format.bvolume output
1176
- new.sentence
1177
1193
  format.number.series output
1178
1194
  publisher empty$
1179
1195
  { format.organization.address output }
@@ -1182,7 +1198,10 @@ FUNCTION {proceedings}
1182
1198
  }
1183
1199
  if$
1184
1200
  format.date "year" output.check
1185
- % new.block ++++ REMOVED (to get comma before note)
1201
+ format.isbn output
1202
+ format.issn output
1203
+ format.doi output
1204
+ format.url output
1186
1205
  format.note output
1187
1206
  fin.entry
1188
1207
  }
@@ -1192,15 +1211,15 @@ FUNCTION {techreport}
1192
1211
  format.authors "author" output.check
1193
1212
  author format.key output
1194
1213
  add.colon
1195
- new.block
1196
1214
  format.title
1197
1215
  "title" output.check
1198
- new.block
1216
+ new.sentence
1199
1217
  format.tr.number output.nonnull
1200
1218
  institution "institution" bibinfo.warn output
1201
1219
  address "address" bibinfo.check output
1202
1220
  format.date "year" output.check
1203
- % new.block ++++ REMOVED (to get comma before note)
1221
+ format.doi output
1222
+ format.url output
1204
1223
  format.note output
1205
1224
  fin.entry
1206
1225
  }
@@ -1210,10 +1229,10 @@ FUNCTION {unpublished}
1210
1229
  format.authors "author" output.check
1211
1230
  author format.key output
1212
1231
  add.colon
1213
- new.block
1214
1232
  format.title "title" output.check
1215
1233
  format.date "year" output.check
1216
- % new.block ++++ REMOVED (to get comma before note)
1234
+ format.doi output
1235
+ format.url output
1217
1236
  format.note "note" output.check
1218
1237
  fin.entry
1219
1238
  }
@@ -1315,7 +1334,7 @@ FUNCTION {calc.label}
1315
1334
  *
1316
1335
  year duplicate$ empty$
1317
1336
  { pop$ "????" }
1318
- 'skip$
1337
+ { purify$ #-1 #4 substring$ }
1319
1338
  if$
1320
1339
  *
1321
1340
  'label :=
@@ -1329,15 +1348,16 @@ FUNCTION {sort.format.names}
1329
1348
  numnames 'namesleft :=
1330
1349
  { namesleft #0 > }
1331
1350
  { s nameptr
1332
- "{ll{ }}{ ff{ }}{ jj{ }}"
1351
+ "{ll{ }}{ f{ }}{ jj{ }}"
1333
1352
  format.name$ 't :=
1334
1353
  nameptr #1 >
1335
1354
  {
1336
1355
  " " *
1337
1356
  namesleft #1 = t "others" = and
1338
- { "zzzzz" * }
1339
- { t sortify * }
1357
+ { "zzzzz" 't := }
1358
+ 'skip$
1340
1359
  if$
1360
+ t sortify *
1341
1361
  }
1342
1362
  { t sortify * }
1343
1363
  if$
@@ -1428,17 +1448,30 @@ FUNCTION {presort}
1428
1448
  ITERATE {presort}
1429
1449
  SORT
1430
1450
  STRINGS { last.label next.extra }
1431
- INTEGERS { last.extra.num number.label }
1451
+ INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label }
1432
1452
  FUNCTION {initialize.extra.label.stuff}
1433
1453
  { #0 int.to.chr$ 'last.label :=
1434
1454
  "" 'next.extra :=
1435
1455
  #0 'last.extra.num :=
1456
+ "a" chr.to.int$ #1 - 'last.extra.num.blank :=
1457
+ last.extra.num.blank 'last.extra.num.extended :=
1436
1458
  #0 'number.label :=
1437
1459
  }
1438
1460
  FUNCTION {forward.pass}
1439
1461
  { last.label label =
1440
1462
  { last.extra.num #1 + 'last.extra.num :=
1441
- last.extra.num int.to.chr$ 'extra.label :=
1463
+ last.extra.num "z" chr.to.int$ >
1464
+ { "a" chr.to.int$ 'last.extra.num :=
1465
+ last.extra.num.extended #1 + 'last.extra.num.extended :=
1466
+ }
1467
+ 'skip$
1468
+ if$
1469
+ last.extra.num.extended last.extra.num.blank >
1470
+ { last.extra.num.extended int.to.chr$
1471
+ last.extra.num int.to.chr$
1472
+ * 'extra.label := }
1473
+ { last.extra.num int.to.chr$ 'extra.label := }
1474
+ if$
1442
1475
  }
1443
1476
  { "a" chr.to.int$ 'last.extra.num :=
1444
1477
  "" 'extra.label :=
@@ -1491,8 +1524,13 @@ FUNCTION {begin.bib}
1491
1524
  write$ newline$
1492
1525
  "\providecommand{\url}[1]{\texttt{#1}}"
1493
1526
  write$ newline$
1494
- % "\providecommand{\urlprefix}{URL }" ++++ EMPTIED by default
1495
- "\providecommand{\urlprefix}{}"
1527
+ "\providecommand{\urlprefix}{URL }"
1528
+ write$ newline$
1529
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
1530
+ write$ newline$
1531
+ " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
1532
+ write$ newline$
1533
+ " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
1496
1534
  write$ newline$
1497
1535
  }
1498
1536
  EXECUTE {begin.bib}
@@ -1505,4 +1543,4 @@ FUNCTION {end.bib}
1505
1543
  EXECUTE {end.bib}
1506
1544
  %% End of customized bst file
1507
1545
  %%
1508
- %% End of file `splncsnat.bst'.
1546
+ %% End of file `splncs04nat.bst'.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-latex-template",
3
- "version": "0.5.0",
3
+ "version": "0.6.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": {