publications-journals.tex /size: 1977 b    last modification: 2020-07-01 14:35
1% \endinput
2
3\environment publications-style
4
5\startcomponent publications-journals
6
7\startchapter[title=Journals]
8
9An experimental feature is the ability to load a list of mapping from complete
10journal names to abbreviated forms.
11
12\startbuffer
13\btxloadjournallist[journals.txt] % the jabref list
14
15\btxexpandedjournal   {Z. Ökol. Nat.schutz} or
16\btxabbreviatedjournal{Z. Ökol. Nat.schutz} or
17\btxabbreviatedjournal{Z. Ökol. Nat. schutz}
18\stopbuffer
19
20\typeTEXbuffer \getbuffer
21
22In this case the text file looks like:
23
24\starttyping
25Zeitschrift für Ökologie und Naturschutz = Z. Ökol. Nat..schutz
26....
27\stoptyping
28
29Instead you can have a \LUA\ file that looks like:
30
31\startLUA
32return {
33    ["Zeitschrift für Ökologie und Naturschutz"] = "Z. Ökol. Nat.schutz",
34    ...
35}
36\stopLUA
37
38or
39
40\startLUA
41return {
42    { "Zeitschrift für Ökologie und Naturschutz", "Z. Ökol. Nat.schutz" },
43    ...
44}
45\stopLUA
46
47A file can be saved with:
48
49\startTEX
50\btxsavejournallist[journals.lua]
51\stopTEX
52
53and then loaded again in a second run. For small lists it makes not much sense
54to cache the lists but if you have tens thousands of journals it can be
55considered. Normally loading is can be neglected compared to the run. Anyhow,
56such a list looks like this:
57
58\startLUA
59return {
60    ["abbreviations"]={
61        ["zeitschriftfürökologieundnaturschutz"] = "Z. Ökol. Nat.schutz",
62    },
63    ["expansions"]={
64        ["zökolnatschutz"] = "Zeitschrift für Ökologie und Naturschutz",
65    },
66}
67\stopLUA
68
69In the future \type {mtx-bibtex} might be able to generate such lists (once we know
70what users come up with).
71
72You can add additional entries with:
73
74\startTEX
75\btxaddjournal
76  [Zeitschrift für Ökologie und Naturschutz]
77  [Z. Ökol. Nat.schutz]
78\stopTEX
79
80As usual with such mechanisms, internally spaces, punctuation and case are
81ignored with a lookup.
82
83There are also two manipulators for journals: \type {expandedjournal} and
84\type {abbreviatedjournal}.
85
86\stopchapter
87
88\stopcomponent
89