2 %% File: `csplainnat.bst' for use with natbib package
3 %% This is a modification of `plainnat.bst' for Czech references style
4 %% (According to "CSN ISO 690: Bibliograficke citace. Obsah, forma a struktura").
5 %% Some modifications are commented, look for 'ZMENA' -- it means 'CHANGE' in Czech.
6 %% For more detailed info use svn repository svn://kraken.pedf.cuni.cz/csplainnat/
8 %% Original plainnat.bst by Patrick W Daly
9 %% Modifications by David Mudr{\'{a}}k mudrd8mz@uxit.pedf.cuni.cz
11 %% This program can be redistributed and/or modified under the terms
12 %% of the LaTeX Project Public License Distributed from CTAN
13 %% archives in directory macros/latex/base/lppl.txt; either
14 %% version 1 of the License, or any later version.
16 % BibTeX `plainnat' family
17 % version 0.99b for BibTeX versions 0.99a or later,
18 % for LaTeX versions 2.09 and 2e.
20 % For use with the `natbib.sty' package; emulates the corresponding
21 % member of the `plain' family, but with author-year citations.
23 % With version 6.0 of `natbib.sty', it may also be used for numerical
24 % citations, while retaining the commands \citeauthor, \citefullauthor,
25 % and \citeyear to print the corresponding information.
27 % For version 7.0 of `natbib.sty', the KEY field replaces missing
28 % authors/editors, and the date is left blank in \bibitem.
30 % Includes field EID for the sequence/citation number of electronic journals
31 % which is used instead of page numbers.
33 % Includes fields ISBN and ISSN.
35 % Includes field URL for Internet addresses.
37 % Includes field DOI for Digital Object Idenfifiers.
39 % Works best with the url.sty package of Donald Arseneau.
41 % Works with identical authors and year are further sorted by
42 % citation key, to preserve any natural sequence.
45 % * Added "@ONLINE" item type with added "cited" field.
77 { label extra.label sort.label short.list }
79 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
81 FUNCTION {init.state.consts}
88 STRINGS { s t t1 t2 } % ZMENA mudrd8mz 2005-10-12 pridavam t1, t2
90 FUNCTION {output.nonnull}
92 output.state mid.sentence =
94 { output.state after.block =
99 { output.state before.all =
101 { add.period$ " " * write$ }
105 mid.sentence 'output.state :=
118 FUNCTION {output.check}
121 { pop$ "empty " t * " in " * cite$ * warning$ }
133 { output.state before.all =
135 { after.block 'output.state := }
139 FUNCTION {new.sentence}
140 { output.state after.block =
142 { output.state before.all =
144 { after.sentence 'output.state := }
168 FUNCTION {new.block.checka}
175 FUNCTION {new.block.checkb}
184 FUNCTION {new.sentence.checka}
191 FUNCTION {new.sentence.checkb}
200 FUNCTION {field.or.null}
210 { "\emph{" swap$ * "}" * }
214 FUNCTION {capitalize} % ZMENA mudrd8mz 2005-10-12 pridavam novou funkci
223 INTEGERS { nameptr namesleft numnames }
225 FUNCTION {format.names.full}
228 s num.names$ 'numnames :=
229 numnames 'namesleft :=
231 { s nameptr "{ll}" format.name$ 't1 := % ZMENA mudrd8mz 2005-10-12
232 t1 capitalize 't1 := % ZMENA mudrd8mz 2005-10-12
233 s nameptr "{, f.}{~j.}" format.name$ 't2 := % ZMENA mudrd8mz 2005-10-12
237 { " -- " * t * } % ZMENA mudrd8mz 2005-10-13 : pomlcka mezi autory
239 { "" * } % ZMENA mudrd8mz 2005-10-12
242 t "OTHERS" = % ZMENA mudrd8mz 2005-10-12 kvuli capitalize
244 { " -- " * t * } % ZMENA mudrd8mz 2005-10-12 : pomlcka mezi poslednim a predposl. autorem
251 nameptr #1 + 'nameptr :=
252 namesleft #1 - 'namesleft :=
257 FUNCTION {format.names.short} % ZMENA mudrd8mz 2005-10-14 pridavam verzi pro vic autoru
259 s #1 "{ll}" format.name$ 't1 :=
261 s #1 "{, f.}{~j.}" format.name$ 't2 :=
265 FUNCTION {format.names}
268 {format.names.short} % pokud ma citace vice nez 3 autory, uvadi se pouze PRVNI et al.
269 {format.names.full} % pokud ma citace max 3 autory, uvadi se vsichni
273 FUNCTION {format.key}
275 { key field.or.null }
280 FUNCTION {format.authors}
283 { author format.names }
287 FUNCTION {format.editors}
290 { editor format.names
291 editor num.names$ #1 >
292 { " (Ed.)" * } % ZMENA mudrd8mz 2005-10-12 menim zobrazovani
299 FUNCTION {format.isbn}
302 { new.block "ISBN " isbn * }
306 FUNCTION {format.issn}
309 { new.block "ISSN " issn * }
313 FUNCTION {format.url}
316 { new.block "Dostupn{\'{e}} z: \url{" url * "}" * }
320 FUNCTION {format.doi}
323 { new.block "\doi{" doi * "}" * }
327 FUNCTION {format.title}
335 FUNCTION {format.full.names}
338 s num.names$ 'numnames :=
339 numnames 'namesleft :=
342 "{vv~}{ll}" format.name$ 't :=
354 { ", " * t * } % ZMENA mudrd8mz 2005-10-12
361 nameptr #1 + 'nameptr :=
362 namesleft #1 - 'namesleft :=
367 FUNCTION {author.editor.full}
371 { editor format.full.names }
374 { author format.full.names }
378 FUNCTION {author.full}
381 { author format.full.names }
385 FUNCTION {editor.full}
388 { editor format.full.names }
392 FUNCTION {make.full.names}
397 { type$ "proceedings" =
405 FUNCTION {output.bibitem}
409 ")" make.full.names duplicate$ short.list =
418 before.all 'output.state :=
425 { t #1 #1 substring$ "-" =
426 { t #1 #2 substring$ "--" = not
428 t #2 global.max$ substring$ 't :=
430 { { t #1 #1 substring$ "-" = }
432 t #2 global.max$ substring$ 't :=
438 { t #1 #1 substring$ *
439 t #2 global.max$ substring$ 't :=
446 FUNCTION {format.date}
447 { year duplicate$ empty$
448 { "empty year in " cite$ * warning$
461 FUNCTION {format.btitle}
465 FUNCTION {tie.or.space.connect}
466 { duplicate$ text.length$ #3 <
473 FUNCTION {either.or.check}
476 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
480 FUNCTION {format.bvolume}
483 { "" volume tie.or.space.connect % ZMENA mudrd8mz 2005-10-12 vypoustim "volume"
486 { " / " * series emphasize * } % ZMENA mudrd8mz 2005-10-12 menim "of" na "/"
488 "volume and number" number either.or.check
493 FUNCTION {format.number.series}
496 { series field.or.null }
497 { output.state mid.sentence =
498 { "è." } % ZMENA mudrd8mz 2005-10-12 menim "number"
501 number tie.or.space.connect
503 { "there's a number but no series in " cite$ * warning$ }
504 { " v " * series * } % ZMENA mudrd8mz 2005-10-12 menim "in"
513 FUNCTION {format.edition}
516 { output.state mid.sentence =
517 { edition "l" change.case$ " edition" * }
518 { edition "t" change.case$ " edition" * }
524 INTEGERS { multiresult }
526 FUNCTION {multi.page.check}
535 swap$ duplicate$ "," =
538 { #1 'multiresult := }
539 { t #2 global.max$ substring$ 't := }
546 FUNCTION {format.pages}
549 { pages multi.page.check
550 { "pages" pages n.dashify tie.or.space.connect }
551 { "page" pages tie.or.space.connect }
557 FUNCTION {format.eid}
560 { "art." eid tie.or.space.connect }
564 FUNCTION {format.vol.num.pages}
565 { volume field.or.null
568 { "\penalty0 " number * *
570 { "there's a number but no volume in " cite$ * warning$ }
578 { pop$ format.pages }
579 { ", s.~" * pages n.dashify * }
585 FUNCTION {format.vol.num.eid}
586 { volume field.or.null
589 { "\penalty0 (" number * ")" * *
591 { "there's a number but no volume in " cite$ * warning$ }
600 { ":\penalty0 " * eid * }
606 FUNCTION {format.chapter.pages}
611 { type "l" change.case$ }
613 chapter tie.or.space.connect
616 { ", " * format.pages * }
622 FUNCTION {format.in.ed.booktitle}
626 { "In " booktitle emphasize * }
627 { "In " format.editors * " " * booktitle emphasize * } % ZMENA mudrd8mz 2005-10-12
633 FUNCTION {empty.misc.check}
634 { author empty$ title empty$ howpublished empty$
635 month empty$ year empty$ note empty$
638 { "all relevant fields are empty in " cite$ * warning$ }
643 FUNCTION {format.thesis.type}
647 type "t" change.case$
652 FUNCTION {format.tr.number}
654 { "Technical Report" }
659 { number tie.or.space.connect }
663 FUNCTION {format.article.crossref}
666 { "need key or journal for " cite$ * " to crossref " * crossref *
670 { "In \emph{" journal * "}" * }
675 " \citep{" * crossref * "}" *
678 FUNCTION {format.book.crossref}
680 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
683 { "Volume" volume tie.or.space.connect
688 editor field.or.null author field.or.null =
692 { "need editor, key, or series for " cite$ * " to crossref " *
696 { "\emph{" * series * "}" * }
704 ", \citet{" * crossref * "}" *
707 FUNCTION {format.incoll.inproc.crossref}
709 editor field.or.null author field.or.null =
713 { "need editor, key, or booktitle for " cite$ * " to crossref " *
717 { "In \emph{" booktitle * "}" * }
725 " \citet{" * crossref * "}" *
730 format.authors "author" output.check
731 author format.key output
733 format.title "title" output.check
736 { journal emphasize "journal" output.check
737 format.date "year" output.check
739 { format.vol.num.pages output }
740 { format.vol.num.eid output }
743 { format.article.crossref output.nonnull
745 { format.pages output }
746 { format.eid output }
758 FUNCTION {online} % ZMENA mudrd8mz 2005-10-12 zcela pridavam
760 format.authors output
762 format.btitle " [online]" * output
770 { format.date "year" output.check }
775 { "[cit.~" cited * "]" * output }
788 { format.editors "author and editor" output.check
789 editor format.key output
791 { format.authors output.nonnull
793 { "author and editor" editor either.or.check }
799 format.btitle "title" output.check
802 format.bvolume output
803 format.number.series output
805 address "~: " * publisher * % ZMENA mudrd8mz 2005-10-12 menim styl adresy a vydavatele
806 "publisher" output.check
809 format.book.crossref output.nonnull
812 format.edition output
813 format.date "year" output.check
824 format.authors output
825 author format.key output
827 format.title "title" output.check
828 howpublished address new.block.checkb
843 { format.editors "author and editor" output.check
844 editor format.key output
846 { format.authors output.nonnull
848 { "author and editor" editor either.or.check }
854 format.btitle "title" output.check
856 { format.bvolume output
857 format.chapter.pages "chapter and pages" output.check
859 format.number.series output
861 publisher "publisher" output.check
864 { format.chapter.pages "chapter and pages" output.check
866 format.book.crossref output.nonnull
869 format.edition output
870 format.date "year" output.check
879 FUNCTION {incollection}
881 format.authors "author" output.check
882 author format.key output
884 format.title "title" output.check
887 { format.in.ed.booktitle "booktitle" output.check
888 format.bvolume output
889 format.number.series output
890 format.chapter.pages output
892 address ": " * publisher * % ZMENA mudrd8mz 2005-10-12 menim styl adresy a vydavatele
893 "publisher" output.check
894 %publisher "publisher" output.check
896 format.edition output
897 format.date "year" output.check
899 { format.incoll.inproc.crossref output.nonnull
900 format.chapter.pages output
911 FUNCTION {inproceedings}
913 format.authors "author" output.check
914 author format.key output
916 format.title "title" output.check
919 { format.in.ed.booktitle "booktitle" output.check
920 format.bvolume output
921 format.number.series output
924 { organization publisher new.sentence.checkb
927 format.date "year" output.check
929 { address output.nonnull
930 format.date "year" output.check
937 { format.incoll.inproc.crossref output.nonnull
949 FUNCTION {conference} { inproceedings }
953 format.authors output
954 author format.key output
956 format.btitle "title" output.check
957 organization address new.block.checkb
960 format.edition output
968 FUNCTION {mastersthesis}
970 format.authors "author" output.check
971 author format.key output
973 format.title "title" output.check
975 "Master's thesis" format.thesis.type output.nonnull
976 school "school" output.check
978 format.date "year" output.check
987 format.authors output
988 author format.key output
989 title howpublished new.block.checkb
991 howpublished new.block.checka
1002 FUNCTION {phdthesis}
1004 format.authors "author" output.check
1005 author format.key output
1007 format.btitle "title" output.check
1009 "PhD thesis" format.thesis.type output.nonnull
1010 school "school" output.check
1012 format.date "year" output.check
1019 FUNCTION {proceedings}
1021 format.editors output
1022 editor format.key output
1024 format.btitle "title" output.check
1025 format.bvolume output
1026 format.number.series output
1028 format.date "year" output.check
1040 FUNCTION {techreport}
1042 format.authors "author" output.check
1043 author format.key output
1045 format.title "title" output.check
1047 format.tr.number output.nonnull
1048 institution "institution" output.check
1050 format.date "year" output.check
1057 FUNCTION {unpublished}
1059 format.authors "author" output.check
1060 author format.key output
1062 format.title "title" output.check
1065 note "note" output.check
1070 FUNCTION {default.type} { misc }
1073 MACRO {jan} {"January"}
1075 MACRO {feb} {"February"}
1077 MACRO {mar} {"March"}
1079 MACRO {apr} {"April"}
1083 MACRO {jun} {"June"}
1085 MACRO {jul} {"July"}
1087 MACRO {aug} {"August"}
1089 MACRO {sep} {"September"}
1091 MACRO {oct} {"October"}
1093 MACRO {nov} {"November"}
1095 MACRO {dec} {"December"}
1099 MACRO {acmcs} {"ACM Computing Surveys"}
1101 MACRO {acta} {"Acta Informatica"}
1103 MACRO {cacm} {"Communications of the ACM"}
1105 MACRO {ibmjrd} {"IBM Journal of Research and Development"}
1107 MACRO {ibmsj} {"IBM Systems Journal"}
1109 MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
1111 MACRO {ieeetc} {"IEEE Transactions on Computers"}
1114 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
1116 MACRO {ipl} {"Information Processing Letters"}
1118 MACRO {jacm} {"Journal of the ACM"}
1120 MACRO {jcss} {"Journal of Computer and System Sciences"}
1122 MACRO {scp} {"Science of Computer Programming"}
1124 MACRO {sicomp} {"SIAM Journal on Computing"}
1126 MACRO {tocs} {"ACM Transactions on Computer Systems"}
1128 MACRO {tods} {"ACM Transactions on Database Systems"}
1130 MACRO {tog} {"ACM Transactions on Graphics"}
1132 MACRO {toms} {"ACM Transactions on Mathematical Software"}
1134 MACRO {toois} {"ACM Transactions on Office Information Systems"}
1136 MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
1138 MACRO {tcs} {"Theoretical Computer Science"}
1150 FUNCTION {chop.word}
1153 s #1 len substring$ =
1154 { s len #1 + global.max$ substring$ }
1159 FUNCTION {format.lab.names}
1161 s #1 "{vv~}{ll}" format.name$
1162 s num.names$ duplicate$
1164 { pop$ " et~al." * }
1167 { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
1169 { " -- " * s #2 "{vv~}{ll}" format.name$ * } % ZMENA mudrd8mz 2005-10-12 menim "and"
1177 FUNCTION {author.key.label}
1180 { cite$ #1 #3 substring$ }
1184 { author format.lab.names }
1188 FUNCTION {author.editor.key.label}
1192 { cite$ #1 #3 substring$ }
1196 { editor format.lab.names }
1199 { author format.lab.names }
1203 FUNCTION {author.key.organization.label}
1206 { organization empty$
1207 { cite$ #1 #3 substring$ }
1208 { "The " #4 organization chop.word #3 text.prefix$ }
1214 { author format.lab.names }
1218 FUNCTION {editor.key.organization.label}
1221 { organization empty$
1222 { cite$ #1 #3 substring$ }
1223 { "The " #4 organization chop.word #3 text.prefix$ }
1229 { editor format.lab.names }
1233 FUNCTION {calc.short.authors}
1237 'author.editor.key.label
1238 { type$ "proceedings" =
1239 'editor.key.organization.label
1241 'author.key.organization.label
1251 FUNCTION {calc.label}
1252 { calc.short.authors
1256 year duplicate$ empty$
1257 short.list key field.or.null = or
1265 FUNCTION {sort.format.names}
1269 s num.names$ 'numnames :=
1270 numnames 'namesleft :=
1273 s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
1277 namesleft #1 = t "others" = and
1279 { numnames #2 > nameptr #2 = and
1280 { "zz" * year field.or.null * " " * }
1289 nameptr #1 + 'nameptr :=
1290 namesleft #1 - 'namesleft :=
1295 FUNCTION {sort.format.title}
1299 "The " #4 t chop.word
1303 #1 global.max$ substring$
1306 FUNCTION {author.sort}
1309 { "to sort, need author or key in " cite$ * warning$
1315 { author sort.format.names }
1319 FUNCTION {author.editor.sort}
1323 { "to sort, need author, editor, or key in " cite$ * warning$
1329 { editor sort.format.names }
1332 { author sort.format.names }
1336 FUNCTION {author.organization.sort}
1338 { organization empty$
1340 { "to sort, need author, organization, or key in " cite$ * warning$
1346 { "The " #4 organization chop.word sortify }
1349 { author sort.format.names }
1353 FUNCTION {editor.organization.sort}
1355 { organization empty$
1357 { "to sort, need editor, organization, or key in " cite$ * warning$
1363 { "The " #4 organization chop.word sortify }
1366 { editor sort.format.names }
1380 { type$ "proceedings" =
1381 'editor.organization.sort
1383 'author.organization.sort
1394 #1 entry.max$ substring$
1397 #1 entry.max$ substring$
1405 STRINGS { longest.label last.label next.extra }
1407 INTEGERS { longest.label.width last.extra.num number.label }
1409 FUNCTION {initialize.longest.label}
1410 { "" 'longest.label :=
1411 #0 int.to.chr$ 'last.label :=
1413 #0 'longest.label.width :=
1414 #0 'last.extra.num :=
1418 FUNCTION {forward.pass}
1419 { last.label label =
1420 { last.extra.num #1 + 'last.extra.num :=
1421 last.extra.num int.to.chr$ 'extra.label :=
1423 { "a" chr.to.int$ 'last.extra.num :=
1425 label 'last.label :=
1428 number.label #1 + 'number.label :=
1431 FUNCTION {reverse.pass}
1433 { "a" 'extra.label := }
1436 extra.label 'next.extra :=
1440 { "{\natexlab{" swap$ * "}}" * }
1443 label extra.label * 'label :=
1446 EXECUTE {initialize.longest.label}
1448 ITERATE {forward.pass}
1450 REVERSE {reverse.pass}
1452 FUNCTION {bib.sort.order}
1453 { sort.label 'sort.key$ :=
1456 ITERATE {bib.sort.order}
1460 FUNCTION {begin.bib}
1463 { preamble$ write$ newline$ }
1465 "\begin{thebibliography}{" number.label int.to.str$ * "}" *
1467 "\providecommand{\natexlab}[1]{#1}"
1469 "\providecommand{\url}[1]{\texttt{#1}}"
1471 "\expandafter\ifx\csname urlstyle\endcsname\relax"
1473 " \providecommand{\doi}[1]{doi: #1}\else"
1475 " \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"
1481 EXECUTE {init.state.consts}
1483 ITERATE {call.type$}
1487 "\end{thebibliography}" write$ newline$