Debian Codegraph @

texmf-dist/tex/optex/base/bib-iso690.opm

raw
1 % This is part of the OpTeX project, see http://petr.olsak.net/optex
2
3 \_codedecl \_undefined {BIB style (iso690) <2025-04-15>} % loaded on demand by \usebib
4
5 \_ifx\_optexbibstyle\_undefined \_errmessage
6 {This file can be read by: \_string\usebib/? (iso690) bibfiles command only}
7 \_endinput \_fi
8
9 \_doc -----------------------------
10 \`\_maybetod` (alias `\:` in the style file group) does not put the second dot.
11 \_cod -----------------------------
12
13 \_def\_maybedot{\_ifnum\_spacefactor=\_sfcode`\.\_relax\_else.\_fi}
14 \_tmpnum=\_sfcode`\. \_advance\_tmpnum by-2 \_sfcode`\.=\_tmpnum
15 \_sfcode`\?=\_tmpnum \_sfcode`\!=\_tmpnum
16 \_let\:=\_maybedot % prevents from double periods
17 \_ifx\.\_undefined \_let\.=\_maybedot \_fi % for backward compatibility
18
19 \_doc -----------------------------
20 Option field.
21 \_cod -----------------------------
22
23 \_CreateField {option}
24 \_def\_isbiboption#1#2{\_edef\_tmp{\_noexpand\_isbiboptionA{#1}}\_tmp}
25 \_def\_isbiboptionA#1{\_def\_tmp##1 #1 ##2\_relax{%
26 \_if^##2^\_csname iffalse\_ea\_endcsname \_else\_csname iftrue\_ea\_endcsname \_fi}%
27 \_ea\_tmp\_biboptionsi #1 \_relax}
28 \_def\_bibopt[#1]#2#3{\_isbiboption{#1}\_iftrue\_def\_tmp{#2}\_else\_def\_tmp{#3}\_fi\_tmp}
29 \_def\_biboptionvalue#1#2{\_def\_tmp##1 #1:##2 ##3\_relax{\_def#2{##2}}%
30 \_ea\_tmp\_biboptionsi #1: \_relax}
31
32 \_def\_readbiboptions{%
33 \_RetrieveFieldIn{option}\_biboptionsi
34 \_toks1=\_ea{\_biboptionsi}%
35 \_edef\_biboptionsi{\_space \_the\_toks1 \_space \_the\_biboptions \_space}%
36 }
37
38 \_doc -----------------------------
39 Formatting of Author/Editor lists.
40 \_cod -----------------------------
41
42 \_def\_firstauthorformat{%
43 \_upper{\_Lastname}\_bprintc\_Firstname{, *}\_bprintc\_Von{ *}\_bprintc\_Junior{, *}%
44 }
45 \_def\_otherauthorformat{%
46 \_bprintc\_Firstname{* }\_bprintc\_Von{* }\_upper{\_Lastname}\_bprintc\_Junior{, *}%
47 }
48 \_def\_commonname{%
49 \_ifnum\_NameCount=1
50 \_firstauthorformat
51 \_else
52 \_ifnum0\_namecount=\_NameCount
53 \_ifx\_maybeetal\_empty \_bibconjunctionand\_else , \_fi
54 \_else , \_fi
55 \_otherauthorformat
56 \_fi
57 }
58 \_def\_authorname{%
59 \_ifx\_authlist\_undefined \_edef\_authlist{\_Lastname,\_Firstname,\_Von,\_Junior}%
60 \_else \_edef\_authlist{\_authlist;\_Lastname,\_Firstname,\_Von,\_Junior}\_fi
61 \_ifnum\_NameCount>0\_namecount\_relax\_else \_commonname \_fi
62 \_ifnum\_NameCount=0\_namecount\_relax \_maybeetal \_fi
63 }
64 \_def\_editorname{%
65 \_ifnum\_NameCount>0\_namecount\_relax\_else \_commonname \_fi
66 \_ifnum\_NameCount=0\_namecount\_relax \_maybeetal \_fi
67 }
68
69 \_def\_prepareauedoptions#1{%
70 \_def\_maybeetal{}\_csname lb@abbreviatefalse\_endcsname
71 \_biboptionvalue{#1max}\_authormax
72 \_biboptionvalue{#1min}\_authormin
73 \_biboptionvalue{#1pre}\_authorpre
74 \_biboptionvalue{#1print}\_authorprint
75 \_isbiboption{#1etal}\_iftrue \_def\_maybeetal{\_Mtext{bib.etal}}\_fi
76 \_biboptionvalue{#1trim}\_autrim
77 \_let\_namecountraw=\_namecount
78 \_ifx\_authormax\_empty \_else
79 \_ifnum 0\_authormax<0\_namecount
80 \_edef\_namecount{\_ifx\_authormin\_empty\_authormax\_else\_authormin\_fi}%
81 \_def\_maybeetal{\_Mtext{bib.etal}}%
82 \_fi\_fi
83 \_ifx\_autrim\_empty \_def\_autrim{10000}\_fi
84 \_ifnum\_autrim=0 \_def\_autrim{10000}\_fi
85 \_ifnum 0\_namecount<\_autrim\_relax \_else \_AbbreviateFirstname \_fi
86 }
87 \_def\_maybeetal{}
88
89 \_ifx\upper\_undefined
90 \_ifx\caps \_undefined \_def\upper{\_uppercase\_ea}\_else
91 \_def\upper#1{{\caps\_rm #1}}\_fi
92 \_fi
93 \_let\_upper=\upper
94
95 \_doc -----------------------------
96 Preparing bib-mark (used when \^`\nonumcitations`).
97 The \`\_setbibmark` is run at the end of each record.
98 The \`\_authlist` includes `Lastname,Firstname,Von,Junior`
99 of all authors separated by semicolon (no semicolon at the end of the
100 list). If `bibmark` isn't declared explicitly then we create it by the
101 \`\_createbibmark``<year>;<authors-list>;,;,;,;\_fin` macro.
102 It outputs first Lastname (and adds \"et al." if the second author in the
103 <authors-list> is non-empty). Then comma and <year> is appended.
104 A user can redefine the `\_createbibark` macro in the `\bibtexhook`
105 tokens list, if another bibmark format is needed.
106 The macro `\_createbibmark` must be expandable. See also
107 \ulink[http://petr.olsak.net/optex/optex-tricks.html\#bibmark]{\OpTeX/ trick~0104}.
108 \_cod -----------------------------
109
110 \_def\_setbibmark{%
111 \_ifx\_authlist\_undefined \_def\_authlist{,;}\_fi
112 \_RetrieveFieldIn{bibmark}\_tmp
113 \_ifx\_tmp\_empty
114 \_RetrieveFieldIn{year}\_tmp
115 \_edef\_tmp{\_ea\_createbibmark\_expanded{\_tmp;\_authlist};,;,;,;\_fin}\_fi
116 \_bibmark=\_ea{\_tmp}%
117 }
118 \_def\_createbibmark #1;#2,#3;#4,#5\_fin{% #1=year #2=LastName #3=FirstName #4=nextAuthor
119 #2\_ifx^#4^\_else \_Mtext{bib.etal}\_fi \_ifx^#1^\_else, #1\_fi
120 }
121
122 \_doc -----------------------------
123 Setting phrases.
124 \_cod -----------------------------
125
126 \_def\_bibconjunctionand{\_Mtext{bib.and}}
127 \_def\_preurl{\_Mtext{bib.available}}
128 \_let\_predoi=\_preurl
129 \_def\_postedition{\_mtext{bib.edition}}
130 \_def\_Inclause{In:~}
131 \_def\_prevolume{\_mtext{bib.volume}}
132 \_def\_prenumber{\_mtext{bib.number}}
133 \_def\_prepages{\_mtext{bib.prepages}}
134 \_def\_posteditor{\_ifnum0\_namecountraw>1 \_Mtext{bib.editors}\_else\_Mtext{bib.editor}\_fi}
135
136 \_doc ----------------------------
137 \`\_Mtext``{<identifier>}` expands to a
138 phrase by outer document language (no entry language).
139 \_cod -----------------------------
140
141 \_chardef\_documentlanguage=\_language
142 \_def\_Mtext#1{\_csname _mt:#1:\_csname _lan:\_the\_documentlanguage\_endcsname\_endcsname}
143
144 \_CreateField {lang}
145 \_def\_setlang#1{\_ifx#1\_empty \_else
146 \_setbox0=\_vbox{\_langinput{#1}}%
147 \_ifcsname _mt:bib.and:#1\_endcsname
148 \_language=\_csname _#1Patt\_endcsname \_relax
149 \_else \_opwarning{No phrases for "#1" used by [\EntryKey] in .bib}%
150 \_fi\_fi
151 }
152
153 \_doc -----------------------------
154 Sorting.
155 \_cod -----------------------------
156
157 \_fieldalias {key} {sortedby}
158
159 \_doc -----------------------------
160 Supporting macros.
161 \_cod -----------------------------
162
163 \_def\_bibwarninga{\_bibwarning}
164 \_def\_bibwarningb{\_bibwarning}
165
166 \_def\_docitedate #1/#2/#3/#4\_relax{[\_Mtext{bib.citedate}%
167 \_if^#2^#1\_else
168 \_if^#3^#1/#2\_else
169 \_cs{_\_cs{_lan:\_the\_documentlanguage}dateformat}#1/#2/#3\relax
170 \_fi\_fi ]%
171 }
172 \_def\_doyear#1{
173 \_biboptionvalue{yearprint}\_yearprint
174 \_ifx\_yearprint\_empty#1\_else\_def\YEAR{#1}\_yearprint\_fi
175 }
176 \_def\_preparenumbering{%
177 \_def\VOL{\_RetrieveField{volume}}%
178 \_def\NO{\_RetrieveField{number}}%
179 \_def\PP{\_RetrieveField{pages}}%
180 }
181 \_def\_prepareednote{%
182 \_def\EDN{\_RetrieveField{edition}}%
183 \_def\ADDR{\_RetrieveField{address}}%
184 \_def\PUBL{\_RetrieveField{publisher}}%
185 \_def\YEAR{\_RetrieveField{year}}%
186 \_def\AU{\_bprintb[!author]{\_doauthor0{####1}}{}}%
187 \_def\ED{\_bprintb[!editor]{\_doeditor0{####1}}{}}%
188 \_preparenumbering
189 }
190 \_def\_doedition#1{%
191 \_biboptionvalue{editionprint}\_editionprint
192 \_ifx\_editionprint\_empty#1\_postedition\_else\_def\ED{#1}\_editionprint\_fi
193 }
194 \_def\_doauthor#1#2{\_prepareauedoptions{au}\_let\_iseditorlist=\_undefined
195 \_if1#1\_def\AU{#2}\_else\_let\_authorprint=\_empty\_fi
196 \_ifx\_authorprint\_empty #2\_else \_authorprint\_fi
197 }
198 \_def\_doeditor#1#2{\_prepareauedoptions{ed}\_let\_firstauthorformat=\_otherauthorformat
199 \_if1#1\_def\ED{#2}\_else\_let\_authorprint=\_empty\_fi
200 \_ifx\_authorprint\_empty #2\_posteditor\_else \_authorprint\_fi
201 }
202
203 \_doc -----------------------------
204 Entry types.
205 \_cod -----------------------------
206
207 \_sdef{_print:BEGIN}{%
208 \_readbiboptions
209 \_biboptionvalue{titlepost}\_titlepost
210 \_isbiboption{unpublished}\_iftrue \_let\_bibwarninga=\_relax \_let\_bibwarningb=\_relax \_fi
211 \_isbiboption{nowarn}\_iftrue \_let\_bibwarning=\_relax \_fi
212 \_isbiboption{urlalso}\_iftrue \_def\_preurl{\_Mtext{bib.availablealso}}\_fi
213 \_RetrieveFieldIn{lang}\_langentry \_setlang\_langentry
214 }
215 \_sdef{_print:END}{%
216 \_bprinta [note] {*.}{}%
217 \_setbibmark
218 }
219 \_def\_bookgeneric#1{%
220 \_bprinta [howpublished] {[*].\ }{}%
221 \_bprintb [edition] {\_doedition{##1}\:\ }{}%
222 \_bprinta [ednote] {*.\ }{}%
223 \_bprinta [address] {*\_bprintv[publisher]{:}{\_bprintv[year]{,}{.}}\ }{\_bibwarninga}%
224 \_bprinta [publisher] {*\_bprintv[year]{,}{.}\ }{\_bibwarninga}%
225 \_bprintb [year] {\_doyear{##1}\_bprintv[citedate]{\_bprintv[numbering]{.}{}}{.}\ }%
226 {\_bibwarning}%
227 \_bprinta [numbering] {\_preparenumbering*\_bprintv[citedate]{}{\:}\ }{}%
228 \_bprinta [citedate] {\_docitedate*///\_relax.\ }{}%
229 #1%
230 \_bprinta [series] {*.\ }{}%
231 \_bprinta [isbn] {ISBN~*.\ }{\_bibwarningb}%
232 \_bprinta [issn] {ISSN~*.\ }{}%
233 \_bprintb [doi] {\_predoi DOI \_ulink[http://dx.doi.org/##1]{##1}.\ }{}%
234 \_bprintb [url] {\_preurl\_url{##1}. }{}%
235 }
236 \_sdef{_print:book}{%
237 \_bprintb [!author] {\_doauthor1{##1}\:\ }{\_bibwarning}%
238 \_bprintb [title] {{\_em##1}\_bprintc\_titlepost{\:\ *}\_bprintv[howpublished]{}{\:}\ }%
239 {\_bibwarning}%
240 \_bookgeneric{}%
241 }
242 \_sdef{_print:article}{%
243 \_biboptionvalue{journalpost}\_journalpost
244 \_bprintb [!author] {\_doauthor1{##1}\:\ }{\_bibwarning}%
245 \_bprinta [title] {*.\ \_bprintc\_titlepost{*.\ }}{\_bibwarning}%
246 \_bprintb [journal] {{\_em##1}\_bprintc\_journalpost{\:\ *}\_bprintv[howpublished]{}{\:}\ }%
247 {\_bibwarninga}%
248 \_bprinta [howpublished] {[*].\ }{}%
249 \_bprinta [address] {*\_bprintb[publisher]{:}{,}\ }{}%
250 \_bprinta [publisher] {*, }{}%
251 \_bprinta [month] {*, }{}%
252 \_bprintb [year] {\_doyear{##1}\_bprintv[volume,number,pages]{,}{\:}\ }{}%
253 \_bprinta [numbering] {\_preparenumbering*\_bprintv[citedate]{}{\:}\ }
254 {\_bprinta [volume] {\_prevolume*\_bprintv[number,pages]{,}{\:}\ }{}%
255 \_bprinta [number] {\_prenumber*\_bprintv[pages]{,}{\:}\ }{}%
256 \_bprintb [pages] {\_prepages\_hbox{##1}\_bprintv[citedate]{}{\:}\ }%
257 {\_bibwarninga}}%
258 \_bprinta [citedate] {\_docitedate*///\_relax.\ }{}%
259 \_bprinta [issn] {ISSN~*.\ }{}%
260 \_bprintb [doi] {\_predoi DOI \_ulink[http://dx.doi.org/##1]{##1}.\ }{}%
261 \_bprintb [url] {\_preurl\_url{##1}. }{}%
262 }
263 \_sdef{_print:inbook}{%
264 \_let\_bibwarningb=\_relax
265 \_bprintb [!author] {\_doauthor1{##1}\:\ }{\_bibwarning}%
266 \_bprinta [title] {*.\ }{\_bibwarning}%
267 \_Inclause
268 \_bprintb [!editor] {\_doeditor1{##1}\:\ }{}%
269 \_bprintb [booktitle] {{\_em##1}\_bprintc\_titlepost{\:\ *}\_bprintv[howpublished]{}{\:}\ }%
270 {\_bibwarning}%
271 \_bookgeneric{\_bprintb [pages] {\_prepages\_hbox{##1}. }{}}%
272 }
273 \_slet{_print:inproceedings}{_print:inbook}
274 \_slet{_print:conference}{_print:inbook}
275
276 \_sdef{_print:thesis}{%
277 \_bprintb [!author] {\_doauthor1{##1}\:\ }{\_bibwarning}%
278 \_bprintb [title] {{\_em##1}\_bprintc\_titlepost{\:\ *}\_bprintv[howpublished]{}{\:}\ }%
279 {\_bibwarning}%
280 \_bprinta [howpublished] {[*].\ }{}%
281 \_bprinta [address] {*\_bprintv[school]{:}{\_bprintv[year]{,}{.}}\ }{\_bibwarning}%
282 \_bprinta [school] {*\_bprintv[year]{,}{.}\ }{\_bibwarning}%
283 \_bprinta [month] {*, }{}%
284 \_bprintb [year] {\_doyear{##1}\_bprintv[citedate]{}{.}\ }{\_bibwarninga}%
285 \_bprinta [citedate] {\_docitedate*///\_relax.\ }{}%
286 \_bprinta [type] {*\_bprintv[ednote]{,}{.}\ }%
287 {\_ifx\_thesistype\_undefined\_bibwarning
288 \_else\_thesistype\_bprintv[ednote]{,}{.}\ \_fi}%
289 \_bprinta [ednote] {*.\ }{}%
290 \_bprintb [doi] {\_predoi DOI \_ulink[http://dx.doi.org/##1]{##1}.\ }{}%
291 \_bprintb [url] {\_preurl\_url{##1}. }{}%
292 }
293 \_sdef{_print:phdthesis}{\_def\_thesistype{\_Mtext{bib.phdthesis}}\_cs{_print:thesis}}
294 \_sdef{_print:mastersthesis}{\_def\_thesistype{\_Mtext{bib.masthesis}}\_cs{_print:thesis}}
295 \_sdef{_print:bachelorsthesis}{\_def\_thesistype{\_Mtext{bib.bachthesis}}\_cs{_print:thesis}}
296
297 \_sdef{_print:online}{%
298 \_bprintb [!author] {\_doauthor1{##1}\:\ }{}%
299 \_bprintb [title] {{\_em##1}\_bprintc\_titlepost{\:\ *}\_bprintv[howpublished]{}{\:}\ }%
300 {\_bibwarning}%
301 \_bprinta [howpublished] {[*].\ }{}%
302 \_bprinta [ednote] {\_prepareednote*\_bprintv[citedate]{}{.}\ }{}%
303 \_bprinta [year] {}{}%
304 \_bprinta [accessed] {\_docitedate*///\_relax.\ }{\_bibwarning}%
305 \_bprintb [doi] {\_predoi DOI \_ulink[http://dx.doi.org/##1]{##1}.\ }{}%
306 \_bprintb [url] {\_preurl\_url{##1}. }{\_bibwarning}%
307 }
308
309 \_sdef{_print:generic}{%
310 \_bprintb [!author] {\_doauthor1{##1}\:\ }{\_bibwarning}%
311 \_bprintb [title] {{\_em##1}\_bprintc\_titlepost{\:\ *}\_bprintv[howpublished]{}{\:}\ }%
312 {\_bibwarning}%
313 \_bprinta [howpublished] {[*].\ }{}%
314 \_bprinta [ednote] {\_prepareednote*\_bprintv[citedate]{}{.}\ }{\_bibwarning}%
315 \_bprinta [citedate] {\_docitedate*///\_relax.\ }{}%
316 \_bprintb [doi] {\_predoi DOI \_ulink[http://dx.doi.org/##1]{##1}.\ }{}%
317 \_bprintb [url] {\_preurl\_url{##1}. }{}%
318 }
319 \_slet{_print:booklet}{_print:generic}
320 \_slet{_print:incollection}{_print:generic}
321 \_slet{_print:manual}{_print:generic}
322 \_slet{_print:proceedings}{_print:generic}
323 \_slet{_print:techreport}{_print:generic}
324 \_slet{_print:unpublished}{_print:generic}
325
326 \_sdef{_print:misc}{\_let\_bibwarning=\_relax \_cs{_print:generic}}
327
328 \_endcode
329
330
331 This is the iso690 bibliographic style used by \OpTeX/.
332
333 See `op-biblist.bib` for an example of the `.bib` input. You can try it by:
334
335 \begtt
336 \fontfam[LMfonts]
337 \nocite[*]
338 \usebib/s (iso690) op-biblist
339 \end
340 \endtt
341
342 \seccc Common rules in \code{.bib} files
343
344 There are entries of type `@FOO{...}` in the `.bib` file. Each entry consists of
345 fields in the form `name = "value"`, or `name = {value}`. No matter which form is
346 used. If the value is pure numeric then you can say simply `name = value`.
347 Warning: the comma after each field value is mandatory! If it is missing then the
348 next field is ignored or badly interpreted.
349
350 The entry names and field names are case insensitive. If there exists a data
351 field no mentioned here then it is simply ignored. You can use it to store
352 more information (abstract, for example).
353
354 There are \"standard fields" used in ancient bib\TeX/ (author, title, editor, edition,
355 etc., see \url{http://en.wikipedia.org/wiki/BibTeX}). The `iso690` style introduces
356 several \"non-standard" fields: ednote, numbering, isbn, issn, doi, url,
357 citedate, key, bibmark. They are documented here.
358
359 Moreover, there are two optional special fields:
360
361 \begitems
362 * lang = language of the entry. The hyphenation plus autogenerated phrases and
363 abbreviations will be typeset by this language.
364 * option = options by which you can control a special printing of various fields.
365 \enditems
366
367 There can be only one option field per each entry with (maybe) more options
368 separated by spaces. You can declare the global option(s) in your document
369 applied for each entry by `\biboptions={...}`.
370
371
372 \seccc The author field
373
374 All names in the author list have to be separated by \"\code{ and }".
375 Each author can be written in various formats (the `von` part is typically missing):
376
377 \begtt
378 Firstname(s) von Lastname
379 or
380 von Lastname, Firstname(s)
381 or
382 von Lastname, After, Firstname(s)
383 \endtt
384 Only the Lastname part is mandatory. Examples:
385 \begtt
386 Petr Olšák
387 or
388 Olšák, Petr
389
390 Leonardo Piero da Vinci
391 or
392 da Vinci, Leonardo Piero
393 or
394 da Vinci, painter, Leonardo Piero
395 \endtt
396 The separator \"\code{ and }" between authors
397 will be converted to comma during
398 printing, but between the semifinal and final author the word \"and" (or something
399 different depending on the current language) is printed.
400
401 The first author is printed in reverse order: \"LASTNAME, Firstname(s) von,
402 After" and the other authors are printed in normal order: \"Firstname(s)
403 von LASTNAME, After". This feature follows the ISO 690 norm. The Lastname
404 is capitalized using uppercase letters. But if the `\caps` font modifier is defined,
405 then it is used and printed `{\caps\_rm Lastname}`.
406
407 You can specify the option `aumax:<number>`. The `<number>` denotes the
408 maximum authors to be printed. The rest of the authors are ignored and the
409 `et~al.` is appended to the list of printed authors. This text is
410 printed only if the `aumax` value is less than the real number of authors.
411 If you have the same number of authors in the .bib file as you need to print
412 but you want to append `et~al.` then you can use `auetal` option.
413
414 There is an `aumin:<number>` option which denotes the definitive number of
415 printed authors if the author list is not fully printed due to `aumax`.
416 If `aumin` is unused then `aumax` authors are printed in this case.
417
418 All authors are printed if `aumax:<number>` option isn't given.
419 There is no internal limit. But you can set the global options in
420 your document by setting the \^`\biboptions` tokens list. For example:
421
422 \begtt
423 \biboptions={aumax:7 aumin:1}
424 % if there are 8 or more authors then only the first author is printed.
425 \endtt
426
427 Examples:
428 \begtt
429 author = "John Green and Bob Brown and Alice Black",
430 \endtt
431 output: GREEN, John, Bob BROWN, and Alice BLACK.
432
433 \begtt
434 author = "John Green and Bob Brown and Alice Black",
435 option = "aumax:1",
436 \endtt
437 output: GREEN, John~et~al.
438
439 \begtt
440 author = "John Green and Bob Brown and Alice Black",
441 option = "aumax:2",
442 \endtt
443 output: GREEN, John, Bob BROWN~et~al.
444
445 \begtt
446 author = "John Green and Bob Brown and Alice Black",
447 option = "aumax:3",
448 \endtt
449 output: GREEN, John, Bob BROWN, and Alice BLACK.
450
451 \begtt
452 author = "John Green and Bob Brown and Alice Black",
453 option = "auetal",
454 \endtt
455 output: GREEN, John, Bob BROWN, Alice BLACK~et~al.
456
457 If you need to add a text before or after the author's list, you can use
458 the `auprint:{<value>}` option. The <value> will be printed instead of the
459 authors list. The <value> can include `\AU` macro which expands to the authors
460 list. Example:
461
462 \begtt
463 author = "Robert Calbraith",
464 option = "auprint:{\AU\space [pseudonym of J. K. Rowling]}",
465 \endtt
466 output: CALBRAITH Robert [pseudonym of J. K. Rowling].
467
468 You can use the `autrim:<number>` option. All Firstnames of all authors
469 are trimmed (i. e. reduced to initials) iff the number of authors in the
470 author field is greater than or equal to `<number>`. There is an exception:
471 `autrim:0` means that no Firstnames are trimmed. This is the default behavior.
472 Another example: `autrim:1` means that all Firstnames are trimmed.
473
474 \begtt
475 author = "John Green and Bob Brown and Alice Black",
476 option = "auetal autrim:1",
477 \endtt
478 output: GREEN, J., B. BROWN, A. BLACK~et~al.
479
480 If you need to write a team name or institution instead of authors, replace all
481 spaces by `\ ` in this name. Such text is interpreted as Lastname. You
482 can add the secondary name (interpreted as Firstname) after the comma. Example:
483
484 \begtt
485 author = "Czech\ Technical\ University\ in\ Prague,
486 Faculty\ of\ Electrical\ Engineering",
487 \endtt
488 output: CZECH TECHNICAL UNIVERSITY IN PRAGUE, Faculty of Electrical Engineering.
489
490
491 \seccc The editor field
492
493 The editor field is used for the list of the authors of the collection. The
494 analogous rules as in author field are used here. It means that the
495 authors are separated by \"\code{ and }", the Firstnames, Lastnames, etc. are
496 interpreted and you can use the options `edmax:<number>`, `edmin:<number>`,
497 `edetal`, `edtrim:<number>` and `edprint:{<value>}` (with `\ED` macro).
498 Example:
499 \begtt
500 editor = "Jan Tomek and Petr Karas",
501 option = "edprint:{\ED, editors.} edtrim:1",
502 \endtt
503 Output: J. TOMEK and P. KARAS, editors.
504
505 If `edprint` option is not set then `{\ED, eds.}` or `{\ED, ed.}` is used
506 depending on the entry language and on the singular or plural of
507 the editor(s).
508
509
510 \seccc The ednote field
511
512 The ednote field is used as the secondary authors and more editional info. The
513 value is read as raw data without any interpretation of Lastname, Firstname
514 etc.
515 \begtt
516 ednote = "Illustrations by Robert \upper{Agarwal}, edited by Tom \upper{Nowak}",
517 \endtt
518 output: Illustrations by Robert AGARWAL, edited by Tom NOWAK.
519
520 The `\upper` command has to be used for Lastnames in the ednote field.
521
522
523 \seccc The title field
524
525 This is the title of the work. It will be printed (in common entry types) by
526 italics. The ISO 690 norm declares, that the title plus optional subtitle
527 are in italics and they are separated by a colon. Next, the optional secondary
528 title has to be printed in an upright font. This can be added by
529 `titlepost:{<value>}`. Example:
530
531 \begtt
532 title = "The Simple Title of The Work",
533 or
534 title = "Main Title: Subtitle",
535 or
536 title = "Main Title: Subtitle",
537 option = "titlepost:{Secondary title}",
538 \endtt
539 The output of the last example:
540 {\it Main Title: Subtitle}. Secondary title.
541
542
543 \seccc The edition field
544
545 This field is used only for second or more edition of cited work. Write
546 only the number without the word "edition". The shortcut "ed." (or something
547 else depending on the current language) is added automatically. Examples:
548
549 \begtt
550 edition = "Second",
551 edition = "2nd",
552 edition = "2$^{\rm nd}$",
553 edition = "2.",
554 \endtt
555 Output of the last example: 2. ed.
556
557 \begtt
558 edition = "2."
559 lang = "cs",
560 \endtt
561 Output: 2. vyd.
562
563 Note, that the example `edition = "Second"` may cause problems. If you are
564 using language "cs" then the output is bad: Second vyd.
565 But you can use `editionprint:{<value>}` option. The the <value> is printed
566 instead of edition field and shortcut. The edition field must be set. Example:
567
568 \begtt
569 edition = "whatever",
570 option = "editionprint:{Second full revised edition}",
571 \endtt
572 Output: Second full revised edition.
573
574 You can use `\EDN` macro in `editionprint` value. This macro is expanded
575 to the edition value. Example:
576
577 \begtt
578 edition = "Second",
579 option = "editionprint:{\EDN\space full revised edition}",
580 or
581 edition = "Second full revised edition",
582 option = "editionprint:{\EDN}",
583 \endtt
584
585
586 \seccc The address, publisher, year fields
587
588 This is an anachronism from ancient Bib\TeX/ (unfortunately no exclusive) that
589 the address field includes only the city of the publisher's residence. No more
590 data are here. The publisher field includes the name of the publisher.
591
592 \begtt
593 address = "Berlin",
594 publisher = "Springer Verlag",
595 year = 2012,
596 \endtt
597 Output: Berlin: Springer Verlag, 2012.
598
599 Note, that the year needn't to be inserted into quotes because it is pure
600 numeric.
601
602 The letter a, b, etc. are appended to the year automatically if two or more
603 subsequent entries in the bibliography list are not distinct by the first
604 author and year fields. If you needn't this feature, you can use the
605 `noautoletters` option.
606
607 You can use "yearprint:{<value>}" option. If it is set then the <value>
608 is used for printing year instead the real field value. The reason: year is
609 sort sensitive, maybe you need to print something else than only sorting key.
610 Example:
611
612 \begtt
613 year = 2000,
614 option = "yearprint:{© 2000}",
615 \endtt
616 Output: © 2000, sorted by: 2000.
617
618 \begtt
619 year = "2012a",
620 option = "yearprint:{2012}",
621 \endtt
622 Output: 2012, sorted by: 2012a.
623
624 The address, publisher, and year are typically mandatory fields. If they are
625 missing then the warning occurs. But you can set `unpublished`
626 option. Then this warning is suppressed. There is no difference in the
627 printed output.
628
629
630 \seccc The url field
631
632 Use it without `\url` macro, but with `http://` prefix. Example:
633
634 \begtt
635 url = "http://petr.olsak.net/opmac.html",
636 \endtt
637
638 The ISO 690 norm recommends to add the text \"Available from" (or
639 something else if a different current language is used) before URL.
640 It means, that the output of the previous example is:
641
642 Available from \url{http://petr.olsak.net/opmac.html}.
643
644 If the `cs` language is the current one than the output is:
645
646 Dostupné z: \url{http://petr.olsak.net/opmac.html}.
647
648 If the `urlalso` option is used, then the added text has the form
649 \"Available also from" or \"Dostupné také z:" (if `cs` language is
650 in use).
651
652
653 \seccc The citedate field
654
655 This is the citation date. The field must be in the form year/month/day. It
656 means, that the two slashes must be written here. The output depends on the
657 selected language. Example:
658
659 \begtt
660 citedate = "2004/05/21",
661 \endtt
662 Output when `en` is used: [cit. 2004-05-21].\nl
663 Output when `cs` is used: [vid. 21.~5.~2004].
664
665
666 \seccc The howpublished field
667
668 This declares the available medium for the cited document if it is not in printed
669 form. Alternatives: online, CD, DVD, etc. Example:
670
671 \begtt
672 howpublished = "online",
673 \endtt
674 Output: [online].
675
676
677 \seccc The volume, number, pages and numbering fields
678
679 The volume is the \"big mark" of the journal issue and the number is the
680 \"small mark" of the journal issue and pages includes the page range of
681 the cited article in the journal. The volume is prefixed by Vol.~,
682 the number by No.~, and the pages by pp.~. But these prefixes depends on the
683 language of the entry.
684
685 Example:
686
687 \begtt
688 volume = 31,
689 number = 3,
690 pages = "37--42",
691 \endtt
692 Output: Vol.~31, No.~3, pp.~37--42.
693
694 \begtt
695 volume = 31,
696 number = 3,
697 pages = "37--42",
698 lang = "cs",
699 \endtt
700 Output: ročník~31, č.~3, s.~37--42.
701
702 If you disagree with the default prefixes, you can use the numbering field.
703 When it is set then it is used instead of volume, number, pages fields
704 and instead of any mentioned prefixes. The numbering can include macros
705 `\VOL`, `\NO`, `\PP`, which are expanded to the respective values of fields. Example:
706
707 \begtt
708 volume = 31,
709 number = 3,
710 pages = "37--42"
711 numbering = "Issue~\VOL/\NO, pages~\PP",
712 \endtt
713 Output: Issue~31/3, pages~37--42
714
715 Note: The volume, numbers, and pages fields are printed without numbering
716 filed only in the `@ARTICLE` entry. It means, that if you need to visible them
717 in the `@INBOOK`, `@INPROCEEDINGS` etc. entries, then you must use the numbering field.
718
719
720 \seccc Common notes about entries
721
722 The order of the fields in the entry is irrelevant. We use the printed order
723 in this manual. The exclamation mark (!) denotes the mandatory field. If
724 the field is missing then a warning occurs during processing.
725
726 If the `unpublished` option is set then the fields address, publisher, year,
727 isbn, and pages are not mandatory. If the `nowarn` option is set then no
728 warnings about missing mandatory fields occur.
729
730 If the field is used but not mentioned in the entry documentation below then
731 it is silently ignored.
732
733 \secccc The `@BOOK` entry
734
735 This is used for book-like entries.
736
737 Fields: author(!), title(!), howpublished, edition, ednote, address(!),
738 publisher(!), year(!), citedate, series, isbn(!), doi, url, note.
739
740 The ednote field here means the secondary authors (illustrator, cover design
741 etc.).
742
743 \secccc The `@ARTICLE` entry
744
745 This is used for articles published in a journal.
746
747 Fields: author(!), title(!), journal(!), howpublished, address, publisher,
748 month, year, [numbering or volume, number, pages(!)], citedate, issn,
749 doi, url, note.
750
751 If the numbering is used then it is used instead volume, number, pages.
752
753
754 \secccc The `@INBOOK` entry
755
756 This is used for the part of a book.
757
758 Fields: author(!), title(!), booktitle(!), howpublished, edition, ednote,
759 address(!), publisher(!), year(!), numbering, citedate, series, isbn or
760 issn, doi, url, note.
761
762 The author field is used for author(s) of the part, the editor field
763 includes author(s) or editor(s) of the whole document. The pages field specifies
764 the page range of the part. The series field can include more information
765 about the part (chapter numbers etc.).
766
767 The `@INPROCEEDINGS` and `@CONFERENCE` entries are equivalent to `@INBOOK` entry.
768
769 \secccc The `@THESIS` entry
770
771 This is used for the student's thesis.
772
773 Fields: author(!), title(!), howpublished, address(!), school(!),
774 month, year(!), citedate, type(!), ednote, doi, url, note.
775
776 The type field must include the text \"Master's Thesis" or something
777 similar (depending on the language of the outer document).
778
779 There are nearly equivalent entries: `@BACHELORSTHESIS`, `@MASTERSTHESIS` and
780 `@PHDTHESIS`. These entries set the type field to an appropriate value
781 automatically. The type field is optional in this case. If it is used then
782 it has precedence before the default setting.
783
784 \secccc The @ONLINE entry
785
786 It is intended for online publications.
787
788 Fields: author, title(!), howpublished, ednote, publisher, accessed, doi, url(!), note.
789
790 \secccc The @MISC entry
791
792 It is intended for various usage.
793
794 Fields: author, title, howpublished, ednote, citedate, doi, url, note.
795
796 You can use `\AU`, `\ED`, `\EDN`, `\VOL`, `\NO`, `\PP`, `\ADDR`, `\PUBL`,
797 `\YEAR` macros in ednote field. These macros print authors list, editors list,
798 edition, volume, number, pages, address, publisher, and year field values
799 respectively.
800
801 The reason for this entry is to give to you the possibility to set the format of
802 entry by your own decision. The most of data are concentrated in the ednote field.
803
804 \secccc The `@BOOKLET`, `@INCOLLECTION`, `@MANUAL`, `@PROCEEDINGS`, `@TECHREPORT`, `@UNPUBLISHED` entries
805
806 These entries are equivalent to `@MICS` entry because we need to save the
807 simplicity. They are implemented only for (almost) backward compatibility
808 with the ancient Bib\TeX/. But the ednote is mandatory field here, so you
809 cannot use these entries from the old databases without warnings and without
810 some additional work with the `.bib` file.
811
812 \seccc The cite-marks (bibmark) used when \code{\\nonumcitations} is set
813
814 When `\nonumcitations` is set then `\cite` prints text-oriented
815 bib-marks instead of numbers. This style file auto-generates these marks in the
816 form \"Lastname of the first author, comma, space, the year" if the bibmark field
817 isn't declared. If you need to set an exception from this common format,
818 then you can use bibmark field.
819
820 The OPmac trick \url{http://petr.olsak.net/opmac-tricks-e.html\#bibmark}
821 describes how to redefine the algorithm for bibmark auto-generating when you
822 need the short form of the type [Au13].
823
824
825 \seccc Sorting
826
827 If `\usebib/c` is used then entries are sorted by citation order in the text.
828 If `\usebib/s` is used then entries are sorted by \"Lastname, Firstname(s)" of
829 the first author and if more entries have this value equal, then the year is
830 used (from older to newer). This feature follows the recommendation of the
831 ISO 690 norm.
832
833 If you have the same authors and the same year, you can control the sorting
834 by setting years like 2013, 2013a, 2013b, etc. You can print something
835 different to the list using `yearprint{<value>}` option, see the section about
836 address, publisher, and year above. The real value of year field (i.e.\ not
837 yearprint value) is also used in the text-oriented bib-marks when
838 `\nonumcitations` is set.
839
840 If you have some problems with name sorting, you can use the hidden field
841 `sortedby` (or `key` field with the same effect).
842 It can be used for sorting instead of the \"Lastname Firstname(s)"
843 of the first author. If the `sortedby` field is unset then the \"Lastname Firstname(s)"
844 is used for sorting normally. Example:
845
846 \begtt
847 author = "Světla Čmejrková",
848 sortedby = "Czzmejrkova Svetla",
849 \endtt
850
851 This entry is now sorted between C and D.
852
853 The norm recommends placing the auto-citations at the top of the list of
854 references. You can do this by setting `sortedby = "@"`, to each entry with your
855 name because the `@` character is sorted before `A`.
856
857
858 \seccc Languages
859
860 There is the language of the outer document and the languages of each entry.
861 The ISO 690 norm recommends that the technical notes (the prefix before URL,
862 the media type, the \"and" conjunction between the semifinal and final author)
863 maybe printed in the language of the outer document. The data of the entry
864 have to be printed in the entry language (edition ed./vyd., Vol./ročník,
865 No./č. etc.). Finally, there are the phrases independent of the language
866 (for example In:). Unfortunately, the bib\TeX/ supposes that the entry data
867 are not fully included in the fields so the automaton has to add some
868 text during processing (\"ed.", \"Vol.", \"see also", etc.).
869 But what language has to be chosen?
870
871 The current value of the `\language` register at the start of the `.bib`
872 processing is described as the language of the outer document. This language
873 is used for technical notes regardless of the entry language. Moreover,
874 each entry can have the `lang` field (short name of the language). This
875 language is used for ed./vyd., vol./ročník, etc. and it is used for
876 hyphenation too. If the `lang` is not set then the outer document
877 language is used.
878
879 You can use \^`\_Mtext{bib.<identifier>}` if you want to use a phrase
880 dependent on outer document language (no on entry language).
881 Example:
882
883 \begtt
884 howpublished = "\_Mtext{bib.blue-ray}"
885 \endtt
886
887 Now, you can set the variants of `bib.blue-ray` phrase for various
888 languages:
889
890 \begtt
891 \_sdef{_mt:bib.blue-ray:en} {Blue-ray disc}
892 \_sdef{_mt:bib.blue-ray:cs} {Blue-ray disk}
893 \endtt
894
895
896 \seccc Summary of non-standard fields
897
898 This style uses the following fields unknown by bib\TeX/:
899
900 \begtt
901 option ... options separated by spaces
902 lang ... the language two-letter code of one entry
903 ednote ... edition info (secondary authors etc.) or
904 global data in @MISC-like entries
905 citedate ... the date of the citation in year/month/day format
906 numbering ... format for volume, number, pages
907 isbn ... ISBN
908 issn ... ISSN
909 doi ... DOI
910 url ... URL
911 \endtt
912
913
914 \seccc Summary of options
915
916 \begtt \catcode`\<=13
917 aumax:<number> ... maximum number of printed authors
918 aumin:<number> ... number of printed authors if aumax exceeds
919 autrim:<number> ... full Firstnames iff number of authors are less than this
920 auprint:{<value>} ... text instead authors list (\AU macro may be used)
921 edmax, edmin, edtrim ... similar as above for editors list
922 edprint:{<value>} ... text instead editors list (\ED macro may be used)
923 titlepost:{<value>} ... text after title
924 yearprint:{<value>} ... text instead real year (\YEAR macro may be used)
925 editionprint:{<value>} .. text instead of real edition (\EDN macro may be used)
926 urlalso ... the ``available also from'' is used instead ``available from''
927 unpublished ... the publisher etc. fields are not mandatory
928 nowarn ... no mandatory fields
929 \endtt
930
931 Other options in the option field are silently ignored.
932
933 \_endinput
934
935 2025-04-15 ... \_maybeetal misspeling, bug fixed (line 70)
936 2024-07-23 ... generic: warning about missing year removed (bug fixed)
937 2023-09-13 ... \_createbibmark: no comma if year is missing
938 2023-06-23 ... @ONLINE entry introduced
939 2023-04-22 ... incollection: typo corrected
940 2023-03-25 ... \_createbibmark introduced
941 2022-05-10 ... \. -> \:, collision with \oldaccents fixed.
942 2022-02-04 ... \_langinput used in \_setlang
943 2021-04-07 ... \biboptions toks declaration moved, bug fixed.
944 2020-03-10 ... released