From 7f00f2e8c8f023c68986b8450225ff9eb0362e35 Mon Sep 17 00:00:00 2001 From: Alexandr Pilshchikov Date: Tue, 17 Oct 2023 10:59:25 +0500 Subject: [PATCH] initial commit --- .editorconfig | 19 + .gitattributes | 8 + .github/ISSUE_TEMPLATE/bug_report.md | 43 + .github/ISSUE_TEMPLATE/feature_request.md | 20 + .github/PULL_REQUEST_TEMPLATE.md | 48 + .gitignore | 278 + BibTeX-Styles/ugost2003.bst | 1930 +++ BibTeX-Styles/ugost2003s.bst | 2053 +++ BibTeX-Styles/ugost2008.bst | 1941 +++ BibTeX-Styles/ugost2008l.bst | 1929 +++ BibTeX-Styles/ugost2008ls.bst | 2064 +++ BibTeX-Styles/ugost2008mod.bst | 1992 +++ BibTeX-Styles/ugost2008n.bst | 2281 +++ BibTeX-Styles/ugost2008ns.bst | 2415 ++++ BibTeX-Styles/ugost2008s.bst | 2064 +++ BibTeX-Styles/utf8gost705u.bst | 1531 ++ BibTeX-Styles/utf8gost71s.bst | 1576 +++ BibTeX-Styles/utf8gost71u.bst | 1608 +++ BibTeX-Styles/utf8gost780u.bst | 1428 ++ CONTRIBUTING.md | 54 + Dissertation/acronyms.tex | 1 + Dissertation/appendix.tex | 820 ++ Dissertation/conclusion.tex | 21 + Dissertation/contents.tex | 6 + Dissertation/dictionary.tex | 6 + Dissertation/dispackages.tex | 14 + Dissertation/disstyles.tex | 195 + Dissertation/images/README.md | 2 + Dissertation/images/drawing.pdf | Bin 0 -> 402247 bytes Dissertation/introduction.tex | 33 + Dissertation/lists.tex | 10 + Dissertation/part1.tex | 643 + Dissertation/part2.tex | 386 + Dissertation/part3.tex | 279 + Dissertation/references.tex | 14 + Dissertation/setup.tex | 124 + Dissertation/title.tex | 94 + Dissertation/userpackages.tex | 45 + Dissertation/userstyles.tex | 311 + Dockerfile | 6 + Documents/Def_positions.pdf | Bin 0 -> 84901 bytes Documents/GOST 2.105-95.pdf | 9024 ++++++++++++ Documents/GOST 7.1-2003.pdf | 14946 ++++++++++++++++++++ Documents/GOST 7.80-2000.pdf | Bin 0 -> 360185 bytes Documents/GOST R 7.0.11-2011.pdf | 2688 ++++ Documents/GOST R 7.0.5-2008.pdf | 6587 +++++++++ LICENSE | 395 + Makefile | 176 + PSCyr/README.md | 28 + PSCyr/Windows.md | 22 + PSCyr/pscyr0.4d.zip | Bin 0 -> 3001733 bytes Presentation/appendix.tex | 32 + Presentation/conclusion.tex | 102 + Presentation/content.tex | 305 + Presentation/images/README.md | 1 + Presentation/images/implementation.pdf | Bin 0 -> 32892 bytes Presentation/images/registration.png | Bin 0 -> 91783 bytes Presentation/preamble.tex | 34 + Presentation/prespackages.tex | 19 + Presentation/setup.tex | 30 + Presentation/styles.tex | 85 + Presentation/title.tex | 51 + README.md | 125 + Readme/Bibliography.md | 334 + Readme/Installation.md | 472 + Readme/Links.md | 154 + Readme/github.md | 270 + Synopsis/content.tex | 155 + Synopsis/images/README.md | 1 + Synopsis/setup.tex | 100 + Synopsis/synpackages.tex | 9 + Synopsis/synstyles.tex | 47 + Synopsis/title.tex | 132 + Synopsis/userpackages.tex | 4 + Synopsis/userstyles.tex | 1 + biblio/author.bib | 92 + biblio/biblatex.tex | 634 + biblio/check-bib-dupes-and-usage.py | 102 + biblio/external.bib | 678 + biblio/predefined.tex | 58 + biblio/registered.bib | 34 + common/characteristic.tex | 211 + common/concl.tex | 9 + common/data.tex | 123 + common/fonts.tex | 51 + common/newnames.tex | 49 + common/packages.tex | 228 + common/renames.tex | 15 + common/setup.tex | 86 + common/styles.tex | 295 + compress.mk | 152 + dissertation.tex | 90 + examples.mk | 153 + images/knuth1.eps | 5535 ++++++++ images/knuth1.jpg | Bin 0 -> 10378 bytes images/knuth2.eps | 7155 ++++++++++ images/knuth2.jpg | Bin 0 -> 22399 bytes images/latex.eps | 2933 ++++ images/latex.png | Bin 0 -> 4925 bytes images/logo.pdf | Bin 0 -> 14629 bytes images/personal-signature.png | Bin 0 -> 1723 bytes images/secretary-signature.png | Bin 0 -> 1891 bytes indent.yaml | 26 + install-dockertex.sh | 32 + latexmkrc | 438 + letters/.gitignore | 2 + letters/README.md | 18 + letters/fonts/LiberationSerif-Italic.ttf | Bin 0 -> 373340 bytes letters/fonts/LiberationSerif-Regular.ttf | Bin 0 -> 391024 bytes letters/fonts/PostIndex.ttf | Bin 0 -> 9032 bytes letters/generate.sh | 23 + letters/letters.tex | 88 + letters/source.tsv | 44 + listings/run_analysis.R | 78 + presentation.tex | 33 + presentation_booklet.tex | 6 + presentation_handout.tex | 89 + siunitx.cfg | 297 + synopsis.tex | 73 + synopsis_booklet.tex | 6 + tikz.tex | 53 + unix.mk | 88 + usercfg.mk | 39 + windows.mk | 26 + 124 files changed, 84763 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .gitignore create mode 100644 BibTeX-Styles/ugost2003.bst create mode 100644 BibTeX-Styles/ugost2003s.bst create mode 100644 BibTeX-Styles/ugost2008.bst create mode 100644 BibTeX-Styles/ugost2008l.bst create mode 100644 BibTeX-Styles/ugost2008ls.bst create mode 100644 BibTeX-Styles/ugost2008mod.bst create mode 100644 BibTeX-Styles/ugost2008n.bst create mode 100644 BibTeX-Styles/ugost2008ns.bst create mode 100644 BibTeX-Styles/ugost2008s.bst create mode 100644 BibTeX-Styles/utf8gost705u.bst create mode 100644 BibTeX-Styles/utf8gost71s.bst create mode 100644 BibTeX-Styles/utf8gost71u.bst create mode 100644 BibTeX-Styles/utf8gost780u.bst create mode 100644 CONTRIBUTING.md create mode 100644 Dissertation/acronyms.tex create mode 100644 Dissertation/appendix.tex create mode 100644 Dissertation/conclusion.tex create mode 100644 Dissertation/contents.tex create mode 100644 Dissertation/dictionary.tex create mode 100644 Dissertation/dispackages.tex create mode 100644 Dissertation/disstyles.tex create mode 100644 Dissertation/images/README.md create mode 100644 Dissertation/images/drawing.pdf create mode 100644 Dissertation/introduction.tex create mode 100644 Dissertation/lists.tex create mode 100644 Dissertation/part1.tex create mode 100644 Dissertation/part2.tex create mode 100644 Dissertation/part3.tex create mode 100644 Dissertation/references.tex create mode 100644 Dissertation/setup.tex create mode 100644 Dissertation/title.tex create mode 100644 Dissertation/userpackages.tex create mode 100644 Dissertation/userstyles.tex create mode 100644 Dockerfile create mode 100644 Documents/Def_positions.pdf create mode 100644 Documents/GOST 2.105-95.pdf create mode 100644 Documents/GOST 7.1-2003.pdf create mode 100644 Documents/GOST 7.80-2000.pdf create mode 100644 Documents/GOST R 7.0.11-2011.pdf create mode 100644 Documents/GOST R 7.0.5-2008.pdf create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 PSCyr/README.md create mode 100644 PSCyr/Windows.md create mode 100644 PSCyr/pscyr0.4d.zip create mode 100644 Presentation/appendix.tex create mode 100644 Presentation/conclusion.tex create mode 100644 Presentation/content.tex create mode 100644 Presentation/images/README.md create mode 100644 Presentation/images/implementation.pdf create mode 100644 Presentation/images/registration.png create mode 100644 Presentation/preamble.tex create mode 100644 Presentation/prespackages.tex create mode 100644 Presentation/setup.tex create mode 100644 Presentation/styles.tex create mode 100644 Presentation/title.tex create mode 100644 README.md create mode 100644 Readme/Bibliography.md create mode 100644 Readme/Installation.md create mode 100644 Readme/Links.md create mode 100644 Readme/github.md create mode 100644 Synopsis/content.tex create mode 100644 Synopsis/images/README.md create mode 100644 Synopsis/setup.tex create mode 100644 Synopsis/synpackages.tex create mode 100644 Synopsis/synstyles.tex create mode 100644 Synopsis/title.tex create mode 100644 Synopsis/userpackages.tex create mode 100644 Synopsis/userstyles.tex create mode 100644 biblio/author.bib create mode 100644 biblio/biblatex.tex create mode 100644 biblio/check-bib-dupes-and-usage.py create mode 100644 biblio/external.bib create mode 100644 biblio/predefined.tex create mode 100644 biblio/registered.bib create mode 100644 common/characteristic.tex create mode 100644 common/concl.tex create mode 100644 common/data.tex create mode 100644 common/fonts.tex create mode 100644 common/newnames.tex create mode 100644 common/packages.tex create mode 100644 common/renames.tex create mode 100644 common/setup.tex create mode 100644 common/styles.tex create mode 100644 compress.mk create mode 100644 dissertation.tex create mode 100644 examples.mk create mode 100644 images/knuth1.eps create mode 100644 images/knuth1.jpg create mode 100644 images/knuth2.eps create mode 100644 images/knuth2.jpg create mode 100644 images/latex.eps create mode 100644 images/latex.png create mode 100644 images/logo.pdf create mode 100644 images/personal-signature.png create mode 100644 images/secretary-signature.png create mode 100644 indent.yaml create mode 100755 install-dockertex.sh create mode 100644 latexmkrc create mode 100644 letters/.gitignore create mode 100644 letters/README.md create mode 100644 letters/fonts/LiberationSerif-Italic.ttf create mode 100644 letters/fonts/LiberationSerif-Regular.ttf create mode 100644 letters/fonts/PostIndex.ttf create mode 100755 letters/generate.sh create mode 100644 letters/letters.tex create mode 100644 letters/source.tsv create mode 100644 listings/run_analysis.R create mode 100644 presentation.tex create mode 100644 presentation_booklet.tex create mode 100644 presentation_handout.tex create mode 100644 siunitx.cfg create mode 100644 synopsis.tex create mode 100644 synopsis_booklet.tex create mode 100644 tikz.tex create mode 100644 unix.mk create mode 100644 usercfg.mk create mode 100644 windows.mk diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..5d86bb2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,19 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# All files +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 4 + +[Makefile] +indent_style = tab + +[*.mk] +indent_style = tab diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..112bc4e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,8 @@ +images/* linguist-vendored +PSCyr/pscyr0.4d.zip linguist-vendored +Documents/* linguist-documentation +*.md linguist-documentation +.gitattributes export-ignore +.gitignore export-ignore +LICENSE export-ignore +CONTRIBUTING.md export-ignore \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..0836683 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,43 @@ +--- +name: Bug report +about: Сообщение об ошибке в шаблоне +title: '' +labels: '' +assignees: '' + +--- + +**Описание ошибки** + +Чёткое и краткое описание ошибки. + +**Воспроизведение** + +Описание шагов, приводящих к ошибке: + +1. Открыть файл '....' +2. Заменить '....' на '....' +3. Выполнить команду '....' +4. Увидеть ошибку + +**Ожидаемое поведение** + +Чёткое и краткое описание того, что должно было произойти. + +**Cкриншоты** + +Изображения, иллюстрирующие ошибку. + +**Логи** + +Сообщения ошибок при компиляции. + +**Используемые версии программ** + + - Операционная система, версия, дистрибутив + - Дистрибутив TeX (TeXLive / MikTeX) и его версия + - Версии пакетов TeX, относящихся к описываемой проблеме (при удачной компиляции список выводится в конце лога сборки после строки `*File List*`) + +**Дополнительные материалы** + +Дополнительные материалы, описывающие ошибку. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..177b0b5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Предложить идею для шаблона +title: '' +labels: '' +assignees: '' + +--- + +**Ваш запрос функции связан с проблемой? Пожалуйста, опишите** + +Четкое и краткое описание проблемы. Например, у нашей комиссии есть дополнительное требование к оформлению '....' + +**Опишите решение, как Вы его себе представляете** + +Четкое и краткое описание работы новой функции. + +**Дополнительные материалы** + +Дополнительные материалы, скриншоты и т.п. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..e888efb --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,48 @@ + + +## PR checklist + +Пожалуйста, убедитесь, что Ваш PR удовлетворяет требованиям: + +- [ ] Изменения были протестированы (`make examples`) +- [ ] Изменения отражены в документации к шаблону +- [ ] Код соответствует правилам индентации шаблона (`make indent`) + + +## Тип PR + +Отметьте графы, которые относятся к данному PR: + +- [ ] Bugfix +- [ ] Feature +- [ ] Форматирование стиля кода +- [ ] Изменение текста шаблона +- [ ] Изменение документации +- [ ] Другое: + + +## Описание PR + + +- +- +- + +## Смежные обсуждения + + +Данный PR закрывает issue: + +## Тестирование шаблона + + +Тестирование производилось в среде + +- [ ] Windows +- [ ] Windows Cygwin +- [ ] GNU/Linux (на основе Debian) +- [ ] GNU/Linux (на основе RedHat) +- [ ] Arch Linux +- [ ] Docker (ссылка на контейнер): + +## Другая информация diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..27fc076 --- /dev/null +++ b/.gitignore @@ -0,0 +1,278 @@ +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.fot +*.cb +*.cb2 +.*.lb + +## Intermediate documents: +*.dvi +*.xdv +*-converted-to.* +# these rules might exclude image files for figures etc. +/*.ps +/*.eps +/*.pdf + +## Bibliography auxiliary files (bibtex/biblatex/biber): +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + +## Build tool auxiliary files: +*.fdb_latexmk +*.synctex +*.synctex(busy) +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync + +## Build tool directories for auxiliary files +# latexrun +latex.out/ + +## Auxiliary and intermediate files from other packages: +# algorithms +*.alg +*.loa + +# achemso +acs-*.bib + +# amsthm +*.thm + +# beamer +*.nav +*.pre +*.snm +*.vrb + +# changes +*.soc + +# comment +*.cut + +# cprotect +*.cpt + +# elsarticle (documentclass of Elsevier journals) +*.spl + +# endnotes +*.ent + +# fixme +*.lox + +# feynmf/feynmp +*.mf +*.mp +*.t[1-9] +*.t[1-9][0-9] +*.tfm + +#(r)(e)ledmac/(r)(e)ledpar +*.end +*.?end +*.[1-9] +*.[1-9][0-9] +*.[1-9][0-9][0-9] +*.[1-9]R +*.[1-9][0-9]R +*.[1-9][0-9][0-9]R +*.eledsec[1-9] +*.eledsec[1-9]R +*.eledsec[1-9][0-9] +*.eledsec[1-9][0-9]R +*.eledsec[1-9][0-9][0-9] +*.eledsec[1-9][0-9][0-9]R + +# glossaries +*.acn +*.acr +*.glg +*.glo +*.gls +*.glsdefs + +# gnuplottex +*-gnuplottex-* + +# gregoriotex +*.gaux +*.gtex + +# htlatex +*.4ct +*.4tc +*.idv +*.lg +*.trc +*.xref + +# hyperref +*.brf + +# knitr +*-concordance.tex +# Comment the next line if you want to keep your tikz graphics files +*.tikz +*-tikzDictionary +images/cache/** + +# listings +*.lol + +# luatexja-ruby +*.ltjruby + +# makeidx +*.idx +*.ilg +*.ind +*.ist + +# minitoc +*.maf +*.mlf +*.mlt +*.mtc[0-9]* +*.slf[0-9]* +*.slt[0-9]* +*.stc[0-9]* + +# minted +_minted* +*.pyg + +# morewrites +*.mw + +# mylatexformat +*.fmt + +# nomencl +*.nlg +*.nlo +*.nls + +# pax +*.pax + +# pdfpcnotes +*.pdfpc + +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# scrwfile +*.wrt + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# pdfcomment +*.upa +*.upb + +# pythontex +*.pytxcode +pythontex-files-*/ + +# tcolorbox +*.listing + +# thmtools +*.loe + +# TikZ & PGF +*.dpth +*.md5 +*.auxlock + +# todonotes +*.tdo + +# vhistory +*.hst +*.ver + +# easy-todo +*.lod + +# xcolor +*.xcp + +# xmpincl +*.xmpi + +# xindy +*.xdy + +# xypic precompiled matrices +*.xyc + +# endfloat +*.ttt +*.fff + +# Latexian +TSWLatexianTemp* + +## Editors: +# WinEdt +*.bak +*.sav + +# Texpad +.texpadtmp + +# LyX +*.lyx~ + +# Kile +*.backup + +# KBibTeX +*~[0-9]* + +# Vim +.*.swp +.*.swo + +# auto folder when using emacs and auctex +./auto/* +*.el + +# expex forward references with \gathertags +*-tags.tex + +# standalone packages +*.sta + +# latexindent backups +*.bak[0-9] + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db diff --git a/BibTeX-Styles/ugost2003.bst b/BibTeX-Styles/ugost2003.bst new file mode 100644 index 0000000..59ddb4e --- /dev/null +++ b/BibTeX-Styles/ugost2003.bst @@ -0,0 +1,1930 @@ +%% +%% This is file `ugost2003.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% gost.dtx (with options: `bst,utf8,strict,eprint') +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This file has the LPPL maintenance status "maintained". +%% Maintained by Igor A. Kotelnikov. +%% Current version: 2012.02.02 +%% +%% Please, send bug report via e-mail: +%% kia999 at mail dot ru +%% or +%% polyama at yahoo dot com +%% + + + +%% +%% This bibstyle attempts to format bibliography according to +%% GOST 7.80-2000 for bibliographic records. + +ENTRY + { address + annote + author + booktitle + bookauthor + chapter + edition + editor + compiler + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + medium % new in v.2. + type + volume + year + language + booklanguage + numpages + url + urldate + isbn + doi + eprinttype % = archivePrefix + eprintclass % = primaryClass + eprint + } + {} + { label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block +after.dblslash after.slash after.column after.semicolumn } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + #4 'after.dblslash := + #5 'after.slash := + #6 'after.column := + #7 'after.semicolumn := +} + +STRINGS { s t } + +STRINGS { curlanguage } + +FUNCTION {change.language} +{ booklanguage empty$ + { "" } + { booklanguage 'curlanguage := + "\selectlanguageifdefined{" + curlanguage * + "}" * + } + if$ +} + +FUNCTION {output.nonnull} +{ + swap$ + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + " " quote$ "--- " * * write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.dblslash = + { "~//" * change.language * " " * write$ } + { output.state after.slash = + { "~/ " * write$ } + { output.state after.column = + { "~: " * write$ } + { output.state after.semicolumn = + { "~; " * write$ } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.dblslash} +{ output.state before.all = + 'skip$ + { after.dblslash 'output.state := } + if$ +} + +FUNCTION {new.slash} +{ output.state before.all = + 'skip$ + { after.slash 'output.state := } + if$ +} + +FUNCTION {new.column} +{ output.state before.all = + 'skip$ + { after.column 'output.state := } + if$ +} + +FUNCTION {new.semicolumn} +{ output.state before.all = + 'skip$ + { after.semicolumn 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + + +FUNCTION {non.stop} +{ duplicate$ + "}" * add.period$ + #-1 #1 substring$ "." = +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.dblslash.checka} +{ empty$ + 'skip$ + 'new.dblslash + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\BibEmph{" swap$ * "}" * } + if$ +} + +FUNCTION {enclose.square.brackets} +{ duplicate$ empty$ + { pop$ "" } + { "[" swap$ * "]" * } + if$ +} + +FUNCTION {bracify} +{ duplicate$ empty$ + { pop$ "{}" } + { "{" swap$ * "}" * } + if$ +} +FUNCTION {bracketise} +{ duplicate$ empty$ + { pop$ "[]" } + { "[" swap$ * "]" * } + if$ +} +FUNCTION {parenthesify} +{ duplicate$ empty$ + { pop$ "()" } + { "(" swap$ * ")" * } + if$ +} + +FUNCTION {space.word} +{ " " swap$ * " " * } + +FUNCTION {bbl.edby} % { "\bbledby{}" } +{ curlanguage "english" = + {"Ed.\ by"} + { curlanguage "ukrainian" = + {"Під ред."} + { curlanguage "russian" = + {"Под ред."} + { curlanguage "german" = + { "ed." } + {"language is not defined: " language "edby" * * warning$ "Ed.\ by"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.cmplr} +{ curlanguage "english" = + { "Compiler"} + { curlanguage "german" = + { "Hrsg." } + { curlanguage "ukrainian" = + {"{Укл.}"} + { curlanguage "russian" = + {"{Сост.}"} + {"language is not defined: " language "cmplr" * * warning$ "Compiler"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.edition} % { "\bbledition{}" } +{ curlanguage "english" = + {"edition"} + { curlanguage "ukrainian" = + {"{вид.}"} + { curlanguage "russian" = + {"{изд.}"} + { curlanguage "german" = + {" {aus.}" } %%%% { "Aufl." } ?? + { curlanguage "italian" = + {"edizione"} + { curlanguage "french" = + {"\'{e}dition"} + {"language is not defined: " language "edition" * * warning$ "edition"} + if$} + if$} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.vvolume} % { "\bblVolume{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Volume"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "Том" } + { curlanguage "german" = + {"{Band}"} %%%% { "Volumen" } + {"language is not defined: " language "vvolume" * * warning$ "Volume"} + if$} + if$} +if$} + +FUNCTION {bbl.vvol} % { "\bblVol{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Vol."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Т."} + { curlanguage "german" = + {"{Bd.}"} %%%% { "Vol." } + {"language is not defined: " language "vvol" * * warning$ "Vol."} + if$} + if$} +if$} + +FUNCTION {bbl.iissue} % { "\bblIssue{}" } +{ curlanguage "english" = + {"Issue"} + { curlanguage "ukrainian" = + {"Випуск"} + { curlanguage "russian" = + {"Выпуск"} + { curlanguage "german" = + {"{Heft}"} %%%% { "Ausgabe" } + {"language is not defined: " language "iissue" * * warning$ "Issue"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.iiss} % { "\bblIss{}" } +{ curlanguage "english" = + {"Iss."} + { curlanguage "ukrainian" = + {"Вип."} + { curlanguage "russian" = + {"Вып."} + { curlanguage "german" = + {"{H.}"} + {"language is not defined: " language "iiss" * * warning$ "Iss."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.of} % { "\bblof{}" } +{ curlanguage "english" = + {"of"} + { curlanguage "german" = + { "von" } + { curlanguage "ukrainian" = + { "{із}" } + { curlanguage "russian" = + { "{из}" } + {"language is not defined: " language "of" * * warning$ "of"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.etal} % { "\bblof{}" } +{ curlanguage "english" = + {"et~al."} + { curlanguage "german" = + { "u.~a." } + { curlanguage "ukrainian" = + {"{та~ін.}"} + { curlanguage "russian" = + {"и~др."} + {"language is not defined: " language "et~al" * * warning$ "et~al."} + if$} + if$} + if$} +if$} + + +FUNCTION {bbl.nnumber} % { "\bblNumber{}" } +{ curlanguage "english" = + {"Number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{Номер}" } + { curlanguage "german" = + {"{Heft}"} %%% { "Anzahl" } + {"language is not defined: " language "nnumber" * * warning$ "Number"} + if$} + if$} +if$} + +FUNCTION {bbl.number} % { "\bblnumber{}" } +{ curlanguage "english" = + {"number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{номер}"} + { curlanguage "german" = + {"{Heft}"} %%% { "anzahl" }??? + {"language is not defined: " language "number" * * warning$ "number"} + if$} + if$} +if$} + +FUNCTION {bbl.nr} % { "\bblno{}" } +{ curlanguage "english" = + {"no."} + { curlanguage "italian" = + { "no" } + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nr" * * warning$ "no."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.nnr} % { "\bblno{}" } +{ curlanguage "english" = + {"No."} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nnr" * * warning$ "No."} + if$} + if$} +if$} + +FUNCTION {bbl.in} % { "\bblin{}" } +{ curlanguage "english" = curlanguage "german" = or + {"in"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{в}" } + {"language is not defined: " language "in" * * warning$ "in"} + if$} +if$} + +FUNCTION {bbl.iin} % { "\bblIn{}" } +{ curlanguage "english" = curlanguage "german" = or + {"In"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{В}" } + {"language is not defined: " language "iin" * * warning$ "In"} + if$} +if$} + +FUNCTION {bbl.pages} % { "\bblpp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} %%% {"pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "pages" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.page} % { "\bblp." +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "page" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.ppages}% { "\bblPp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} %%%% { "Pp." } + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppages" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.ppage} % { "\bblP." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppage" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.urldate} +{ curlanguage "english" = + {"online; accessed"} + { curlanguage "ukrainian" = + { "{дата звернення}" } + { curlanguage "russian" = + { "{дата обращения}" } + { curlanguage "german" = + { "{online; abgerufen}" } + { "language is not defined: " language "urldate" * * warning$ "online; accessed" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.techreport} % rename to bbl.techreport +{ curlanguage "english" = + { "Rep." } + { curlanguage "german" = + { "Bericht" } + { curlanguage "russian" = + { "{Отчет}" } + { "language is not defined: " language "techrep" * * warning$ "Rep." } + if$} + if$} +if$} + +FUNCTION {bbl.mthesis} +{ curlanguage "english" = + { "Master's thesis" } + { curlanguage "german" = + { "Diss.~Mag." } + { curlanguage "russian" = + { "{Квалификационная работа магистра}" } + { "language is not defined: " language "mthesis" * * warning$ "Master's thesis" } + if$} + if$} +if$} + +FUNCTION {bbl.phdthesis} +{ curlanguage "english" = + { "Ph.\,D. thesis" } + { curlanguage "german" = + { "Diss.~Ph.\,D." } + { curlanguage "russian" = + { "{Дисс\ldots\ кандидата наук}" } + { curlanguage "french" = + { "Th\`{e}se de doctorat" } + { "language is not defined: " language "phdthesis" * * warning$ "Ph.\,D. thesis" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.dscithesis} +{ curlanguage "english" = + { "Dr.\,Sci. dissertation" } + { curlanguage "german" = + { "Diss.~Dr." } + { curlanguage "russian" = + { "{Дисс\ldots\ доктора наук}" } + { "language is not defined: " language "dscithesis" * * warning$ "Dr.\,Sci. dissertation" } + if$} + if$} +if$} + +FUNCTION {bbl.nnoaddress} +{ curlanguage "english" = + { "S.\ l." } + { curlanguage "russian" = + { "{Б.\ м.}" } + { "language is not defined: " language "nnoaddress" * * warning$ "S.\ l." } + if$} +if$} + +FUNCTION {bbl.nopublisher} +{ curlanguage "english" = + { "s.\ n." } + { curlanguage "russian" = + { "{б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "s.\ n." } + if$} +if$} + +FUNCTION {bbl.nnopublisher} +{ curlanguage "english" = + { "S.\ n." } + { curlanguage "russian" = + { "{Б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "S.\ n." } + if$} +if$} + +FUNCTION {bbl.medium.text} +{ curlanguage "english" = + { "Text" } + { curlanguage "russian" = curlanguage "ukrainian" = or + { "{Текст}" } + { "language is not defined: " language "medium" * * warning$ "Text" } + if$} +if$} + +FUNCTION {bbl.medium.elres} +{ curlanguage "english" = + { "Electronic resource" } + { curlanguage "russian" = + { "{Электронный ресурс}" } + { curlanguage "ukrainian" = + { "{Електронний ресурс}" } + { "language is not defined: " language "medium" * * warning$ "Electronic resource" } + if$} + if$} +if$} + +FUNCTION {bbl.chief} +{ curlanguage "english" = + { "chief" } + { curlanguage "russian" = + { "{рук.}" } + { curlanguage "ukrainian" = + { "{рук.}" } + { "language is not defined: " language "chief" * * warning$ "chief" } + if$} + if$} +if$} + +FUNCTION {bbl.executor} +{ curlanguage "english" = + { "Executor" } + { curlanguage "russian" = + { "{исполн.}" } + { curlanguage "ukrainian" = + { "{виконавець}" } + { "language is not defined: " language "medium" * * warning$ "Executor" } + if$} + if$} +if$} + +FUNCTION {bbl.medium} +{ type$ "online" = + { bbl.medium.elres } + { bbl.medium.text } +if$} + +INTEGERS { nameptr namesleft numnames } + + +FUNCTION {format.names} +{ + #1 "{vv~}{ll}{~jj}{,~ff}" format.name$ +} + + +FUNCTION {format.names.rev} +{ + 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ff}{~vv}{~ll}{, jj}" format.name$ 't := + nameptr #1 > + { nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + t "~others" = + or + { " " * bbl.etal enclose.square.brackets * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names emphasize} + if$ +} + + +FUNCTION {format.bookauthors} +{ bookauthor empty$ + { "" } + { bookauthor format.names} + if$ +} + +FUNCTION {format.authors.after} +{ author empty$ + { "" } + { author format.names.rev} + if$ +} + +FUNCTION {format.bookauthors.after} +{ bookauthor empty$ + { "" } + { bookauthor format.names.rev}% always cuts to 4 persons + if$ +} + +FUNCTION {format.editors.after} +{ editor empty$ + { "" } + { bbl.edby "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.chief.after} +{ editor empty$ + { "" } + { bbl.chief "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.executor.after} +{ author empty$ + { "" } + { bbl.executor ": " * author format.names.rev * } + if$ +} + +FUNCTION {format.compiler.after} +{ compiler empty$ + { "" } + { bbl.cmplr "\ " * compiler format.names.rev * } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title } + if$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { year ". " quote$ "--- " month * * * * } + if$ + } + if$ +} + +FUNCTION {output.address.publisher} +{ + address empty$ + { + bbl.nnoaddress + publisher empty$ + { "~: " * bbl.nopublisher * enclose.square.brackets } + { enclose.square.brackets "~: " * publisher * } + if$ + } + { + address output + new.column + publisher empty$ + { bbl.nopublisher enclose.square.brackets } + { publisher } + if$ + } + if$ + output +} + + + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem" write$ + cite$ bracify write$ + newline$ + language empty$ + { "english" 'curlanguage := } + { language 'curlanguage := } + if$ + "\selectlanguageifdefined" curlanguage bracify * write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.iin + " " * } + +FUNCTION {format.btitle} +{ title +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {tie.connect} + {"~" + swap$ * * + } + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.connect + series empty$ + 'skip$ + { bbl.of space.word * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { "there's a number but no series in " cite$ * warning$ + bbl.nnr } + { + %new.dblslash + new.sentence + series + bbl.nr + tie.or.space.connect} + if$ + number tie.or.space.connect + } + if$ + } + { "" } + if$ +} + +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + + +FUNCTION {convert.edition} +{ edition +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { convert.edition " " * bbl.edition * } + { convert.edition " " * bbl.edition * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { bbl.ppages pages n.dashify tie.connect } + { bbl.ppage pages tie.connect } + if$ + } + if$ +} + +FUNCTION {format.pages.page} +{ pages empty$ + { numpages empty$ + { "" } + { numpages bbl.pages tie.connect } + if$} + { format.pages} + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { + ", no." number tie.or.space.connect * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ": " * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.volume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.or.space.connect } + if$ +} + +FUNCTION {format.number} +{ number empty$ + { "" } + { bbl.nr number tie.or.space.connect } + if$ +} + + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type + } + if$ +} + +%% { "t" change.case$ } +%% { "" } + +FUNCTION {format.techreport.type} +{ type empty$ + { bbl.techreport } + 'type + if$ +} + +FUNCTION {author.before} +{ + author empty$ + 'skip$ + {author num.names$ #4 < + {format.authors output + new.sentence} + 'skip$ + if$} + if$ +} + +%%<*!long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% {bookauthor num.names$ #4 < +%% {format.bookauthors output +%% new.sentence} +%% 'skip$ +%% if$} +%% if$ +%%} +%% +%%<*long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% { format.bookauthors output +%% new.sentence +%% } +%% if$ +%%} +%% + +FUNCTION {author.after} +{ + author empty$ + 'skip$ + {format.authors.after output + new.semicolumn } + if$ +} + +FUNCTION {bookauthor.after} +{ + bookauthor empty$ + 'skip$ + {format.bookauthors.after output + new.semicolumn } + if$ +} + +FUNCTION {editor.organization.after} +{ + compiler empty$ + {} + { format.compiler.after output + new.semicolumn + } + if$ + editor empty$ + {} + { format.editors.after output + new.semicolumn + } + if$ + organization empty$ + {} + {organization output + new.semicolumn + } + if$ +} + +FUNCTION {format.url} +{ url empty$ + { "" } + { + "URL: \BibUrl{" url * "}" * + urldate empty$ + { "" } + { " (" bbl.urldate * ": " * urldate * ")" * } + if$ * + } + if$ +} + +FUNCTION {format.annote} +{ annote empty$ + { "" } +{ after.sentence 'output.state := + "\BibAnnote{" annote add.period$ * "}" * +} + if$ +} + +FUNCTION {format.isbn} +{ + isbn empty$ + { "" } + { "ISBN:~\href{http://isbndb.com/search-all.html?kw=" isbn * + "}{" * isbn * "}" * + } + if$ +} + +FUNCTION {add.doi} +{ duplicate$ empty$ + 'skip$ + { doi empty$ + 'skip$ + { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } + if$ + } + if$ +} + +FUNCTION {add.medium} +{ duplicate$ empty$ + 'skip$ + { medium empty$ + { " " * bbl.medium enclose.square.brackets * } + { " " * medium enclose.square.brackets * } +%% { bbl.medium enclose.square.brackets * } +%% { medium enclose.square.brackets * } + if$ + } + if$ +} + + + +FUNCTION {format.eprint} +{ eprint empty$ + { "" } + { eprinttype empty$ + { "" } + { eprinttype "~: " *} + if$ + eprintclass empty$ + { } + { eprintclass * "/" *} + if$ + url empty$ + { eprint * } + { "\href{" * url * "}{" * eprint * "}" *} + if$ + } + if$ +} + +FUNCTION {output.eprint.url} +{ + eprint empty$ + { format.url output } + { format.eprint output } + if$ +} + + + +FUNCTION {article} +{ + output.bibitem + author.before + format.title add.medium "title" output.check + new.slash + author.after + new.dblslash + journal emphasize add.doi "journal" output.check % new in v.2 + new.block + format.date "year" output.check + new.block + format.volume output + format.number output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {book} +{ + output.bibitem + author.before + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.sentence + format.number.series output + new.block + format.edition output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {booklet} +{ + output.bibitem + author.before + format.title add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.block + howpublished output + address output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inbook} +{ + output.bibitem + author.before + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + bookauthor.after + editor.organization.after + new.block + format.edition output + new.block + format.number.series output + new.sentence + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {incollection} +{ + output.bibitem + author.before + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + format.number.series output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {proceedings} +{ + output.bibitem + format.btitle add.doi add.medium "title" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + output.address.publisher + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + author.before + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + new.block + format.btitle add.doi add.medium "title" output.check + author empty$ + { organization empty$ + { + address new.block.checka + address output + } + 'skip$ + if$ + } + { + organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.title add.medium output + howpublished new.block.checka + howpublished output + new.block + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + editor.organization.after + new.block + format.date "year" output.check + new.block + note "note" output.check + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {online} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.title add.doi add.medium "title" output.check + howpublished new.dblslash.checka + howpublished enclose.square.brackets output + editor.organization.after + new.sentence + new.block + output.address.publisher + format.date output + new.block + output.eprint.url + new.sentence + note output + format.annote output + fin.entry +} + +FUNCTION {internet} {online} +FUNCTION {www} {online} +FUNCTION {webpage} {online} +FUNCTION {electronic} {online} +FUNCTION {thesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + type "type" output.check + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +%% format.techrep.type.number output.nonnull +%% format.url output +FUNCTION {report} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + new.column + type "type" output.check + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.phdthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {masterthesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.mthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {dscithesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.dscithesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +%% format.url output + +FUNCTION {techreport} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + new.column + format.techreport.type output + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"\bbljan{}"} +MACRO {feb} {"\bblfeb{}"} +MACRO {mar} {"\bblmar{}"} +MACRO {apr} {"\bblapr{}"} +MACRO {may} {"\bblmay{}"} +MACRO {jun} {"\bbljun{}"} +MACRO {jul} {"\bbljul{}"} +MACRO {aug} {"\bblaug{}"} +MACRO {sep} {"\bblsep{}"} +MACRO {oct} {"\bbloct{}"} +MACRO {nov} {"\bblnov{}"} +MACRO {dec} {"\bbldec{}"} + + +MACRO {aa}{"Astron. \& Astrophys."} +MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."} +MACRO {aj} {"Astron. J."} +MACRO {aph} {"Acta Phys."} +MACRO {advp} {"Adv. Phys."} +MACRO {ajp} {"Amer. J. Phys."} +MACRO {ajm} {"Amer. J. Math."} +MACRO {amsci} {"Amer. Sci."} +MACRO {anofd} {"Ann. Fluid Dyn."} +MACRO {am} {"Ann. Math."} +MACRO {ap} {"Ann. Phys. (NY)"} +MACRO {adp} {"Ann. Phys. (Leipzig)"} +MACRO {ao} {"Appl. Opt."} +MACRO {apl} {"Appl. Phys. Lett."} +MACRO {app} {"Astroparticle Phys."} +MACRO {apj} {"Astrophys. J."} +MACRO {apjsup} {"Astrophys. J. Suppl."} +MACRO {apss} {"Astrophys. Space Sci."} +MACRO {araa} {"Ann. Rev. Astron. Astrophys."} +MACRO {baas} {"Bull. Amer. Astron. Soc."} +MACRO {baps} {"Bull. Amer. Phys. Soc."} +MACRO {cmp} {"Comm. Math. Phys."} +MACRO {cpam} {"Commun. Pure Appl. Math."} +MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"} +MACRO {cpc} {"Comp. Phys. Comm."} +MACRO {cqg} {"Class. Quant. Grav."} +MACRO {cra} {"C. R. Acad. Sci. A"} +MACRO {fed} {"Fusion Eng. \& Design"} +MACRO {ft} {"Fusion Tech."} +MACRO {grg} {"Gen. Relativ. Gravit."} +MACRO {ieeens} {"IEEE Trans. Nucl. Sci."} +MACRO {ieeeps} {"IEEE Trans. Plasma Sci."} +MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"} +MACRO {ip} {"Infrared Phys."} +MACRO {irp} {"Infrared Phys."} +MACRO {jap} {"J. Appl. Phys."} +MACRO {jasa} {"J. Acoust. Soc. America"} +MACRO {jcp} {"J. Comp. Phys."} +MACRO {jchp} {"J. Chem. Phys."} +MACRO {jetp} {"Sov. Phys.--JETP"} +MACRO {jfe} {"J. Fusion Energy"} +MACRO {jfm} {"J. Fluid Mech."} +MACRO {jmp} {"J. Math. Phys."} +MACRO {jne} {"J. Nucl. Energy"} +MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."} +MACRO {jnm} {"J. Nucl. Mat."} +MACRO {jpc} {"J. Phys. Chem."} +MACRO {jpp} {"J. Plasma Phys."} +MACRO {jpsj} {"J. Phys. Soc. Japan"} +MACRO {jsi} {"J. Sci. Instrum."} +MACRO {jvst} {"J. Vac. Sci. \& Tech."} +MACRO {nat} {"Nature"} +MACRO {nature} {"Nature"} +MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"} +MACRO {nf} {"Nucl. Fusion"} +MACRO {nim} {"Nucl. Inst. \& Meth."} +MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."} +MACRO {np} {"Nucl. Phys."} +MACRO {npb} {"Nucl. Phys. B"} +MACRO {nt/f} {"Nucl. Tech./Fusion"} +MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"} +MACRO {inc} {"Nuovo Cimento"} +MACRO {nc} {"Nuovo Cimento"} +MACRO {pf} {"Phys. Fluids"} +MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."} +MACRO {pfb} {"Phys. Fluids B: Plasma Phys."} +MACRO {pl} {"Phys. Lett."} +MACRO {pla} {"Phys. Lett. A"} +MACRO {plb} {"Phys. Lett. B"} +MACRO {prep} {"Phys. Rep."} +MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"} +MACRO {pp} {"Phys. Plasmas"} +MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"} +MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"} +MACRO {prl} {"Phys. Rev. Lett."} +MACRO {pr} {"Phys. Rev."} +MACRO {physrev} {"Phys. Rev."} +MACRO {pra} {"Phys. Rev. A"} +MACRO {prb} {"Phys. Rev. B"} +MACRO {prc} {"Phys. Rev. C"} +MACRO {prd} {"Phys. Rev. D"} +MACRO {pre} {"Phys. Rev. E"} +MACRO {ps} {"Phys. Scripta"} +MACRO {procrsl} {"Proc. Roy. Soc. London"} +MACRO {rmp} {"Rev. Mod. Phys."} +MACRO {rsi} {"Rev. Sci. Inst."} +MACRO {science} {"Science"} +MACRO {sciam} {"Sci. Am."} +MACRO {sam} {"Stud. Appl. Math."} +MACRO {sjpp} {"Sov. J. Plasma Phys."} +MACRO {spd} {"Sov. Phys.--Doklady"} +MACRO {sptp} {"Sov. Phys.--Tech. Phys."} +MACRO {spu} {"Sov. Phys.--Uspekhi"} +MACRO {st} {"Sky and Telesc."} + +MACRO {appopt} {"Appl. Opt."} +MACRO {bell} {"Bell Syst. Tech. J."} +MACRO {ell} {"Electron. Lett."} +MACRO {jasp} {"J. Appl. Spectr."} +MACRO {jqe} {"IEEE J. Quantum Electron."} +MACRO {jlwt} {"J. Lightwave Technol."} +MACRO {jmo} {"J. Mod. Opt."} +MACRO {josa} {"J. Opt. Soc. America"} +MACRO {josaa} {"J. Opt. Soc. Amer.~A"} +MACRO {josab} {"J. Opt. Soc. Amer.~B"} +MACRO {jdp} {"J. Phys. (Paris)"} +MACRO {oc} {"Opt. Commun."} +MACRO {ol} {"Opt. Lett."} +MACRO {os} {"Opt. Spectrosc."} +MACRO {phtl} {"IEEE Photon. Technol. Lett."} +MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."} +MACRO {sjot} {"Sov. J. Opt. Technol."} +MACRO {sjqe} {"Sov. J. Quantum Electron."} +MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."} +MACRO {stph} {"Sov. Phys.--Techn. Phys."} +MACRO {stphl} {"Sov. Techn. Phys. Lett."} +MACRO {vr} {"Vision Res."} +MACRO {zph} {"Z. f. Physik"} +MACRO {zphb} {"Z. f. Physik~B"} +MACRO {zphd} {"Z. f. Physik~D"} +MACRO {sse} {"Solid-State Electron."} +MACRO {pss} {"Phys. Sol. State"} +MACRO {sst} {"Semicond. Sci. Tech."} +MACRO {nl} {"Nano Lett."} + +READ + + + + + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +EXECUTE {initialize.longest.label} + +FUNCTION {forward.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +ITERATE {forward.pass} + + +FUNCTION {begin.bib} +{ "\begin{thebibliography}{" longest.label * "}" * write$ newline$ + "\def\selectlanguageifdefined#1{" write$ newline$ + "\expandafter\ifx\csname date#1\endcsname\relax" write$ newline$ + "\else\selectlanguage{#1}\fi}" write$ newline$ + "\providecommand*{\href}[2]{{\small #2}}" write$ newline$ + "\providecommand*{\url}[1]{{\small #1}}" write$ newline$ + "\providecommand*{\BibUrl}[1]{\url{#1}}" write$ newline$ + "\providecommand{\BibAnnote}[1]{}" write$ newline$ + "\providecommand*{\BibEmph}[1]{#1}" write$ newline$ + preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} + +%% +%% End of file `ugost2003.bst'. diff --git a/BibTeX-Styles/ugost2003s.bst b/BibTeX-Styles/ugost2003s.bst new file mode 100644 index 0000000..4973ffd --- /dev/null +++ b/BibTeX-Styles/ugost2003s.bst @@ -0,0 +1,2053 @@ +%% +%% This is file `ugost2003s.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% gost.dtx (with options: `bst,utf8,strict,eprint,sort') +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This file has the LPPL maintenance status "maintained". +%% Maintained by Igor A. Kotelnikov. +%% Current version: 2012.02.02 +%% +%% Please, send bug report via e-mail: +%% kia999 at mail dot ru +%% or +%% polyama at yahoo dot com +%% + + + +%% +%% This bibstyle attempts to format bibliography according to +%% GOST 7.80-2000 for bibliographic records. + +ENTRY + { address + annote + author + booktitle + bookauthor + chapter + edition + editor + compiler + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + medium % new in v.2. + type + volume + year + language + booklanguage + numpages + url + urldate + isbn + doi + eprinttype % = archivePrefix + eprintclass % = primaryClass + eprint + } + {} + { label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block +after.dblslash after.slash after.column after.semicolumn } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + #4 'after.dblslash := + #5 'after.slash := + #6 'after.column := + #7 'after.semicolumn := +} + +STRINGS { s t } + +STRINGS { curlanguage } + +FUNCTION {change.language} +{ booklanguage empty$ + { "" } + { booklanguage 'curlanguage := + "\selectlanguageifdefined{" + curlanguage * + "}" * + } + if$ +} + +FUNCTION {output.nonnull} +{ + swap$ + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + " " quote$ "--- " * * write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.dblslash = + { "~//" * change.language * " " * write$ } + { output.state after.slash = + { "~/ " * write$ } + { output.state after.column = + { "~: " * write$ } + { output.state after.semicolumn = + { "~; " * write$ } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.dblslash} +{ output.state before.all = + 'skip$ + { after.dblslash 'output.state := } + if$ +} + +FUNCTION {new.slash} +{ output.state before.all = + 'skip$ + { after.slash 'output.state := } + if$ +} + +FUNCTION {new.column} +{ output.state before.all = + 'skip$ + { after.column 'output.state := } + if$ +} + +FUNCTION {new.semicolumn} +{ output.state before.all = + 'skip$ + { after.semicolumn 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +FUNCTION {non.stop} +{ duplicate$ + "}" * add.period$ + #-1 #1 substring$ "." = +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.dblslash.checka} +{ empty$ + 'skip$ + 'new.dblslash + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\BibEmph{" swap$ * "}" * } + if$ +} + +FUNCTION {enclose.square.brackets} +{ duplicate$ empty$ + { pop$ "" } + { "[" swap$ * "]" * } + if$ +} + +FUNCTION {bracify} +{ duplicate$ empty$ + { pop$ "{}" } + { "{" swap$ * "}" * } + if$ +} +FUNCTION {bracketise} +{ duplicate$ empty$ + { pop$ "[]" } + { "[" swap$ * "]" * } + if$ +} +FUNCTION {parenthesify} +{ duplicate$ empty$ + { pop$ "()" } + { "(" swap$ * ")" * } + if$ +} + +FUNCTION {space.word} +{ " " swap$ * " " * } + +FUNCTION {bbl.edby} % { "\bbledby{}" } +{ curlanguage "english" = + {"Ed.\ by"} + { curlanguage "ukrainian" = + {"Під ред."} + { curlanguage "russian" = + {"Под ред."} + { curlanguage "german" = + { "ed." } + {"language is not defined: " language "edby" * * warning$ "Ed.\ by"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.cmplr} +{ curlanguage "english" = + { "Compiler"} + { curlanguage "german" = + { "Hrsg." } + { curlanguage "ukrainian" = + {"{Укл.}"} + { curlanguage "russian" = + {"{Сост.}"} + {"language is not defined: " language "cmplr" * * warning$ "Compiler"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.edition} % { "\bbledition{}" } +{ curlanguage "english" = + {"edition"} + { curlanguage "ukrainian" = + {"{вид.}"} + { curlanguage "russian" = + {"{изд.}"} + { curlanguage "german" = + {" {aus.}" } %%%% { "Aufl." } ?? + { curlanguage "italian" = + {"edizione"} + { curlanguage "french" = + {"\'{e}dition"} + {"language is not defined: " language "edition" * * warning$ "edition"} + if$} + if$} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.vvolume} % { "\bblVolume{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Volume"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "Том" } + { curlanguage "german" = + {"{Band}"} %%%% { "Volumen" } + {"language is not defined: " language "vvolume" * * warning$ "Volume"} + if$} + if$} +if$} + +FUNCTION {bbl.vvol} % { "\bblVol{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Vol."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Т."} + { curlanguage "german" = + {"{Bd.}"} %%%% { "Vol." } + {"language is not defined: " language "vvol" * * warning$ "Vol."} + if$} + if$} +if$} + +FUNCTION {bbl.iissue} % { "\bblIssue{}" } +{ curlanguage "english" = + {"Issue"} + { curlanguage "ukrainian" = + {"Випуск"} + { curlanguage "russian" = + {"Выпуск"} + { curlanguage "german" = + {"{Heft}"} %%%% { "Ausgabe" } + {"language is not defined: " language "iissue" * * warning$ "Issue"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.iiss} % { "\bblIss{}" } +{ curlanguage "english" = + {"Iss."} + { curlanguage "ukrainian" = + {"Вип."} + { curlanguage "russian" = + {"Вып."} + { curlanguage "german" = + {"{H.}"} + {"language is not defined: " language "iiss" * * warning$ "Iss."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.of} % { "\bblof{}" } +{ curlanguage "english" = + {"of"} + { curlanguage "german" = + { "von" } + { curlanguage "ukrainian" = + { "{із}" } + { curlanguage "russian" = + { "{из}" } + {"language is not defined: " language "of" * * warning$ "of"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.etal} % { "\bblof{}" } +{ curlanguage "english" = + {"et~al."} + { curlanguage "german" = + { "u.~a." } + { curlanguage "ukrainian" = + {"{та~ін.}"} + { curlanguage "russian" = + {"и~др."} + {"language is not defined: " language "et~al" * * warning$ "et~al."} + if$} + if$} + if$} +if$} + + +FUNCTION {bbl.nnumber} % { "\bblNumber{}" } +{ curlanguage "english" = + {"Number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{Номер}" } + { curlanguage "german" = + {"{Heft}"} %%% { "Anzahl" } + {"language is not defined: " language "nnumber" * * warning$ "Number"} + if$} + if$} +if$} + +FUNCTION {bbl.number} % { "\bblnumber{}" } +{ curlanguage "english" = + {"number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{номер}"} + { curlanguage "german" = + {"{Heft}"} %%% { "anzahl" }??? + {"language is not defined: " language "number" * * warning$ "number"} + if$} + if$} +if$} + +FUNCTION {bbl.nr} % { "\bblno{}" } +{ curlanguage "english" = + {"no."} + { curlanguage "italian" = + { "no" } + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nr" * * warning$ "no."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.nnr} % { "\bblno{}" } +{ curlanguage "english" = + {"No."} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nnr" * * warning$ "No."} + if$} + if$} +if$} + +FUNCTION {bbl.in} % { "\bblin{}" } +{ curlanguage "english" = curlanguage "german" = or + {"in"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{в}" } + {"language is not defined: " language "in" * * warning$ "in"} + if$} +if$} + +FUNCTION {bbl.iin} % { "\bblIn{}" } +{ curlanguage "english" = curlanguage "german" = or + {"In"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{В}" } + {"language is not defined: " language "iin" * * warning$ "In"} + if$} +if$} + +FUNCTION {bbl.pages} % { "\bblpp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} %%% {"pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "pages" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.page} % { "\bblp." +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "page" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.ppages}% { "\bblPp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} %%%% { "Pp." } + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppages" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.ppage} % { "\bblP." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppage" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.urldate} +{ curlanguage "english" = + {"online; accessed"} + { curlanguage "ukrainian" = + { "{дата звернення}" } + { curlanguage "russian" = + { "{дата обращения}" } + { curlanguage "german" = + { "{online; abgerufen}" } + { "language is not defined: " language "urldate" * * warning$ "online; accessed" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.techreport} % rename to bbl.techreport +{ curlanguage "english" = + { "Rep." } + { curlanguage "german" = + { "Bericht" } + { curlanguage "russian" = + { "{Отчет}" } + { "language is not defined: " language "techrep" * * warning$ "Rep." } + if$} + if$} +if$} + +FUNCTION {bbl.mthesis} +{ curlanguage "english" = + { "Master's thesis" } + { curlanguage "german" = + { "Diss.~Mag." } + { curlanguage "russian" = + { "{Квалификационная работа магистра}" } + { "language is not defined: " language "mthesis" * * warning$ "Master's thesis" } + if$} + if$} +if$} + +FUNCTION {bbl.phdthesis} +{ curlanguage "english" = + { "Ph.\,D. thesis" } + { curlanguage "german" = + { "Diss.~Ph.\,D." } + { curlanguage "russian" = + { "{Дисс\ldots\ кандидата наук}" } + { curlanguage "french" = + { "Th\`{e}se de doctorat" } + { "language is not defined: " language "phdthesis" * * warning$ "Ph.\,D. thesis" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.dscithesis} +{ curlanguage "english" = + { "Dr.\,Sci. dissertation" } + { curlanguage "german" = + { "Diss.~Dr." } + { curlanguage "russian" = + { "{Дисс\ldots\ доктора наук}" } + { "language is not defined: " language "dscithesis" * * warning$ "Dr.\,Sci. dissertation" } + if$} + if$} +if$} + +FUNCTION {bbl.nnoaddress} +{ curlanguage "english" = + { "S.\ l." } + { curlanguage "russian" = + { "{Б.\ м.}" } + { "language is not defined: " language "nnoaddress" * * warning$ "S.\ l." } + if$} +if$} + +FUNCTION {bbl.nopublisher} +{ curlanguage "english" = + { "s.\ n." } + { curlanguage "russian" = + { "{б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "s.\ n." } + if$} +if$} + +FUNCTION {bbl.nnopublisher} +{ curlanguage "english" = + { "S.\ n." } + { curlanguage "russian" = + { "{Б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "S.\ n." } + if$} +if$} + +FUNCTION {bbl.medium.text} +{ curlanguage "english" = + { "Text" } + { curlanguage "russian" = curlanguage "ukrainian" = or + { "{Текст}" } + { "language is not defined: " language "medium" * * warning$ "Text" } + if$} +if$} + +FUNCTION {bbl.medium.elres} +{ curlanguage "english" = + { "Electronic resource" } + { curlanguage "russian" = + { "{Электронный ресурс}" } + { curlanguage "ukrainian" = + { "{Електронний ресурс}" } + { "language is not defined: " language "medium" * * warning$ "Electronic resource" } + if$} + if$} +if$} + +FUNCTION {bbl.chief} +{ curlanguage "english" = + { "chief" } + { curlanguage "russian" = + { "{рук.}" } + { curlanguage "ukrainian" = + { "{рук.}" } + { "language is not defined: " language "chief" * * warning$ "chief" } + if$} + if$} +if$} + +FUNCTION {bbl.executor} +{ curlanguage "english" = + { "Executor" } + { curlanguage "russian" = + { "{исполн.}" } + { curlanguage "ukrainian" = + { "{виконавець}" } + { "language is not defined: " language "medium" * * warning$ "Executor" } + if$} + if$} +if$} + +FUNCTION {bbl.medium} +{ type$ "online" = + { bbl.medium.elres } + { bbl.medium.text } +if$} + +INTEGERS { nameptr namesleft numnames } + + +FUNCTION {format.names} +{ + #1 "{vv~}{ll}{~jj}{,~ff}" format.name$ +} + + +FUNCTION {format.names.rev} +{ + 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ff}{~vv}{~ll}{, jj}" format.name$ 't := + nameptr #1 > + { nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + t "~others" = + or + { " " * bbl.etal enclose.square.brackets * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names emphasize} + if$ +} + + +FUNCTION {format.bookauthors} +{ bookauthor empty$ + { "" } + { bookauthor format.names} + if$ +} + +FUNCTION {format.authors.after} +{ author empty$ + { "" } + { author format.names.rev} + if$ +} + +FUNCTION {format.bookauthors.after} +{ bookauthor empty$ + { "" } + { bookauthor format.names.rev}% always cuts to 4 persons + if$ +} + +FUNCTION {format.editors.after} +{ editor empty$ + { "" } + { bbl.edby "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.chief.after} +{ editor empty$ + { "" } + { bbl.chief "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.executor.after} +{ author empty$ + { "" } + { bbl.executor ": " * author format.names.rev * } + if$ +} + +FUNCTION {format.compiler.after} +{ compiler empty$ + { "" } + { bbl.cmplr "\ " * compiler format.names.rev * } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title } + if$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { year ". " quote$ "--- " month * * * * } + if$ + } + if$ +} + +FUNCTION {output.address.publisher} +{ + address empty$ + { + bbl.nnoaddress + publisher empty$ + { "~: " * bbl.nopublisher * enclose.square.brackets } + { enclose.square.brackets "~: " * publisher * } + if$ + } + { + address output + new.column + publisher empty$ + { bbl.nopublisher enclose.square.brackets } + { publisher } + if$ + } + if$ + output +} + + + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem" write$ + cite$ bracify write$ + newline$ + language empty$ + { "english" 'curlanguage := } + { language 'curlanguage := } + if$ + "\selectlanguageifdefined" curlanguage bracify * write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.iin + " " * } + +FUNCTION {format.btitle} +{ title +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {tie.connect} + {"~" + swap$ * * + } + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.connect + series empty$ + 'skip$ + { bbl.of space.word * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { "there's a number but no series in " cite$ * warning$ + bbl.nnr } + { + %new.dblslash + new.sentence + series + bbl.nr + tie.or.space.connect} + if$ + number tie.or.space.connect + } + if$ + } + { "" } + if$ +} + +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + + +FUNCTION {convert.edition} +{ edition +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { convert.edition " " * bbl.edition * } + { convert.edition " " * bbl.edition * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { bbl.ppages pages n.dashify tie.connect } + { bbl.ppage pages tie.connect } + if$ + } + if$ +} + +FUNCTION {format.pages.page} +{ pages empty$ + { numpages empty$ + { "" } + { numpages bbl.pages tie.connect } + if$} + { format.pages} + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { + ", no." number tie.or.space.connect * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ": " * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.volume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.or.space.connect } + if$ +} + +FUNCTION {format.number} +{ number empty$ + { "" } + { bbl.nr number tie.or.space.connect } + if$ +} + + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type + } + if$ +} + +%% { "t" change.case$ } +%% { "" } + +FUNCTION {format.techreport.type} +{ type empty$ + { bbl.techreport } + 'type + if$ +} + +FUNCTION {author.before} +{ + author empty$ + 'skip$ + {author num.names$ #4 < + {format.authors output + new.sentence} + 'skip$ + if$} + if$ +} + +%%<*!long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% {bookauthor num.names$ #4 < +%% {format.bookauthors output +%% new.sentence} +%% 'skip$ +%% if$} +%% if$ +%%} +%% +%%<*long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% { format.bookauthors output +%% new.sentence +%% } +%% if$ +%%} +%% + +FUNCTION {author.after} +{ + author empty$ + 'skip$ + {format.authors.after output + new.semicolumn } + if$ +} + +FUNCTION {bookauthor.after} +{ + bookauthor empty$ + 'skip$ + {format.bookauthors.after output + new.semicolumn } + if$ +} + +FUNCTION {editor.organization.after} +{ + compiler empty$ + {} + { format.compiler.after output + new.semicolumn + } + if$ + editor empty$ + {} + { format.editors.after output + new.semicolumn + } + if$ + organization empty$ + {} + {organization output + new.semicolumn + } + if$ +} + +FUNCTION {format.url} +{ url empty$ + { "" } + { + "URL: \BibUrl{" url * "}" * + urldate empty$ + { "" } + { " (" bbl.urldate * ": " * urldate * ")" * } + if$ * + } + if$ +} + +FUNCTION {format.annote} +{ annote empty$ + { "" } +{ after.sentence 'output.state := + "\BibAnnote{" annote add.period$ * "}" * +} + if$ +} + +FUNCTION {format.isbn} +{ + isbn empty$ + { "" } + { "ISBN:~\href{http://isbndb.com/search-all.html?kw=" isbn * + "}{" * isbn * "}" * + } + if$ +} + +FUNCTION {add.doi} +{ duplicate$ empty$ + 'skip$ + { doi empty$ + 'skip$ + { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } + if$ + } + if$ +} + +FUNCTION {add.medium} +{ duplicate$ empty$ + 'skip$ + { medium empty$ + { " " * bbl.medium enclose.square.brackets * } + { " " * medium enclose.square.brackets * } +%% { bbl.medium enclose.square.brackets * } +%% { medium enclose.square.brackets * } + if$ + } + if$ +} + + + +FUNCTION {format.eprint} +{ eprint empty$ + { "" } + { eprinttype empty$ + { "" } + { eprinttype "~: " *} + if$ + eprintclass empty$ + { } + { eprintclass * "/" *} + if$ + url empty$ + { eprint * } + { "\href{" * url * "}{" * eprint * "}" *} + if$ + } + if$ +} + +FUNCTION {output.eprint.url} +{ + eprint empty$ + { format.url output } + { format.eprint output } + if$ +} + + + +FUNCTION {article} +{ + output.bibitem + author.before + format.title add.medium "title" output.check + new.slash + author.after + new.dblslash + journal emphasize add.doi "journal" output.check % new in v.2 + new.block + format.date "year" output.check + new.block + format.volume output + format.number output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {book} +{ + output.bibitem + author.before + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.sentence + format.number.series output + new.block + format.edition output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {booklet} +{ + output.bibitem + author.before + format.title add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.block + howpublished output + address output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inbook} +{ + output.bibitem + author.before + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + bookauthor.after + editor.organization.after + new.block + format.edition output + new.block + format.number.series output + new.sentence + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {incollection} +{ + output.bibitem + author.before + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + format.number.series output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {proceedings} +{ + output.bibitem + format.btitle add.doi add.medium "title" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + output.address.publisher + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + author.before + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + new.block + format.btitle add.doi add.medium "title" output.check + author empty$ + { organization empty$ + { + address new.block.checka + address output + } + 'skip$ + if$ + } + { + organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.title add.medium output + howpublished new.block.checka + howpublished output + new.block + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + editor.organization.after + new.block + format.date "year" output.check + new.block + note "note" output.check + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {online} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.title add.doi add.medium "title" output.check + howpublished new.dblslash.checka + howpublished enclose.square.brackets output + editor.organization.after + new.sentence + new.block + output.address.publisher + format.date output + new.block + output.eprint.url + new.sentence + note output + format.annote output + fin.entry +} + +FUNCTION {internet} {online} +FUNCTION {www} {online} +FUNCTION {webpage} {online} +FUNCTION {electronic} {online} +FUNCTION {thesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + type "type" output.check + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +%% format.techrep.type.number output.nonnull +%% format.url output +FUNCTION {report} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + new.column + type "type" output.check + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.phdthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {masterthesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.mthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {dscithesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.dscithesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +%% format.url output + +FUNCTION {techreport} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + new.column + format.techreport.type output + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"\bbljan{}"} +MACRO {feb} {"\bblfeb{}"} +MACRO {mar} {"\bblmar{}"} +MACRO {apr} {"\bblapr{}"} +MACRO {may} {"\bblmay{}"} +MACRO {jun} {"\bbljun{}"} +MACRO {jul} {"\bbljul{}"} +MACRO {aug} {"\bblaug{}"} +MACRO {sep} {"\bblsep{}"} +MACRO {oct} {"\bbloct{}"} +MACRO {nov} {"\bblnov{}"} +MACRO {dec} {"\bbldec{}"} + + +MACRO {aa}{"Astron. \& Astrophys."} +MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."} +MACRO {aj} {"Astron. J."} +MACRO {aph} {"Acta Phys."} +MACRO {advp} {"Adv. Phys."} +MACRO {ajp} {"Amer. J. Phys."} +MACRO {ajm} {"Amer. J. Math."} +MACRO {amsci} {"Amer. Sci."} +MACRO {anofd} {"Ann. Fluid Dyn."} +MACRO {am} {"Ann. Math."} +MACRO {ap} {"Ann. Phys. (NY)"} +MACRO {adp} {"Ann. Phys. (Leipzig)"} +MACRO {ao} {"Appl. Opt."} +MACRO {apl} {"Appl. Phys. Lett."} +MACRO {app} {"Astroparticle Phys."} +MACRO {apj} {"Astrophys. J."} +MACRO {apjsup} {"Astrophys. J. Suppl."} +MACRO {apss} {"Astrophys. Space Sci."} +MACRO {araa} {"Ann. Rev. Astron. Astrophys."} +MACRO {baas} {"Bull. Amer. Astron. Soc."} +MACRO {baps} {"Bull. Amer. Phys. Soc."} +MACRO {cmp} {"Comm. Math. Phys."} +MACRO {cpam} {"Commun. Pure Appl. Math."} +MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"} +MACRO {cpc} {"Comp. Phys. Comm."} +MACRO {cqg} {"Class. Quant. Grav."} +MACRO {cra} {"C. R. Acad. Sci. A"} +MACRO {fed} {"Fusion Eng. \& Design"} +MACRO {ft} {"Fusion Tech."} +MACRO {grg} {"Gen. Relativ. Gravit."} +MACRO {ieeens} {"IEEE Trans. Nucl. Sci."} +MACRO {ieeeps} {"IEEE Trans. Plasma Sci."} +MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"} +MACRO {ip} {"Infrared Phys."} +MACRO {irp} {"Infrared Phys."} +MACRO {jap} {"J. Appl. Phys."} +MACRO {jasa} {"J. Acoust. Soc. America"} +MACRO {jcp} {"J. Comp. Phys."} +MACRO {jchp} {"J. Chem. Phys."} +MACRO {jetp} {"Sov. Phys.--JETP"} +MACRO {jfe} {"J. Fusion Energy"} +MACRO {jfm} {"J. Fluid Mech."} +MACRO {jmp} {"J. Math. Phys."} +MACRO {jne} {"J. Nucl. Energy"} +MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."} +MACRO {jnm} {"J. Nucl. Mat."} +MACRO {jpc} {"J. Phys. Chem."} +MACRO {jpp} {"J. Plasma Phys."} +MACRO {jpsj} {"J. Phys. Soc. Japan"} +MACRO {jsi} {"J. Sci. Instrum."} +MACRO {jvst} {"J. Vac. Sci. \& Tech."} +MACRO {nat} {"Nature"} +MACRO {nature} {"Nature"} +MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"} +MACRO {nf} {"Nucl. Fusion"} +MACRO {nim} {"Nucl. Inst. \& Meth."} +MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."} +MACRO {np} {"Nucl. Phys."} +MACRO {npb} {"Nucl. Phys. B"} +MACRO {nt/f} {"Nucl. Tech./Fusion"} +MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"} +MACRO {inc} {"Nuovo Cimento"} +MACRO {nc} {"Nuovo Cimento"} +MACRO {pf} {"Phys. Fluids"} +MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."} +MACRO {pfb} {"Phys. Fluids B: Plasma Phys."} +MACRO {pl} {"Phys. Lett."} +MACRO {pla} {"Phys. Lett. A"} +MACRO {plb} {"Phys. Lett. B"} +MACRO {prep} {"Phys. Rep."} +MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"} +MACRO {pp} {"Phys. Plasmas"} +MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"} +MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"} +MACRO {prl} {"Phys. Rev. Lett."} +MACRO {pr} {"Phys. Rev."} +MACRO {physrev} {"Phys. Rev."} +MACRO {pra} {"Phys. Rev. A"} +MACRO {prb} {"Phys. Rev. B"} +MACRO {prc} {"Phys. Rev. C"} +MACRO {prd} {"Phys. Rev. D"} +MACRO {pre} {"Phys. Rev. E"} +MACRO {ps} {"Phys. Scripta"} +MACRO {procrsl} {"Proc. Roy. Soc. London"} +MACRO {rmp} {"Rev. Mod. Phys."} +MACRO {rsi} {"Rev. Sci. Inst."} +MACRO {science} {"Science"} +MACRO {sciam} {"Sci. Am."} +MACRO {sam} {"Stud. Appl. Math."} +MACRO {sjpp} {"Sov. J. Plasma Phys."} +MACRO {spd} {"Sov. Phys.--Doklady"} +MACRO {sptp} {"Sov. Phys.--Tech. Phys."} +MACRO {spu} {"Sov. Phys.--Uspekhi"} +MACRO {st} {"Sky and Telesc."} + +MACRO {appopt} {"Appl. Opt."} +MACRO {bell} {"Bell Syst. Tech. J."} +MACRO {ell} {"Electron. Lett."} +MACRO {jasp} {"J. Appl. Spectr."} +MACRO {jqe} {"IEEE J. Quantum Electron."} +MACRO {jlwt} {"J. Lightwave Technol."} +MACRO {jmo} {"J. Mod. Opt."} +MACRO {josa} {"J. Opt. Soc. America"} +MACRO {josaa} {"J. Opt. Soc. Amer.~A"} +MACRO {josab} {"J. Opt. Soc. Amer.~B"} +MACRO {jdp} {"J. Phys. (Paris)"} +MACRO {oc} {"Opt. Commun."} +MACRO {ol} {"Opt. Lett."} +MACRO {os} {"Opt. Spectrosc."} +MACRO {phtl} {"IEEE Photon. Technol. Lett."} +MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."} +MACRO {sjot} {"Sov. J. Opt. Technol."} +MACRO {sjqe} {"Sov. J. Quantum Electron."} +MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."} +MACRO {stph} {"Sov. Phys.--Techn. Phys."} +MACRO {stphl} {"Sov. Techn. Phys. Lett."} +MACRO {vr} {"Vision Res."} +MACRO {zph} {"Z. f. Physik"} +MACRO {zphb} {"Z. f. Physik~B"} +MACRO {zphd} {"Z. f. Physik~D"} +MACRO {sse} {"Solid-State Electron."} +MACRO {pss} {"Phys. Sol. State"} +MACRO {sst} {"Semicond. Sci. Tech."} +MACRO {nl} {"Nano Lett."} + +READ + + +FUNCTION {sortify} +{ purify$ +} + +%% ===================================== +%% This version from old Gost package +%%<*!natbib> +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { nameptr #1 > + { " " * } + 'skip$ + if$ + s nameptr + "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" + format.name$ 't := + nameptr numnames = t "others" = and + { "et al" * } + %{ bbl.etal * } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} +%% +%% This version from plainnat.bst +%% It ignores second and subsequent authors but include year. +%%<*natbib> +%% +%% ===================================== + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word % Removes "The " if any + chop.word % Removes "An " if any + chop.word % Removes "A " if any + sortify + #1 global.max$ substring$ +} + +%% ===================================== +%% This version from old gost package. +%% +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { + author num.names$ #4 < + {author sort.format.names } + {title sort.format.title} + if$ + } + if$ +} +%% This version from plainnat.bst +%% ===================================== + +FUNCTION {author.title.sort} +{ author empty$ + { title empty$ + { key empty$ + { "to sort, need author, title, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { title sort.format.title } + if$ + } + { + author num.names$ #4 < + {author sort.format.names } + {title sort.format.title} + if$ + } + if$ +} + +FUNCTION {presort}%#1 +{ + author.title.sort + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + + +ITERATE {presort} + +SORT + + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +EXECUTE {initialize.longest.label} + +FUNCTION {forward.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +ITERATE {forward.pass} + + +FUNCTION {begin.bib} +{ "\begin{thebibliography}{" longest.label * "}" * write$ newline$ + "\def\selectlanguageifdefined#1{" write$ newline$ + "\expandafter\ifx\csname date#1\endcsname\relax" write$ newline$ + "\else\selectlanguage{#1}\fi}" write$ newline$ + "\providecommand*{\href}[2]{{\small #2}}" write$ newline$ + "\providecommand*{\url}[1]{{\small #1}}" write$ newline$ + "\providecommand*{\BibUrl}[1]{\url{#1}}" write$ newline$ + "\providecommand{\BibAnnote}[1]{}" write$ newline$ + "\providecommand*{\BibEmph}[1]{#1}" write$ newline$ + preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} + +%% +%% End of file `ugost2003s.bst'. diff --git a/BibTeX-Styles/ugost2008.bst b/BibTeX-Styles/ugost2008.bst new file mode 100644 index 0000000..b1e1166 --- /dev/null +++ b/BibTeX-Styles/ugost2008.bst @@ -0,0 +1,1941 @@ +%% +%% This is file `ugost2008.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% gost.dtx (with options: `bst,utf8,modern,eprint') +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This file has the LPPL maintenance status "maintained". +%% Maintained by Igor A. Kotelnikov. +%% Current version: 2012.02.02 +%% +%% Please, send bug report via e-mail: +%% kia999 at mail dot ru +%% or +%% polyama at yahoo dot com +%% + + + +%% +%% This bibstyle attempts to format bibliography according to +%% GOST 7.0.5-2008 for bibliographic reference. + +ENTRY + { address + annote + author + booktitle + bookauthor + chapter + edition + editor + compiler + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + medium % new in v.2. + type + volume + year + language + booklanguage + numpages + url + urldate + isbn + doi + eprinttype % = archivePrefix + eprintclass % = primaryClass + eprint + } + {} + { label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block +after.dblslash after.slash after.column after.semicolumn } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + #4 'after.dblslash := + #5 'after.slash := + #6 'after.column := + #7 'after.semicolumn := +} + +STRINGS { s t } + +STRINGS { curlanguage } + +FUNCTION {change.language} +{ booklanguage empty$ + { "" } + { booklanguage 'curlanguage := + "\selectlanguageifdefined{" + curlanguage * + "}" * + } + if$ +} + +FUNCTION {output.nonnull} +{ + swap$ + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + " \BibDash " write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.dblslash = + { "~//" * change.language * " " * write$ } + { output.state after.slash = + { "~/ " * write$ } + { output.state after.column = + { "~: " * write$ } + { output.state after.semicolumn = + { "~; " * write$ } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.dblslash} +{ output.state before.all = + 'skip$ + { after.dblslash 'output.state := } + if$ +} + +FUNCTION {new.slash} +{ output.state before.all = + 'skip$ + { after.slash 'output.state := } + if$ +} + +FUNCTION {new.column} +{ output.state before.all = + 'skip$ + { after.column 'output.state := } + if$ +} + +FUNCTION {new.semicolumn} +{ output.state before.all = + 'skip$ + { after.semicolumn 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + + +FUNCTION {non.stop} +{ duplicate$ + "}" * add.period$ + #-1 #1 substring$ "." = +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.dblslash.checka} +{ empty$ + 'skip$ + 'new.dblslash + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\BibEmph{" swap$ * "}" * } + if$ +} + +FUNCTION {enclose.square.brackets} { } + +FUNCTION {bracify} +{ duplicate$ empty$ + { pop$ "{}" } + { "{" swap$ * "}" * } + if$ +} +FUNCTION {bracketise} +{ duplicate$ empty$ + { pop$ "[]" } + { "[" swap$ * "]" * } + if$ +} +FUNCTION {parenthesify} +{ duplicate$ empty$ + { pop$ "()" } + { "(" swap$ * ")" * } + if$ +} + +FUNCTION {space.word} +{ " " swap$ * " " * } + +FUNCTION {bbl.edby} % { "\bbledby{}" } +{ curlanguage "english" = + {"Ed.\ by"} + { curlanguage "ukrainian" = + {"Під ред."} + { curlanguage "russian" = + {"Под ред."} + { curlanguage "german" = + { "ed." } + {"language is not defined: " language "edby" * * warning$ "Ed.\ by"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.cmplr} +{ curlanguage "english" = + { "Compiler"} + { curlanguage "german" = + { "Hrsg." } + { curlanguage "ukrainian" = + {"{Укл.}"} + { curlanguage "russian" = + {"{Сост.}"} + {"language is not defined: " language "cmplr" * * warning$ "Compiler"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.edition} % { "\bbledition{}" } +{ curlanguage "english" = + {"edition"} + { curlanguage "ukrainian" = + {"{вид.}"} + { curlanguage "russian" = + {"{изд.}"} + { curlanguage "german" = + {" {aus.}" } %%%% { "Aufl." } ?? + { curlanguage "italian" = + {"edizione"} + { curlanguage "french" = + {"\'{e}dition"} + {"language is not defined: " language "edition" * * warning$ "edition"} + if$} + if$} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.vvolume} % { "\bblVolume{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Volume"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "Том" } + { curlanguage "german" = + {"{Band}"} %%%% { "Volumen" } + {"language is not defined: " language "vvolume" * * warning$ "Volume"} + if$} + if$} +if$} + +FUNCTION {bbl.vvol} % { "\bblVol{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Vol."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Т."} + { curlanguage "german" = + {"{Bd.}"} %%%% { "Vol." } + {"language is not defined: " language "vvol" * * warning$ "Vol."} + if$} + if$} +if$} + +FUNCTION {bbl.iissue} % { "\bblIssue{}" } +{ curlanguage "english" = + {"Issue"} + { curlanguage "ukrainian" = + {"Випуск"} + { curlanguage "russian" = + {"Выпуск"} + { curlanguage "german" = + {"{Heft}"} %%%% { "Ausgabe" } + {"language is not defined: " language "iissue" * * warning$ "Issue"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.iiss} % { "\bblIss{}" } +{ curlanguage "english" = + {"Iss."} + { curlanguage "ukrainian" = + {"Вип."} + { curlanguage "russian" = + {"Вып."} + { curlanguage "german" = + {"{H.}"} + {"language is not defined: " language "iiss" * * warning$ "Iss."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.of} % { "\bblof{}" } +{ curlanguage "english" = + {"of"} + { curlanguage "german" = + { "von" } + { curlanguage "ukrainian" = + { "{із}" } + { curlanguage "russian" = + { "{из}" } + {"language is not defined: " language "of" * * warning$ "of"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.etal} % { "\bblof{}" } +{ curlanguage "english" = + {"et~al."} + { curlanguage "german" = + { "u.~a." } + { curlanguage "ukrainian" = + {"{та~ін.}"} + { curlanguage "russian" = + {"и~др."} + {"language is not defined: " language "et~al" * * warning$ "et~al."} + if$} + if$} + if$} +if$} + + +FUNCTION {bbl.nnumber} % { "\bblNumber{}" } +{ curlanguage "english" = + {"Number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{Номер}" } + { curlanguage "german" = + {"{Heft}"} %%% { "Anzahl" } + {"language is not defined: " language "nnumber" * * warning$ "Number"} + if$} + if$} +if$} + +FUNCTION {bbl.number} % { "\bblnumber{}" } +{ curlanguage "english" = + {"number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{номер}"} + { curlanguage "german" = + {"{Heft}"} %%% { "anzahl" }??? + {"language is not defined: " language "number" * * warning$ "number"} + if$} + if$} +if$} + +FUNCTION {bbl.nr} % { "\bblno{}" } +{ curlanguage "english" = + {"no."} + { curlanguage "italian" = + { "no" } + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nr" * * warning$ "no."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.nnr} % { "\bblno{}" } +{ curlanguage "english" = + {"No."} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nnr" * * warning$ "No."} + if$} + if$} +if$} + +FUNCTION {bbl.in} % { "\bblin{}" } +{ curlanguage "english" = curlanguage "german" = or + {"in"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{в}" } + {"language is not defined: " language "in" * * warning$ "in"} + if$} +if$} + +FUNCTION {bbl.iin} % { "\bblIn{}" } +{ curlanguage "english" = curlanguage "german" = or + {"In"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{В}" } + {"language is not defined: " language "iin" * * warning$ "In"} + if$} +if$} + +FUNCTION {bbl.pages} % { "\bblpp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} %%% {"pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "pages" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.page} % { "\bblp." +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "page" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.ppages}% { "\bblPp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} %%%% { "Pp." } + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppages" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.ppage} % { "\bblP." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppage" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.urldate} +{ curlanguage "english" = + {"online; accessed"} + { curlanguage "ukrainian" = + { "{дата звернення}" } + { curlanguage "russian" = + { "{дата обращения}" } + { curlanguage "german" = + { "{online; abgerufen}" } + { "language is not defined: " language "urldate" * * warning$ "online; accessed" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.techreport} % rename to bbl.techreport +{ curlanguage "english" = + { "Rep." } + { curlanguage "german" = + { "Bericht" } + { curlanguage "russian" = + { "{Отчет}" } + { "language is not defined: " language "techrep" * * warning$ "Rep." } + if$} + if$} +if$} + +FUNCTION {bbl.mthesis} +{ curlanguage "english" = + { "Master's thesis" } + { curlanguage "german" = + { "Diss.~Mag." } + { curlanguage "russian" = + { "{Квалификационная работа магистра}" } + { "language is not defined: " language "mthesis" * * warning$ "Master's thesis" } + if$} + if$} +if$} + +FUNCTION {bbl.phdthesis} +{ curlanguage "english" = + { "Ph.\,D. thesis" } + { curlanguage "german" = + { "Diss.~Ph.\,D." } + { curlanguage "russian" = + { "{Дисс\ldots\ кандидата наук}" } + { curlanguage "french" = + { "Th\`{e}se de doctorat" } + { "language is not defined: " language "phdthesis" * * warning$ "Ph.\,D. thesis" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.dscithesis} +{ curlanguage "english" = + { "Dr.\,Sci. dissertation" } + { curlanguage "german" = + { "Diss.~Dr." } + { curlanguage "russian" = + { "{Дисс\ldots\ доктора наук}" } + { "language is not defined: " language "dscithesis" * * warning$ "Dr.\,Sci. dissertation" } + if$} + if$} +if$} + +FUNCTION {bbl.nnoaddress} +{ curlanguage "english" = + { "S.\ l." } + { curlanguage "russian" = + { "{Б.\ м.}" } + { "language is not defined: " language "nnoaddress" * * warning$ "S.\ l." } + if$} +if$} + +FUNCTION {bbl.nopublisher} +{ curlanguage "english" = + { "s.\ n." } + { curlanguage "russian" = + { "{б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "s.\ n." } + if$} +if$} + +FUNCTION {bbl.nnopublisher} +{ curlanguage "english" = + { "S.\ n." } + { curlanguage "russian" = + { "{Б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "S.\ n." } + if$} +if$} + +FUNCTION {bbl.medium.text} +{ curlanguage "english" = + { "Text" } + { curlanguage "russian" = curlanguage "ukrainian" = or + { "{Текст}" } + { "language is not defined: " language "medium" * * warning$ "Text" } + if$} +if$} + +FUNCTION {bbl.medium.elres} +{ curlanguage "english" = + { "Electronic resource" } + { curlanguage "russian" = + { "{Электронный ресурс}" } + { curlanguage "ukrainian" = + { "{Електронний ресурс}" } + { "language is not defined: " language "medium" * * warning$ "Electronic resource" } + if$} + if$} +if$} + +FUNCTION {bbl.chief} +{ curlanguage "english" = + { "chief" } + { curlanguage "russian" = + { "{рук.}" } + { curlanguage "ukrainian" = + { "{рук.}" } + { "language is not defined: " language "chief" * * warning$ "chief" } + if$} + if$} +if$} + +FUNCTION {bbl.executor} +{ curlanguage "english" = + { "Executor" } + { curlanguage "russian" = + { "{исполн.}" } + { curlanguage "ukrainian" = + { "{виконавець}" } + { "language is not defined: " language "medium" * * warning$ "Executor" } + if$} + if$} +if$} + +FUNCTION {bbl.medium} +{ type$ "online" = + { bbl.medium.elres } + { bbl.medium.text } +if$} + +INTEGERS { nameptr namesleft numnames } + + +FUNCTION {format.names} +{ + 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}{~jj}{~ff}" format.name$ 't := + nameptr #1 > + { nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + + +FUNCTION {format.names.rev} +{ + 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ff}{~vv}{~ll}{, jj}" format.name$ 't := + nameptr #1 > + { nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names emphasize} + if$ +} + + +FUNCTION {format.bookauthors} +{ bookauthor empty$ + { "" } + { bookauthor format.names} + if$ +} + +FUNCTION {format.authors.after} +{ author empty$ + { "" } + { author format.names.rev} + if$ +} + +FUNCTION {format.bookauthors.after} +{ bookauthor empty$ + { "" } + { bookauthor format.names.rev}% always cuts to 4 persons + if$ +} + +FUNCTION {format.editors.after} +{ editor empty$ + { "" } + { bbl.edby "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.chief.after} +{ editor empty$ + { "" } + { bbl.chief "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.executor.after} +{ author empty$ + { "" } + { bbl.executor ": " * author format.names.rev * } + if$ +} + +FUNCTION {format.compiler.after} +{ compiler empty$ + { "" } + { bbl.cmplr "\ " * compiler format.names.rev * } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title } + if$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { year ". \BibDash " month * * } + if$ + } + if$ +} + +FUNCTION {output.address.publisher} +{ + address empty$ + 'skip$ + { address output + publisher empty$ + 'skip$ + { new.column } + if$ + } + if$ + publisher output +} + + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem" write$ + cite$ bracify write$ + newline$ + language empty$ + { "english" 'curlanguage := } + { language 'curlanguage := } + if$ + "\selectlanguageifdefined" curlanguage bracify * write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.iin + " " * } + +FUNCTION {format.btitle} +{ title +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {tie.connect} + {"~" + swap$ * * + } + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.connect + series empty$ + 'skip$ + { bbl.of space.word * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { "there's a number but no series in " cite$ * warning$ + bbl.nnr } + { + %new.dblslash + new.sentence + series + bbl.nr + tie.or.space.connect} + if$ + number tie.or.space.connect + } + if$ + } + { "" } + if$ +} + +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + + +FUNCTION {convert.edition} +{ edition +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { convert.edition " " * bbl.edition * } + { convert.edition " " * bbl.edition * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { bbl.ppages pages n.dashify tie.connect } + { bbl.ppage pages tie.connect } + if$ + } + if$ +} + +FUNCTION {format.pages.page} +{ pages empty$ + { numpages empty$ + { "" } + { numpages bbl.pages tie.connect } + if$} + { format.pages} + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { + ", no." number tie.or.space.connect * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ": " * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.volume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.or.space.connect } + if$ +} + +FUNCTION {format.number} +{ number empty$ + { "" } + { bbl.nr number tie.or.space.connect } + if$ +} + + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type + } + if$ +} + +%% { "t" change.case$ } +%% { "" } + +FUNCTION {format.techreport.type} +{ type empty$ + { bbl.techreport } + 'type + if$ +} + +FUNCTION {author.before} +{ + author empty$ + 'skip$ + {author num.names$ #4 < + {format.authors output + new.sentence} + 'skip$ + if$} + if$ +} + +%%<*!long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% {bookauthor num.names$ #4 < +%% {format.bookauthors output +%% new.sentence} +%% 'skip$ +%% if$} +%% if$ +%%} +%% +%%<*long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% { format.bookauthors output +%% new.sentence +%% } +%% if$ +%%} +%% + +FUNCTION {author.after} +{ + author empty$ + 'skip$ + {author num.names$ #3 > + {format.authors.after output + new.semicolumn } + 'skip$ + if$} + if$ +} + +FUNCTION {bookauthor.after} +{ + bookauthor empty$ + 'skip$ + {format.bookauthors.after output + new.semicolumn } + if$ +} + +FUNCTION {editor.organization.after} +{ + compiler empty$ + {} + { format.compiler.after output + new.semicolumn + } + if$ + editor empty$ + {} + { format.editors.after output + new.semicolumn + } + if$ + organization empty$ + {} + {organization output + new.semicolumn + } + if$ +} + +FUNCTION {format.url} +{ url empty$ + { "" } + { + "URL: \BibUrl{" url * "}" * + urldate empty$ + { "" } + { " (" bbl.urldate * ": " * urldate * ")" * } + if$ * + } + if$ +} + +FUNCTION {format.annote} +{ annote empty$ + { "" } +{ after.sentence 'output.state := + "\BibAnnote{" annote add.period$ * "}" * +} + if$ +} + +FUNCTION {format.isbn} +{ + isbn empty$ + { "" } + { "ISBN:~\href{http://isbndb.com/search-all.html?kw=" isbn * + "}{" * isbn * "}" * + } + if$ +} + +FUNCTION {add.doi} +{ duplicate$ empty$ + 'skip$ + { doi empty$ + 'skip$ + { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } + if$ + } + if$ +} + +FUNCTION {add.medium} { } + + + +FUNCTION {format.eprint} +{ eprint empty$ + { "" } + { eprinttype empty$ + { "" } + { eprinttype "~: " *} + if$ + eprintclass empty$ + { } + { eprintclass * "/" *} + if$ + url empty$ + { eprint * } + { "\href{" * url * "}{" * eprint * "}" *} + if$ + } + if$ +} + +FUNCTION {output.eprint.url} +{ + eprint empty$ + { format.url output } + { format.eprint output } + if$ +} + + + +FUNCTION {article} +{ + output.bibitem + author.before + format.title add.medium "title" output.check + new.slash + author.after + new.dblslash + journal emphasize add.doi "journal" output.check % new in v.2 + new.block + format.date "year" output.check + new.block + format.volume output + format.number output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {book} +{ + output.bibitem + author.before + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.sentence + format.number.series output + new.block + format.edition output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {booklet} +{ + output.bibitem + author.before + format.title add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.block + howpublished output + address output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inbook} +{ + output.bibitem + author.before + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + bookauthor.after + editor.organization.after + new.block + format.edition output + new.block + format.number.series output + new.sentence + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {incollection} +{ + output.bibitem + author.before + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + format.number.series output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {proceedings} +{ + output.bibitem + format.btitle add.doi add.medium "title" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + output.address.publisher + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + author.before + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + new.block + format.btitle add.doi add.medium "title" output.check + author empty$ + { organization empty$ + { + address new.block.checka + address output + } + 'skip$ + if$ + } + { + organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.title add.medium output + howpublished new.block.checka + howpublished output + new.block + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + editor.organization.after + new.block + format.date "year" output.check + new.block + note "note" output.check + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {online} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.title add.doi add.medium "title" output.check + howpublished new.dblslash.checka + howpublished enclose.square.brackets output + editor.organization.after + new.sentence + new.block + output.address.publisher + format.date output + new.block + output.eprint.url + new.sentence + note output + format.annote output + fin.entry +} + +FUNCTION {internet} {online} +FUNCTION {www} {online} +FUNCTION {webpage} {online} +FUNCTION {electronic} {online} +FUNCTION {thesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + type "type" output.check + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +%% format.techrep.type.number output.nonnull +%% format.url output +FUNCTION {report} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + new.column + type "type" output.check + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.phdthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {masterthesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.mthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {dscithesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.dscithesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +%% format.url output + +FUNCTION {techreport} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + new.column + format.techreport.type output + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"\bbljan{}"} +MACRO {feb} {"\bblfeb{}"} +MACRO {mar} {"\bblmar{}"} +MACRO {apr} {"\bblapr{}"} +MACRO {may} {"\bblmay{}"} +MACRO {jun} {"\bbljun{}"} +MACRO {jul} {"\bbljul{}"} +MACRO {aug} {"\bblaug{}"} +MACRO {sep} {"\bblsep{}"} +MACRO {oct} {"\bbloct{}"} +MACRO {nov} {"\bblnov{}"} +MACRO {dec} {"\bbldec{}"} + + +MACRO {aa}{"Astron. \& Astrophys."} +MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."} +MACRO {aj} {"Astron. J."} +MACRO {aph} {"Acta Phys."} +MACRO {advp} {"Adv. Phys."} +MACRO {ajp} {"Amer. J. Phys."} +MACRO {ajm} {"Amer. J. Math."} +MACRO {amsci} {"Amer. Sci."} +MACRO {anofd} {"Ann. Fluid Dyn."} +MACRO {am} {"Ann. Math."} +MACRO {ap} {"Ann. Phys. (NY)"} +MACRO {adp} {"Ann. Phys. (Leipzig)"} +MACRO {ao} {"Appl. Opt."} +MACRO {apl} {"Appl. Phys. Lett."} +MACRO {app} {"Astroparticle Phys."} +MACRO {apj} {"Astrophys. J."} +MACRO {apjsup} {"Astrophys. J. Suppl."} +MACRO {apss} {"Astrophys. Space Sci."} +MACRO {araa} {"Ann. Rev. Astron. Astrophys."} +MACRO {baas} {"Bull. Amer. Astron. Soc."} +MACRO {baps} {"Bull. Amer. Phys. Soc."} +MACRO {cmp} {"Comm. Math. Phys."} +MACRO {cpam} {"Commun. Pure Appl. Math."} +MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"} +MACRO {cpc} {"Comp. Phys. Comm."} +MACRO {cqg} {"Class. Quant. Grav."} +MACRO {cra} {"C. R. Acad. Sci. A"} +MACRO {fed} {"Fusion Eng. \& Design"} +MACRO {ft} {"Fusion Tech."} +MACRO {grg} {"Gen. Relativ. Gravit."} +MACRO {ieeens} {"IEEE Trans. Nucl. Sci."} +MACRO {ieeeps} {"IEEE Trans. Plasma Sci."} +MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"} +MACRO {ip} {"Infrared Phys."} +MACRO {irp} {"Infrared Phys."} +MACRO {jap} {"J. Appl. Phys."} +MACRO {jasa} {"J. Acoust. Soc. America"} +MACRO {jcp} {"J. Comp. Phys."} +MACRO {jchp} {"J. Chem. Phys."} +MACRO {jetp} {"Sov. Phys.--JETP"} +MACRO {jfe} {"J. Fusion Energy"} +MACRO {jfm} {"J. Fluid Mech."} +MACRO {jmp} {"J. Math. Phys."} +MACRO {jne} {"J. Nucl. Energy"} +MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."} +MACRO {jnm} {"J. Nucl. Mat."} +MACRO {jpc} {"J. Phys. Chem."} +MACRO {jpp} {"J. Plasma Phys."} +MACRO {jpsj} {"J. Phys. Soc. Japan"} +MACRO {jsi} {"J. Sci. Instrum."} +MACRO {jvst} {"J. Vac. Sci. \& Tech."} +MACRO {nat} {"Nature"} +MACRO {nature} {"Nature"} +MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"} +MACRO {nf} {"Nucl. Fusion"} +MACRO {nim} {"Nucl. Inst. \& Meth."} +MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."} +MACRO {np} {"Nucl. Phys."} +MACRO {npb} {"Nucl. Phys. B"} +MACRO {nt/f} {"Nucl. Tech./Fusion"} +MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"} +MACRO {inc} {"Nuovo Cimento"} +MACRO {nc} {"Nuovo Cimento"} +MACRO {pf} {"Phys. Fluids"} +MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."} +MACRO {pfb} {"Phys. Fluids B: Plasma Phys."} +MACRO {pl} {"Phys. Lett."} +MACRO {pla} {"Phys. Lett. A"} +MACRO {plb} {"Phys. Lett. B"} +MACRO {prep} {"Phys. Rep."} +MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"} +MACRO {pp} {"Phys. Plasmas"} +MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"} +MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"} +MACRO {prl} {"Phys. Rev. Lett."} +MACRO {pr} {"Phys. Rev."} +MACRO {physrev} {"Phys. Rev."} +MACRO {pra} {"Phys. Rev. A"} +MACRO {prb} {"Phys. Rev. B"} +MACRO {prc} {"Phys. Rev. C"} +MACRO {prd} {"Phys. Rev. D"} +MACRO {pre} {"Phys. Rev. E"} +MACRO {ps} {"Phys. Scripta"} +MACRO {procrsl} {"Proc. Roy. Soc. London"} +MACRO {rmp} {"Rev. Mod. Phys."} +MACRO {rsi} {"Rev. Sci. Inst."} +MACRO {science} {"Science"} +MACRO {sciam} {"Sci. Am."} +MACRO {sam} {"Stud. Appl. Math."} +MACRO {sjpp} {"Sov. J. Plasma Phys."} +MACRO {spd} {"Sov. Phys.--Doklady"} +MACRO {sptp} {"Sov. Phys.--Tech. Phys."} +MACRO {spu} {"Sov. Phys.--Uspekhi"} +MACRO {st} {"Sky and Telesc."} + +MACRO {appopt} {"Appl. Opt."} +MACRO {bell} {"Bell Syst. Tech. J."} +MACRO {ell} {"Electron. Lett."} +MACRO {jasp} {"J. Appl. Spectr."} +MACRO {jqe} {"IEEE J. Quantum Electron."} +MACRO {jlwt} {"J. Lightwave Technol."} +MACRO {jmo} {"J. Mod. Opt."} +MACRO {josa} {"J. Opt. Soc. America"} +MACRO {josaa} {"J. Opt. Soc. Amer.~A"} +MACRO {josab} {"J. Opt. Soc. Amer.~B"} +MACRO {jdp} {"J. Phys. (Paris)"} +MACRO {oc} {"Opt. Commun."} +MACRO {ol} {"Opt. Lett."} +MACRO {os} {"Opt. Spectrosc."} +MACRO {phtl} {"IEEE Photon. Technol. Lett."} +MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."} +MACRO {sjot} {"Sov. J. Opt. Technol."} +MACRO {sjqe} {"Sov. J. Quantum Electron."} +MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."} +MACRO {stph} {"Sov. Phys.--Techn. Phys."} +MACRO {stphl} {"Sov. Techn. Phys. Lett."} +MACRO {vr} {"Vision Res."} +MACRO {zph} {"Z. f. Physik"} +MACRO {zphb} {"Z. f. Physik~B"} +MACRO {zphd} {"Z. f. Physik~D"} +MACRO {sse} {"Solid-State Electron."} +MACRO {pss} {"Phys. Sol. State"} +MACRO {sst} {"Semicond. Sci. Tech."} +MACRO {nl} {"Nano Lett."} + +READ + + + + + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +EXECUTE {initialize.longest.label} + +FUNCTION {forward.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +ITERATE {forward.pass} + + +FUNCTION {begin.bib} +{ "\begin{thebibliography}{" longest.label * "}" * write$ newline$ + "\def\selectlanguageifdefined#1{" write$ newline$ + "\expandafter\ifx\csname date#1\endcsname\relax" write$ newline$ + "\else\selectlanguage{#1}\fi}" write$ newline$ + "\providecommand*{\href}[2]{{\small #2}}" write$ newline$ + "\providecommand*{\url}[1]{{\small #1}}" write$ newline$ + "\providecommand*{\BibUrl}[1]{\url{#1}}" write$ newline$ + "\providecommand{\BibAnnote}[1]{}" write$ newline$ + "\providecommand*{\BibEmph}[1]{#1}" write$ newline$ + "\ProvideTextCommandDefault{\cyrdash}{\hbox to.8em{--\hss--}}" write$ newline$ + "\providecommand*{\BibDash}{\ifdim\lastskip>0pt\unskip\nobreak\hskip.2em\fi" write$ newline$ + "\cyrdash\hskip.2em\ignorespaces}" write$ newline$ + preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} + +%% +%% End of file `ugost2008.bst'. diff --git a/BibTeX-Styles/ugost2008l.bst b/BibTeX-Styles/ugost2008l.bst new file mode 100644 index 0000000..0094b72 --- /dev/null +++ b/BibTeX-Styles/ugost2008l.bst @@ -0,0 +1,1929 @@ +%% +%% This is file `ugost2008l.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% gost.dtx (with options: `bst,utf8,modern,eprint,long') +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This file has the LPPL maintenance status "maintained". +%% Maintained by Igor A. Kotelnikov. +%% Current version: 2012.02.02 +%% +%% Please, send bug report via e-mail: +%% kia999 at mail dot ru +%% or +%% polyama at yahoo dot com +%% + + + +%% +%% This bibstyle attempts to format bibliography according to +%% GOST 7.0.5-2008 for bibliographic reference. + +ENTRY + { address + annote + author + booktitle + bookauthor + chapter + edition + editor + compiler + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + medium % new in v.2. + type + volume + year + language + booklanguage + numpages + url + urldate + isbn + doi + eprinttype % = archivePrefix + eprintclass % = primaryClass + eprint + } + {} + { label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block +after.dblslash after.slash after.column after.semicolumn } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + #4 'after.dblslash := + #5 'after.slash := + #6 'after.column := + #7 'after.semicolumn := +} + +STRINGS { s t } + +STRINGS { curlanguage } + +FUNCTION {change.language} +{ booklanguage empty$ + { "" } + { booklanguage 'curlanguage := + "\selectlanguageifdefined{" + curlanguage * + "}" * + } + if$ +} + +FUNCTION {output.nonnull} +{ + swap$ + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + " \BibDash " write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.dblslash = + { "~//" * change.language * " " * write$ } + { output.state after.slash = + { "~/ " * write$ } + { output.state after.column = + { "~: " * write$ } + { output.state after.semicolumn = + { "~; " * write$ } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.dblslash} +{ output.state before.all = + 'skip$ + { after.dblslash 'output.state := } + if$ +} + +FUNCTION {new.slash} +{ output.state before.all = + 'skip$ + { after.slash 'output.state := } + if$ +} + +FUNCTION {new.column} +{ output.state before.all = + 'skip$ + { after.column 'output.state := } + if$ +} + +FUNCTION {new.semicolumn} +{ output.state before.all = + 'skip$ + { after.semicolumn 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + + +FUNCTION {non.stop} +{ duplicate$ + "}" * add.period$ + #-1 #1 substring$ "." = +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.dblslash.checka} +{ empty$ + 'skip$ + 'new.dblslash + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\BibEmph{" swap$ * "}" * } + if$ +} + +FUNCTION {enclose.square.brackets} { } + +FUNCTION {bracify} +{ duplicate$ empty$ + { pop$ "{}" } + { "{" swap$ * "}" * } + if$ +} +FUNCTION {bracketise} +{ duplicate$ empty$ + { pop$ "[]" } + { "[" swap$ * "]" * } + if$ +} +FUNCTION {parenthesify} +{ duplicate$ empty$ + { pop$ "()" } + { "(" swap$ * ")" * } + if$ +} + +FUNCTION {space.word} +{ " " swap$ * " " * } + +FUNCTION {bbl.edby} % { "\bbledby{}" } +{ curlanguage "english" = + {"Ed.\ by"} + { curlanguage "ukrainian" = + {"Під ред."} + { curlanguage "russian" = + {"Под ред."} + { curlanguage "german" = + { "ed." } + {"language is not defined: " language "edby" * * warning$ "Ed.\ by"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.cmplr} +{ curlanguage "english" = + { "Compiler"} + { curlanguage "german" = + { "Hrsg." } + { curlanguage "ukrainian" = + {"{Укл.}"} + { curlanguage "russian" = + {"{Сост.}"} + {"language is not defined: " language "cmplr" * * warning$ "Compiler"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.edition} % { "\bbledition{}" } +{ curlanguage "english" = + {"edition"} + { curlanguage "ukrainian" = + {"{вид.}"} + { curlanguage "russian" = + {"{изд.}"} + { curlanguage "german" = + {" {aus.}" } %%%% { "Aufl." } ?? + { curlanguage "italian" = + {"edizione"} + { curlanguage "french" = + {"\'{e}dition"} + {"language is not defined: " language "edition" * * warning$ "edition"} + if$} + if$} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.vvolume} % { "\bblVolume{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Volume"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "Том" } + { curlanguage "german" = + {"{Band}"} %%%% { "Volumen" } + {"language is not defined: " language "vvolume" * * warning$ "Volume"} + if$} + if$} +if$} + +FUNCTION {bbl.vvol} % { "\bblVol{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Vol."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Т."} + { curlanguage "german" = + {"{Bd.}"} %%%% { "Vol." } + {"language is not defined: " language "vvol" * * warning$ "Vol."} + if$} + if$} +if$} + +FUNCTION {bbl.iissue} % { "\bblIssue{}" } +{ curlanguage "english" = + {"Issue"} + { curlanguage "ukrainian" = + {"Випуск"} + { curlanguage "russian" = + {"Выпуск"} + { curlanguage "german" = + {"{Heft}"} %%%% { "Ausgabe" } + {"language is not defined: " language "iissue" * * warning$ "Issue"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.iiss} % { "\bblIss{}" } +{ curlanguage "english" = + {"Iss."} + { curlanguage "ukrainian" = + {"Вип."} + { curlanguage "russian" = + {"Вып."} + { curlanguage "german" = + {"{H.}"} + {"language is not defined: " language "iiss" * * warning$ "Iss."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.of} % { "\bblof{}" } +{ curlanguage "english" = + {"of"} + { curlanguage "german" = + { "von" } + { curlanguage "ukrainian" = + { "{із}" } + { curlanguage "russian" = + { "{из}" } + {"language is not defined: " language "of" * * warning$ "of"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.etal} % { "\bblof{}" } +{ curlanguage "english" = + {"et~al."} + { curlanguage "german" = + { "u.~a." } + { curlanguage "ukrainian" = + {"{та~ін.}"} + { curlanguage "russian" = + {"и~др."} + {"language is not defined: " language "et~al" * * warning$ "et~al."} + if$} + if$} + if$} +if$} + + +FUNCTION {bbl.nnumber} % { "\bblNumber{}" } +{ curlanguage "english" = + {"Number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{Номер}" } + { curlanguage "german" = + {"{Heft}"} %%% { "Anzahl" } + {"language is not defined: " language "nnumber" * * warning$ "Number"} + if$} + if$} +if$} + +FUNCTION {bbl.number} % { "\bblnumber{}" } +{ curlanguage "english" = + {"number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{номер}"} + { curlanguage "german" = + {"{Heft}"} %%% { "anzahl" }??? + {"language is not defined: " language "number" * * warning$ "number"} + if$} + if$} +if$} + +FUNCTION {bbl.nr} % { "\bblno{}" } +{ curlanguage "english" = + {"no."} + { curlanguage "italian" = + { "no" } + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nr" * * warning$ "no."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.nnr} % { "\bblno{}" } +{ curlanguage "english" = + {"No."} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nnr" * * warning$ "No."} + if$} + if$} +if$} + +FUNCTION {bbl.in} % { "\bblin{}" } +{ curlanguage "english" = curlanguage "german" = or + {"in"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{в}" } + {"language is not defined: " language "in" * * warning$ "in"} + if$} +if$} + +FUNCTION {bbl.iin} % { "\bblIn{}" } +{ curlanguage "english" = curlanguage "german" = or + {"In"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{В}" } + {"language is not defined: " language "iin" * * warning$ "In"} + if$} +if$} + +FUNCTION {bbl.pages} % { "\bblpp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} %%% {"pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "pages" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.page} % { "\bblp." +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "page" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.ppages}% { "\bblPp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} %%%% { "Pp." } + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppages" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.ppage} % { "\bblP." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppage" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.urldate} +{ curlanguage "english" = + {"online; accessed"} + { curlanguage "ukrainian" = + { "{дата звернення}" } + { curlanguage "russian" = + { "{дата обращения}" } + { curlanguage "german" = + { "{online; abgerufen}" } + { "language is not defined: " language "urldate" * * warning$ "online; accessed" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.techreport} % rename to bbl.techreport +{ curlanguage "english" = + { "Rep." } + { curlanguage "german" = + { "Bericht" } + { curlanguage "russian" = + { "{Отчет}" } + { "language is not defined: " language "techrep" * * warning$ "Rep." } + if$} + if$} +if$} + +FUNCTION {bbl.mthesis} +{ curlanguage "english" = + { "Master's thesis" } + { curlanguage "german" = + { "Diss.~Mag." } + { curlanguage "russian" = + { "{Квалификационная работа магистра}" } + { "language is not defined: " language "mthesis" * * warning$ "Master's thesis" } + if$} + if$} +if$} + +FUNCTION {bbl.phdthesis} +{ curlanguage "english" = + { "Ph.\,D. thesis" } + { curlanguage "german" = + { "Diss.~Ph.\,D." } + { curlanguage "russian" = + { "{Дисс\ldots\ кандидата наук}" } + { curlanguage "french" = + { "Th\`{e}se de doctorat" } + { "language is not defined: " language "phdthesis" * * warning$ "Ph.\,D. thesis" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.dscithesis} +{ curlanguage "english" = + { "Dr.\,Sci. dissertation" } + { curlanguage "german" = + { "Diss.~Dr." } + { curlanguage "russian" = + { "{Дисс\ldots\ доктора наук}" } + { "language is not defined: " language "dscithesis" * * warning$ "Dr.\,Sci. dissertation" } + if$} + if$} +if$} + +FUNCTION {bbl.nnoaddress} +{ curlanguage "english" = + { "S.\ l." } + { curlanguage "russian" = + { "{Б.\ м.}" } + { "language is not defined: " language "nnoaddress" * * warning$ "S.\ l." } + if$} +if$} + +FUNCTION {bbl.nopublisher} +{ curlanguage "english" = + { "s.\ n." } + { curlanguage "russian" = + { "{б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "s.\ n." } + if$} +if$} + +FUNCTION {bbl.nnopublisher} +{ curlanguage "english" = + { "S.\ n." } + { curlanguage "russian" = + { "{Б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "S.\ n." } + if$} +if$} + +FUNCTION {bbl.medium.text} +{ curlanguage "english" = + { "Text" } + { curlanguage "russian" = curlanguage "ukrainian" = or + { "{Текст}" } + { "language is not defined: " language "medium" * * warning$ "Text" } + if$} +if$} + +FUNCTION {bbl.medium.elres} +{ curlanguage "english" = + { "Electronic resource" } + { curlanguage "russian" = + { "{Электронный ресурс}" } + { curlanguage "ukrainian" = + { "{Електронний ресурс}" } + { "language is not defined: " language "medium" * * warning$ "Electronic resource" } + if$} + if$} +if$} + +FUNCTION {bbl.chief} +{ curlanguage "english" = + { "chief" } + { curlanguage "russian" = + { "{рук.}" } + { curlanguage "ukrainian" = + { "{рук.}" } + { "language is not defined: " language "chief" * * warning$ "chief" } + if$} + if$} +if$} + +FUNCTION {bbl.executor} +{ curlanguage "english" = + { "Executor" } + { curlanguage "russian" = + { "{исполн.}" } + { curlanguage "ukrainian" = + { "{виконавець}" } + { "language is not defined: " language "medium" * * warning$ "Executor" } + if$} + if$} +if$} + +FUNCTION {bbl.medium} +{ type$ "online" = + { bbl.medium.elres } + { bbl.medium.text } +if$} + +INTEGERS { nameptr namesleft numnames } + + +FUNCTION {format.names} +{ + 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}{~jj}{~ff}" format.name$ 't := + nameptr #1 > + { nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + + +FUNCTION {format.names.rev} +{ + 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ff}{~vv}{~ll}{, jj}" format.name$ 't := + nameptr #1 > + { nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names emphasize} + if$ +} + + +FUNCTION {format.bookauthors} +{ bookauthor empty$ + { "" } + { bookauthor format.names} + if$ +} + +FUNCTION {format.authors.after} +{ author empty$ + { "" } + { author format.names.rev} + if$ +} + +FUNCTION {format.bookauthors.after} +{ bookauthor empty$ + { "" } + { bookauthor format.names.rev}% always cuts to 4 persons + if$ +} + +FUNCTION {format.editors.after} +{ editor empty$ + { "" } + { bbl.edby "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.chief.after} +{ editor empty$ + { "" } + { bbl.chief "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.executor.after} +{ author empty$ + { "" } + { bbl.executor ": " * author format.names.rev * } + if$ +} + +FUNCTION {format.compiler.after} +{ compiler empty$ + { "" } + { bbl.cmplr "\ " * compiler format.names.rev * } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title } + if$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { year ". \BibDash " month * * } + if$ + } + if$ +} + +FUNCTION {output.address.publisher} +{ + address empty$ + 'skip$ + { address output + publisher empty$ + 'skip$ + { new.column } + if$ + } + if$ + publisher output +} + + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem" write$ + cite$ bracify write$ + newline$ + language empty$ + { "english" 'curlanguage := } + { language 'curlanguage := } + if$ + "\selectlanguageifdefined" curlanguage bracify * write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.iin + " " * } + +FUNCTION {format.btitle} +{ title +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {tie.connect} + {"~" + swap$ * * + } + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.connect + series empty$ + 'skip$ + { bbl.of space.word * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { "there's a number but no series in " cite$ * warning$ + bbl.nnr } + { + %new.dblslash + new.sentence + series + bbl.nr + tie.or.space.connect} + if$ + number tie.or.space.connect + } + if$ + } + { "" } + if$ +} + +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + + +FUNCTION {convert.edition} +{ edition +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { convert.edition " " * bbl.edition * } + { convert.edition " " * bbl.edition * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { bbl.ppages pages n.dashify tie.connect } + { bbl.ppage pages tie.connect } + if$ + } + if$ +} + +FUNCTION {format.pages.page} +{ pages empty$ + { numpages empty$ + { "" } + { numpages bbl.pages tie.connect } + if$} + { format.pages} + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { + ", no." number tie.or.space.connect * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ": " * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.volume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.or.space.connect } + if$ +} + +FUNCTION {format.number} +{ number empty$ + { "" } + { bbl.nr number tie.or.space.connect } + if$ +} + + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type + } + if$ +} + +%% { "t" change.case$ } +%% { "" } + +FUNCTION {format.techreport.type} +{ type empty$ + { bbl.techreport } + 'type + if$ +} + +FUNCTION {author.before} +{ + author empty$ + 'skip$ + { format.authors output + new.sentence + } + if$ +} + +%%<*!long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% {bookauthor num.names$ #4 < +%% {format.bookauthors output +%% new.sentence} +%% 'skip$ +%% if$} +%% if$ +%%} +%% +%%<*long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% { format.bookauthors output +%% new.sentence +%% } +%% if$ +%%} +%% + +FUNCTION {author.after} { } + +FUNCTION {bookauthor.after} +{ + bookauthor empty$ + 'skip$ + {format.bookauthors.after output + new.semicolumn } + if$ +} + +FUNCTION {editor.organization.after} +{ + compiler empty$ + {} + { format.compiler.after output + new.semicolumn + } + if$ + editor empty$ + {} + { format.editors.after output + new.semicolumn + } + if$ + organization empty$ + {} + {organization output + new.semicolumn + } + if$ +} + +FUNCTION {format.url} +{ url empty$ + { "" } + { + "URL: \BibUrl{" url * "}" * + urldate empty$ + { "" } + { " (" bbl.urldate * ": " * urldate * ")" * } + if$ * + } + if$ +} + +FUNCTION {format.annote} +{ annote empty$ + { "" } +{ after.sentence 'output.state := + "\BibAnnote{" annote add.period$ * "}" * +} + if$ +} + +FUNCTION {format.isbn} +{ + isbn empty$ + { "" } + { "ISBN:~\href{http://isbndb.com/search-all.html?kw=" isbn * + "}{" * isbn * "}" * + } + if$ +} + +FUNCTION {add.doi} +{ duplicate$ empty$ + 'skip$ + { doi empty$ + 'skip$ + { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } + if$ + } + if$ +} + +FUNCTION {add.medium} { } + + + +FUNCTION {format.eprint} +{ eprint empty$ + { "" } + { eprinttype empty$ + { "" } + { eprinttype "~: " *} + if$ + eprintclass empty$ + { } + { eprintclass * "/" *} + if$ + url empty$ + { eprint * } + { "\href{" * url * "}{" * eprint * "}" *} + if$ + } + if$ +} + +FUNCTION {output.eprint.url} +{ + eprint empty$ + { format.url output } + { format.eprint output } + if$ +} + + + +FUNCTION {article} +{ + output.bibitem + author.before + format.title add.medium "title" output.check + new.slash + author.after + new.dblslash + journal emphasize add.doi "journal" output.check % new in v.2 + new.block + format.date "year" output.check + new.block + format.volume output + format.number output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {book} +{ + output.bibitem + author.before + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.sentence + format.number.series output + new.block + format.edition output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {booklet} +{ + output.bibitem + author.before + format.title add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.block + howpublished output + address output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inbook} +{ + output.bibitem + author.before + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + bookauthor.after + editor.organization.after + new.block + format.edition output + new.block + format.number.series output + new.sentence + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {incollection} +{ + output.bibitem + author.before + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + format.number.series output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {proceedings} +{ + output.bibitem + format.btitle add.doi add.medium "title" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + output.address.publisher + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + author.before + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + new.block + format.btitle add.doi add.medium "title" output.check + author empty$ + { organization empty$ + { + address new.block.checka + address output + } + 'skip$ + if$ + } + { + organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.title add.medium output + howpublished new.block.checka + howpublished output + new.block + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + editor.organization.after + new.block + format.date "year" output.check + new.block + note "note" output.check + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {online} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.title add.doi add.medium "title" output.check + howpublished new.dblslash.checka + howpublished enclose.square.brackets output + editor.organization.after + new.sentence + new.block + output.address.publisher + format.date output + new.block + output.eprint.url + new.sentence + note output + format.annote output + fin.entry +} + +FUNCTION {internet} {online} +FUNCTION {www} {online} +FUNCTION {webpage} {online} +FUNCTION {electronic} {online} +FUNCTION {thesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + type "type" output.check + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +%% format.techrep.type.number output.nonnull +%% format.url output +FUNCTION {report} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + new.column + type "type" output.check + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.phdthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {masterthesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.mthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {dscithesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.dscithesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +%% format.url output + +FUNCTION {techreport} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + new.column + format.techreport.type output + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"\bbljan{}"} +MACRO {feb} {"\bblfeb{}"} +MACRO {mar} {"\bblmar{}"} +MACRO {apr} {"\bblapr{}"} +MACRO {may} {"\bblmay{}"} +MACRO {jun} {"\bbljun{}"} +MACRO {jul} {"\bbljul{}"} +MACRO {aug} {"\bblaug{}"} +MACRO {sep} {"\bblsep{}"} +MACRO {oct} {"\bbloct{}"} +MACRO {nov} {"\bblnov{}"} +MACRO {dec} {"\bbldec{}"} + + +MACRO {aa}{"Astron. \& Astrophys."} +MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."} +MACRO {aj} {"Astron. J."} +MACRO {aph} {"Acta Phys."} +MACRO {advp} {"Adv. Phys."} +MACRO {ajp} {"Amer. J. Phys."} +MACRO {ajm} {"Amer. J. Math."} +MACRO {amsci} {"Amer. Sci."} +MACRO {anofd} {"Ann. Fluid Dyn."} +MACRO {am} {"Ann. Math."} +MACRO {ap} {"Ann. Phys. (NY)"} +MACRO {adp} {"Ann. Phys. (Leipzig)"} +MACRO {ao} {"Appl. Opt."} +MACRO {apl} {"Appl. Phys. Lett."} +MACRO {app} {"Astroparticle Phys."} +MACRO {apj} {"Astrophys. J."} +MACRO {apjsup} {"Astrophys. J. Suppl."} +MACRO {apss} {"Astrophys. Space Sci."} +MACRO {araa} {"Ann. Rev. Astron. Astrophys."} +MACRO {baas} {"Bull. Amer. Astron. Soc."} +MACRO {baps} {"Bull. Amer. Phys. Soc."} +MACRO {cmp} {"Comm. Math. Phys."} +MACRO {cpam} {"Commun. Pure Appl. Math."} +MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"} +MACRO {cpc} {"Comp. Phys. Comm."} +MACRO {cqg} {"Class. Quant. Grav."} +MACRO {cra} {"C. R. Acad. Sci. A"} +MACRO {fed} {"Fusion Eng. \& Design"} +MACRO {ft} {"Fusion Tech."} +MACRO {grg} {"Gen. Relativ. Gravit."} +MACRO {ieeens} {"IEEE Trans. Nucl. Sci."} +MACRO {ieeeps} {"IEEE Trans. Plasma Sci."} +MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"} +MACRO {ip} {"Infrared Phys."} +MACRO {irp} {"Infrared Phys."} +MACRO {jap} {"J. Appl. Phys."} +MACRO {jasa} {"J. Acoust. Soc. America"} +MACRO {jcp} {"J. Comp. Phys."} +MACRO {jchp} {"J. Chem. Phys."} +MACRO {jetp} {"Sov. Phys.--JETP"} +MACRO {jfe} {"J. Fusion Energy"} +MACRO {jfm} {"J. Fluid Mech."} +MACRO {jmp} {"J. Math. Phys."} +MACRO {jne} {"J. Nucl. Energy"} +MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."} +MACRO {jnm} {"J. Nucl. Mat."} +MACRO {jpc} {"J. Phys. Chem."} +MACRO {jpp} {"J. Plasma Phys."} +MACRO {jpsj} {"J. Phys. Soc. Japan"} +MACRO {jsi} {"J. Sci. Instrum."} +MACRO {jvst} {"J. Vac. Sci. \& Tech."} +MACRO {nat} {"Nature"} +MACRO {nature} {"Nature"} +MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"} +MACRO {nf} {"Nucl. Fusion"} +MACRO {nim} {"Nucl. Inst. \& Meth."} +MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."} +MACRO {np} {"Nucl. Phys."} +MACRO {npb} {"Nucl. Phys. B"} +MACRO {nt/f} {"Nucl. Tech./Fusion"} +MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"} +MACRO {inc} {"Nuovo Cimento"} +MACRO {nc} {"Nuovo Cimento"} +MACRO {pf} {"Phys. Fluids"} +MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."} +MACRO {pfb} {"Phys. Fluids B: Plasma Phys."} +MACRO {pl} {"Phys. Lett."} +MACRO {pla} {"Phys. Lett. A"} +MACRO {plb} {"Phys. Lett. B"} +MACRO {prep} {"Phys. Rep."} +MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"} +MACRO {pp} {"Phys. Plasmas"} +MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"} +MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"} +MACRO {prl} {"Phys. Rev. Lett."} +MACRO {pr} {"Phys. Rev."} +MACRO {physrev} {"Phys. Rev."} +MACRO {pra} {"Phys. Rev. A"} +MACRO {prb} {"Phys. Rev. B"} +MACRO {prc} {"Phys. Rev. C"} +MACRO {prd} {"Phys. Rev. D"} +MACRO {pre} {"Phys. Rev. E"} +MACRO {ps} {"Phys. Scripta"} +MACRO {procrsl} {"Proc. Roy. Soc. London"} +MACRO {rmp} {"Rev. Mod. Phys."} +MACRO {rsi} {"Rev. Sci. Inst."} +MACRO {science} {"Science"} +MACRO {sciam} {"Sci. Am."} +MACRO {sam} {"Stud. Appl. Math."} +MACRO {sjpp} {"Sov. J. Plasma Phys."} +MACRO {spd} {"Sov. Phys.--Doklady"} +MACRO {sptp} {"Sov. Phys.--Tech. Phys."} +MACRO {spu} {"Sov. Phys.--Uspekhi"} +MACRO {st} {"Sky and Telesc."} + +MACRO {appopt} {"Appl. Opt."} +MACRO {bell} {"Bell Syst. Tech. J."} +MACRO {ell} {"Electron. Lett."} +MACRO {jasp} {"J. Appl. Spectr."} +MACRO {jqe} {"IEEE J. Quantum Electron."} +MACRO {jlwt} {"J. Lightwave Technol."} +MACRO {jmo} {"J. Mod. Opt."} +MACRO {josa} {"J. Opt. Soc. America"} +MACRO {josaa} {"J. Opt. Soc. Amer.~A"} +MACRO {josab} {"J. Opt. Soc. Amer.~B"} +MACRO {jdp} {"J. Phys. (Paris)"} +MACRO {oc} {"Opt. Commun."} +MACRO {ol} {"Opt. Lett."} +MACRO {os} {"Opt. Spectrosc."} +MACRO {phtl} {"IEEE Photon. Technol. Lett."} +MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."} +MACRO {sjot} {"Sov. J. Opt. Technol."} +MACRO {sjqe} {"Sov. J. Quantum Electron."} +MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."} +MACRO {stph} {"Sov. Phys.--Techn. Phys."} +MACRO {stphl} {"Sov. Techn. Phys. Lett."} +MACRO {vr} {"Vision Res."} +MACRO {zph} {"Z. f. Physik"} +MACRO {zphb} {"Z. f. Physik~B"} +MACRO {zphd} {"Z. f. Physik~D"} +MACRO {sse} {"Solid-State Electron."} +MACRO {pss} {"Phys. Sol. State"} +MACRO {sst} {"Semicond. Sci. Tech."} +MACRO {nl} {"Nano Lett."} + +READ + + + + + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +EXECUTE {initialize.longest.label} + +FUNCTION {forward.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +ITERATE {forward.pass} + + +FUNCTION {begin.bib} +{ "\begin{thebibliography}{" longest.label * "}" * write$ newline$ + "\def\selectlanguageifdefined#1{" write$ newline$ + "\expandafter\ifx\csname date#1\endcsname\relax" write$ newline$ + "\else\selectlanguage{#1}\fi}" write$ newline$ + "\providecommand*{\href}[2]{{\small #2}}" write$ newline$ + "\providecommand*{\url}[1]{{\small #1}}" write$ newline$ + "\providecommand*{\BibUrl}[1]{\url{#1}}" write$ newline$ + "\providecommand{\BibAnnote}[1]{}" write$ newline$ + "\providecommand*{\BibEmph}[1]{#1}" write$ newline$ + "\ProvideTextCommandDefault{\cyrdash}{\hbox to.8em{--\hss--}}" write$ newline$ + "\providecommand*{\BibDash}{\ifdim\lastskip>0pt\unskip\nobreak\hskip.2em\fi" write$ newline$ + "\cyrdash\hskip.2em\ignorespaces}" write$ newline$ + preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} + +%% +%% End of file `ugost2008l.bst'. diff --git a/BibTeX-Styles/ugost2008ls.bst b/BibTeX-Styles/ugost2008ls.bst new file mode 100644 index 0000000..cf53dbb --- /dev/null +++ b/BibTeX-Styles/ugost2008ls.bst @@ -0,0 +1,2064 @@ +%% +%% This is file `ugost2008ls.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% gost.dtx (with options: `bst,utf8,modern,eprint,longlist,sort') +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This file has the LPPL maintenance status "maintained". +%% Maintained by Igor A. Kotelnikov. +%% Current version: 2012.02.02 +%% +%% Please, send bug report via e-mail: +%% kia999 at mail dot ru +%% or +%% polyama at yahoo dot com +%% + + + +%% +%% This bibstyle attempts to format bibliography according to +%% GOST 7.0.5-2008 for bibliographic reference. + +ENTRY + { address + annote + author + booktitle + bookauthor + chapter + edition + editor + compiler + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + medium % new in v.2. + type + volume + year + language + booklanguage + numpages + url + urldate + isbn + doi + eprinttype % = archivePrefix + eprintclass % = primaryClass + eprint + } + {} + { label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block +after.dblslash after.slash after.column after.semicolumn } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + #4 'after.dblslash := + #5 'after.slash := + #6 'after.column := + #7 'after.semicolumn := +} + +STRINGS { s t } + +STRINGS { curlanguage } + +FUNCTION {change.language} +{ booklanguage empty$ + { "" } + { booklanguage 'curlanguage := + "\selectlanguageifdefined{" + curlanguage * + "}" * + } + if$ +} + +FUNCTION {output.nonnull} +{ + swap$ + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + " \BibDash " write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.dblslash = + { "~//" * change.language * " " * write$ } + { output.state after.slash = + { "~/ " * write$ } + { output.state after.column = + { "~: " * write$ } + { output.state after.semicolumn = + { "~; " * write$ } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.dblslash} +{ output.state before.all = + 'skip$ + { after.dblslash 'output.state := } + if$ +} + +FUNCTION {new.slash} +{ output.state before.all = + 'skip$ + { after.slash 'output.state := } + if$ +} + +FUNCTION {new.column} +{ output.state before.all = + 'skip$ + { after.column 'output.state := } + if$ +} + +FUNCTION {new.semicolumn} +{ output.state before.all = + 'skip$ + { after.semicolumn 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +FUNCTION {non.stop} +{ duplicate$ + "}" * add.period$ + #-1 #1 substring$ "." = +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.dblslash.checka} +{ empty$ + 'skip$ + 'new.dblslash + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\BibEmph{" swap$ * "}" * } + if$ +} + +FUNCTION {enclose.square.brackets} { } + +FUNCTION {bracify} +{ duplicate$ empty$ + { pop$ "{}" } + { "{" swap$ * "}" * } + if$ +} +FUNCTION {bracketise} +{ duplicate$ empty$ + { pop$ "[]" } + { "[" swap$ * "]" * } + if$ +} +FUNCTION {parenthesify} +{ duplicate$ empty$ + { pop$ "()" } + { "(" swap$ * ")" * } + if$ +} + +FUNCTION {space.word} +{ " " swap$ * " " * } + +FUNCTION {bbl.edby} % { "\bbledby{}" } +{ curlanguage "english" = + {"Ed.\ by"} + { curlanguage "ukrainian" = + {"Під ред."} + { curlanguage "russian" = + {"Под ред."} + { curlanguage "german" = + { "ed." } + {"language is not defined: " language "edby" * * warning$ "Ed.\ by"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.cmplr} +{ curlanguage "english" = + { "Compiler"} + { curlanguage "german" = + { "Hrsg." } + { curlanguage "ukrainian" = + {"{Укл.}"} + { curlanguage "russian" = + {"{Сост.}"} + {"language is not defined: " language "cmplr" * * warning$ "Compiler"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.edition} % { "\bbledition{}" } +{ curlanguage "english" = + {"edition"} + { curlanguage "ukrainian" = + {"{вид.}"} + { curlanguage "russian" = + {"{изд.}"} + { curlanguage "german" = + {" {aus.}" } %%%% { "Aufl." } ?? + { curlanguage "italian" = + {"edizione"} + { curlanguage "french" = + {"\'{e}dition"} + {"language is not defined: " language "edition" * * warning$ "edition"} + if$} + if$} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.vvolume} % { "\bblVolume{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Volume"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "Том" } + { curlanguage "german" = + {"{Band}"} %%%% { "Volumen" } + {"language is not defined: " language "vvolume" * * warning$ "Volume"} + if$} + if$} +if$} + +FUNCTION {bbl.vvol} % { "\bblVol{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Vol."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Т."} + { curlanguage "german" = + {"{Bd.}"} %%%% { "Vol." } + {"language is not defined: " language "vvol" * * warning$ "Vol."} + if$} + if$} +if$} + +FUNCTION {bbl.iissue} % { "\bblIssue{}" } +{ curlanguage "english" = + {"Issue"} + { curlanguage "ukrainian" = + {"Випуск"} + { curlanguage "russian" = + {"Выпуск"} + { curlanguage "german" = + {"{Heft}"} %%%% { "Ausgabe" } + {"language is not defined: " language "iissue" * * warning$ "Issue"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.iiss} % { "\bblIss{}" } +{ curlanguage "english" = + {"Iss."} + { curlanguage "ukrainian" = + {"Вип."} + { curlanguage "russian" = + {"Вып."} + { curlanguage "german" = + {"{H.}"} + {"language is not defined: " language "iiss" * * warning$ "Iss."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.of} % { "\bblof{}" } +{ curlanguage "english" = + {"of"} + { curlanguage "german" = + { "von" } + { curlanguage "ukrainian" = + { "{із}" } + { curlanguage "russian" = + { "{из}" } + {"language is not defined: " language "of" * * warning$ "of"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.etal} % { "\bblof{}" } +{ curlanguage "english" = + {"et~al."} + { curlanguage "german" = + { "u.~a." } + { curlanguage "ukrainian" = + {"{та~ін.}"} + { curlanguage "russian" = + {"и~др."} + {"language is not defined: " language "et~al" * * warning$ "et~al."} + if$} + if$} + if$} +if$} + + +FUNCTION {bbl.nnumber} % { "\bblNumber{}" } +{ curlanguage "english" = + {"Number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{Номер}" } + { curlanguage "german" = + {"{Heft}"} %%% { "Anzahl" } + {"language is not defined: " language "nnumber" * * warning$ "Number"} + if$} + if$} +if$} + +FUNCTION {bbl.number} % { "\bblnumber{}" } +{ curlanguage "english" = + {"number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{номер}"} + { curlanguage "german" = + {"{Heft}"} %%% { "anzahl" }??? + {"language is not defined: " language "number" * * warning$ "number"} + if$} + if$} +if$} + +FUNCTION {bbl.nr} % { "\bblno{}" } +{ curlanguage "english" = + {"no."} + { curlanguage "italian" = + { "no" } + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nr" * * warning$ "no."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.nnr} % { "\bblno{}" } +{ curlanguage "english" = + {"No."} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nnr" * * warning$ "No."} + if$} + if$} +if$} + +FUNCTION {bbl.in} % { "\bblin{}" } +{ curlanguage "english" = curlanguage "german" = or + {"in"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{в}" } + {"language is not defined: " language "in" * * warning$ "in"} + if$} +if$} + +FUNCTION {bbl.iin} % { "\bblIn{}" } +{ curlanguage "english" = curlanguage "german" = or + {"In"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{В}" } + {"language is not defined: " language "iin" * * warning$ "In"} + if$} +if$} + +FUNCTION {bbl.pages} % { "\bblpp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} %%% {"pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "pages" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.page} % { "\bblp." +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "page" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.ppages}% { "\bblPp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} %%%% { "Pp." } + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppages" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.ppage} % { "\bblP." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppage" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.urldate} +{ curlanguage "english" = + {"online; accessed"} + { curlanguage "ukrainian" = + { "{дата звернення}" } + { curlanguage "russian" = + { "{дата обращения}" } + { curlanguage "german" = + { "{online; abgerufen}" } + { "language is not defined: " language "urldate" * * warning$ "online; accessed" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.techreport} % rename to bbl.techreport +{ curlanguage "english" = + { "Rep." } + { curlanguage "german" = + { "Bericht" } + { curlanguage "russian" = + { "{Отчет}" } + { "language is not defined: " language "techrep" * * warning$ "Rep." } + if$} + if$} +if$} + +FUNCTION {bbl.mthesis} +{ curlanguage "english" = + { "Master's thesis" } + { curlanguage "german" = + { "Diss.~Mag." } + { curlanguage "russian" = + { "{Квалификационная работа магистра}" } + { "language is not defined: " language "mthesis" * * warning$ "Master's thesis" } + if$} + if$} +if$} + +FUNCTION {bbl.phdthesis} +{ curlanguage "english" = + { "Ph.\,D. thesis" } + { curlanguage "german" = + { "Diss.~Ph.\,D." } + { curlanguage "russian" = + { "{Дисс\ldots\ кандидата наук}" } + { curlanguage "french" = + { "Th\`{e}se de doctorat" } + { "language is not defined: " language "phdthesis" * * warning$ "Ph.\,D. thesis" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.dscithesis} +{ curlanguage "english" = + { "Dr.\,Sci. dissertation" } + { curlanguage "german" = + { "Diss.~Dr." } + { curlanguage "russian" = + { "{Дисс\ldots\ доктора наук}" } + { "language is not defined: " language "dscithesis" * * warning$ "Dr.\,Sci. dissertation" } + if$} + if$} +if$} + +FUNCTION {bbl.nnoaddress} +{ curlanguage "english" = + { "S.\ l." } + { curlanguage "russian" = + { "{Б.\ м.}" } + { "language is not defined: " language "nnoaddress" * * warning$ "S.\ l." } + if$} +if$} + +FUNCTION {bbl.nopublisher} +{ curlanguage "english" = + { "s.\ n." } + { curlanguage "russian" = + { "{б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "s.\ n." } + if$} +if$} + +FUNCTION {bbl.nnopublisher} +{ curlanguage "english" = + { "S.\ n." } + { curlanguage "russian" = + { "{Б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "S.\ n." } + if$} +if$} + +FUNCTION {bbl.medium.text} +{ curlanguage "english" = + { "Text" } + { curlanguage "russian" = curlanguage "ukrainian" = or + { "{Текст}" } + { "language is not defined: " language "medium" * * warning$ "Text" } + if$} +if$} + +FUNCTION {bbl.medium.elres} +{ curlanguage "english" = + { "Electronic resource" } + { curlanguage "russian" = + { "{Электронный ресурс}" } + { curlanguage "ukrainian" = + { "{Електронний ресурс}" } + { "language is not defined: " language "medium" * * warning$ "Electronic resource" } + if$} + if$} +if$} + +FUNCTION {bbl.chief} +{ curlanguage "english" = + { "chief" } + { curlanguage "russian" = + { "{рук.}" } + { curlanguage "ukrainian" = + { "{рук.}" } + { "language is not defined: " language "chief" * * warning$ "chief" } + if$} + if$} +if$} + +FUNCTION {bbl.executor} +{ curlanguage "english" = + { "Executor" } + { curlanguage "russian" = + { "{исполн.}" } + { curlanguage "ukrainian" = + { "{виконавець}" } + { "language is not defined: " language "medium" * * warning$ "Executor" } + if$} + if$} +if$} + +FUNCTION {bbl.medium} +{ type$ "online" = + { bbl.medium.elres } + { bbl.medium.text } +if$} + +INTEGERS { nameptr namesleft numnames } + + +FUNCTION {format.names} +{ + 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}{~jj}{~ff}" format.name$ 't := + nameptr #1 > + { nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + + +FUNCTION {format.names.rev} +{ + 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ff}{~vv}{~ll}{, jj}" format.name$ 't := + nameptr #1 > + { nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names emphasize} + if$ +} + + +FUNCTION {format.bookauthors} +{ bookauthor empty$ + { "" } + { bookauthor format.names} + if$ +} + +FUNCTION {format.authors.after} +{ author empty$ + { "" } + { author format.names.rev} + if$ +} + +FUNCTION {format.bookauthors.after} +{ bookauthor empty$ + { "" } + { bookauthor format.names.rev}% always cuts to 4 persons + if$ +} + +FUNCTION {format.editors.after} +{ editor empty$ + { "" } + { bbl.edby "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.chief.after} +{ editor empty$ + { "" } + { bbl.chief "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.executor.after} +{ author empty$ + { "" } + { bbl.executor ": " * author format.names.rev * } + if$ +} + +FUNCTION {format.compiler.after} +{ compiler empty$ + { "" } + { bbl.cmplr "\ " * compiler format.names.rev * } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title } + if$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { year ". \BibDash " month * * } + if$ + } + if$ +} + +FUNCTION {output.address.publisher} +{ + address empty$ + 'skip$ + { address output + publisher empty$ + 'skip$ + { new.column } + if$ + } + if$ + publisher output +} + + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem" write$ + cite$ bracify write$ + newline$ + language empty$ + { "english" 'curlanguage := } + { language 'curlanguage := } + if$ + "\selectlanguageifdefined" curlanguage bracify * write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.iin + " " * } + +FUNCTION {format.btitle} +{ title +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {tie.connect} + {"~" + swap$ * * + } + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.connect + series empty$ + 'skip$ + { bbl.of space.word * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { "there's a number but no series in " cite$ * warning$ + bbl.nnr } + { + %new.dblslash + new.sentence + series + bbl.nr + tie.or.space.connect} + if$ + number tie.or.space.connect + } + if$ + } + { "" } + if$ +} + +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + + +FUNCTION {convert.edition} +{ edition +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { convert.edition " " * bbl.edition * } + { convert.edition " " * bbl.edition * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { bbl.ppages pages n.dashify tie.connect } + { bbl.ppage pages tie.connect } + if$ + } + if$ +} + +FUNCTION {format.pages.page} +{ pages empty$ + { numpages empty$ + { "" } + { numpages bbl.pages tie.connect } + if$} + { format.pages} + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { + ", no." number tie.or.space.connect * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ": " * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.volume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.or.space.connect } + if$ +} + +FUNCTION {format.number} +{ number empty$ + { "" } + { bbl.nr number tie.or.space.connect } + if$ +} + + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type + } + if$ +} + +%% { "t" change.case$ } +%% { "" } + +FUNCTION {format.techreport.type} +{ type empty$ + { bbl.techreport } + 'type + if$ +} + +FUNCTION {author.before} +{ + author empty$ + 'skip$ + {author num.names$ #4 < + {format.authors output + new.sentence} + 'skip$ + if$} + if$ +} + +%%<*!long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% {bookauthor num.names$ #4 < +%% {format.bookauthors output +%% new.sentence} +%% 'skip$ +%% if$} +%% if$ +%%} +%% +%%<*long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% { format.bookauthors output +%% new.sentence +%% } +%% if$ +%%} +%% + +FUNCTION {author.after} +{ + author empty$ + 'skip$ + {author num.names$ #3 > + {format.authors.after output + new.semicolumn } + 'skip$ + if$} + if$ +} + +FUNCTION {bookauthor.after} +{ + bookauthor empty$ + 'skip$ + {format.bookauthors.after output + new.semicolumn } + if$ +} + +FUNCTION {editor.organization.after} +{ + compiler empty$ + {} + { format.compiler.after output + new.semicolumn + } + if$ + editor empty$ + {} + { format.editors.after output + new.semicolumn + } + if$ + organization empty$ + {} + {organization output + new.semicolumn + } + if$ +} + +FUNCTION {format.url} +{ url empty$ + { "" } + { + "URL: \BibUrl{" url * "}" * + urldate empty$ + { "" } + { " (" bbl.urldate * ": " * urldate * ")" * } + if$ * + } + if$ +} + +FUNCTION {format.annote} +{ annote empty$ + { "" } +{ after.sentence 'output.state := + "\BibAnnote{" annote add.period$ * "}" * +} + if$ +} + +FUNCTION {format.isbn} +{ + isbn empty$ + { "" } + { "ISBN:~\href{http://isbndb.com/search-all.html?kw=" isbn * + "}{" * isbn * "}" * + } + if$ +} + +FUNCTION {add.doi} +{ duplicate$ empty$ + 'skip$ + { doi empty$ + 'skip$ + { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } + if$ + } + if$ +} + +FUNCTION {add.medium} { } + + + +FUNCTION {format.eprint} +{ eprint empty$ + { "" } + { eprinttype empty$ + { "" } + { eprinttype "~: " *} + if$ + eprintclass empty$ + { } + { eprintclass * "/" *} + if$ + url empty$ + { eprint * } + { "\href{" * url * "}{" * eprint * "}" *} + if$ + } + if$ +} + +FUNCTION {output.eprint.url} +{ + eprint empty$ + { format.url output } + { format.eprint output } + if$ +} + + + +FUNCTION {article} +{ + output.bibitem + author.before + format.title add.medium "title" output.check + new.slash + author.after + new.dblslash + journal emphasize add.doi "journal" output.check % new in v.2 + new.block + format.date "year" output.check + new.block + format.volume output + format.number output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {book} +{ + output.bibitem + author.before + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.sentence + format.number.series output + new.block + format.edition output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {booklet} +{ + output.bibitem + author.before + format.title add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.block + howpublished output + address output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inbook} +{ + output.bibitem + author.before + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + bookauthor.after + editor.organization.after + new.block + format.edition output + new.block + format.number.series output + new.sentence + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {incollection} +{ + output.bibitem + author.before + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + format.number.series output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {proceedings} +{ + output.bibitem + format.btitle add.doi add.medium "title" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + output.address.publisher + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + author.before + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + new.block + format.btitle add.doi add.medium "title" output.check + author empty$ + { organization empty$ + { + address new.block.checka + address output + } + 'skip$ + if$ + } + { + organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.title add.medium output + howpublished new.block.checka + howpublished output + new.block + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + editor.organization.after + new.block + format.date "year" output.check + new.block + note "note" output.check + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {online} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.title add.doi add.medium "title" output.check + howpublished new.dblslash.checka + howpublished enclose.square.brackets output + editor.organization.after + new.sentence + new.block + output.address.publisher + format.date output + new.block + output.eprint.url + new.sentence + note output + format.annote output + fin.entry +} + +FUNCTION {internet} {online} +FUNCTION {www} {online} +FUNCTION {webpage} {online} +FUNCTION {electronic} {online} +FUNCTION {thesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + type "type" output.check + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +%% format.techrep.type.number output.nonnull +%% format.url output +FUNCTION {report} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + new.column + type "type" output.check + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.phdthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {masterthesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.mthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {dscithesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.dscithesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +%% format.url output + +FUNCTION {techreport} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + new.column + format.techreport.type output + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"\bbljan{}"} +MACRO {feb} {"\bblfeb{}"} +MACRO {mar} {"\bblmar{}"} +MACRO {apr} {"\bblapr{}"} +MACRO {may} {"\bblmay{}"} +MACRO {jun} {"\bbljun{}"} +MACRO {jul} {"\bbljul{}"} +MACRO {aug} {"\bblaug{}"} +MACRO {sep} {"\bblsep{}"} +MACRO {oct} {"\bbloct{}"} +MACRO {nov} {"\bblnov{}"} +MACRO {dec} {"\bbldec{}"} + + +MACRO {aa}{"Astron. \& Astrophys."} +MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."} +MACRO {aj} {"Astron. J."} +MACRO {aph} {"Acta Phys."} +MACRO {advp} {"Adv. Phys."} +MACRO {ajp} {"Amer. J. Phys."} +MACRO {ajm} {"Amer. J. Math."} +MACRO {amsci} {"Amer. Sci."} +MACRO {anofd} {"Ann. Fluid Dyn."} +MACRO {am} {"Ann. Math."} +MACRO {ap} {"Ann. Phys. (NY)"} +MACRO {adp} {"Ann. Phys. (Leipzig)"} +MACRO {ao} {"Appl. Opt."} +MACRO {apl} {"Appl. Phys. Lett."} +MACRO {app} {"Astroparticle Phys."} +MACRO {apj} {"Astrophys. J."} +MACRO {apjsup} {"Astrophys. J. Suppl."} +MACRO {apss} {"Astrophys. Space Sci."} +MACRO {araa} {"Ann. Rev. Astron. Astrophys."} +MACRO {baas} {"Bull. Amer. Astron. Soc."} +MACRO {baps} {"Bull. Amer. Phys. Soc."} +MACRO {cmp} {"Comm. Math. Phys."} +MACRO {cpam} {"Commun. Pure Appl. Math."} +MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"} +MACRO {cpc} {"Comp. Phys. Comm."} +MACRO {cqg} {"Class. Quant. Grav."} +MACRO {cra} {"C. R. Acad. Sci. A"} +MACRO {fed} {"Fusion Eng. \& Design"} +MACRO {ft} {"Fusion Tech."} +MACRO {grg} {"Gen. Relativ. Gravit."} +MACRO {ieeens} {"IEEE Trans. Nucl. Sci."} +MACRO {ieeeps} {"IEEE Trans. Plasma Sci."} +MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"} +MACRO {ip} {"Infrared Phys."} +MACRO {irp} {"Infrared Phys."} +MACRO {jap} {"J. Appl. Phys."} +MACRO {jasa} {"J. Acoust. Soc. America"} +MACRO {jcp} {"J. Comp. Phys."} +MACRO {jchp} {"J. Chem. Phys."} +MACRO {jetp} {"Sov. Phys.--JETP"} +MACRO {jfe} {"J. Fusion Energy"} +MACRO {jfm} {"J. Fluid Mech."} +MACRO {jmp} {"J. Math. Phys."} +MACRO {jne} {"J. Nucl. Energy"} +MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."} +MACRO {jnm} {"J. Nucl. Mat."} +MACRO {jpc} {"J. Phys. Chem."} +MACRO {jpp} {"J. Plasma Phys."} +MACRO {jpsj} {"J. Phys. Soc. Japan"} +MACRO {jsi} {"J. Sci. Instrum."} +MACRO {jvst} {"J. Vac. Sci. \& Tech."} +MACRO {nat} {"Nature"} +MACRO {nature} {"Nature"} +MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"} +MACRO {nf} {"Nucl. Fusion"} +MACRO {nim} {"Nucl. Inst. \& Meth."} +MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."} +MACRO {np} {"Nucl. Phys."} +MACRO {npb} {"Nucl. Phys. B"} +MACRO {nt/f} {"Nucl. Tech./Fusion"} +MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"} +MACRO {inc} {"Nuovo Cimento"} +MACRO {nc} {"Nuovo Cimento"} +MACRO {pf} {"Phys. Fluids"} +MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."} +MACRO {pfb} {"Phys. Fluids B: Plasma Phys."} +MACRO {pl} {"Phys. Lett."} +MACRO {pla} {"Phys. Lett. A"} +MACRO {plb} {"Phys. Lett. B"} +MACRO {prep} {"Phys. Rep."} +MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"} +MACRO {pp} {"Phys. Plasmas"} +MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"} +MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"} +MACRO {prl} {"Phys. Rev. Lett."} +MACRO {pr} {"Phys. Rev."} +MACRO {physrev} {"Phys. Rev."} +MACRO {pra} {"Phys. Rev. A"} +MACRO {prb} {"Phys. Rev. B"} +MACRO {prc} {"Phys. Rev. C"} +MACRO {prd} {"Phys. Rev. D"} +MACRO {pre} {"Phys. Rev. E"} +MACRO {ps} {"Phys. Scripta"} +MACRO {procrsl} {"Proc. Roy. Soc. London"} +MACRO {rmp} {"Rev. Mod. Phys."} +MACRO {rsi} {"Rev. Sci. Inst."} +MACRO {science} {"Science"} +MACRO {sciam} {"Sci. Am."} +MACRO {sam} {"Stud. Appl. Math."} +MACRO {sjpp} {"Sov. J. Plasma Phys."} +MACRO {spd} {"Sov. Phys.--Doklady"} +MACRO {sptp} {"Sov. Phys.--Tech. Phys."} +MACRO {spu} {"Sov. Phys.--Uspekhi"} +MACRO {st} {"Sky and Telesc."} + +MACRO {appopt} {"Appl. Opt."} +MACRO {bell} {"Bell Syst. Tech. J."} +MACRO {ell} {"Electron. Lett."} +MACRO {jasp} {"J. Appl. Spectr."} +MACRO {jqe} {"IEEE J. Quantum Electron."} +MACRO {jlwt} {"J. Lightwave Technol."} +MACRO {jmo} {"J. Mod. Opt."} +MACRO {josa} {"J. Opt. Soc. America"} +MACRO {josaa} {"J. Opt. Soc. Amer.~A"} +MACRO {josab} {"J. Opt. Soc. Amer.~B"} +MACRO {jdp} {"J. Phys. (Paris)"} +MACRO {oc} {"Opt. Commun."} +MACRO {ol} {"Opt. Lett."} +MACRO {os} {"Opt. Spectrosc."} +MACRO {phtl} {"IEEE Photon. Technol. Lett."} +MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."} +MACRO {sjot} {"Sov. J. Opt. Technol."} +MACRO {sjqe} {"Sov. J. Quantum Electron."} +MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."} +MACRO {stph} {"Sov. Phys.--Techn. Phys."} +MACRO {stphl} {"Sov. Techn. Phys. Lett."} +MACRO {vr} {"Vision Res."} +MACRO {zph} {"Z. f. Physik"} +MACRO {zphb} {"Z. f. Physik~B"} +MACRO {zphd} {"Z. f. Physik~D"} +MACRO {sse} {"Solid-State Electron."} +MACRO {pss} {"Phys. Sol. State"} +MACRO {sst} {"Semicond. Sci. Tech."} +MACRO {nl} {"Nano Lett."} + +READ + + +FUNCTION {sortify} +{ purify$ +} + +%% ===================================== +%% This version from old Gost package +%%<*!natbib> +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { nameptr #1 > + { " " * } + 'skip$ + if$ + s nameptr + "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" + format.name$ 't := + nameptr numnames = t "others" = and + { "et al" * } + %{ bbl.etal * } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} +%% +%% This version from plainnat.bst +%% It ignores second and subsequent authors but include year. +%%<*natbib> +%% +%% ===================================== + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word % Removes "The " if any + chop.word % Removes "An " if any + chop.word % Removes "A " if any + sortify + #1 global.max$ substring$ +} + +%% ===================================== +%% This version from old gost package. +%% +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { + author num.names$ #4 < + {author sort.format.names } + {title sort.format.title} + if$ + } + if$ +} +%% This version from plainnat.bst +%% ===================================== + +FUNCTION {author.title.sort} +{ author empty$ + { title empty$ + { key empty$ + { "to sort, need author, title, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { title sort.format.title } + if$ + } + { + author num.names$ #4 < + {author sort.format.names } + {title sort.format.title} + if$ + } + if$ +} + +FUNCTION {presort}%#1 +{ + author.title.sort + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + + +ITERATE {presort} + +SORT + + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +EXECUTE {initialize.longest.label} + +FUNCTION {forward.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +ITERATE {forward.pass} + + +FUNCTION {begin.bib} +{ "\begin{thebibliography}{" longest.label * "}" * write$ newline$ + "\def\selectlanguageifdefined#1{" write$ newline$ + "\expandafter\ifx\csname date#1\endcsname\relax" write$ newline$ + "\else\selectlanguage{#1}\fi}" write$ newline$ + "\providecommand*{\href}[2]{{\small #2}}" write$ newline$ + "\providecommand*{\url}[1]{{\small #1}}" write$ newline$ + "\providecommand*{\BibUrl}[1]{\url{#1}}" write$ newline$ + "\providecommand{\BibAnnote}[1]{}" write$ newline$ + "\providecommand*{\BibEmph}[1]{#1}" write$ newline$ + "\ProvideTextCommandDefault{\cyrdash}{\hbox to.8em{--\hss--}}" write$ newline$ + "\providecommand*{\BibDash}{\ifdim\lastskip>0pt\unskip\nobreak\hskip.2em\fi" write$ newline$ + "\cyrdash\hskip.2em\ignorespaces}" write$ newline$ + preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} + +%% +%% End of file `ugost2008ls.bst'. diff --git a/BibTeX-Styles/ugost2008mod.bst b/BibTeX-Styles/ugost2008mod.bst new file mode 100644 index 0000000..477c658 --- /dev/null +++ b/BibTeX-Styles/ugost2008mod.bst @@ -0,0 +1,1992 @@ +%% +%% This is file `ugost2008.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% gost.dtx (with options: `bst,utf8,modern,eprint') +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This file has the LPPL maintenance status "maintained". +%% Maintained by Igor A. Kotelnikov. +%% Current version: 2012.02.02 +%% +%% Please, send bug report via e-mail: +%% kia999 at mail dot ru +%% or +%% polyama at yahoo dot com +%% + + + +%% +%% This bibstyle attempts to format bibliography according to +%% GOST 7.0.5-2008 for bibliographic reference. + +ENTRY + { address + annote + author + booktitle + bookauthor + chapter + edition + editor + compiler + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + medium % new in v.2. + type + volume + year + language + booklanguage + numpages + url + urldate + isbn + doi + eprinttype % = archivePrefix + eprintclass % = primaryClass + eprint + } + {} + { label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block +after.dblslash after.slash after.column after.semicolumn } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + #4 'after.dblslash := + #5 'after.slash := + #6 'after.column := + #7 'after.semicolumn := +} + +STRINGS { s t } + +STRINGS { curlanguage } + +FUNCTION {change.language} +{ booklanguage empty$ + { "" } + { booklanguage 'curlanguage := + "\selectlanguageifdefined{" + curlanguage * + "}" * + } + if$ +} + +FUNCTION {output.nonnull} +{ + swap$ + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + " \BibDash " write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.dblslash = + { "~//" * change.language * " " * write$ } + { output.state after.slash = + { "~/ " * write$ } + { output.state after.column = + { "~: " * write$ } + { output.state after.semicolumn = + { "~; " * write$ } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.dblslash} +{ output.state before.all = + 'skip$ + { after.dblslash 'output.state := } + if$ +} + +FUNCTION {new.slash} +{ output.state before.all = + 'skip$ + { after.slash 'output.state := } + if$ +} + +FUNCTION {new.column} +{ output.state before.all = + 'skip$ + { after.column 'output.state := } + if$ +} + +FUNCTION {new.semicolumn} +{ output.state before.all = + 'skip$ + { after.semicolumn 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + + +FUNCTION {non.stop} +{ duplicate$ + "}" * add.period$ + #-1 #1 substring$ "." = +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.dblslash.checka} +{ empty$ + 'skip$ + 'new.dblslash + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\BibEmph{" swap$ * "}" * } + if$ +} + +FUNCTION {emphasizei} +{ duplicate$ empty$ + { pop$ "" } + { "\BibEmphi{" swap$ * "}" * } + if$ +} + +FUNCTION {emphasizeii} +{ duplicate$ empty$ + { pop$ "" } + { "\BibEmphii{" swap$ * "}" * } + if$ +} + +%FUNCTION {enclose.square.brackets} { } + +FUNCTION {enclose.square.brackets} +{ duplicate$ empty$ + { pop$ "" } + { "[" swap$ * "]" * } + if$ +} + +FUNCTION {bracify} +{ duplicate$ empty$ + { pop$ "{}" } + { "{" swap$ * "}" * } + if$ +} +FUNCTION {bracketise} +{ duplicate$ empty$ + { pop$ "[]" } + { "[" swap$ * "]" * } + if$ +} +FUNCTION {parenthesify} +{ duplicate$ empty$ + { pop$ "()" } + { "(" swap$ * ")" * } + if$ +} + +FUNCTION {space.word} +{ " " swap$ * " " * } + +FUNCTION {bbl.edby} % { "\bbledby{}" } +{ curlanguage "english" = + {"Ed.\ by"} + { curlanguage "ukrainian" = + {"Під ред."} + { curlanguage "russian" = + {"Под ред."} + { curlanguage "german" = + { "ed." } + {"language is not defined: " language "edby" * * warning$ "Ed.\ by"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.cmplr} +{ curlanguage "english" = + { "Compiler"} + { curlanguage "german" = + { "Hrsg." } + { curlanguage "ukrainian" = + {"{Укл.}"} + { curlanguage "russian" = + {"{Сост.}"} + {"language is not defined: " language "cmplr" * * warning$ "Compiler"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.edition} % { "\bbledition{}" } +{ curlanguage "english" = + {"edition"} + { curlanguage "ukrainian" = + {"{вид.}"} + { curlanguage "russian" = + {"{изд.}"} + { curlanguage "german" = + {" {aus.}" } %%%% { "Aufl." } ?? + { curlanguage "italian" = + {"edizione"} + { curlanguage "french" = + {"\'{e}dition"} + {"language is not defined: " language "edition" * * warning$ "edition"} + if$} + if$} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.vvolume} % { "\bblVolume{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Volume"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "Том" } + { curlanguage "german" = + {"{Band}"} %%%% { "Volumen" } + {"language is not defined: " language "vvolume" * * warning$ "Volume"} + if$} + if$} +if$} + +FUNCTION {bbl.vvol} % { "\bblVol{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Vol."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Т."} + { curlanguage "german" = + {"{Bd.}"} %%%% { "Vol." } + {"language is not defined: " language "vvol" * * warning$ "Vol."} + if$} + if$} +if$} + +FUNCTION {bbl.iissue} % { "\bblIssue{}" } +{ curlanguage "english" = + {"Issue"} + { curlanguage "ukrainian" = + {"Випуск"} + { curlanguage "russian" = + {"Выпуск"} + { curlanguage "german" = + {"{Heft}"} %%%% { "Ausgabe" } + {"language is not defined: " language "iissue" * * warning$ "Issue"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.iiss} % { "\bblIss{}" } +{ curlanguage "english" = + {"Iss."} + { curlanguage "ukrainian" = + {"Вип."} + { curlanguage "russian" = + {"Вып."} + { curlanguage "german" = + {"{H.}"} + {"language is not defined: " language "iiss" * * warning$ "Iss."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.of} % { "\bblof{}" } +{ curlanguage "english" = + {"of"} + { curlanguage "german" = + { "von" } + { curlanguage "ukrainian" = + { "{із}" } + { curlanguage "russian" = + { "{из}" } + {"language is not defined: " language "of" * * warning$ "of"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.etal} % { "\bblof{}" } +{ curlanguage "english" = + {"et~al."} + { curlanguage "german" = + { "u.~a." } + { curlanguage "ukrainian" = + {"{та~ін.}"} + { curlanguage "russian" = + {"и~др."} + {"language is not defined: " language "et~al" * * warning$ "et~al."} + if$} + if$} + if$} +if$} + + +FUNCTION {bbl.nnumber} % { "\bblNumber{}" } +{ curlanguage "english" = + {"Number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{Номер}" } + { curlanguage "german" = + {"{Heft}"} %%% { "Anzahl" } + {"language is not defined: " language "nnumber" * * warning$ "Number"} + if$} + if$} +if$} + +FUNCTION {bbl.number} % { "\bblnumber{}" } +{ curlanguage "english" = + {"number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{номер}"} + { curlanguage "german" = + {"{Heft}"} %%% { "anzahl" }??? + {"language is not defined: " language "number" * * warning$ "number"} + if$} + if$} +if$} + +FUNCTION {bbl.nr} % { "\bblno{}" } +{ curlanguage "english" = + {"no."} + { curlanguage "italian" = + { "no" } + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nr" * * warning$ "no."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.nnr} % { "\bblno{}" } +{ curlanguage "english" = + {"No."} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nnr" * * warning$ "No."} + if$} + if$} +if$} + +FUNCTION {bbl.in} % { "\bblin{}" } +{ curlanguage "english" = curlanguage "german" = or + {"in"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{в}" } + {"language is not defined: " language "in" * * warning$ "in"} + if$} +if$} + +FUNCTION {bbl.iin} % { "\bblIn{}" } +{ curlanguage "english" = curlanguage "german" = or + {"In"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{В}" } + {"language is not defined: " language "iin" * * warning$ "In"} + if$} +if$} + +FUNCTION {bbl.pages} % { "\bblpp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} %%% {"pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "pages" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.page} % { "\bblp." +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "page" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.ppages}% { "\bblPp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} %%%% { "Pp." } + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppages" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.ppage} % { "\bblP." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppage" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.urldate} +{ curlanguage "english" = + {"online; accessed"} + { curlanguage "ukrainian" = + { "{дата звернення}" } + { curlanguage "russian" = + { "{дата обращения}" } + { curlanguage "german" = + { "{online; abgerufen}" } + { "language is not defined: " language "urldate" * * warning$ "online; accessed" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.techreport} % rename to bbl.techreport +{ curlanguage "english" = + { "Rep." } + { curlanguage "german" = + { "Bericht" } + { curlanguage "russian" = + { "{Отчет}" } + { "language is not defined: " language "techrep" * * warning$ "Rep." } + if$} + if$} +if$} + +FUNCTION {bbl.mthesis} +{ curlanguage "english" = + { "Master's thesis" } + { curlanguage "german" = + { "Diss.~Mag." } + { curlanguage "russian" = + { "{Квалификационная работа магистра}" } + { "language is not defined: " language "mthesis" * * warning$ "Master's thesis" } + if$} + if$} +if$} + +FUNCTION {bbl.phdthesis} +{ curlanguage "english" = + { "Ph.\,D. thesis" } + { curlanguage "german" = + { "Diss.~Ph.\,D." } + { curlanguage "russian" = + { "{Дисс\ldots\ кандидата наук}" } + { curlanguage "french" = + { "Th\`{e}se de doctorat" } + { "language is not defined: " language "phdthesis" * * warning$ "Ph.\,D. thesis" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.dscithesis} +{ curlanguage "english" = + { "Dr.\,Sci. dissertation" } + { curlanguage "german" = + { "Diss.~Dr." } + { curlanguage "russian" = + { "{Дисс\ldots\ доктора наук}" } + { "language is not defined: " language "dscithesis" * * warning$ "Dr.\,Sci. dissertation" } + if$} + if$} +if$} + +FUNCTION {bbl.nnoaddress} +{ curlanguage "english" = + { "S.\ l." } + { curlanguage "russian" = + { "{Б.\ м.}" } + { "language is not defined: " language "nnoaddress" * * warning$ "S.\ l." } + if$} +if$} + +FUNCTION {bbl.nopublisher} +{ curlanguage "english" = + { "s.\ n." } + { curlanguage "russian" = + { "{б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "s.\ n." } + if$} +if$} + +FUNCTION {bbl.nnopublisher} +{ curlanguage "english" = + { "S.\ n." } + { curlanguage "russian" = + { "{Б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "S.\ n." } + if$} +if$} + +FUNCTION {bbl.medium.text} +{ curlanguage "english" = + { "Text" } + { curlanguage "russian" = curlanguage "ukrainian" = or + { "{Текст}" } + { "language is not defined: " language "medium" * * warning$ "Text" } + if$} +if$} + +FUNCTION {bbl.medium.elres} +{ curlanguage "english" = + { "Electronic resource" } + { curlanguage "russian" = + { "{Электронный ресурс}" } + { curlanguage "ukrainian" = + { "{Електронний ресурс}" } + { "language is not defined: " language "medium" * * warning$ "Electronic resource" } + if$} + if$} +if$} + +FUNCTION {bbl.chief} +{ curlanguage "english" = + { "chief" } + { curlanguage "russian" = + { "{рук.}" } + { curlanguage "ukrainian" = + { "{рук.}" } + { "language is not defined: " language "chief" * * warning$ "chief" } + if$} + if$} +if$} + +FUNCTION {bbl.executor} +{ curlanguage "english" = + { "Executor" } + { curlanguage "russian" = + { "{исполн.}" } + { curlanguage "ukrainian" = + { "{виконавець}" } + { "language is not defined: " language "medium" * * warning$ "Executor" } + if$} + if$} +if$} + +FUNCTION {bbl.medium} +{ type$ "online" = + { bbl.medium.elres } + { bbl.medium.text } +if$} + +INTEGERS { nameptr namesleft numnames } + + +FUNCTION {format.names} +{ + 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}{~jj}{~ff}" format.name$ 't := %% von Last Jr First; + nameptr #1 > + { nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + t "~others" = + or +% { " " * bbl.etal * } + { " " * bbl.etal enclose.square.brackets * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + + +FUNCTION {format.names.rev} +{ + 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ff}{~vv}{~ll}{, jj}" format.name$ 't := %First von Last, Jr; + nameptr #1 > + { nameptr #2 = % [это число]-1 = то количество ФИО, которое остаётся перед "и др." + numnames #3 > and % [это число] = то количество ФИО, свыше которого начинают сокращать до "и др." + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + t "~others" = + or +% { " " * bbl.etal * } + { " " * bbl.etal enclose.square.brackets * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names emphasize} + if$ +} + + +FUNCTION {format.bookauthors} +{ bookauthor empty$ + { "" } + { bookauthor format.names} + if$ +} + +FUNCTION {format.authors.after} +{ author empty$ + { "" } + { author format.names.rev} + if$ +} + +FUNCTION {format.bookauthors.after} +{ bookauthor empty$ + { "" } + { bookauthor format.names.rev}% always cuts to 4 persons + if$ +} + +FUNCTION {format.editors.after} +{ editor empty$ + { "" } + { bbl.edby "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.chief.after} +{ editor empty$ + { "" } + { bbl.chief "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.executor.after} +{ author empty$ + { "" } + { bbl.executor ": " * author format.names.rev * } + if$ +} + +FUNCTION {format.compiler.after} +{ compiler empty$ + { "" } + { bbl.cmplr "\ " * compiler format.names.rev * } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title } + if$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { year ". \BibDash " month * * } + if$ + } + if$ +} + +FUNCTION {output.address.publisher} +{ + address empty$ + 'skip$ + { address output + publisher empty$ + 'skip$ + { new.column } + if$ + } + if$ + publisher output +} + + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem" write$ + cite$ bracify write$ + newline$ + language empty$ + { "english" 'curlanguage := } + { language 'curlanguage := } + if$ + "\selectlanguageifdefined" curlanguage bracify * write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.iin + " " * } + +FUNCTION {format.btitle} +{ title +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {tie.connect} + {"~" + swap$ * * + } + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.connect + series empty$ + 'skip$ + { bbl.of space.word * series emphasizeii * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { "there's a number but no series in " cite$ * warning$ + bbl.nnr } + { + %new.dblslash + new.sentence + series + bbl.nr + tie.or.space.connect} + if$ + number tie.or.space.connect + } + if$ + } + { "" } + if$ +} + +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + + +FUNCTION {convert.edition} +{ edition +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { convert.edition " " * bbl.edition * } + { convert.edition " " * bbl.edition * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { bbl.ppages pages n.dashify tie.connect } + { bbl.ppage pages tie.connect } + if$ + } + if$ +} + +FUNCTION {format.pages.page} +{ pages empty$ + { numpages empty$ + { "" } + { numpages bbl.pages tie.connect } + if$} + { format.pages} + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { + ", no." number tie.or.space.connect * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ": " * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.volume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.or.space.connect } + if$ +} + +FUNCTION {format.number} +{ number empty$ + { "" } + { bbl.nr number tie.or.space.connect } + if$ +} + + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type + } + if$ +} + +%% { "t" change.case$ } +%% { "" } + +FUNCTION {format.techreport.type} +{ type empty$ + { bbl.techreport } + 'type + if$ +} + +FUNCTION {author.before} +{ + author empty$ + 'skip$ + {author num.names$ #4 < + {format.authors output + new.sentence} + 'skip$ + if$} + if$ +} + +%%<*!long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% {bookauthor num.names$ #4 < +%% {format.bookauthors output +%% new.sentence} +%% 'skip$ +%% if$} +%% if$ +%%} +%% +%%<*long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% { format.bookauthors output +%% new.sentence +%% } +%% if$ +%%} +%% + +FUNCTION {author.after} +{ + author empty$ + 'skip$ + {author num.names$ #3 > % свыше этого числа авторов их переносят направо после названия работы + {format.authors.after output + new.semicolumn } + 'skip$ + if$} + if$ +} + +FUNCTION {bookauthor.after} +{ + bookauthor empty$ + 'skip$ + {format.bookauthors.after output + new.semicolumn } + if$ +} + +FUNCTION {editor.organization.after} +{ + compiler empty$ + {} + { format.compiler.after output + new.semicolumn + } + if$ + editor empty$ + {} + { format.editors.after output + new.semicolumn + } + if$ + organization empty$ + {} + {organization output + new.semicolumn + } + if$ +} + +FUNCTION {format.doi} +{ doi empty$ + { "" } + { + after.sentence 'output.state := + "\BibDOI{" doi * "}" * + } + if$ +} + +FUNCTION {format.url} +{ url empty$ + { "" } + { + "URL: \BibUrl{" url * "}" * + urldate empty$ + { "" } + { " (" bbl.urldate * ": " * urldate * ")" * } + if$ * + } + if$ +} + +FUNCTION {format.annote} +{ annote empty$ + { "" } +{ after.sentence 'output.state := + "\BibAnnote{" annote add.period$ * "}" * +} + if$ +} + +FUNCTION {format.isbn} +{ + isbn empty$ + { "" } + { "ISBN:~\href{http://isbndb.com/search-all.html?kw=" isbn * + "}{" * isbn * "}" * + } + if$ +} + +FUNCTION {add.doi} +{ duplicate$ empty$ + 'skip$ + { doi empty$ + 'skip$ + { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } + if$ + } + if$ +} + +FUNCTION {add.medium} { } + + + +FUNCTION {format.eprint} +{ eprint empty$ + { "" } + { eprinttype empty$ + { "" } + { eprinttype "~: " *} + if$ + eprintclass empty$ + { } + { eprintclass * "/" *} + if$ + url empty$ + { eprint * } + { "\href{" * url * "}{" * eprint * "}" *} + if$ + } + if$ +} + +FUNCTION {output.eprint.url} +{ + eprint empty$ + { + url empty$ + { format.doi output } + { format.url output } + if$ + } + { format.eprint output } + if$ +} + +%FUNCTION {output.eprint.url} +%{ +% eprint empty$ +% { format.url output } +% { format.eprint output } +% if$ +%} + + +FUNCTION {article} +{ + output.bibitem + author.before add.doi + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + journal emphasizei add.doi "journal" output.check % new in v.2 + new.block + format.date "year" output.check + new.block + format.volume output + format.number output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {book} +{ + output.bibitem + author.before add.doi + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.sentence + format.number.series output + new.block + format.edition output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {booklet} +{ + output.bibitem + author.before add.doi + format.title add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.block + howpublished output + address output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inbook} +{ + output.bibitem + author.before add.doi + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + bookauthor.after + editor.organization.after + new.block + format.edition output + new.block + format.number.series output + new.sentence + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {incollection} +{ + output.bibitem + author.before add.doi + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + format.number.series output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {proceedings} +{ + output.bibitem + format.btitle add.doi add.medium "title" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + output.address.publisher + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + author.before add.doi + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors add.doi output.nonnull } + if$ + new.block + format.btitle add.doi add.medium "title" output.check + author empty$ + { organization empty$ + { + address new.block.checka + address output + } + 'skip$ + if$ + } + { + organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors add.doi output + title howpublished new.sentence.checkb + format.title add.doi add.medium output + howpublished new.block.checka + howpublished output + new.block + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + author.before add.doi + format.btitle add.doi "title" output.check + new.slash + author.after + editor.organization.after + new.block + format.date "year" output.check + new.block + note "note" output.check + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {online} +{ output.bibitem + format.authors add.doi output + title howpublished new.sentence.checkb + format.title add.doi add.medium "title" output.check + howpublished new.dblslash.checka + howpublished output +% howpublished enclose.square.brackets output + editor.organization.after + new.sentence + new.block + output.address.publisher + format.date output + new.block + output.eprint.url + new.sentence + note output + format.annote output + fin.entry +} + +FUNCTION {internet} {online} +FUNCTION {www} {online} +FUNCTION {webpage} {online} +FUNCTION {electronic} {online} +FUNCTION {thesis} +{ output.bibitem + format.authors add.doi "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + type "type" output.check + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +%% format.techrep.type.number output.nonnull +%% format.url output +FUNCTION {report} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + new.column + type "type" output.check + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors add.doi "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.phdthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {masterthesis} +{ output.bibitem + format.authors add.doi "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.mthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {mastersthesis} { masterthesis } + +FUNCTION {dscithesis} +{ output.bibitem + format.authors add.doi "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.dscithesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +%% format.url output + +FUNCTION {techreport} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + new.column + format.techreport.type output + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"\bbljan{}"} +MACRO {feb} {"\bblfeb{}"} +MACRO {mar} {"\bblmar{}"} +MACRO {apr} {"\bblapr{}"} +MACRO {may} {"\bblmay{}"} +MACRO {jun} {"\bbljun{}"} +MACRO {jul} {"\bbljul{}"} +MACRO {aug} {"\bblaug{}"} +MACRO {sep} {"\bblsep{}"} +MACRO {oct} {"\bbloct{}"} +MACRO {nov} {"\bblnov{}"} +MACRO {dec} {"\bbldec{}"} + + +MACRO {aa}{"Astron. \& Astrophys."} +MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."} +MACRO {aj} {"Astron. J."} +MACRO {aph} {"Acta Phys."} +MACRO {advp} {"Adv. Phys."} +MACRO {ajp} {"Amer. J. Phys."} +MACRO {ajm} {"Amer. J. Math."} +MACRO {amsci} {"Amer. Sci."} +MACRO {anofd} {"Ann. Fluid Dyn."} +MACRO {am} {"Ann. Math."} +MACRO {ap} {"Ann. Phys. (NY)"} +MACRO {adp} {"Ann. Phys. (Leipzig)"} +MACRO {ao} {"Appl. Opt."} +MACRO {apl} {"Appl. Phys. Lett."} +MACRO {app} {"Astroparticle Phys."} +MACRO {apj} {"Astrophys. J."} +MACRO {apjsup} {"Astrophys. J. Suppl."} +MACRO {apss} {"Astrophys. Space Sci."} +MACRO {araa} {"Ann. Rev. Astron. Astrophys."} +MACRO {baas} {"Bull. Amer. Astron. Soc."} +MACRO {baps} {"Bull. Amer. Phys. Soc."} +MACRO {cmp} {"Comm. Math. Phys."} +MACRO {cpam} {"Commun. Pure Appl. Math."} +MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"} +MACRO {cpc} {"Comp. Phys. Comm."} +MACRO {cqg} {"Class. Quant. Grav."} +MACRO {cra} {"C. R. Acad. Sci. A"} +MACRO {fed} {"Fusion Eng. \& Design"} +MACRO {ft} {"Fusion Tech."} +MACRO {grg} {"Gen. Relativ. Gravit."} +MACRO {ieeens} {"IEEE Trans. Nucl. Sci."} +MACRO {ieeeps} {"IEEE Trans. Plasma Sci."} +MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"} +MACRO {ip} {"Infrared Phys."} +MACRO {irp} {"Infrared Phys."} +MACRO {jap} {"J. Appl. Phys."} +MACRO {jasa} {"J. Acoust. Soc. America"} +MACRO {jcp} {"J. Comp. Phys."} +MACRO {jchp} {"J. Chem. Phys."} +MACRO {jetp} {"Sov. Phys.--JETP"} +MACRO {jfe} {"J. Fusion Energy"} +MACRO {jfm} {"J. Fluid Mech."} +MACRO {jmp} {"J. Math. Phys."} +MACRO {jne} {"J. Nucl. Energy"} +MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."} +MACRO {jnm} {"J. Nucl. Mat."} +MACRO {jpc} {"J. Phys. Chem."} +MACRO {jpp} {"J. Plasma Phys."} +MACRO {jpsj} {"J. Phys. Soc. Japan"} +MACRO {jsi} {"J. Sci. Instrum."} +MACRO {jvst} {"J. Vac. Sci. \& Tech."} +MACRO {nat} {"Nature"} +MACRO {nature} {"Nature"} +MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"} +MACRO {nf} {"Nucl. Fusion"} +MACRO {nim} {"Nucl. Inst. \& Meth."} +MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."} +MACRO {np} {"Nucl. Phys."} +MACRO {npb} {"Nucl. Phys. B"} +MACRO {nt/f} {"Nucl. Tech./Fusion"} +MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"} +MACRO {inc} {"Nuovo Cimento"} +MACRO {nc} {"Nuovo Cimento"} +MACRO {pf} {"Phys. Fluids"} +MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."} +MACRO {pfb} {"Phys. Fluids B: Plasma Phys."} +MACRO {pl} {"Phys. Lett."} +MACRO {pla} {"Phys. Lett. A"} +MACRO {plb} {"Phys. Lett. B"} +MACRO {prep} {"Phys. Rep."} +MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"} +MACRO {pp} {"Phys. Plasmas"} +MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"} +MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"} +MACRO {prl} {"Phys. Rev. Lett."} +MACRO {pr} {"Phys. Rev."} +MACRO {physrev} {"Phys. Rev."} +MACRO {pra} {"Phys. Rev. A"} +MACRO {prb} {"Phys. Rev. B"} +MACRO {prc} {"Phys. Rev. C"} +MACRO {prd} {"Phys. Rev. D"} +MACRO {pre} {"Phys. Rev. E"} +MACRO {ps} {"Phys. Scripta"} +MACRO {procrsl} {"Proc. Roy. Soc. London"} +MACRO {rmp} {"Rev. Mod. Phys."} +MACRO {rsi} {"Rev. Sci. Inst."} +MACRO {science} {"Science"} +MACRO {sciam} {"Sci. Am."} +MACRO {sam} {"Stud. Appl. Math."} +MACRO {sjpp} {"Sov. J. Plasma Phys."} +MACRO {spd} {"Sov. Phys.--Doklady"} +MACRO {sptp} {"Sov. Phys.--Tech. Phys."} +MACRO {spu} {"Sov. Phys.--Uspekhi"} +MACRO {st} {"Sky and Telesc."} + +MACRO {appopt} {"Appl. Opt."} +MACRO {bell} {"Bell Syst. Tech. J."} +MACRO {ell} {"Electron. Lett."} +MACRO {jasp} {"J. Appl. Spectr."} +MACRO {jqe} {"IEEE J. Quantum Electron."} +MACRO {jlwt} {"J. Lightwave Technol."} +MACRO {jmo} {"J. Mod. Opt."} +MACRO {josa} {"J. Opt. Soc. America"} +MACRO {josaa} {"J. Opt. Soc. Amer.~A"} +MACRO {josab} {"J. Opt. Soc. Amer.~B"} +MACRO {jdp} {"J. Phys. (Paris)"} +MACRO {oc} {"Opt. Commun."} +MACRO {ol} {"Opt. Lett."} +MACRO {os} {"Opt. Spectrosc."} +MACRO {phtl} {"IEEE Photon. Technol. Lett."} +MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."} +MACRO {sjot} {"Sov. J. Opt. Technol."} +MACRO {sjqe} {"Sov. J. Quantum Electron."} +MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."} +MACRO {stph} {"Sov. Phys.--Techn. Phys."} +MACRO {stphl} {"Sov. Techn. Phys. Lett."} +MACRO {vr} {"Vision Res."} +MACRO {zph} {"Z. f. Physik"} +MACRO {zphb} {"Z. f. Physik~B"} +MACRO {zphd} {"Z. f. Physik~D"} +MACRO {sse} {"Solid-State Electron."} +MACRO {pss} {"Phys. Sol. State"} +MACRO {sst} {"Semicond. Sci. Tech."} +MACRO {nl} {"Nano Lett."} + +READ + + + + + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +EXECUTE {initialize.longest.label} + +FUNCTION {forward.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +ITERATE {forward.pass} + + +FUNCTION {begin.bib} +{ "\begin{thebibliography}{" longest.label * "}" * write$ newline$ + "\def\selectlanguageifdefined#1{" write$ newline$ + "\expandafter\ifx\csname date#1\endcsname\relax" write$ newline$ + "\else\selectlanguage{#1}\fi}" write$ newline$ + "\providecommand*{\href}[2]{{\small #2}}" write$ newline$ + "\providecommand*{\url}[1]{{\small #1}}" write$ newline$ + "\providecommand*{\BibUrl}[1]{\url{#1}}" write$ newline$ + "\providecommand*{\BibDOI}[1]{DOI: \href{http://dx.doi.org/#1}{\nolinkurl{#1}}}" write$ newline$ + "\providecommand{\BibAnnote}[1]{}" write$ newline$ + "\providecommand*{\BibEmph}[1]{#1}" write$ newline$ + "\providecommand*{\BibEmphi}[1]{#1}" write$ newline$ + "\providecommand*{\BibEmphii}[1]{#1}" write$ newline$ + "\ProvideTextCommandDefault{\cyrdash}{\hbox to.8em{--\hss--}}" write$ newline$ + "\providecommand*{\BibDash}{\ifdim\lastskip>0pt\unskip\nobreak\hskip.2em\fi" write$ newline$ + "\cyrdash\hskip.2em\ignorespaces}" write$ newline$ + preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} + +%% +%% End of file `ugost2008.bst'. diff --git a/BibTeX-Styles/ugost2008n.bst b/BibTeX-Styles/ugost2008n.bst new file mode 100644 index 0000000..d58b4e6 --- /dev/null +++ b/BibTeX-Styles/ugost2008n.bst @@ -0,0 +1,2281 @@ +%% +%% This is file `ugost2008n.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% gost.dtx (with options: `bst,utf8,modern,natbib,eprint') +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This file has the LPPL maintenance status "maintained". +%% Maintained by Igor A. Kotelnikov. +%% Current version: 2012.02.02 +%% +%% Please, send bug report via e-mail: +%% kia999 at mail dot ru +%% or +%% polyama at yahoo dot com +%% + + + +%% +%% This bibstyle attempts to format bibliography according to +%% GOST 7.0.5-2008 for bibliographic reference. +%%------------------------------------------------------------------- +%% This is an author-year citation style bibliography. +%% It requires a special package file to function properly +%% such as natbib.sty by Patrick W. Daly. +%% The form of the \bibitem entries is +%% \bibitem[Jones et al.(1990)]{key}... +%% \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}... +%% where the label part (in brackets) consists of the author names, +%% as they should appear in the citation, with the year in parentheses following. +%% There must be no space before the opening parenthesis! +%% A full list of authors may also follow the year. +%% In natbib.sty, it is possible to define the type of enclosures that is +%% really wanted (brackets or parentheses), but in either case, there must +%% be parentheses in the label. +%% The \cite command functions as follows: +%% \citet{key} => Jones et al. (1990) +%% \citet*{key} => Jones, Baker, and Smith (1990) +%% \citep{key} => (Jones et al., 1990) +%% \citep*{key} => (Jones, Baker, and Smith, 1990) +%% \citep[chap. 2]{key} => (Jones et al., 1990, chap. 2) +%% \citep[e.g.][]{key} => (e.g. Jones et al., 1990) +%% \citep[e.g.][p. 32]{key} => (e.g. Jones et al., p. 32) +%% \citeauthor{key} => Jones et al. +%% \citeauthor*{key} => Jones, Baker, and Smith +%% \citeyear{key} => 1990 +%%--------------------------------------------------------------------- + +ENTRY + { address + annote + author + booktitle + bookauthor + chapter + edition + editor + compiler + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + medium % new in v.2. + type + volume + year + language + booklanguage + numpages + url + urldate + isbn + doi + eprinttype % = archivePrefix + eprintclass % = primaryClass + eprint + } + {} + { label extra.label sort.label short.list } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block +after.dblslash after.slash after.column after.semicolumn } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + #4 'after.dblslash := + #5 'after.slash := + #6 'after.column := + #7 'after.semicolumn := +} + +STRINGS { s t } + +STRINGS { curlanguage } + +FUNCTION {change.language} +{ booklanguage empty$ + { "" } + { booklanguage 'curlanguage := + "\selectlanguageifdefined{" + curlanguage * + "}" * + } + if$ +} + +FUNCTION {output.nonnull} +{ + swap$ + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + " \BibDash " write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.dblslash = + { "~//" * change.language * " " * write$ } + { output.state after.slash = + { "~/ " * write$ } + { output.state after.column = + { "~: " * write$ } + { output.state after.semicolumn = + { "~; " * write$ } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.dblslash} +{ output.state before.all = + 'skip$ + { after.dblslash 'output.state := } + if$ +} + +FUNCTION {new.slash} +{ output.state before.all = + 'skip$ + { after.slash 'output.state := } + if$ +} + +FUNCTION {new.column} +{ output.state before.all = + 'skip$ + { after.column 'output.state := } + if$ +} + +FUNCTION {new.semicolumn} +{ output.state before.all = + 'skip$ + { after.semicolumn 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +FUNCTION {non.stop} +{ duplicate$ + "}" * add.period$ + #-1 #1 substring$ "." = +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.dblslash.checka} +{ empty$ + 'skip$ + 'new.dblslash + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\BibEmph{" swap$ * "}" * } + if$ +} + +FUNCTION {enclose.square.brackets} { } + +FUNCTION {bracify} +{ duplicate$ empty$ + { pop$ "{}" } + { "{" swap$ * "}" * } + if$ +} +FUNCTION {bracketise} +{ duplicate$ empty$ + { pop$ "[]" } + { "[" swap$ * "]" * } + if$ +} +FUNCTION {parenthesify} +{ duplicate$ empty$ + { pop$ "()" } + { "(" swap$ * ")" * } + if$ +} + +FUNCTION {space.word} +{ " " swap$ * " " * } + +FUNCTION {bbl.edby} % { "\bbledby{}" } +{ curlanguage "english" = + {"Ed.\ by"} + { curlanguage "ukrainian" = + {"Під ред."} + { curlanguage "russian" = + {"Под ред."} + { curlanguage "german" = + { "ed." } + {"language is not defined: " language "edby" * * warning$ "Ed.\ by"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.cmplr} +{ curlanguage "english" = + { "Compiler"} + { curlanguage "german" = + { "Hrsg." } + { curlanguage "ukrainian" = + {"{Укл.}"} + { curlanguage "russian" = + {"{Сост.}"} + {"language is not defined: " language "cmplr" * * warning$ "Compiler"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.edition} % { "\bbledition{}" } +{ curlanguage "english" = + {"edition"} + { curlanguage "ukrainian" = + {"{вид.}"} + { curlanguage "russian" = + {"{изд.}"} + { curlanguage "german" = + {" {aus.}" } %%%% { "Aufl." } ?? + { curlanguage "italian" = + {"edizione"} + { curlanguage "french" = + {"\'{e}dition"} + {"language is not defined: " language "edition" * * warning$ "edition"} + if$} + if$} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.vvolume} % { "\bblVolume{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Volume"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "Том" } + { curlanguage "german" = + {"{Band}"} %%%% { "Volumen" } + {"language is not defined: " language "vvolume" * * warning$ "Volume"} + if$} + if$} +if$} + +FUNCTION {bbl.vvol} % { "\bblVol{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Vol."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Т."} + { curlanguage "german" = + {"{Bd.}"} %%%% { "Vol." } + {"language is not defined: " language "vvol" * * warning$ "Vol."} + if$} + if$} +if$} + +FUNCTION {bbl.iissue} % { "\bblIssue{}" } +{ curlanguage "english" = + {"Issue"} + { curlanguage "ukrainian" = + {"Випуск"} + { curlanguage "russian" = + {"Выпуск"} + { curlanguage "german" = + {"{Heft}"} %%%% { "Ausgabe" } + {"language is not defined: " language "iissue" * * warning$ "Issue"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.iiss} % { "\bblIss{}" } +{ curlanguage "english" = + {"Iss."} + { curlanguage "ukrainian" = + {"Вип."} + { curlanguage "russian" = + {"Вып."} + { curlanguage "german" = + {"{H.}"} + {"language is not defined: " language "iiss" * * warning$ "Iss."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.of} % { "\bblof{}" } +{ curlanguage "english" = + {"of"} + { curlanguage "german" = + { "von" } + { curlanguage "ukrainian" = + { "{із}" } + { curlanguage "russian" = + { "{из}" } + {"language is not defined: " language "of" * * warning$ "of"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.etal} % { "\bblof{}" } +{ curlanguage "english" = + {"et~al."} + { curlanguage "german" = + { "u.~a." } + { curlanguage "ukrainian" = + {"{та~ін.}"} + { curlanguage "russian" = + {"и~др."} + {"language is not defined: " language "et~al" * * warning$ "et~al."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.and} % { "\bbland{}" } +{ curlanguage "english" = + {"and"} + { curlanguage "german" = + { "und" } + { curlanguage "ukrainian" = + {"і"} + { curlanguage "russian" = + {"и"} + {"language is not defined: " language "and" * * warning$ "and"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.nnumber} % { "\bblNumber{}" } +{ curlanguage "english" = + {"Number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{Номер}" } + { curlanguage "german" = + {"{Heft}"} %%% { "Anzahl" } + {"language is not defined: " language "nnumber" * * warning$ "Number"} + if$} + if$} +if$} + +FUNCTION {bbl.number} % { "\bblnumber{}" } +{ curlanguage "english" = + {"number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{номер}"} + { curlanguage "german" = + {"{Heft}"} %%% { "anzahl" }??? + {"language is not defined: " language "number" * * warning$ "number"} + if$} + if$} +if$} + +FUNCTION {bbl.nr} % { "\bblno{}" } +{ curlanguage "english" = + {"no."} + { curlanguage "italian" = + { "no" } + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nr" * * warning$ "no."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.nnr} % { "\bblno{}" } +{ curlanguage "english" = + {"No."} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nnr" * * warning$ "No."} + if$} + if$} +if$} + +FUNCTION {bbl.in} % { "\bblin{}" } +{ curlanguage "english" = curlanguage "german" = or + {"in"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{в}" } + {"language is not defined: " language "in" * * warning$ "in"} + if$} +if$} + +FUNCTION {bbl.iin} % { "\bblIn{}" } +{ curlanguage "english" = curlanguage "german" = or + {"In"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{В}" } + {"language is not defined: " language "iin" * * warning$ "In"} + if$} +if$} + +FUNCTION {bbl.pages} % { "\bblpp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} %%% {"pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "pages" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.page} % { "\bblp." +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "page" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.ppages}% { "\bblPp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} %%%% { "Pp." } + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppages" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.ppage} % { "\bblP." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppage" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.urldate} +{ curlanguage "english" = + {"online; accessed"} + { curlanguage "ukrainian" = + { "{дата звернення}" } + { curlanguage "russian" = + { "{дата обращения}" } + { curlanguage "german" = + { "{online; abgerufen}" } + { "language is not defined: " language "urldate" * * warning$ "online; accessed" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.techreport} % rename to bbl.techreport +{ curlanguage "english" = + { "Rep." } + { curlanguage "german" = + { "Bericht" } + { curlanguage "russian" = + { "{Отчет}" } + { "language is not defined: " language "techrep" * * warning$ "Rep." } + if$} + if$} +if$} + +FUNCTION {bbl.mthesis} +{ curlanguage "english" = + { "Master's thesis" } + { curlanguage "german" = + { "Diss.~Mag." } + { curlanguage "russian" = + { "{Квалификационная работа магистра}" } + { "language is not defined: " language "mthesis" * * warning$ "Master's thesis" } + if$} + if$} +if$} + +FUNCTION {bbl.phdthesis} +{ curlanguage "english" = + { "Ph.\,D. thesis" } + { curlanguage "german" = + { "Diss.~Ph.\,D." } + { curlanguage "russian" = + { "{Дисс\ldots\ кандидата наук}" } + { curlanguage "french" = + { "Th\`{e}se de doctorat" } + { "language is not defined: " language "phdthesis" * * warning$ "Ph.\,D. thesis" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.dscithesis} +{ curlanguage "english" = + { "Dr.\,Sci. dissertation" } + { curlanguage "german" = + { "Diss.~Dr." } + { curlanguage "russian" = + { "{Дисс\ldots\ доктора наук}" } + { "language is not defined: " language "dscithesis" * * warning$ "Dr.\,Sci. dissertation" } + if$} + if$} +if$} + +FUNCTION {bbl.nnoaddress} +{ curlanguage "english" = + { "S.\ l." } + { curlanguage "russian" = + { "{Б.\ м.}" } + { "language is not defined: " language "nnoaddress" * * warning$ "S.\ l." } + if$} +if$} + +FUNCTION {bbl.nopublisher} +{ curlanguage "english" = + { "s.\ n." } + { curlanguage "russian" = + { "{б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "s.\ n." } + if$} +if$} + +FUNCTION {bbl.nnopublisher} +{ curlanguage "english" = + { "S.\ n." } + { curlanguage "russian" = + { "{Б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "S.\ n." } + if$} +if$} + +FUNCTION {bbl.medium.text} +{ curlanguage "english" = + { "Text" } + { curlanguage "russian" = curlanguage "ukrainian" = or + { "{Текст}" } + { "language is not defined: " language "medium" * * warning$ "Text" } + if$} +if$} + +FUNCTION {bbl.medium.elres} +{ curlanguage "english" = + { "Electronic resource" } + { curlanguage "russian" = + { "{Электронный ресурс}" } + { curlanguage "ukrainian" = + { "{Електронний ресурс}" } + { "language is not defined: " language "medium" * * warning$ "Electronic resource" } + if$} + if$} +if$} + +FUNCTION {bbl.chief} +{ curlanguage "english" = + { "chief" } + { curlanguage "russian" = + { "{рук.}" } + { curlanguage "ukrainian" = + { "{рук.}" } + { "language is not defined: " language "chief" * * warning$ "chief" } + if$} + if$} +if$} + +FUNCTION {bbl.executor} +{ curlanguage "english" = + { "Executor" } + { curlanguage "russian" = + { "{исполн.}" } + { curlanguage "ukrainian" = + { "{виконавець}" } + { "language is not defined: " language "medium" * * warning$ "Executor" } + if$} + if$} +if$} + +FUNCTION {bbl.medium} +{ type$ "online" = + { bbl.medium.elres } + { bbl.medium.text } +if$} + +INTEGERS { nameptr namesleft numnames } + + +FUNCTION {format.names} +{ + 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}{~jj}{~ff}" format.name$ 't := + nameptr #1 > + { nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.lab.names} +{ 's := + language empty$ + { "english" 'curlanguage := } + { language 'curlanguage := } + if$ + s #1 "{vv~}{ll}" format.name$ + s num.names$ duplicate$ + #2 > + %{ pop$ " et~al." * } + { pop$ " " bbl.etal * * } + { #2 < + 'skip$ + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + %{ " et~al." * } + { " " bbl.etal * * } + %{ " and " * s #2 "{vv~}{ll}" format.name$ * } + { " " bbl.and " " * * * s #2 "{vv~}{ll}" format.name$ * } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.names.rev} +{ + 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ff}{~vv}{~ll}{, jj}" format.name$ 't := + nameptr #1 > + { nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names emphasize} + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + %'key %% causes lost of year + { "{}" key * } %% Bug in bibtex8 ?? + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.key.organization.label} +{ author empty$ + { key empty$ + { organization empty$ + { cite$ #1 #3 substring$ } + { "The " #4 organization chop.word #3 text.prefix$ } + if$ + } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.organization.label} +{ editor empty$ + { key empty$ + { organization empty$ + { cite$ #1 #3 substring$ } + { "The " #4 organization chop.word #3 text.prefix$ } + if$ + } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.short.authors} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.organization.label + { type$ "manual" = + 'author.key.organization.label + 'author.key.label + if$ + } + if$ + } + if$ + 'short.list := +} + +FUNCTION {calc.label} +{ calc.short.authors + short.list + "(" + * + year duplicate$ empty$ + short.list key field.or.null = or + { pop$ "" } + 'skip$ + if$ + * + 'label := +} + + +FUNCTION {format.bookauthors} +{ bookauthor empty$ + { "" } + { bookauthor format.names} + if$ +} + +FUNCTION {format.authors.after} +{ author empty$ + { "" } + { author format.names.rev} + if$ +} + +FUNCTION {format.bookauthors.after} +{ bookauthor empty$ + { "" } + { bookauthor format.names.rev}% always cuts to 4 persons + if$ +} + +FUNCTION {format.editors.after} +{ editor empty$ + { "" } + { bbl.edby "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.chief.after} +{ editor empty$ + { "" } + { bbl.chief "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.executor.after} +{ author empty$ + { "" } + { bbl.executor ": " * author format.names.rev * } + if$ +} + +FUNCTION {format.compiler.after} +{ compiler empty$ + { "" } + { bbl.cmplr "\ " * compiler format.names.rev * } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title } + if$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { year ". \BibDash " month * * } + if$ + } + if$ + extra.label * % new in v.1.2 +} + +FUNCTION {output.address.publisher} +{ + address empty$ + 'skip$ + { address output + publisher empty$ + 'skip$ + { new.column } + if$ + } + if$ + publisher output +} + + +FUNCTION {format.full.names} +{'s := + language empty$ + { "english" 'curlanguage := } + { language 'curlanguage := } + if$ + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}" format.name$ 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + numnames #2 > + curlanguage "english" = + and + { "," * } + 'skip$ + if$ + t "others" = + %t "~others" = + %or + %{ " et~al." * } + { " " bbl.etal * * } + %{ " and " * t * } + { " " bbl.and " " * * * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {author.full} +{ author empty$ + { "" } + { author format.full.names } + if$ +} + +FUNCTION {editor.full} +{ editor empty$ + { "" } + { editor format.full.names } + if$ +} + +FUNCTION {author.editor.full} +{ author empty$ + { editor empty$ + { "" } + { editor format.full.names } + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {make.full.names} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.full + { type$ "proceedings" = + 'editor.full + 'author.full + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem[" write$ + label write$ + ")" make.full.names duplicate$ short.list = + { pop$ } + { * } + if$ + "]{" * write$ + cite$ write$ + "}" write$ + language empty$ + { "english" 'curlanguage := } + {language 'curlanguage := } + if$ + "\selectlanguageifdefined" curlanguage bracify * write$ + newline$ + "" + before.all 'output.state := +} +%% author.key.label +%% year parenthesify * +%% "; lbl:" label * * +%% "; mfn:" make.full.names * * + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.iin + " " * } + +FUNCTION {format.btitle} +{ title +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {tie.connect} + {"~" + swap$ * * + } + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.connect + series empty$ + 'skip$ + { bbl.of space.word * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { "there's a number but no series in " cite$ * warning$ + bbl.nnr } + { + %new.dblslash + new.sentence + series + bbl.nr + tie.or.space.connect} + if$ + number tie.or.space.connect + } + if$ + } + { "" } + if$ +} + +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + + +FUNCTION {convert.edition} +{ edition +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { convert.edition " " * bbl.edition * } + { convert.edition " " * bbl.edition * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { bbl.ppages pages n.dashify tie.connect } + { bbl.ppage pages tie.connect } + if$ + } + if$ +} + +FUNCTION {format.pages.page} +{ pages empty$ + { numpages empty$ + { "" } + { numpages bbl.pages tie.connect } + if$} + { format.pages} + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { + ", no." number tie.or.space.connect * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ": " * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.volume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.or.space.connect } + if$ +} + +FUNCTION {format.number} +{ number empty$ + { "" } + { bbl.nr number tie.or.space.connect } + if$ +} + + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type + } + if$ +} + +%% { "t" change.case$ } +%% { "" } + +FUNCTION {format.techreport.type} +{ type empty$ + { bbl.techreport } + 'type + if$ +} + +FUNCTION {author.before} +{ + author empty$ + 'skip$ + {author num.names$ #4 < + {format.authors output + new.sentence} + 'skip$ + if$} + if$ +} + +%%<*!long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% {bookauthor num.names$ #4 < +%% {format.bookauthors output +%% new.sentence} +%% 'skip$ +%% if$} +%% if$ +%%} +%% +%%<*long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% { format.bookauthors output +%% new.sentence +%% } +%% if$ +%%} +%% + +FUNCTION {author.after} +{ + author empty$ + 'skip$ + {author num.names$ #3 > + {format.authors.after output + new.semicolumn } + 'skip$ + if$} + if$ +} + +FUNCTION {bookauthor.after} +{ + bookauthor empty$ + 'skip$ + {format.bookauthors.after output + new.semicolumn } + if$ +} + +FUNCTION {editor.organization.after} +{ + compiler empty$ + {} + { format.compiler.after output + new.semicolumn + } + if$ + editor empty$ + {} + { format.editors.after output + new.semicolumn + } + if$ + organization empty$ + {} + {organization output + new.semicolumn + } + if$ +} + +FUNCTION {format.url} +{ url empty$ + { "" } + { + "URL: \BibUrl{" url * "}" * + urldate empty$ + { "" } + { " (" bbl.urldate * ": " * urldate * ")" * } + if$ * + } + if$ +} + +FUNCTION {format.annote} +{ annote empty$ + { "" } +{ after.sentence 'output.state := + "\BibAnnote{" annote add.period$ * "}" * +} + if$ +} + +FUNCTION {format.isbn} +{ + isbn empty$ + { "" } + { "ISBN:~\href{http://isbndb.com/search-all.html?kw=" isbn * + "}{" * isbn * "}" * + } + if$ +} + +FUNCTION {add.doi} +{ duplicate$ empty$ + 'skip$ + { doi empty$ + 'skip$ + { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } + if$ + } + if$ +} + +FUNCTION {add.medium} { } + + + +FUNCTION {format.eprint} +{ eprint empty$ + { "" } + { eprinttype empty$ + { "" } + { eprinttype "~: " *} + if$ + eprintclass empty$ + { } + { eprintclass * "/" *} + if$ + url empty$ + { eprint * } + { "\href{" * url * "}{" * eprint * "}" *} + if$ + } + if$ +} + +FUNCTION {output.eprint.url} +{ + eprint empty$ + { format.url output } + { format.eprint output } + if$ +} + + + +FUNCTION {article} +{ + output.bibitem + author.before + author format.key output + format.title add.medium "title" output.check + new.slash + author.after + new.dblslash + journal emphasize add.doi "journal" output.check % new in v.2 + new.block + format.date "year" output.check + new.block + format.volume output + format.number output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {book} +{ + output.bibitem + author.before + author format.key output + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.sentence + format.number.series output + new.block + format.edition output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {booklet} +{ + output.bibitem + author.before + author format.key output + format.title add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.block + howpublished output + address output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inbook} +{ + output.bibitem + author.before + author format.key output + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + bookauthor.after + editor.organization.after + new.block + format.edition output + new.block + format.number.series output + new.sentence + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {incollection} +{ + output.bibitem + author.before + author format.key output + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + format.number.series output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {proceedings} +{ + output.bibitem + editor format.key output + format.btitle add.doi add.medium "title" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + output.address.publisher + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + author.before + author format.key output + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + author format.key output + new.block + format.btitle add.doi add.medium "title" output.check + author empty$ + { organization empty$ + { + address new.block.checka + address output + } + 'skip$ + if$ + } + { + organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + author format.key output + title howpublished new.sentence.checkb + format.title add.medium output + howpublished new.block.checka + howpublished output + new.block + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + author.before + author format.key output + format.btitle "title" output.check + new.slash + author.after + editor.organization.after + new.block + format.date "year" output.check + new.block + note "note" output.check + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {online} +{ output.bibitem + format.authors output + author format.key output + title howpublished new.sentence.checkb + format.title add.doi add.medium "title" output.check + howpublished new.dblslash.checka + howpublished enclose.square.brackets output + editor.organization.after + new.sentence + new.block + output.address.publisher + format.date output + new.block + output.eprint.url + new.sentence + note output + format.annote output + fin.entry +} + +FUNCTION {internet} {online} +FUNCTION {www} {online} +FUNCTION {webpage} {online} +FUNCTION {electronic} {online} +FUNCTION {thesis} +{ output.bibitem + format.authors "author" output.check + author format.key output + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + type "type" output.check + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +%% format.techrep.type.number output.nonnull +%% format.url output +FUNCTION {report} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + title format.key output + new.column + type "type" output.check + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.phdthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {masterthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.mthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {dscithesis} +{ output.bibitem + format.authors "author" output.check + author format.key output + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.dscithesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +%% format.url output + +FUNCTION {techreport} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + title format.key output + new.column + format.techreport.type output + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"\bbljan{}"} +MACRO {feb} {"\bblfeb{}"} +MACRO {mar} {"\bblmar{}"} +MACRO {apr} {"\bblapr{}"} +MACRO {may} {"\bblmay{}"} +MACRO {jun} {"\bbljun{}"} +MACRO {jul} {"\bbljul{}"} +MACRO {aug} {"\bblaug{}"} +MACRO {sep} {"\bblsep{}"} +MACRO {oct} {"\bbloct{}"} +MACRO {nov} {"\bblnov{}"} +MACRO {dec} {"\bbldec{}"} + + +MACRO {aa}{"Astron. \& Astrophys."} +MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."} +MACRO {aj} {"Astron. J."} +MACRO {aph} {"Acta Phys."} +MACRO {advp} {"Adv. Phys."} +MACRO {ajp} {"Amer. J. Phys."} +MACRO {ajm} {"Amer. J. Math."} +MACRO {amsci} {"Amer. Sci."} +MACRO {anofd} {"Ann. Fluid Dyn."} +MACRO {am} {"Ann. Math."} +MACRO {ap} {"Ann. Phys. (NY)"} +MACRO {adp} {"Ann. Phys. (Leipzig)"} +MACRO {ao} {"Appl. Opt."} +MACRO {apl} {"Appl. Phys. Lett."} +MACRO {app} {"Astroparticle Phys."} +MACRO {apj} {"Astrophys. J."} +MACRO {apjsup} {"Astrophys. J. Suppl."} +MACRO {apss} {"Astrophys. Space Sci."} +MACRO {araa} {"Ann. Rev. Astron. Astrophys."} +MACRO {baas} {"Bull. Amer. Astron. Soc."} +MACRO {baps} {"Bull. Amer. Phys. Soc."} +MACRO {cmp} {"Comm. Math. Phys."} +MACRO {cpam} {"Commun. Pure Appl. Math."} +MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"} +MACRO {cpc} {"Comp. Phys. Comm."} +MACRO {cqg} {"Class. Quant. Grav."} +MACRO {cra} {"C. R. Acad. Sci. A"} +MACRO {fed} {"Fusion Eng. \& Design"} +MACRO {ft} {"Fusion Tech."} +MACRO {grg} {"Gen. Relativ. Gravit."} +MACRO {ieeens} {"IEEE Trans. Nucl. Sci."} +MACRO {ieeeps} {"IEEE Trans. Plasma Sci."} +MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"} +MACRO {ip} {"Infrared Phys."} +MACRO {irp} {"Infrared Phys."} +MACRO {jap} {"J. Appl. Phys."} +MACRO {jasa} {"J. Acoust. Soc. America"} +MACRO {jcp} {"J. Comp. Phys."} +MACRO {jchp} {"J. Chem. Phys."} +MACRO {jetp} {"Sov. Phys.--JETP"} +MACRO {jfe} {"J. Fusion Energy"} +MACRO {jfm} {"J. Fluid Mech."} +MACRO {jmp} {"J. Math. Phys."} +MACRO {jne} {"J. Nucl. Energy"} +MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."} +MACRO {jnm} {"J. Nucl. Mat."} +MACRO {jpc} {"J. Phys. Chem."} +MACRO {jpp} {"J. Plasma Phys."} +MACRO {jpsj} {"J. Phys. Soc. Japan"} +MACRO {jsi} {"J. Sci. Instrum."} +MACRO {jvst} {"J. Vac. Sci. \& Tech."} +MACRO {nat} {"Nature"} +MACRO {nature} {"Nature"} +MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"} +MACRO {nf} {"Nucl. Fusion"} +MACRO {nim} {"Nucl. Inst. \& Meth."} +MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."} +MACRO {np} {"Nucl. Phys."} +MACRO {npb} {"Nucl. Phys. B"} +MACRO {nt/f} {"Nucl. Tech./Fusion"} +MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"} +MACRO {inc} {"Nuovo Cimento"} +MACRO {nc} {"Nuovo Cimento"} +MACRO {pf} {"Phys. Fluids"} +MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."} +MACRO {pfb} {"Phys. Fluids B: Plasma Phys."} +MACRO {pl} {"Phys. Lett."} +MACRO {pla} {"Phys. Lett. A"} +MACRO {plb} {"Phys. Lett. B"} +MACRO {prep} {"Phys. Rep."} +MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"} +MACRO {pp} {"Phys. Plasmas"} +MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"} +MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"} +MACRO {prl} {"Phys. Rev. Lett."} +MACRO {pr} {"Phys. Rev."} +MACRO {physrev} {"Phys. Rev."} +MACRO {pra} {"Phys. Rev. A"} +MACRO {prb} {"Phys. Rev. B"} +MACRO {prc} {"Phys. Rev. C"} +MACRO {prd} {"Phys. Rev. D"} +MACRO {pre} {"Phys. Rev. E"} +MACRO {ps} {"Phys. Scripta"} +MACRO {procrsl} {"Proc. Roy. Soc. London"} +MACRO {rmp} {"Rev. Mod. Phys."} +MACRO {rsi} {"Rev. Sci. Inst."} +MACRO {science} {"Science"} +MACRO {sciam} {"Sci. Am."} +MACRO {sam} {"Stud. Appl. Math."} +MACRO {sjpp} {"Sov. J. Plasma Phys."} +MACRO {spd} {"Sov. Phys.--Doklady"} +MACRO {sptp} {"Sov. Phys.--Tech. Phys."} +MACRO {spu} {"Sov. Phys.--Uspekhi"} +MACRO {st} {"Sky and Telesc."} + +MACRO {appopt} {"Appl. Opt."} +MACRO {bell} {"Bell Syst. Tech. J."} +MACRO {ell} {"Electron. Lett."} +MACRO {jasp} {"J. Appl. Spectr."} +MACRO {jqe} {"IEEE J. Quantum Electron."} +MACRO {jlwt} {"J. Lightwave Technol."} +MACRO {jmo} {"J. Mod. Opt."} +MACRO {josa} {"J. Opt. Soc. America"} +MACRO {josaa} {"J. Opt. Soc. Amer.~A"} +MACRO {josab} {"J. Opt. Soc. Amer.~B"} +MACRO {jdp} {"J. Phys. (Paris)"} +MACRO {oc} {"Opt. Commun."} +MACRO {ol} {"Opt. Lett."} +MACRO {os} {"Opt. Spectrosc."} +MACRO {phtl} {"IEEE Photon. Technol. Lett."} +MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."} +MACRO {sjot} {"Sov. J. Opt. Technol."} +MACRO {sjqe} {"Sov. J. Quantum Electron."} +MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."} +MACRO {stph} {"Sov. Phys.--Techn. Phys."} +MACRO {stphl} {"Sov. Techn. Phys. Lett."} +MACRO {vr} {"Vision Res."} +MACRO {zph} {"Z. f. Physik"} +MACRO {zphb} {"Z. f. Physik~B"} +MACRO {zphd} {"Z. f. Physik~D"} +MACRO {sse} {"Solid-State Electron."} +MACRO {pss} {"Phys. Sol. State"} +MACRO {sst} {"Semicond. Sci. Tech."} +MACRO {nl} {"Nano Lett."} + +READ + + +FUNCTION {sortify} +{ purify$ +} + + +INTEGERS { seq.num } + +FUNCTION {init.seq} +{ #0 'seq.num :=} + +EXECUTE {init.seq} + +FUNCTION {int.to.fix} +{ "000000000" swap$ int.to.str$ * + #-1 #10 substring$ +} + +FUNCTION {presort}%#3 +{ + calc.label % computes label + label sortify % initiates sort.label + " " + * + seq.num #1 + 'seq.num := % advance seq.num + seq.num int.to.fix % prepend seq.num with 0s + 'sort.label := % set sort.label to seq.num + sort.label * % append seq.num to label + #1 entry.max$ substring$ % cut if too long + 'sort.key$ := % set sort.key$ +} + +ITERATE {presort} + +SORT + + +STRINGS { longest.label last.label next.extra } + +INTEGERS { number.label longest.label.width last.extra.num } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'longest.label.width := + #0 'last.extra.num := + #0 'number.label := +} + +EXECUTE {initialize.longest.label} + +FUNCTION {forward.pass} +{ last.label label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + label 'last.label := + } + if$ + number.label #1 + 'number.label := +} + +ITERATE {forward.pass} + +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + extra.label 'next.extra := + extra.label + duplicate$ empty$ + 'skip$ + { "{\natexlab{" swap$ * "}}" * } + if$ + 'extra.label := + label extra.label * 'label := +} + +REVERSE {reverse.pass} + +FUNCTION {bib.sort.order} +{ sort.label 'sort.key$ := +} + +ITERATE {bib.sort.order} + +SORT + +FUNCTION {begin.bib} +{ "\begin{thebibliography}{" longest.label * "}" * write$ newline$ + "\def\selectlanguageifdefined#1{" write$ newline$ + "\expandafter\ifx\csname date#1\endcsname\relax" write$ newline$ + "\else\selectlanguage{#1}\fi}" write$ newline$ + "\providecommand*{\href}[2]{{\small #2}}" write$ newline$ + "\providecommand*{\url}[1]{{\small #1}}" write$ newline$ + "\providecommand*{\BibUrl}[1]{\url{#1}}" write$ newline$ + "\providecommand{\BibAnnote}[1]{}" write$ newline$ + "\providecommand*{\BibEmph}[1]{#1}" write$ newline$ + "\ProvideTextCommandDefault{\cyrdash}{\hbox to.8em{--\hss--}}" write$ newline$ + "\providecommand*{\BibDash}{\ifdim\lastskip>0pt\unskip\nobreak\hskip.2em\fi" write$ newline$ + "\cyrdash\hskip.2em\ignorespaces}" write$ newline$ + "\providecommand{\natexlab}[1]{#1}" write$ newline$ + preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} + +%% +%% End of file `ugost2008n.bst'. diff --git a/BibTeX-Styles/ugost2008ns.bst b/BibTeX-Styles/ugost2008ns.bst new file mode 100644 index 0000000..91ff06d --- /dev/null +++ b/BibTeX-Styles/ugost2008ns.bst @@ -0,0 +1,2415 @@ +%% +%% This is file `ugost2008ns.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% gost.dtx (with options: `bst,utf8,modern,natbib,eprint,sort') +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This file has the LPPL maintenance status "maintained". +%% Maintained by Igor A. Kotelnikov. +%% Current version: 2012.02.02 +%% +%% Please, send bug report via e-mail: +%% kia999 at mail dot ru +%% or +%% polyama at yahoo dot com +%% + + + +%% +%% This bibstyle attempts to format bibliography according to +%% GOST 7.0.5-2008 for bibliographic reference. +%%------------------------------------------------------------------- +%% This is an author-year citation style bibliography. +%% It requires a special package file to function properly +%% such as natbib.sty by Patrick W. Daly. +%% The form of the \bibitem entries is +%% \bibitem[Jones et al.(1990)]{key}... +%% \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}... +%% where the label part (in brackets) consists of the author names, +%% as they should appear in the citation, with the year in parentheses following. +%% There must be no space before the opening parenthesis! +%% A full list of authors may also follow the year. +%% In natbib.sty, it is possible to define the type of enclosures that is +%% really wanted (brackets or parentheses), but in either case, there must +%% be parentheses in the label. +%% The \cite command functions as follows: +%% \citet{key} => Jones et al. (1990) +%% \citet*{key} => Jones, Baker, and Smith (1990) +%% \citep{key} => (Jones et al., 1990) +%% \citep*{key} => (Jones, Baker, and Smith, 1990) +%% \citep[chap. 2]{key} => (Jones et al., 1990, chap. 2) +%% \citep[e.g.][]{key} => (e.g. Jones et al., 1990) +%% \citep[e.g.][p. 32]{key} => (e.g. Jones et al., p. 32) +%% \citeauthor{key} => Jones et al. +%% \citeauthor*{key} => Jones, Baker, and Smith +%% \citeyear{key} => 1990 +%%--------------------------------------------------------------------- + +ENTRY + { address + annote + author + booktitle + bookauthor + chapter + edition + editor + compiler + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + medium % new in v.2. + type + volume + year + language + booklanguage + numpages + url + urldate + isbn + doi + eprinttype % = archivePrefix + eprintclass % = primaryClass + eprint + } + {} + { label extra.label sort.label short.list } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block +after.dblslash after.slash after.column after.semicolumn } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + #4 'after.dblslash := + #5 'after.slash := + #6 'after.column := + #7 'after.semicolumn := +} + +STRINGS { s t } + +STRINGS { curlanguage } + +FUNCTION {change.language} +{ booklanguage empty$ + { "" } + { booklanguage 'curlanguage := + "\selectlanguageifdefined{" + curlanguage * + "}" * + } + if$ +} + +FUNCTION {output.nonnull} +{ + swap$ + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + " \BibDash " write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.dblslash = + { "~//" * change.language * " " * write$ } + { output.state after.slash = + { "~/ " * write$ } + { output.state after.column = + { "~: " * write$ } + { output.state after.semicolumn = + { "~; " * write$ } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.dblslash} +{ output.state before.all = + 'skip$ + { after.dblslash 'output.state := } + if$ +} + +FUNCTION {new.slash} +{ output.state before.all = + 'skip$ + { after.slash 'output.state := } + if$ +} + +FUNCTION {new.column} +{ output.state before.all = + 'skip$ + { after.column 'output.state := } + if$ +} + +FUNCTION {new.semicolumn} +{ output.state before.all = + 'skip$ + { after.semicolumn 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +FUNCTION {non.stop} +{ duplicate$ + "}" * add.period$ + #-1 #1 substring$ "." = +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.dblslash.checka} +{ empty$ + 'skip$ + 'new.dblslash + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\BibEmph{" swap$ * "}" * } + if$ +} + +FUNCTION {enclose.square.brackets} { } + +FUNCTION {bracify} +{ duplicate$ empty$ + { pop$ "{}" } + { "{" swap$ * "}" * } + if$ +} +FUNCTION {bracketise} +{ duplicate$ empty$ + { pop$ "[]" } + { "[" swap$ * "]" * } + if$ +} +FUNCTION {parenthesify} +{ duplicate$ empty$ + { pop$ "()" } + { "(" swap$ * ")" * } + if$ +} + +FUNCTION {space.word} +{ " " swap$ * " " * } + +FUNCTION {bbl.edby} % { "\bbledby{}" } +{ curlanguage "english" = + {"Ed.\ by"} + { curlanguage "ukrainian" = + {"Під ред."} + { curlanguage "russian" = + {"Под ред."} + { curlanguage "german" = + { "ed." } + {"language is not defined: " language "edby" * * warning$ "Ed.\ by"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.cmplr} +{ curlanguage "english" = + { "Compiler"} + { curlanguage "german" = + { "Hrsg." } + { curlanguage "ukrainian" = + {"{Укл.}"} + { curlanguage "russian" = + {"{Сост.}"} + {"language is not defined: " language "cmplr" * * warning$ "Compiler"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.edition} % { "\bbledition{}" } +{ curlanguage "english" = + {"edition"} + { curlanguage "ukrainian" = + {"{вид.}"} + { curlanguage "russian" = + {"{изд.}"} + { curlanguage "german" = + {" {aus.}" } %%%% { "Aufl." } ?? + { curlanguage "italian" = + {"edizione"} + { curlanguage "french" = + {"\'{e}dition"} + {"language is not defined: " language "edition" * * warning$ "edition"} + if$} + if$} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.vvolume} % { "\bblVolume{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Volume"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "Том" } + { curlanguage "german" = + {"{Band}"} %%%% { "Volumen" } + {"language is not defined: " language "vvolume" * * warning$ "Volume"} + if$} + if$} +if$} + +FUNCTION {bbl.vvol} % { "\bblVol{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Vol."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Т."} + { curlanguage "german" = + {"{Bd.}"} %%%% { "Vol." } + {"language is not defined: " language "vvol" * * warning$ "Vol."} + if$} + if$} +if$} + +FUNCTION {bbl.iissue} % { "\bblIssue{}" } +{ curlanguage "english" = + {"Issue"} + { curlanguage "ukrainian" = + {"Випуск"} + { curlanguage "russian" = + {"Выпуск"} + { curlanguage "german" = + {"{Heft}"} %%%% { "Ausgabe" } + {"language is not defined: " language "iissue" * * warning$ "Issue"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.iiss} % { "\bblIss{}" } +{ curlanguage "english" = + {"Iss."} + { curlanguage "ukrainian" = + {"Вип."} + { curlanguage "russian" = + {"Вып."} + { curlanguage "german" = + {"{H.}"} + {"language is not defined: " language "iiss" * * warning$ "Iss."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.of} % { "\bblof{}" } +{ curlanguage "english" = + {"of"} + { curlanguage "german" = + { "von" } + { curlanguage "ukrainian" = + { "{із}" } + { curlanguage "russian" = + { "{из}" } + {"language is not defined: " language "of" * * warning$ "of"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.etal} % { "\bblof{}" } +{ curlanguage "english" = + {"et~al."} + { curlanguage "german" = + { "u.~a." } + { curlanguage "ukrainian" = + {"{та~ін.}"} + { curlanguage "russian" = + {"и~др."} + {"language is not defined: " language "et~al" * * warning$ "et~al."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.and} % { "\bbland{}" } +{ curlanguage "english" = + {"and"} + { curlanguage "german" = + { "und" } + { curlanguage "ukrainian" = + {"і"} + { curlanguage "russian" = + {"и"} + {"language is not defined: " language "and" * * warning$ "and"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.nnumber} % { "\bblNumber{}" } +{ curlanguage "english" = + {"Number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{Номер}" } + { curlanguage "german" = + {"{Heft}"} %%% { "Anzahl" } + {"language is not defined: " language "nnumber" * * warning$ "Number"} + if$} + if$} +if$} + +FUNCTION {bbl.number} % { "\bblnumber{}" } +{ curlanguage "english" = + {"number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{номер}"} + { curlanguage "german" = + {"{Heft}"} %%% { "anzahl" }??? + {"language is not defined: " language "number" * * warning$ "number"} + if$} + if$} +if$} + +FUNCTION {bbl.nr} % { "\bblno{}" } +{ curlanguage "english" = + {"no."} + { curlanguage "italian" = + { "no" } + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nr" * * warning$ "no."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.nnr} % { "\bblno{}" } +{ curlanguage "english" = + {"No."} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nnr" * * warning$ "No."} + if$} + if$} +if$} + +FUNCTION {bbl.in} % { "\bblin{}" } +{ curlanguage "english" = curlanguage "german" = or + {"in"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{в}" } + {"language is not defined: " language "in" * * warning$ "in"} + if$} +if$} + +FUNCTION {bbl.iin} % { "\bblIn{}" } +{ curlanguage "english" = curlanguage "german" = or + {"In"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{В}" } + {"language is not defined: " language "iin" * * warning$ "In"} + if$} +if$} + +FUNCTION {bbl.pages} % { "\bblpp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} %%% {"pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "pages" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.page} % { "\bblp." +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "page" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.ppages}% { "\bblPp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} %%%% { "Pp." } + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppages" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.ppage} % { "\bblP." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppage" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.urldate} +{ curlanguage "english" = + {"online; accessed"} + { curlanguage "ukrainian" = + { "{дата звернення}" } + { curlanguage "russian" = + { "{дата обращения}" } + { curlanguage "german" = + { "{online; abgerufen}" } + { "language is not defined: " language "urldate" * * warning$ "online; accessed" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.techreport} % rename to bbl.techreport +{ curlanguage "english" = + { "Rep." } + { curlanguage "german" = + { "Bericht" } + { curlanguage "russian" = + { "{Отчет}" } + { "language is not defined: " language "techrep" * * warning$ "Rep." } + if$} + if$} +if$} + +FUNCTION {bbl.mthesis} +{ curlanguage "english" = + { "Master's thesis" } + { curlanguage "german" = + { "Diss.~Mag." } + { curlanguage "russian" = + { "{Квалификационная работа магистра}" } + { "language is not defined: " language "mthesis" * * warning$ "Master's thesis" } + if$} + if$} +if$} + +FUNCTION {bbl.phdthesis} +{ curlanguage "english" = + { "Ph.\,D. thesis" } + { curlanguage "german" = + { "Diss.~Ph.\,D." } + { curlanguage "russian" = + { "{Дисс\ldots\ кандидата наук}" } + { curlanguage "french" = + { "Th\`{e}se de doctorat" } + { "language is not defined: " language "phdthesis" * * warning$ "Ph.\,D. thesis" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.dscithesis} +{ curlanguage "english" = + { "Dr.\,Sci. dissertation" } + { curlanguage "german" = + { "Diss.~Dr." } + { curlanguage "russian" = + { "{Дисс\ldots\ доктора наук}" } + { "language is not defined: " language "dscithesis" * * warning$ "Dr.\,Sci. dissertation" } + if$} + if$} +if$} + +FUNCTION {bbl.nnoaddress} +{ curlanguage "english" = + { "S.\ l." } + { curlanguage "russian" = + { "{Б.\ м.}" } + { "language is not defined: " language "nnoaddress" * * warning$ "S.\ l." } + if$} +if$} + +FUNCTION {bbl.nopublisher} +{ curlanguage "english" = + { "s.\ n." } + { curlanguage "russian" = + { "{б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "s.\ n." } + if$} +if$} + +FUNCTION {bbl.nnopublisher} +{ curlanguage "english" = + { "S.\ n." } + { curlanguage "russian" = + { "{Б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "S.\ n." } + if$} +if$} + +FUNCTION {bbl.medium.text} +{ curlanguage "english" = + { "Text" } + { curlanguage "russian" = curlanguage "ukrainian" = or + { "{Текст}" } + { "language is not defined: " language "medium" * * warning$ "Text" } + if$} +if$} + +FUNCTION {bbl.medium.elres} +{ curlanguage "english" = + { "Electronic resource" } + { curlanguage "russian" = + { "{Электронный ресурс}" } + { curlanguage "ukrainian" = + { "{Електронний ресурс}" } + { "language is not defined: " language "medium" * * warning$ "Electronic resource" } + if$} + if$} +if$} + +FUNCTION {bbl.chief} +{ curlanguage "english" = + { "chief" } + { curlanguage "russian" = + { "{рук.}" } + { curlanguage "ukrainian" = + { "{рук.}" } + { "language is not defined: " language "chief" * * warning$ "chief" } + if$} + if$} +if$} + +FUNCTION {bbl.executor} +{ curlanguage "english" = + { "Executor" } + { curlanguage "russian" = + { "{исполн.}" } + { curlanguage "ukrainian" = + { "{виконавець}" } + { "language is not defined: " language "medium" * * warning$ "Executor" } + if$} + if$} +if$} + +FUNCTION {bbl.medium} +{ type$ "online" = + { bbl.medium.elres } + { bbl.medium.text } +if$} + +INTEGERS { nameptr namesleft numnames } + + +FUNCTION {format.names} +{ + 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}{~jj}{~ff}" format.name$ 't := + nameptr #1 > + { nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.lab.names} +{ 's := + language empty$ + { "english" 'curlanguage := } + { language 'curlanguage := } + if$ + s #1 "{vv~}{ll}" format.name$ + s num.names$ duplicate$ + #2 > + %{ pop$ " et~al." * } + { pop$ " " bbl.etal * * } + { #2 < + 'skip$ + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + %{ " et~al." * } + { " " bbl.etal * * } + %{ " and " * s #2 "{vv~}{ll}" format.name$ * } + { " " bbl.and " " * * * s #2 "{vv~}{ll}" format.name$ * } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.names.rev} +{ + 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ff}{~vv}{~ll}{, jj}" format.name$ 't := + nameptr #1 > + { nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names emphasize} + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + %'key %% causes lost of year + { "{}" key * } %% Bug in bibtex8 ?? + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.key.organization.label} +{ author empty$ + { key empty$ + { organization empty$ + { cite$ #1 #3 substring$ } + { "The " #4 organization chop.word #3 text.prefix$ } + if$ + } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.organization.label} +{ editor empty$ + { key empty$ + { organization empty$ + { cite$ #1 #3 substring$ } + { "The " #4 organization chop.word #3 text.prefix$ } + if$ + } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.short.authors} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.organization.label + { type$ "manual" = + 'author.key.organization.label + 'author.key.label + if$ + } + if$ + } + if$ + 'short.list := +} + +FUNCTION {calc.label} +{ calc.short.authors + short.list + "(" + * + year duplicate$ empty$ + short.list key field.or.null = or + { pop$ "" } + 'skip$ + if$ + * + 'label := +} + + +FUNCTION {format.bookauthors} +{ bookauthor empty$ + { "" } + { bookauthor format.names} + if$ +} + +FUNCTION {format.authors.after} +{ author empty$ + { "" } + { author format.names.rev} + if$ +} + +FUNCTION {format.bookauthors.after} +{ bookauthor empty$ + { "" } + { bookauthor format.names.rev}% always cuts to 4 persons + if$ +} + +FUNCTION {format.editors.after} +{ editor empty$ + { "" } + { bbl.edby "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.chief.after} +{ editor empty$ + { "" } + { bbl.chief "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.executor.after} +{ author empty$ + { "" } + { bbl.executor ": " * author format.names.rev * } + if$ +} + +FUNCTION {format.compiler.after} +{ compiler empty$ + { "" } + { bbl.cmplr "\ " * compiler format.names.rev * } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title } + if$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { year ". \BibDash " month * * } + if$ + } + if$ + extra.label * % new in v.1.2 +} + +FUNCTION {output.address.publisher} +{ + address empty$ + 'skip$ + { address output + publisher empty$ + 'skip$ + { new.column } + if$ + } + if$ + publisher output +} + + +FUNCTION {format.full.names} +{'s := + language empty$ + { "english" 'curlanguage := } + { language 'curlanguage := } + if$ + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}" format.name$ 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + numnames #2 > + curlanguage "english" = + and + { "," * } + 'skip$ + if$ + t "others" = + %t "~others" = + %or + %{ " et~al." * } + { " " bbl.etal * * } + %{ " and " * t * } + { " " bbl.and " " * * * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {author.full} +{ author empty$ + { "" } + { author format.full.names } + if$ +} + +FUNCTION {editor.full} +{ editor empty$ + { "" } + { editor format.full.names } + if$ +} + +FUNCTION {author.editor.full} +{ author empty$ + { editor empty$ + { "" } + { editor format.full.names } + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {make.full.names} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.full + { type$ "proceedings" = + 'editor.full + 'author.full + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem[" write$ + label write$ + ")" make.full.names duplicate$ short.list = + { pop$ } + { * } + if$ + "]{" * write$ + cite$ write$ + "}" write$ + language empty$ + { "english" 'curlanguage := } + {language 'curlanguage := } + if$ + "\selectlanguageifdefined" curlanguage bracify * write$ + newline$ + "" + before.all 'output.state := +} +%% author.key.label +%% year parenthesify * +%% "; lbl:" label * * +%% "; mfn:" make.full.names * * + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.iin + " " * } + +FUNCTION {format.btitle} +{ title +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {tie.connect} + {"~" + swap$ * * + } + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.connect + series empty$ + 'skip$ + { bbl.of space.word * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { "there's a number but no series in " cite$ * warning$ + bbl.nnr } + { + %new.dblslash + new.sentence + series + bbl.nr + tie.or.space.connect} + if$ + number tie.or.space.connect + } + if$ + } + { "" } + if$ +} + +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + + +FUNCTION {convert.edition} +{ edition +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { convert.edition " " * bbl.edition * } + { convert.edition " " * bbl.edition * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { bbl.ppages pages n.dashify tie.connect } + { bbl.ppage pages tie.connect } + if$ + } + if$ +} + +FUNCTION {format.pages.page} +{ pages empty$ + { numpages empty$ + { "" } + { numpages bbl.pages tie.connect } + if$} + { format.pages} + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { + ", no." number tie.or.space.connect * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ": " * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.volume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.or.space.connect } + if$ +} + +FUNCTION {format.number} +{ number empty$ + { "" } + { bbl.nr number tie.or.space.connect } + if$ +} + + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type + } + if$ +} + +%% { "t" change.case$ } +%% { "" } + +FUNCTION {format.techreport.type} +{ type empty$ + { bbl.techreport } + 'type + if$ +} + +FUNCTION {author.before} +{ + author empty$ + 'skip$ + {author num.names$ #4 < + {format.authors output + new.sentence} + 'skip$ + if$} + if$ +} + +%%<*!long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% {bookauthor num.names$ #4 < +%% {format.bookauthors output +%% new.sentence} +%% 'skip$ +%% if$} +%% if$ +%%} +%% +%%<*long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% { format.bookauthors output +%% new.sentence +%% } +%% if$ +%%} +%% + +FUNCTION {author.after} +{ + author empty$ + 'skip$ + {author num.names$ #3 > + {format.authors.after output + new.semicolumn } + 'skip$ + if$} + if$ +} + +FUNCTION {bookauthor.after} +{ + bookauthor empty$ + 'skip$ + {format.bookauthors.after output + new.semicolumn } + if$ +} + +FUNCTION {editor.organization.after} +{ + compiler empty$ + {} + { format.compiler.after output + new.semicolumn + } + if$ + editor empty$ + {} + { format.editors.after output + new.semicolumn + } + if$ + organization empty$ + {} + {organization output + new.semicolumn + } + if$ +} + +FUNCTION {format.url} +{ url empty$ + { "" } + { + "URL: \BibUrl{" url * "}" * + urldate empty$ + { "" } + { " (" bbl.urldate * ": " * urldate * ")" * } + if$ * + } + if$ +} + +FUNCTION {format.annote} +{ annote empty$ + { "" } +{ after.sentence 'output.state := + "\BibAnnote{" annote add.period$ * "}" * +} + if$ +} + +FUNCTION {format.isbn} +{ + isbn empty$ + { "" } + { "ISBN:~\href{http://isbndb.com/search-all.html?kw=" isbn * + "}{" * isbn * "}" * + } + if$ +} + +FUNCTION {add.doi} +{ duplicate$ empty$ + 'skip$ + { doi empty$ + 'skip$ + { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } + if$ + } + if$ +} + +FUNCTION {add.medium} { } + + + +FUNCTION {format.eprint} +{ eprint empty$ + { "" } + { eprinttype empty$ + { "" } + { eprinttype "~: " *} + if$ + eprintclass empty$ + { } + { eprintclass * "/" *} + if$ + url empty$ + { eprint * } + { "\href{" * url * "}{" * eprint * "}" *} + if$ + } + if$ +} + +FUNCTION {output.eprint.url} +{ + eprint empty$ + { format.url output } + { format.eprint output } + if$ +} + + + +FUNCTION {article} +{ + output.bibitem + author.before + author format.key output + format.title add.medium "title" output.check + new.slash + author.after + new.dblslash + journal emphasize add.doi "journal" output.check % new in v.2 + new.block + format.date "year" output.check + new.block + format.volume output + format.number output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {book} +{ + output.bibitem + author.before + author format.key output + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.sentence + format.number.series output + new.block + format.edition output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {booklet} +{ + output.bibitem + author.before + author format.key output + format.title add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.block + howpublished output + address output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inbook} +{ + output.bibitem + author.before + author format.key output + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + bookauthor.after + editor.organization.after + new.block + format.edition output + new.block + format.number.series output + new.sentence + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {incollection} +{ + output.bibitem + author.before + author format.key output + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + format.number.series output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {proceedings} +{ + output.bibitem + editor format.key output + format.btitle add.doi add.medium "title" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + output.address.publisher + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + author.before + author format.key output + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + author format.key output + new.block + format.btitle add.doi add.medium "title" output.check + author empty$ + { organization empty$ + { + address new.block.checka + address output + } + 'skip$ + if$ + } + { + organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + author format.key output + title howpublished new.sentence.checkb + format.title add.medium output + howpublished new.block.checka + howpublished output + new.block + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + author.before + author format.key output + format.btitle "title" output.check + new.slash + author.after + editor.organization.after + new.block + format.date "year" output.check + new.block + note "note" output.check + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {online} +{ output.bibitem + format.authors output + author format.key output + title howpublished new.sentence.checkb + format.title add.doi add.medium "title" output.check + howpublished new.dblslash.checka + howpublished enclose.square.brackets output + editor.organization.after + new.sentence + new.block + output.address.publisher + format.date output + new.block + output.eprint.url + new.sentence + note output + format.annote output + fin.entry +} + +FUNCTION {internet} {online} +FUNCTION {www} {online} +FUNCTION {webpage} {online} +FUNCTION {electronic} {online} +FUNCTION {thesis} +{ output.bibitem + format.authors "author" output.check + author format.key output + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + type "type" output.check + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +%% format.techrep.type.number output.nonnull +%% format.url output +FUNCTION {report} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + title format.key output + new.column + type "type" output.check + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.phdthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {masterthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.mthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {dscithesis} +{ output.bibitem + format.authors "author" output.check + author format.key output + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.dscithesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +%% format.url output + +FUNCTION {techreport} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + title format.key output + new.column + format.techreport.type output + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"\bbljan{}"} +MACRO {feb} {"\bblfeb{}"} +MACRO {mar} {"\bblmar{}"} +MACRO {apr} {"\bblapr{}"} +MACRO {may} {"\bblmay{}"} +MACRO {jun} {"\bbljun{}"} +MACRO {jul} {"\bbljul{}"} +MACRO {aug} {"\bblaug{}"} +MACRO {sep} {"\bblsep{}"} +MACRO {oct} {"\bbloct{}"} +MACRO {nov} {"\bblnov{}"} +MACRO {dec} {"\bbldec{}"} + + +MACRO {aa}{"Astron. \& Astrophys."} +MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."} +MACRO {aj} {"Astron. J."} +MACRO {aph} {"Acta Phys."} +MACRO {advp} {"Adv. Phys."} +MACRO {ajp} {"Amer. J. Phys."} +MACRO {ajm} {"Amer. J. Math."} +MACRO {amsci} {"Amer. Sci."} +MACRO {anofd} {"Ann. Fluid Dyn."} +MACRO {am} {"Ann. Math."} +MACRO {ap} {"Ann. Phys. (NY)"} +MACRO {adp} {"Ann. Phys. (Leipzig)"} +MACRO {ao} {"Appl. Opt."} +MACRO {apl} {"Appl. Phys. Lett."} +MACRO {app} {"Astroparticle Phys."} +MACRO {apj} {"Astrophys. J."} +MACRO {apjsup} {"Astrophys. J. Suppl."} +MACRO {apss} {"Astrophys. Space Sci."} +MACRO {araa} {"Ann. Rev. Astron. Astrophys."} +MACRO {baas} {"Bull. Amer. Astron. Soc."} +MACRO {baps} {"Bull. Amer. Phys. Soc."} +MACRO {cmp} {"Comm. Math. Phys."} +MACRO {cpam} {"Commun. Pure Appl. Math."} +MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"} +MACRO {cpc} {"Comp. Phys. Comm."} +MACRO {cqg} {"Class. Quant. Grav."} +MACRO {cra} {"C. R. Acad. Sci. A"} +MACRO {fed} {"Fusion Eng. \& Design"} +MACRO {ft} {"Fusion Tech."} +MACRO {grg} {"Gen. Relativ. Gravit."} +MACRO {ieeens} {"IEEE Trans. Nucl. Sci."} +MACRO {ieeeps} {"IEEE Trans. Plasma Sci."} +MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"} +MACRO {ip} {"Infrared Phys."} +MACRO {irp} {"Infrared Phys."} +MACRO {jap} {"J. Appl. Phys."} +MACRO {jasa} {"J. Acoust. Soc. America"} +MACRO {jcp} {"J. Comp. Phys."} +MACRO {jchp} {"J. Chem. Phys."} +MACRO {jetp} {"Sov. Phys.--JETP"} +MACRO {jfe} {"J. Fusion Energy"} +MACRO {jfm} {"J. Fluid Mech."} +MACRO {jmp} {"J. Math. Phys."} +MACRO {jne} {"J. Nucl. Energy"} +MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."} +MACRO {jnm} {"J. Nucl. Mat."} +MACRO {jpc} {"J. Phys. Chem."} +MACRO {jpp} {"J. Plasma Phys."} +MACRO {jpsj} {"J. Phys. Soc. Japan"} +MACRO {jsi} {"J. Sci. Instrum."} +MACRO {jvst} {"J. Vac. Sci. \& Tech."} +MACRO {nat} {"Nature"} +MACRO {nature} {"Nature"} +MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"} +MACRO {nf} {"Nucl. Fusion"} +MACRO {nim} {"Nucl. Inst. \& Meth."} +MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."} +MACRO {np} {"Nucl. Phys."} +MACRO {npb} {"Nucl. Phys. B"} +MACRO {nt/f} {"Nucl. Tech./Fusion"} +MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"} +MACRO {inc} {"Nuovo Cimento"} +MACRO {nc} {"Nuovo Cimento"} +MACRO {pf} {"Phys. Fluids"} +MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."} +MACRO {pfb} {"Phys. Fluids B: Plasma Phys."} +MACRO {pl} {"Phys. Lett."} +MACRO {pla} {"Phys. Lett. A"} +MACRO {plb} {"Phys. Lett. B"} +MACRO {prep} {"Phys. Rep."} +MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"} +MACRO {pp} {"Phys. Plasmas"} +MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"} +MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"} +MACRO {prl} {"Phys. Rev. Lett."} +MACRO {pr} {"Phys. Rev."} +MACRO {physrev} {"Phys. Rev."} +MACRO {pra} {"Phys. Rev. A"} +MACRO {prb} {"Phys. Rev. B"} +MACRO {prc} {"Phys. Rev. C"} +MACRO {prd} {"Phys. Rev. D"} +MACRO {pre} {"Phys. Rev. E"} +MACRO {ps} {"Phys. Scripta"} +MACRO {procrsl} {"Proc. Roy. Soc. London"} +MACRO {rmp} {"Rev. Mod. Phys."} +MACRO {rsi} {"Rev. Sci. Inst."} +MACRO {science} {"Science"} +MACRO {sciam} {"Sci. Am."} +MACRO {sam} {"Stud. Appl. Math."} +MACRO {sjpp} {"Sov. J. Plasma Phys."} +MACRO {spd} {"Sov. Phys.--Doklady"} +MACRO {sptp} {"Sov. Phys.--Tech. Phys."} +MACRO {spu} {"Sov. Phys.--Uspekhi"} +MACRO {st} {"Sky and Telesc."} + +MACRO {appopt} {"Appl. Opt."} +MACRO {bell} {"Bell Syst. Tech. J."} +MACRO {ell} {"Electron. Lett."} +MACRO {jasp} {"J. Appl. Spectr."} +MACRO {jqe} {"IEEE J. Quantum Electron."} +MACRO {jlwt} {"J. Lightwave Technol."} +MACRO {jmo} {"J. Mod. Opt."} +MACRO {josa} {"J. Opt. Soc. America"} +MACRO {josaa} {"J. Opt. Soc. Amer.~A"} +MACRO {josab} {"J. Opt. Soc. Amer.~B"} +MACRO {jdp} {"J. Phys. (Paris)"} +MACRO {oc} {"Opt. Commun."} +MACRO {ol} {"Opt. Lett."} +MACRO {os} {"Opt. Spectrosc."} +MACRO {phtl} {"IEEE Photon. Technol. Lett."} +MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."} +MACRO {sjot} {"Sov. J. Opt. Technol."} +MACRO {sjqe} {"Sov. J. Quantum Electron."} +MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."} +MACRO {stph} {"Sov. Phys.--Techn. Phys."} +MACRO {stphl} {"Sov. Techn. Phys. Lett."} +MACRO {vr} {"Vision Res."} +MACRO {zph} {"Z. f. Physik"} +MACRO {zphb} {"Z. f. Physik~B"} +MACRO {zphd} {"Z. f. Physik~D"} +MACRO {sse} {"Solid-State Electron."} +MACRO {pss} {"Phys. Sol. State"} +MACRO {sst} {"Semicond. Sci. Tech."} +MACRO {nl} {"Nano Lett."} + +READ + + +FUNCTION {sortify} +{ purify$ +} + +%% ===================================== +%% This version from old Gost package +%%<*!natbib> +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { nameptr #1 > + { " " * } + 'skip$ + if$ + s nameptr + "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" + format.name$ 't := + nameptr numnames = t "others" = and + { "et al" * } + %{ bbl.etal * } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} +%% +%% This version from plainnat.bst +%% It ignores second and subsequent authors but include year. +%%<*natbib> +%% +%% ===================================== + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word % Removes "The " if any + chop.word % Removes "An " if any + chop.word % Removes "A " if any + sortify + #1 global.max$ substring$ +} + +%% ===================================== +%% This version from old gost package. +%% +%% This version from plainnat.bst +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} +%% ===================================== + +FUNCTION {author.title.sort} +{ author empty$ + { title empty$ + { key empty$ + { "to sort, need author, title, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { title sort.format.title } + if$ + } + { + author num.names$ #4 < + {author sort.format.names } + {title sort.format.title} + if$ + } + if$ +} +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.organization.sort} +{ author empty$ + { organization empty$ + { key empty$ + { "to sort, need author, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {editor.organization.sort} +{ editor empty$ + { organization empty$ + { key empty$ + { "to sort, need editor, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { editor sort.format.names } + if$ +} + +FUNCTION {presort}%#2 +{ calc.label + label sortify + %author.title.sort + " " + * + % ========= plainnat.bst ========= + author.title.sort + " " + * + year field.or.null sortify + * + " " + * + %cite$ + title field.or.null sort.format.title + * + #1 entry.max$ substring$ + 'sort.label := + sort.label * + % ================================ + #1 entry.max$ substring$ + 'sort.key$ := +} + + +ITERATE {presort} + +SORT + + +STRINGS { longest.label last.label next.extra } + +INTEGERS { number.label longest.label.width last.extra.num } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'longest.label.width := + #0 'last.extra.num := + #0 'number.label := +} + +EXECUTE {initialize.longest.label} + +FUNCTION {forward.pass} +{ last.label label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + label 'last.label := + } + if$ + number.label #1 + 'number.label := +} + +ITERATE {forward.pass} + +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + extra.label 'next.extra := + extra.label + duplicate$ empty$ + 'skip$ + { "{\natexlab{" swap$ * "}}" * } + if$ + 'extra.label := + label extra.label * 'label := +} + +REVERSE {reverse.pass} + +FUNCTION {bib.sort.order} +{ sort.label 'sort.key$ := +} + +ITERATE {bib.sort.order} + +SORT + +FUNCTION {begin.bib} +{ "\begin{thebibliography}{" longest.label * "}" * write$ newline$ + "\def\selectlanguageifdefined#1{" write$ newline$ + "\expandafter\ifx\csname date#1\endcsname\relax" write$ newline$ + "\else\selectlanguage{#1}\fi}" write$ newline$ + "\providecommand*{\href}[2]{{\small #2}}" write$ newline$ + "\providecommand*{\url}[1]{{\small #1}}" write$ newline$ + "\providecommand*{\BibUrl}[1]{\url{#1}}" write$ newline$ + "\providecommand{\BibAnnote}[1]{}" write$ newline$ + "\providecommand*{\BibEmph}[1]{#1}" write$ newline$ + "\ProvideTextCommandDefault{\cyrdash}{\hbox to.8em{--\hss--}}" write$ newline$ + "\providecommand*{\BibDash}{\ifdim\lastskip>0pt\unskip\nobreak\hskip.2em\fi" write$ newline$ + "\cyrdash\hskip.2em\ignorespaces}" write$ newline$ + "\providecommand{\natexlab}[1]{#1}" write$ newline$ + preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} + +%% +%% End of file `ugost2008ns.bst'. diff --git a/BibTeX-Styles/ugost2008s.bst b/BibTeX-Styles/ugost2008s.bst new file mode 100644 index 0000000..9c46cb8 --- /dev/null +++ b/BibTeX-Styles/ugost2008s.bst @@ -0,0 +1,2064 @@ +%% +%% This is file `ugost2008s.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% gost.dtx (with options: `bst,utf8,modern,eprint,sort') +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This file has the LPPL maintenance status "maintained". +%% Maintained by Igor A. Kotelnikov. +%% Current version: 2012.02.02 +%% +%% Please, send bug report via e-mail: +%% kia999 at mail dot ru +%% or +%% polyama at yahoo dot com +%% + + + +%% +%% This bibstyle attempts to format bibliography according to +%% GOST 7.0.5-2008 for bibliographic reference. + +ENTRY + { address + annote + author + booktitle + bookauthor + chapter + edition + editor + compiler + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + medium % new in v.2. + type + volume + year + language + booklanguage + numpages + url + urldate + isbn + doi + eprinttype % = archivePrefix + eprintclass % = primaryClass + eprint + } + {} + { label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block +after.dblslash after.slash after.column after.semicolumn } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + #4 'after.dblslash := + #5 'after.slash := + #6 'after.column := + #7 'after.semicolumn := +} + +STRINGS { s t } + +STRINGS { curlanguage } + +FUNCTION {change.language} +{ booklanguage empty$ + { "" } + { booklanguage 'curlanguage := + "\selectlanguageifdefined{" + curlanguage * + "}" * + } + if$ +} + +FUNCTION {output.nonnull} +{ + swap$ + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + " \BibDash " write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.dblslash = + { "~//" * change.language * " " * write$ } + { output.state after.slash = + { "~/ " * write$ } + { output.state after.column = + { "~: " * write$ } + { output.state after.semicolumn = + { "~; " * write$ } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.dblslash} +{ output.state before.all = + 'skip$ + { after.dblslash 'output.state := } + if$ +} + +FUNCTION {new.slash} +{ output.state before.all = + 'skip$ + { after.slash 'output.state := } + if$ +} + +FUNCTION {new.column} +{ output.state before.all = + 'skip$ + { after.column 'output.state := } + if$ +} + +FUNCTION {new.semicolumn} +{ output.state before.all = + 'skip$ + { after.semicolumn 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +FUNCTION {non.stop} +{ duplicate$ + "}" * add.period$ + #-1 #1 substring$ "." = +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.dblslash.checka} +{ empty$ + 'skip$ + 'new.dblslash + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\BibEmph{" swap$ * "}" * } + if$ +} + +FUNCTION {enclose.square.brackets} { } + +FUNCTION {bracify} +{ duplicate$ empty$ + { pop$ "{}" } + { "{" swap$ * "}" * } + if$ +} +FUNCTION {bracketise} +{ duplicate$ empty$ + { pop$ "[]" } + { "[" swap$ * "]" * } + if$ +} +FUNCTION {parenthesify} +{ duplicate$ empty$ + { pop$ "()" } + { "(" swap$ * ")" * } + if$ +} + +FUNCTION {space.word} +{ " " swap$ * " " * } + +FUNCTION {bbl.edby} % { "\bbledby{}" } +{ curlanguage "english" = + {"Ed.\ by"} + { curlanguage "ukrainian" = + {"Під ред."} + { curlanguage "russian" = + {"Под ред."} + { curlanguage "german" = + { "ed." } + {"language is not defined: " language "edby" * * warning$ "Ed.\ by"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.cmplr} +{ curlanguage "english" = + { "Compiler"} + { curlanguage "german" = + { "Hrsg." } + { curlanguage "ukrainian" = + {"{Укл.}"} + { curlanguage "russian" = + {"{Сост.}"} + {"language is not defined: " language "cmplr" * * warning$ "Compiler"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.edition} % { "\bbledition{}" } +{ curlanguage "english" = + {"edition"} + { curlanguage "ukrainian" = + {"{вид.}"} + { curlanguage "russian" = + {"{изд.}"} + { curlanguage "german" = + {" {aus.}" } %%%% { "Aufl." } ?? + { curlanguage "italian" = + {"edizione"} + { curlanguage "french" = + {"\'{e}dition"} + {"language is not defined: " language "edition" * * warning$ "edition"} + if$} + if$} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.vvolume} % { "\bblVolume{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Volume"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "Том" } + { curlanguage "german" = + {"{Band}"} %%%% { "Volumen" } + {"language is not defined: " language "vvolume" * * warning$ "Volume"} + if$} + if$} +if$} + +FUNCTION {bbl.vvol} % { "\bblVol{}" } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"Vol."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Т."} + { curlanguage "german" = + {"{Bd.}"} %%%% { "Vol." } + {"language is not defined: " language "vvol" * * warning$ "Vol."} + if$} + if$} +if$} + +FUNCTION {bbl.iissue} % { "\bblIssue{}" } +{ curlanguage "english" = + {"Issue"} + { curlanguage "ukrainian" = + {"Випуск"} + { curlanguage "russian" = + {"Выпуск"} + { curlanguage "german" = + {"{Heft}"} %%%% { "Ausgabe" } + {"language is not defined: " language "iissue" * * warning$ "Issue"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.iiss} % { "\bblIss{}" } +{ curlanguage "english" = + {"Iss."} + { curlanguage "ukrainian" = + {"Вип."} + { curlanguage "russian" = + {"Вып."} + { curlanguage "german" = + {"{H.}"} + {"language is not defined: " language "iiss" * * warning$ "Iss."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.of} % { "\bblof{}" } +{ curlanguage "english" = + {"of"} + { curlanguage "german" = + { "von" } + { curlanguage "ukrainian" = + { "{із}" } + { curlanguage "russian" = + { "{из}" } + {"language is not defined: " language "of" * * warning$ "of"} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.etal} % { "\bblof{}" } +{ curlanguage "english" = + {"et~al."} + { curlanguage "german" = + { "u.~a." } + { curlanguage "ukrainian" = + {"{та~ін.}"} + { curlanguage "russian" = + {"и~др."} + {"language is not defined: " language "et~al" * * warning$ "et~al."} + if$} + if$} + if$} +if$} + + +FUNCTION {bbl.nnumber} % { "\bblNumber{}" } +{ curlanguage "english" = + {"Number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{Номер}" } + { curlanguage "german" = + {"{Heft}"} %%% { "Anzahl" } + {"language is not defined: " language "nnumber" * * warning$ "Number"} + if$} + if$} +if$} + +FUNCTION {bbl.number} % { "\bblnumber{}" } +{ curlanguage "english" = + {"number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{номер}"} + { curlanguage "german" = + {"{Heft}"} %%% { "anzahl" }??? + {"language is not defined: " language "number" * * warning$ "number"} + if$} + if$} +if$} + +FUNCTION {bbl.nr} % { "\bblno{}" } +{ curlanguage "english" = + {"no."} + { curlanguage "italian" = + { "no" } + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nr" * * warning$ "no."} + if$} + if$} + if$} +if$} + +FUNCTION {bbl.nnr} % { "\bblno{}" } +{ curlanguage "english" = + {"No."} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{№}" } + { curlanguage "german" = + {"{H.}"} %%% { "an." } + {"language is not defined: " language "nnr" * * warning$ "No."} + if$} + if$} +if$} + +FUNCTION {bbl.in} % { "\bblin{}" } +{ curlanguage "english" = curlanguage "german" = or + {"in"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{в}" } + {"language is not defined: " language "in" * * warning$ "in"} + if$} +if$} + +FUNCTION {bbl.iin} % { "\bblIn{}" } +{ curlanguage "english" = curlanguage "german" = or + {"In"} + { curlanguage "ukrainian" = curlanguage "russian" = or + { "{В}" } + {"language is not defined: " language "iin" * * warning$ "In"} + if$} +if$} + +FUNCTION {bbl.pages} % { "\bblpp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} %%% {"pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "pages" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.page} % { "\bblp." +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"p."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + { curlanguage "german" = + {"S."} %%%% { "s." } + {"language is not defined: " language "page" * * warning$ "p."} + if$} + if$} +if$} + +FUNCTION {bbl.ppages}% { "\bblPp." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} %%%% { "Pp." } + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppages" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.ppage} % { "\bblP." } +{ curlanguage "english" = curlanguage "french" = or curlanguage "italian" = or + {"P."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + { curlanguage "german" = + {"S."} + {"language is not defined: " language "ppage" * * warning$ "P."} + if$} + if$} +if$} + +FUNCTION {bbl.urldate} +{ curlanguage "english" = + {"online; accessed"} + { curlanguage "ukrainian" = + { "{дата звернення}" } + { curlanguage "russian" = + { "{дата обращения}" } + { curlanguage "german" = + { "{online; abgerufen}" } + { "language is not defined: " language "urldate" * * warning$ "online; accessed" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.techreport} % rename to bbl.techreport +{ curlanguage "english" = + { "Rep." } + { curlanguage "german" = + { "Bericht" } + { curlanguage "russian" = + { "{Отчет}" } + { "language is not defined: " language "techrep" * * warning$ "Rep." } + if$} + if$} +if$} + +FUNCTION {bbl.mthesis} +{ curlanguage "english" = + { "Master's thesis" } + { curlanguage "german" = + { "Diss.~Mag." } + { curlanguage "russian" = + { "{Квалификационная работа магистра}" } + { "language is not defined: " language "mthesis" * * warning$ "Master's thesis" } + if$} + if$} +if$} + +FUNCTION {bbl.phdthesis} +{ curlanguage "english" = + { "Ph.\,D. thesis" } + { curlanguage "german" = + { "Diss.~Ph.\,D." } + { curlanguage "russian" = + { "{Дисс\ldots\ кандидата наук}" } + { curlanguage "french" = + { "Th\`{e}se de doctorat" } + { "language is not defined: " language "phdthesis" * * warning$ "Ph.\,D. thesis" } + if$} + if$} + if$} +if$} + +FUNCTION {bbl.dscithesis} +{ curlanguage "english" = + { "Dr.\,Sci. dissertation" } + { curlanguage "german" = + { "Diss.~Dr." } + { curlanguage "russian" = + { "{Дисс\ldots\ доктора наук}" } + { "language is not defined: " language "dscithesis" * * warning$ "Dr.\,Sci. dissertation" } + if$} + if$} +if$} + +FUNCTION {bbl.nnoaddress} +{ curlanguage "english" = + { "S.\ l." } + { curlanguage "russian" = + { "{Б.\ м.}" } + { "language is not defined: " language "nnoaddress" * * warning$ "S.\ l." } + if$} +if$} + +FUNCTION {bbl.nopublisher} +{ curlanguage "english" = + { "s.\ n." } + { curlanguage "russian" = + { "{б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "s.\ n." } + if$} +if$} + +FUNCTION {bbl.nnopublisher} +{ curlanguage "english" = + { "S.\ n." } + { curlanguage "russian" = + { "{Б.\ и.}" } + { "language is not defined: " language "nnopublisher" * * warning$ "S.\ n." } + if$} +if$} + +FUNCTION {bbl.medium.text} +{ curlanguage "english" = + { "Text" } + { curlanguage "russian" = curlanguage "ukrainian" = or + { "{Текст}" } + { "language is not defined: " language "medium" * * warning$ "Text" } + if$} +if$} + +FUNCTION {bbl.medium.elres} +{ curlanguage "english" = + { "Electronic resource" } + { curlanguage "russian" = + { "{Электронный ресурс}" } + { curlanguage "ukrainian" = + { "{Електронний ресурс}" } + { "language is not defined: " language "medium" * * warning$ "Electronic resource" } + if$} + if$} +if$} + +FUNCTION {bbl.chief} +{ curlanguage "english" = + { "chief" } + { curlanguage "russian" = + { "{рук.}" } + { curlanguage "ukrainian" = + { "{рук.}" } + { "language is not defined: " language "chief" * * warning$ "chief" } + if$} + if$} +if$} + +FUNCTION {bbl.executor} +{ curlanguage "english" = + { "Executor" } + { curlanguage "russian" = + { "{исполн.}" } + { curlanguage "ukrainian" = + { "{виконавець}" } + { "language is not defined: " language "medium" * * warning$ "Executor" } + if$} + if$} +if$} + +FUNCTION {bbl.medium} +{ type$ "online" = + { bbl.medium.elres } + { bbl.medium.text } +if$} + +INTEGERS { nameptr namesleft numnames } + + +FUNCTION {format.names} +{ + 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}{~jj}{~ff}" format.name$ 't := + nameptr #1 > + { nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + + +FUNCTION {format.names.rev} +{ + 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ff}{~vv}{~ll}{, jj}" format.name$ 't := + nameptr #1 > + { nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names emphasize} + if$ +} + + +FUNCTION {format.bookauthors} +{ bookauthor empty$ + { "" } + { bookauthor format.names} + if$ +} + +FUNCTION {format.authors.after} +{ author empty$ + { "" } + { author format.names.rev} + if$ +} + +FUNCTION {format.bookauthors.after} +{ bookauthor empty$ + { "" } + { bookauthor format.names.rev}% always cuts to 4 persons + if$ +} + +FUNCTION {format.editors.after} +{ editor empty$ + { "" } + { bbl.edby "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.chief.after} +{ editor empty$ + { "" } + { bbl.chief "\ " * editor format.names.rev * } + if$ +} + +FUNCTION {format.executor.after} +{ author empty$ + { "" } + { bbl.executor ": " * author format.names.rev * } + if$ +} + +FUNCTION {format.compiler.after} +{ compiler empty$ + { "" } + { bbl.cmplr "\ " * compiler format.names.rev * } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title } + if$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { year ". \BibDash " month * * } + if$ + } + if$ +} + +FUNCTION {output.address.publisher} +{ + address empty$ + 'skip$ + { address output + publisher empty$ + 'skip$ + { new.column } + if$ + } + if$ + publisher output +} + + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem" write$ + cite$ bracify write$ + newline$ + language empty$ + { "english" 'curlanguage := } + { language 'curlanguage := } + if$ + "\selectlanguageifdefined" curlanguage bracify * write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.iin + " " * } + +FUNCTION {format.btitle} +{ title +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {tie.connect} + {"~" + swap$ * * + } + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.connect + series empty$ + 'skip$ + { bbl.of space.word * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { "there's a number but no series in " cite$ * warning$ + bbl.nnr } + { + %new.dblslash + new.sentence + series + bbl.nr + tie.or.space.connect} + if$ + number tie.or.space.connect + } + if$ + } + { "" } + if$ +} + +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + + +FUNCTION {convert.edition} +{ edition +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { convert.edition " " * bbl.edition * } + { convert.edition " " * bbl.edition * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { bbl.ppages pages n.dashify tie.connect } + { bbl.ppage pages tie.connect } + if$ + } + if$ +} + +FUNCTION {format.pages.page} +{ pages empty$ + { numpages empty$ + { "" } + { numpages bbl.pages tie.connect } + if$} + { format.pages} + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { + ", no." number tie.or.space.connect * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ": " * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.volume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.or.space.connect } + if$ +} + +FUNCTION {format.number} +{ number empty$ + { "" } + { bbl.nr number tie.or.space.connect } + if$ +} + + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type + } + if$ +} + +%% { "t" change.case$ } +%% { "" } + +FUNCTION {format.techreport.type} +{ type empty$ + { bbl.techreport } + 'type + if$ +} + +FUNCTION {author.before} +{ + author empty$ + 'skip$ + {author num.names$ #4 < + {format.authors output + new.sentence} + 'skip$ + if$} + if$ +} + +%%<*!long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% {bookauthor num.names$ #4 < +%% {format.bookauthors output +%% new.sentence} +%% 'skip$ +%% if$} +%% if$ +%%} +%% +%%<*long> +%%FUNCTION {bookauthor.before} +%%{ +%% bookauthor empty$ +%% 'skip$ +%% { format.bookauthors output +%% new.sentence +%% } +%% if$ +%%} +%% + +FUNCTION {author.after} +{ + author empty$ + 'skip$ + {author num.names$ #3 > + {format.authors.after output + new.semicolumn } + 'skip$ + if$} + if$ +} + +FUNCTION {bookauthor.after} +{ + bookauthor empty$ + 'skip$ + {format.bookauthors.after output + new.semicolumn } + if$ +} + +FUNCTION {editor.organization.after} +{ + compiler empty$ + {} + { format.compiler.after output + new.semicolumn + } + if$ + editor empty$ + {} + { format.editors.after output + new.semicolumn + } + if$ + organization empty$ + {} + {organization output + new.semicolumn + } + if$ +} + +FUNCTION {format.url} +{ url empty$ + { "" } + { + "URL: \BibUrl{" url * "}" * + urldate empty$ + { "" } + { " (" bbl.urldate * ": " * urldate * ")" * } + if$ * + } + if$ +} + +FUNCTION {format.annote} +{ annote empty$ + { "" } +{ after.sentence 'output.state := + "\BibAnnote{" annote add.period$ * "}" * +} + if$ +} + +FUNCTION {format.isbn} +{ + isbn empty$ + { "" } + { "ISBN:~\href{http://isbndb.com/search-all.html?kw=" isbn * + "}{" * isbn * "}" * + } + if$ +} + +FUNCTION {add.doi} +{ duplicate$ empty$ + 'skip$ + { doi empty$ + 'skip$ + { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } + if$ + } + if$ +} + +FUNCTION {add.medium} { } + + + +FUNCTION {format.eprint} +{ eprint empty$ + { "" } + { eprinttype empty$ + { "" } + { eprinttype "~: " *} + if$ + eprintclass empty$ + { } + { eprintclass * "/" *} + if$ + url empty$ + { eprint * } + { "\href{" * url * "}{" * eprint * "}" *} + if$ + } + if$ +} + +FUNCTION {output.eprint.url} +{ + eprint empty$ + { format.url output } + { format.eprint output } + if$ +} + + + +FUNCTION {article} +{ + output.bibitem + author.before + format.title add.medium "title" output.check + new.slash + author.after + new.dblslash + journal emphasize add.doi "journal" output.check % new in v.2 + new.block + format.date "year" output.check + new.block + format.volume output + format.number output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {book} +{ + output.bibitem + author.before + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.sentence + format.number.series output + new.block + format.edition output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {booklet} +{ + output.bibitem + author.before + format.title add.doi add.medium "title" output.check + new.slash + author.after + editor.organization.after + new.block + howpublished output + address output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inbook} +{ + output.bibitem + author.before + format.btitle add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + bookauthor.after + editor.organization.after + new.block + format.edition output + new.block + format.number.series output + new.sentence + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + new.block + format.pages.page output + new.block + format.isbn output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {incollection} +{ + output.bibitem + author.before + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + output.address.publisher + format.date "year" output.check + new.block + format.bvolume output + format.number.series output + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {proceedings} +{ + output.bibitem + format.btitle add.doi add.medium "title" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + output.address.publisher + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + author.before + new.sentence + format.title add.doi add.medium "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + new.block + format.btitle add.doi add.medium "title" output.check + author empty$ + { organization empty$ + { + address new.block.checka + address output + } + 'skip$ + if$ + } + { + organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.title add.medium output + howpublished new.block.checka + howpublished output + new.block + format.date "year" output.check + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + editor.organization.after + new.block + format.date "year" output.check + new.block + note "note" output.check + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {online} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.title add.doi add.medium "title" output.check + howpublished new.dblslash.checka + howpublished enclose.square.brackets output + editor.organization.after + new.sentence + new.block + output.address.publisher + format.date output + new.block + output.eprint.url + new.sentence + note output + format.annote output + fin.entry +} + +FUNCTION {internet} {online} +FUNCTION {www} {online} +FUNCTION {webpage} {online} +FUNCTION {electronic} {online} +FUNCTION {thesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + type "type" output.check + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +%% format.techrep.type.number output.nonnull +%% format.url output +FUNCTION {report} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + new.column + type "type" output.check + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.phdthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {masterthesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.mthesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {dscithesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle add.doi add.medium "title" output.check + new.column + bbl.dscithesis format.thesis.type output.nonnull + new.column + number output + new.slash + format.authors.after output + new.semicolumn + school "school" output.check + new.block + output.address.publisher + format.date "year" output.check + new.block + format.pages.page output + new.block + note output + new.sentence + output.eprint.url + format.annote output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +%% format.url output + +FUNCTION {techreport} +{ + output.bibitem + format.title add.doi add.medium "title" output.check + new.column + format.techreport.type output + new.column + number output + new.slash + institution "institution" output.check + new.semicolumn + format.chief.after output % from editor field + new.semicolumn + format.executor.after output % from author field + new.block + address output + new.column + organization output + format.date "year" output.check + new.block % v.2 + format.pages.page output % v.2 + new.sentence % или new.block ? + output.eprint.url + new.block + note output + format.annote output + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"\bbljan{}"} +MACRO {feb} {"\bblfeb{}"} +MACRO {mar} {"\bblmar{}"} +MACRO {apr} {"\bblapr{}"} +MACRO {may} {"\bblmay{}"} +MACRO {jun} {"\bbljun{}"} +MACRO {jul} {"\bbljul{}"} +MACRO {aug} {"\bblaug{}"} +MACRO {sep} {"\bblsep{}"} +MACRO {oct} {"\bbloct{}"} +MACRO {nov} {"\bblnov{}"} +MACRO {dec} {"\bbldec{}"} + + +MACRO {aa}{"Astron. \& Astrophys."} +MACRO {aasup}{"Astron. \& Astrophys. Suppl. Ser."} +MACRO {aj} {"Astron. J."} +MACRO {aph} {"Acta Phys."} +MACRO {advp} {"Adv. Phys."} +MACRO {ajp} {"Amer. J. Phys."} +MACRO {ajm} {"Amer. J. Math."} +MACRO {amsci} {"Amer. Sci."} +MACRO {anofd} {"Ann. Fluid Dyn."} +MACRO {am} {"Ann. Math."} +MACRO {ap} {"Ann. Phys. (NY)"} +MACRO {adp} {"Ann. Phys. (Leipzig)"} +MACRO {ao} {"Appl. Opt."} +MACRO {apl} {"Appl. Phys. Lett."} +MACRO {app} {"Astroparticle Phys."} +MACRO {apj} {"Astrophys. J."} +MACRO {apjsup} {"Astrophys. J. Suppl."} +MACRO {apss} {"Astrophys. Space Sci."} +MACRO {araa} {"Ann. Rev. Astron. Astrophys."} +MACRO {baas} {"Bull. Amer. Astron. Soc."} +MACRO {baps} {"Bull. Amer. Phys. Soc."} +MACRO {cmp} {"Comm. Math. Phys."} +MACRO {cpam} {"Commun. Pure Appl. Math."} +MACRO {cppcf} {"Comm. Plasma Phys. \& Controlled Fusion"} +MACRO {cpc} {"Comp. Phys. Comm."} +MACRO {cqg} {"Class. Quant. Grav."} +MACRO {cra} {"C. R. Acad. Sci. A"} +MACRO {fed} {"Fusion Eng. \& Design"} +MACRO {ft} {"Fusion Tech."} +MACRO {grg} {"Gen. Relativ. Gravit."} +MACRO {ieeens} {"IEEE Trans. Nucl. Sci."} +MACRO {ieeeps} {"IEEE Trans. Plasma Sci."} +MACRO {ijimw} {"Interntl. J. Infrared \& Millimeter Waves"} +MACRO {ip} {"Infrared Phys."} +MACRO {irp} {"Infrared Phys."} +MACRO {jap} {"J. Appl. Phys."} +MACRO {jasa} {"J. Acoust. Soc. America"} +MACRO {jcp} {"J. Comp. Phys."} +MACRO {jchp} {"J. Chem. Phys."} +MACRO {jetp} {"Sov. Phys.--JETP"} +MACRO {jfe} {"J. Fusion Energy"} +MACRO {jfm} {"J. Fluid Mech."} +MACRO {jmp} {"J. Math. Phys."} +MACRO {jne} {"J. Nucl. Energy"} +MACRO {jnec} {"J. Nucl. Energy, C: Plasma Phys., Accelerators, Thermonucl. Res."} +MACRO {jnm} {"J. Nucl. Mat."} +MACRO {jpc} {"J. Phys. Chem."} +MACRO {jpp} {"J. Plasma Phys."} +MACRO {jpsj} {"J. Phys. Soc. Japan"} +MACRO {jsi} {"J. Sci. Instrum."} +MACRO {jvst} {"J. Vac. Sci. \& Tech."} +MACRO {nat} {"Nature"} +MACRO {nature} {"Nature"} +MACRO {nedf} {"Nucl. Eng. \& Design/Fusion"} +MACRO {nf} {"Nucl. Fusion"} +MACRO {nim} {"Nucl. Inst. \& Meth."} +MACRO {nimpr} {"Nucl. Inst. \& Meth. in Phys. Res."} +MACRO {np} {"Nucl. Phys."} +MACRO {npb} {"Nucl. Phys. B"} +MACRO {nt/f} {"Nucl. Tech./Fusion"} +MACRO {npbpc} {"Nucl. Phys. B (Proc. Suppl.)"} +MACRO {inc} {"Nuovo Cimento"} +MACRO {nc} {"Nuovo Cimento"} +MACRO {pf} {"Phys. Fluids"} +MACRO {pfa} {"Phys. Fluids A: Fluid Dyn."} +MACRO {pfb} {"Phys. Fluids B: Plasma Phys."} +MACRO {pl} {"Phys. Lett."} +MACRO {pla} {"Phys. Lett. A"} +MACRO {plb} {"Phys. Lett. B"} +MACRO {prep} {"Phys. Rep."} +MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"} +MACRO {pp} {"Phys. Plasmas"} +MACRO {ppcf} {"Plasma Phys. \& Controlled Fusion"} +MACRO {phitrsl} {"Philos. Trans. Roy. Soc. London"} +MACRO {prl} {"Phys. Rev. Lett."} +MACRO {pr} {"Phys. Rev."} +MACRO {physrev} {"Phys. Rev."} +MACRO {pra} {"Phys. Rev. A"} +MACRO {prb} {"Phys. Rev. B"} +MACRO {prc} {"Phys. Rev. C"} +MACRO {prd} {"Phys. Rev. D"} +MACRO {pre} {"Phys. Rev. E"} +MACRO {ps} {"Phys. Scripta"} +MACRO {procrsl} {"Proc. Roy. Soc. London"} +MACRO {rmp} {"Rev. Mod. Phys."} +MACRO {rsi} {"Rev. Sci. Inst."} +MACRO {science} {"Science"} +MACRO {sciam} {"Sci. Am."} +MACRO {sam} {"Stud. Appl. Math."} +MACRO {sjpp} {"Sov. J. Plasma Phys."} +MACRO {spd} {"Sov. Phys.--Doklady"} +MACRO {sptp} {"Sov. Phys.--Tech. Phys."} +MACRO {spu} {"Sov. Phys.--Uspekhi"} +MACRO {st} {"Sky and Telesc."} + +MACRO {appopt} {"Appl. Opt."} +MACRO {bell} {"Bell Syst. Tech. J."} +MACRO {ell} {"Electron. Lett."} +MACRO {jasp} {"J. Appl. Spectr."} +MACRO {jqe} {"IEEE J. Quantum Electron."} +MACRO {jlwt} {"J. Lightwave Technol."} +MACRO {jmo} {"J. Mod. Opt."} +MACRO {josa} {"J. Opt. Soc. America"} +MACRO {josaa} {"J. Opt. Soc. Amer.~A"} +MACRO {josab} {"J. Opt. Soc. Amer.~B"} +MACRO {jdp} {"J. Phys. (Paris)"} +MACRO {oc} {"Opt. Commun."} +MACRO {ol} {"Opt. Lett."} +MACRO {os} {"Opt. Spectrosc."} +MACRO {phtl} {"IEEE Photon. Technol. Lett."} +MACRO {pspie} {"Proc. Soc. Photo-Opt. Instrum. Eng."} +MACRO {sjot} {"Sov. J. Opt. Technol."} +MACRO {sjqe} {"Sov. J. Quantum Electron."} +MACRO {sleb} {"Sov. Phys.--Leb. Inst. Rep."} +MACRO {stph} {"Sov. Phys.--Techn. Phys."} +MACRO {stphl} {"Sov. Techn. Phys. Lett."} +MACRO {vr} {"Vision Res."} +MACRO {zph} {"Z. f. Physik"} +MACRO {zphb} {"Z. f. Physik~B"} +MACRO {zphd} {"Z. f. Physik~D"} +MACRO {sse} {"Solid-State Electron."} +MACRO {pss} {"Phys. Sol. State"} +MACRO {sst} {"Semicond. Sci. Tech."} +MACRO {nl} {"Nano Lett."} + +READ + + +FUNCTION {sortify} +{ purify$ +} + +%% ===================================== +%% This version from old Gost package +%%<*!natbib> +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { nameptr #1 > + { " " * } + 'skip$ + if$ + s nameptr + "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" + format.name$ 't := + nameptr numnames = t "others" = and + { "et al" * } + %{ bbl.etal * } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} +%% +%% This version from plainnat.bst +%% It ignores second and subsequent authors but include year. +%%<*natbib> +%% +%% ===================================== + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word % Removes "The " if any + chop.word % Removes "An " if any + chop.word % Removes "A " if any + sortify + #1 global.max$ substring$ +} + +%% ===================================== +%% This version from old gost package. +%% +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { + author num.names$ #4 < + {author sort.format.names } + {title sort.format.title} + if$ + } + if$ +} +%% This version from plainnat.bst +%% ===================================== + +FUNCTION {author.title.sort} +{ author empty$ + { title empty$ + { key empty$ + { "to sort, need author, title, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { title sort.format.title } + if$ + } + { + author num.names$ #4 < + {author sort.format.names } + {title sort.format.title} + if$ + } + if$ +} + +FUNCTION {presort}%#1 +{ + author.title.sort + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + + +ITERATE {presort} + +SORT + + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +EXECUTE {initialize.longest.label} + +FUNCTION {forward.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +ITERATE {forward.pass} + + +FUNCTION {begin.bib} +{ "\begin{thebibliography}{" longest.label * "}" * write$ newline$ + "\def\selectlanguageifdefined#1{" write$ newline$ + "\expandafter\ifx\csname date#1\endcsname\relax" write$ newline$ + "\else\selectlanguage{#1}\fi}" write$ newline$ + "\providecommand*{\href}[2]{{\small #2}}" write$ newline$ + "\providecommand*{\url}[1]{{\small #1}}" write$ newline$ + "\providecommand*{\BibUrl}[1]{\url{#1}}" write$ newline$ + "\providecommand{\BibAnnote}[1]{}" write$ newline$ + "\providecommand*{\BibEmph}[1]{#1}" write$ newline$ + "\ProvideTextCommandDefault{\cyrdash}{\hbox to.8em{--\hss--}}" write$ newline$ + "\providecommand*{\BibDash}{\ifdim\lastskip>0pt\unskip\nobreak\hskip.2em\fi" write$ newline$ + "\cyrdash\hskip.2em\ignorespaces}" write$ newline$ + preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} + +%% +%% End of file `ugost2008s.bst'. diff --git a/BibTeX-Styles/utf8gost705u.bst b/BibTeX-Styles/utf8gost705u.bst new file mode 100644 index 0000000..99e8cf3 --- /dev/null +++ b/BibTeX-Styles/utf8gost705u.bst @@ -0,0 +1,1531 @@ +%% This bibliography style attempts +%% to format bibliography according to +%% GOST 7.0.5-2008 +%% +%% Package version - 1.2 +%% +%%version history +%%1.0 базовая версия +%%1.1 поправлена ошибка с полем page (при ненулевом numpages) из одной цифры (c. 319). Теперь - C. 319 +%%1.2 поправлен баг, решена проблема с bibentry. В конце каждой записи ставится пустая группа: {}. Строки 145--149 кода +%% +%% For the Ukrainian|English bibliographic entries +%% you need to create field +%% language = {ukrainian|english}. +%% Default language is Russian. +%% Field numpages for books must contain number of pages. +%% +%% See examples in test.pdf and samples.pdf +%% +%% You can send your questions and comments to e-mail: tex_support@uniyar.ac.ru +%% + +ENTRY + { address + annote + author + booktitle + bookauthor + chapter + edition + editor + compiler + howpublished + institution + journal + key + month + note + number + organization + pages + numpages + publisher + school + series + title + type + volume + year + language + booklanguage + url + } + {} + { label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block +after.dblslash after.slash after.column after.semicolumn} + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + #4 'after.dblslash := + #5 'after.slash := + #6 'after.column := + #7 'after.semicolumn := +} + +STRINGS { s t } + +STRINGS { curlanguage } + +FUNCTION {change.language} +{ booklanguage empty$ + {""} + {booklanguage 'curlanguage := + "\selectlanguageifdefined{" + curlanguage * + "}" * + } + if$ +} + +%% Разделители +FUNCTION {output.nonnull} +%%%{ 's := +{ swap$ + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + " " " " * write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.dblslash = + { "~//" * change.language * " " * write$ } + { output.state after.slash = + { "~/ " * write$ } + { output.state after.column = + { ": " * write$ } + { output.state after.semicolumn = + { "; " * write$ } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ +%%% s +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +%% Проверка наличия содержания +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ +%% вставляем пустую группу в конце. вер.1.2 %%%%%%%%%%%%%%%%%%%%%% + after.sentence 'output.state := + "{}" + write$ +%% конец вставки %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + newline$ +} + +%% Смена состояний + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.dblslash} +{ output.state before.all = + 'skip$ + { after.dblslash 'output.state := } + if$ +} + +FUNCTION {new.slash} +{ output.state before.all = + 'skip$ + { after.slash 'output.state := } + if$ +} + +FUNCTION {new.column} +{ output.state before.all = + 'skip$ + { after.column 'output.state := } + if$ +} + +FUNCTION {new.semicolumn} +{ output.state before.all = + 'skip$ + { after.semicolumn 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} +%% --------- + +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +%% Логические операции + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +%% --------- + + +FUNCTION {non.stop} +{ duplicate$ + "}" * add.period$ + #-1 #1 substring$ "." = +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +%% Выделение \emph +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\BibEmph{" swap$ * "}" * } + if$ +} + +FUNCTION {space.word} +{ " " swap$ * " " * } + +%% Сокращения для разных языков +%% Русские версии поправлены (не все). Убраны заглавные буквы +FUNCTION {bbl.edby} % { "\bbledby{}" } +{ curlanguage "english" = + {"Ed. by "} + { curlanguage "ukrainian" = + {"{Під ред. }"} + { curlanguage "russian" = + {"{под ред. }"} %%%%%%%%%%%%%%%% правлено + {"language is not defined: " language "edited by" * * warning$ "edited by"} + if$} + if$} + if$ +} + +FUNCTION {bbl.cmplr} +{ curlanguage "english" = + {"Compiler "} + { curlanguage "ukrainian" = + {"{Укл. }"} + { curlanguage "russian" = + {"{сост. }"} %%%%%%%%%%%%%%%% правлено + {"language is not defined: " language "compiler" * * warning$ "compiler"} + if$} + if$} + if$ +} + +FUNCTION {bbl.edition} % { "\bbledition{}" } +{ curlanguage "english" = + {"edition"} + { curlanguage "ukrainian" = + {"{вид.}"} + { curlanguage "russian" = + {"{изд.}"} + {"language is not defined: " language "edition" * * warning$ "edition"} + if$} + if$} + if$ +} + +FUNCTION {bbl.vvolume} % { "\bblVolume{}" } +{ curlanguage "english" = + {"Volume"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Том"} + {"language is not defined: " language "Volume" * * warning$ "Volume"} + if$} + if$ +} + +FUNCTION {bbl.vvol} % { "\bblVol{}" } +{ curlanguage "english" = + {"Vol."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Т."} + {"language is not defined: " language "Vol." * * warning$ "Vol."} + if$} + if$ +} + +FUNCTION {bbl.iissue} % { "\bblIssue{}" } +{ curlanguage "english" = + {"Issue"} + { curlanguage "ukrainian" = + {"Випуск"} + { curlanguage "russian" = + {"Выпуск"} + {"language is not defined: " language * warning$ "Issue"} + if$} + if$} + if$ +} + +FUNCTION {bbl.iiss} % { "\bblIss{}" } +{ curlanguage "english" = + {"Iss."} + { curlanguage "ukrainian" = + {"Вип."} + { curlanguage "russian" = + {"Вып."} + {"language is not defined: " language * warning$ "Issue"} + if$} + if$} + if$ +} + +FUNCTION {bbl.of} % { "\bblof{}" } +{ curlanguage "english" = + {"of"} + { curlanguage "ukrainian" = + {"{із}"} + { curlanguage "russian" = + {"{из}"} + {"language is not defined: " language "of" * * warning$ "of"} + if$} + if$} + if$ +} + +FUNCTION {bbl.etal} % { "\bblof{}" } +{ curlanguage "english" = + {"et~al."} + { curlanguage "ukrainian" = + {"{та~ін.}"} + { curlanguage "russian" = + {"{[и~др.]}"} + {"language is not defined: " language "at al" * * warning$ "at al."} + if$} + if$} + if$ +} + +FUNCTION {bbl.nnumber} % { "\bblNumber{}" } +{ curlanguage "english" = + {"Number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Номер"} + {"language is not defined: " language "Number" * * warning$ "Number"} + if$} + if$ +} + +FUNCTION {bbl.number} % { "\bblnumber{}" } +{ curlanguage "english" = + {"number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{номер}"} + {"language is not defined: " language "number" * * warning$ "number"} + if$} + if$ +} + +FUNCTION {bbl.nr} % { "\bblno{}" } +{ curlanguage "english" = + {"no."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{№}"} + {"language is not defined: " language "no." * * warning$ "no."} + if$} + if$ +} + +FUNCTION {bbl.nnr} % { "\bblno{}" } +{ curlanguage "english" = + {"No."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{№}"} + {"language is not defined: " language "No." * * warning$ "No."} + if$} + if$ +} + +FUNCTION {bbl.in} % { "\bblin{}" } +{ curlanguage "english" = + {"in"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{в}"} + {"language is not defined: " language "in" * * warning$ "in"} + if$} + if$ +} + +FUNCTION {bbl.iin} % { "\bblIn{}" } +{ curlanguage "english" = + {"In"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"В"} + {"language is not defined: " language "In" * * warning$ "In"} + if$} + if$ +} +%% Поле page - номер страницы или диапазон, поле numpage - количество страниц +FUNCTION {bbl.pages} % { "\bblpp." } +{ curlanguage "english" = + {"pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{C.}"} %%правлено + {"language is not defined: " language "pp." * * warning$ "pp."} + if$} + if$ +} + +FUNCTION {bbl.page} % { "\bblp." % +{ curlanguage "english" = + {"p."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + {"language is not defined: " language "p." * * warning$ "p."} + if$} + if$ +} + +FUNCTION {bbl.ppages}% { "\bblPp." } +{ curlanguage "english" = + {"pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + {"language is not defined: " language "pp." * * warning$ "pp."} + if$} + if$ +} + +FUNCTION {bbl.ppage} % { "\bblP." } +{ curlanguage "english" = + {"P."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + {"language is not defined: " language "P." * * warning$ "P."} + if$} + if$ +} + + +FUNCTION {bbl.techrep} { "Tech. Rep." } +FUNCTION {bbl.mthesis} { "Master's thesis" } +FUNCTION {bbl.phdthesis} { "Ph.D. thesis" } + +%% ----- + + +INTEGERS { nameptr namesleft numnames } + +%% Запись имен в прямом порядке: Фамилия И.О. +%% У английских имен сокращает Имя до И. (у остальный вствляет как есть) +FUNCTION {format.names} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + curlanguage "ukrainian" = curlanguage "russian" = or + { "{vv~}{ll}{~jj}{~ff}" format.name$ 't := } + { curlanguage "english" = + { "{vv~}{ll}{~jj}{~f.}" format.name$ 't := } + { "language is not defined: " language "{vv~}{ll}{~jj}{~ff}" * * warning$ "{vv~}{ll}{~jj}{~ff}" } + if$} + if$ + nameptr #1 > + { + nameptr #4 = + numnames #3 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { + t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +%% Запись имен в обратном порядке И.О. Фамилия +%% У английских имен сокращает Имя до И. (у остальный вствляет как есть) +FUNCTION {format.names.rev} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + curlanguage "ukrainian" = curlanguage "russian" = or + { "{ff}{~vv}{~ll}{, jj}" format.name$ 't := } + { curlanguage "english" = + { "{f.}{~vv}{~ll}{, jj}" format.name$ 't := } + { "language is not defined: " language "{ff}{~vv}{~ll}{, jj}" * * warning$ "{ff}{~vv}{~ll}{, jj}" } + if$} + if$ + + nameptr #1 > + { + nameptr #4 = + numnames #3 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { + t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names} + if$ +} + +FUNCTION {format.bookauthors} +{ bookauthor empty$ + { "" } + { bookauthor format.names} + if$ +} + +FUNCTION {format.authors.after} +{ author empty$ + { "" } + { author format.names.rev} + if$ +} + +FUNCTION {format.bookauthors.after} +{ bookauthor empty$ + { "" } + { bookauthor format.names.rev} + if$ +} + +FUNCTION {format.editors.after} +{ editor empty$ + { "" } + { bbl.edby editor format.names.rev * + } + if$ +} + +FUNCTION {format.compiler.after} +{ compiler empty$ + { "" } + { bbl.cmplr compiler format.names.rev * + } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title + } + if$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { year ". " " " month * * * } %%%%%%%%правлено + if$ + } + if$ +} + +FUNCTION {output.address.publisher.date} +{ + address empty$ + 'skip$ + { address output + publisher empty$ + 'skip$ + { new.column + } + if$ + } + if$ + publisher output + format.date output +} + +%% Начало bibitem'а +FUNCTION {output.bibitem} +{ newline$ + "\bibitem{" write$ + cite$ write$ + "}" write$ + newline$ + language empty$ + {"russian" 'curlanguage :=}%%%%%%%% правлено + {language 'curlanguage :=} + if$ + "\selectlanguageifdefined{" write$ + curlanguage write$ + "}" write$ newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.iin + " " * } + +FUNCTION {format.btitle} +{ title +} + +%% Вставка липкого пробела у коротких слов +%% Один или два символа - ставит неразрывный пробел, три и больше - пробел +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {tie.connect} + {"~" + swap$ * * + } + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.connect + series empty$ + 'skip$ + { bbl.of space.word * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { "there's a number but no series in " cite$ * warning$ + bbl.nnr } + { + %new.dblslash + new.sentence + series + bbl.nr + tie.or.space.connect} + if$ + number tie.or.space.connect + } + if$ + } + { "" } + if$ +} + +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + + +FUNCTION {convert.edition} +{ edition +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { convert.edition " " * bbl.edition * } + { convert.edition " " * bbl.edition * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages}%%%%Поправлено (P вместо pp и p вместо pp) +{ pages empty$ + { "" } + { pages multi.page.check + { bbl.ppage pages n.dashify tie.connect } +% { bbl.page pages tie.connect } % поправлено 16.3.2012 + { bbl.ppage pages tie.connect } % поправлено 16.3.2012 + if$ + } + if$ +} + +FUNCTION {format.pages.page}%%%%Поправлено (P вместо pp и p вместо pp) +{ pages empty$ + { numpages empty$ + { "" } + { numpages bbl.page tie.connect } + if$} + { format.pages} + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { + ", no." number tie.or.space.connect * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ": " * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.volume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.or.space.connect } + if$ +} + +FUNCTION {format.number} +{ number empty$ + { "" } + { bbl.nr number tie.connect } %%%% правлено + if$ +} + + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type + } + if$ +} + +FUNCTION {format.tr.number}% выводим TYPE и NUMBER +{ type empty$ + { bbl.techrep } + 'type + if$ + number empty$ + { "" } + { number tie.or.space.connect } + if$ +} + +FUNCTION {format.tr.number1}% выводим только TYPE. Добавлено +{ type empty$ + { bbl.techrep } + 'type + if$ +} + +FUNCTION {format.tr.number2}% выводим только NUMBER. Добавлено +{ number empty$ + { "" } + { number } + if$ +} + + +FUNCTION {author.before} +{ + author empty$ + 'skip$ + {author num.names$ #4 < + {format.authors output + new.sentence} + 'skip$ + if$} + if$ +} + +FUNCTION {bookauthor.before} +{ + bookauthor empty$ + 'skip$ + {bookauthor num.names$ #4 < + {format.bookauthors output + new.sentence} + 'skip$ + if$} + if$ +} + + +FUNCTION {author.after} +{ + author empty$ + 'skip$ + {author num.names$ #3 > + {format.authors.after output + new.semicolumn } + 'skip$ + if$} + if$ +} +FUNCTION {bookauthor.after} +{ + bookauthor empty$ + 'skip$ + {bookauthor num.names$ #3 > + {format.bookauthors.after output + new.semicolumn } + 'skip$ + if$} + if$ +} + +FUNCTION {editor.organization.after} +{ + compiler empty$ + {} + { format.compiler.after output + new.semicolumn + } + if$ + editor empty$ + {} + { format.editors.after output + new.semicolumn + } + if$ + organization empty$ + {} + {organization output + new.semicolumn + } + if$ +} + +FUNCTION {format.url} +{ url empty$ + { "" } + { after.sentence 'output.state := + "URL: " url * "" * + } + if$ +} + +FUNCTION {format.annote} +{ annote empty$ + { "" } +{ after.sentence 'output.state := + "\BibAnnote{" annote * "}" * +} + if$ +} + +FUNCTION {format.annoteurl} %%%%%%%% правлено +{ annote empty$ url empty$ or + { "" } +{ after.sentence 'output.state := + "URL:" "~" * url * " " * "\BibAnnote{" * annote * "}" * +} + if$ +} + +FUNCTION {article} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + new.dblslash +%%journal emphasize "journal" output.check%% правлено + journal "journal" output.check + new.block + address output %%%%%%%% добавлено + format.date output + new.block + format.volume output + format.number output + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {book} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + editor.organization.after + new.sentence + format.number.series output + new.block + format.edition output + new.block + output.address.publisher.date + new.block + format.bvolume output + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + author.before + format.title "title" output.check + new.slash + author.after + editor.organization.after + %%%%new.block%%%%%%%%%%убрано + new.column%%%%%%%%%%%%%добавлено + howpublished output + new.block%%%%%%%%%%%%%%добавлено + address output + format.date output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + new.dblslash + bookauthor.before + booktitle "booktitle" output.check + new.slash + bookauthor.after + editor.organization.after + new.block + format.edition output + new.block + format.number.series output + new.sentence + output.address.publisher.date + new.block + format.bvolume output + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + author.before + new.sentence + format.btitle "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + format.number.series output%%%%%%%%%%%%%%%%%добавлено + new.block%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%добавлено + output.address.publisher.date + new.block + format.bvolume output + %format.number.series output%%%%%%%%%%%%%%%%%переставлено + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + author.before + new.sentence + format.title "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + new.block + address empty$ + { publisher output + format.date "year" output.check + } + { address output.nonnull + new.column + publisher output + format.date "year" output.check + } + if$ + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + new.block + format.btitle "title" output.check + new.block %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%вставлено + author empty$ + { organization empty$ + { + address new.block.checka + address output + } + 'skip$ + if$ + } + { + organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + new.block%%%%%%%%%%%%%%%%%%%%%%%%%%вставлено + format.date output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" output.check + new.block + format.btitle "title" output.check + %new.block%%%%%%%%%закомментировано + new.column%%%%%%%%%добавлено + bbl.mthesis format.thesis.type output.nonnull + new.column%%%%%%%%%%%%%%%добавлено + school "school" output.check + new.block%%%%%%%%добавлено + address output + format.date "year" output.check + new.block + note output + new.block + format.url output + format.annote output + fin.entry +} + +FUNCTION {electronic} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.btitle output + howpublished new.block.checka + howpublished output + new.block + format.date output + new.block + note output + new.sentence + format.annoteurl output %%%%%%% правлено + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.btitle output + howpublished new.block.checka + howpublished output + new.block + format.date output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle "title" output.check + %new.column + new.sentence + bbl.phdthesis format.thesis.type output.nonnull + %new.slash%%%%%%%%%%%%%%%%%%закомментировано + new.column%%%%%%%%%%%%%%%%добавлено + school "school" output.check + new.block + output.address.publisher.date + new.block + format.pages.page output + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + format.btitle "title" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + address empty$ + { publisher output + format.date "year" output.check + } + { address output.nonnull + %format.date "year" output.check%%%%%%%%%%%%%%было + %new.sentence + %publisher output + new.column%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%стало + publisher output + format.date "year" output.check + } + if$ + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + author.before + new.sentence + format.title "title" output.check + new.column %%%%раскомментарено + %new.sentence %%%%закомментарено + %format.tr.number output.nonnull%%% заменено на отдельный вывод типа и номера + format.tr.number1 output.nonnull + new.column + format.tr.number2 output.nonnull%%% конец вставки + new.slash + author.after + editor.organization.after + new.block + address output + new.column + institution "institution" output.check + format.date "year" output.check + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + editor.organization.after + new.block + note "note" output.check + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"\bbljan{}"} + +MACRO {feb} {"\bblfeb{}"} + +MACRO {mar} {"\bblmar{}"} + +MACRO {apr} {"\bblapr{}"} + +MACRO {may} {"\bblmay{}"} + +MACRO {jun} {"\bbljun{}"} + +MACRO {jul} {"\bbljul{}"} + +MACRO {aug} {"\bblaug{}"} + +MACRO {sep} {"\bblsep{}"} + +MACRO {oct} {"\bbloct{}"} + +MACRO {nov} {"\bblnov{}"} + +MACRO {dec} {"\bbldec{}"} + +MACRO {acmcs} {"ACM Computing Surveys"} + +MACRO {acta} {"Acta Informatica"} + +MACRO {cacm} {"Communications of the ACM"} + +MACRO {ibmjrd} {"IBM Journal of Research and Development"} + +MACRO {ibmsj} {"IBM Systems Journal"} + +MACRO {ieeese} {"IEEE Transactions on Software Engineering"} + +MACRO {ieeetc} {"IEEE Transactions on Computers"} + +MACRO {ieeetcad} + {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} + +MACRO {ipl} {"Information Processing Letters"} + +MACRO {jacm} {"Journal of the ACM"} + +MACRO {jcss} {"Journal of Computer and System Sciences"} + +MACRO {scp} {"Science of Computer Programming"} + +MACRO {sicomp} {"SIAM Journal on Computing"} + +MACRO {tocs} {"ACM Transactions on Computer Systems"} + +MACRO {tods} {"ACM Transactions on Database Systems"} + +MACRO {tog} {"ACM Transactions on Graphics"} + +MACRO {toms} {"ACM Transactions on Mathematical Software"} + +MACRO {toois} {"ACM Transactions on Office Information Systems"} + +MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} + +MACRO {tcs} {"Theoretical Computer Science"} + +READ + + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +FUNCTION {longest.label.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +EXECUTE {initialize.longest.label} + +ITERATE {longest.label.pass} + +FUNCTION {begin.bib} +{ "\begin{thebibliography}{" longest.label * "}" * write$ newline$ + "\def\selectlanguageifdefined#1{" write$ newline$ + "\expandafter\ifx\csname date#1\endcsname\relax" write$ newline$ + "\else\language\csname l@#1\endcsname\fi}" write$ newline$ + "\ifx\undefined\url\def\url#1{{\small #1}}\else\fi" write$ newline$ + "\ifx\undefined\BibUrl\def\BibUrl#1{\url{#1}}\else\fi" write$ newline$ + "\ifx\undefined\BibAnnote\long\def\BibAnnote#1{(#1)}\else\fi" write$ newline$ + "\ifx\undefined\BibEmph\def\BibEmph#1{\emph{#1}}\else\fi" write$ newline$ + preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} + +%% +%% End of file `utf8gost705u.bst'. diff --git a/BibTeX-Styles/utf8gost71s.bst b/BibTeX-Styles/utf8gost71s.bst new file mode 100644 index 0000000..ff49dca --- /dev/null +++ b/BibTeX-Styles/utf8gost71s.bst @@ -0,0 +1,1576 @@ +%% +%% This is file `utf8gost71s.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% utf8gost.dtx (with options: `utf8gost71s') +%% +%% Copyright 1996-2005 Maksym Polyakov. +%% Version 2005.08.12 +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.2 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% Please, send bug reports via e-mail: +%% polyama at auburn dot edu +%% +%% 2005.08.12 Bug fix (long annote) +%% +%% 2003.06.06 contributions by Konstantin Vorontsov: +%% New ENTRY "annote" added for output annotations. +%% New commands BibUrl, BibAnnote added for customize urls and annotations. +%% +%% 2003.08.10 +%% New command BibEmph added for customize emphasizing. +%% +%% 2003.10.07 +%% Some bug fixes in names and date formatting. +%% +%% 2003.10.07 +%% Bug fix in INPROCEEDINGS. +%% +%% +%% This bibliography style attempts +%% to format bibliography according to +%% GOST 7.1-84 vd970321 +%% +%% For the Ukrainian|Russian bibliographic entries +%% you need to create field +%% language = {ukrainian|russian}. +%% Default language is English. +%% Field numpages for books must contain number of pages. +%% Optional field url will format url (using hyperref, if loaded). +%% +%% See examples in gost71.pdf and gost780.pdf +%% +%% Requires 8-bit bibtex with switch -B and csf file supporting cyrillic. +%% bibtex8 -B -c .csf +%% + +ENTRY + { address + annote + author + booktitle + bookauthor + chapter + edition + editor + compiler + howpublished + institution + journal + key + month + note + number + organization + pages + numpages + publisher + school + series + title + type + volume + year + language + booklanguage + url + } + {} + { label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block +after.dblslash after.slash after.column after.semicolumn} + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + #4 'after.dblslash := + #5 'after.slash := + #6 'after.column := + #7 'after.semicolumn := +} + +STRINGS { s t } + +STRINGS { curlanguage } + +FUNCTION {change.language} +{ booklanguage empty$ + {""} + {booklanguage 'curlanguage := + "\selectlanguageifdefined{" + curlanguage * + "}" * + } + if$ +} + +FUNCTION {output.nonnull} +%%%{ 's := +{ swap$ + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + " " "--- " * write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.dblslash = + { "~//" * change.language * " " * write$ } + { output.state after.slash = + { "~/ " * write$ } + { output.state after.column = + { ": " * write$ } + { output.state after.semicolumn = + { "; " * write$ } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ +%%% s +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.dblslash} +{ output.state before.all = + 'skip$ + { after.dblslash 'output.state := } + if$ +} + +FUNCTION {new.slash} +{ output.state before.all = + 'skip$ + { after.slash 'output.state := } + if$ +} + +FUNCTION {new.column} +{ output.state before.all = + 'skip$ + { after.column 'output.state := } + if$ +} + +FUNCTION {new.semicolumn} +{ output.state before.all = + 'skip$ + { after.semicolumn 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +FUNCTION {non.stop} +{ duplicate$ + "}" * add.period$ + #-1 #1 substring$ "." = +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\BibEmph{" swap$ * "}" * } + if$ +} + +FUNCTION {space.word} +{ " " swap$ * " " * } + +FUNCTION {bbl.edby} % { "\bbledby{}" } +{ curlanguage "english" = + {"Ed. by "} + { curlanguage "ukrainian" = + {"{Під ред. }"} + { curlanguage "russian" = + {"{Под ред. }"} + {"language is not defined: " language "edited by" * * warning$ "edited by"} + if$} + if$} + if$ +} + +FUNCTION {bbl.cmplr} +{ curlanguage "english" = + {"Compiler "} + { curlanguage "ukrainian" = + {"{Укл. }"} + { curlanguage "russian" = + {"{Сост. }"} + {"language is not defined: " language "compiler" * * warning$ "compiler"} + if$} + if$} + if$ +} + +FUNCTION {bbl.edition} % { "\bbledition{}" } +{ curlanguage "english" = + {"edition"} + { curlanguage "ukrainian" = + {"{вид.}"} + { curlanguage "russian" = + {"{изд.}"} + {"language is not defined: " language "edition" * * warning$ "edition"} + if$} + if$} + if$ +} + +FUNCTION {bbl.vvolume} % { "\bblVolume{}" } +{ curlanguage "english" = + {"Volume"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Том"} + {"language is not defined: " language "Volume" * * warning$ "Volume"} + if$} + if$ +} + +FUNCTION {bbl.vvol} % { "\bblVol{}" } +{ curlanguage "english" = + {"Vol."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Т."} + {"language is not defined: " language "Vol." * * warning$ "Vol."} + if$} + if$ +} + +FUNCTION {bbl.iissue} % { "\bblIssue{}" } +{ curlanguage "english" = + {"Issue"} + { curlanguage "ukrainian" = + {"Випуск"} + { curlanguage "russian" = + {"Выпуск"} + {"language is not defined: " language * warning$ "Issue"} + if$} + if$} + if$ +} + +FUNCTION {bbl.iiss} % { "\bblIss{}" } +{ curlanguage "english" = + {"Iss."} + { curlanguage "ukrainian" = + {"Вип."} + { curlanguage "russian" = + {"Вып."} + {"language is not defined: " language * warning$ "Issue"} + if$} + if$} + if$ +} + +FUNCTION {bbl.of} % { "\bblof{}" } +{ curlanguage "english" = + {"of"} + { curlanguage "ukrainian" = + {"{із}"} + { curlanguage "russian" = + {"{из}"} + {"language is not defined: " language "of" * * warning$ "of"} + if$} + if$} + if$ +} + +FUNCTION {bbl.etal} % { "\bblof{}" } +{ curlanguage "english" = + {"et~al."} + { curlanguage "ukrainian" = + {"{та~ін.}"} + { curlanguage "russian" = + {"{и~др.}"} + {"language is not defined: " language "at al" * * warning$ "at al."} + if$} + if$} + if$ +} + +FUNCTION {bbl.nnumber} % { "\bblNumber{}" } +{ curlanguage "english" = + {"Number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Номер"} + {"language is not defined: " language "Number" * * warning$ "Number"} + if$} + if$ +} + +FUNCTION {bbl.number} % { "\bblnumber{}" } +{ curlanguage "english" = + {"number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{номер}"} + {"language is not defined: " language "number" * * warning$ "number"} + if$} + if$ +} + +FUNCTION {bbl.nr} % { "\bblno{}" } +{ curlanguage "english" = + {"no."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{№}"} + {"language is not defined: " language "no." * * warning$ "no."} + if$} + if$ +} + +FUNCTION {bbl.nnr} % { "\bblno{}" } +{ curlanguage "english" = + {"No."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{№}"} + {"language is not defined: " language "No." * * warning$ "No."} + if$} + if$ +} + +FUNCTION {bbl.in} % { "\bblin{}" } +{ curlanguage "english" = + {"in"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{в}"} + {"language is not defined: " language "in" * * warning$ "in"} + if$} + if$ +} + +FUNCTION {bbl.iin} % { "\bblIn{}" } +{ curlanguage "english" = + {"In"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"В"} + {"language is not defined: " language "In" * * warning$ "In"} + if$} + if$ +} + +FUNCTION {bbl.pages} % { "\bblpp." } +{ curlanguage "english" = + {"pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + {"language is not defined: " language "pp." * * warning$ "pp."} + if$} + if$ +} + +FUNCTION {bbl.page} % { "\bblp." +{ curlanguage "english" = + {"p."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + {"language is not defined: " language "p." * * warning$ "p."} + if$} + if$ +} + +FUNCTION {bbl.ppages}% { "\bblPp." } +{ curlanguage "english" = + {"Pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + {"language is not defined: " language "Pp." * * warning$ "Pp."} + if$} + if$ +} + +FUNCTION {bbl.ppage} % { "\bblP." } +{ curlanguage "english" = + {"P."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + {"language is not defined: " language "P." * * warning$ "P."} + if$} + if$ +} + + +FUNCTION {bbl.techrep} { "Tech. Rep." } +FUNCTION {bbl.mthesis} { "Master's thesis" } +FUNCTION {bbl.phdthesis} { "Ph.D. thesis" } + +INTEGERS { nameptr namesleft numnames } + + +FUNCTION {format.names} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}{~jj}{~ff}" format.name$ 't := + nameptr #1 > + { + nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { + t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + + +FUNCTION {format.names.rev} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ff}{~vv}{~ll}{, jj}" + format.name$ 't := + nameptr #1 > + { + nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { + t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names emphasize} + if$ +} + +FUNCTION {format.bookauthors} +{ bookauthor empty$ + { "" } + { bookauthor format.names} + if$ +} + +FUNCTION {format.authors.after} +{ author empty$ + { "" } + { author format.names.rev} + if$ +} + +FUNCTION {format.bookauthors.after} +{ bookauthor empty$ + { "" } + { bookauthor format.names.rev} + if$ +} + +FUNCTION {format.editors.after} +{ editor empty$ + { "" } + { bbl.edby editor format.names.rev * + } + if$ +} + +FUNCTION {format.compiler.after} +{ compiler empty$ + { "" } + { bbl.cmplr compiler format.names.rev * + } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title + } + if$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { year ". " "--- " month * * * } + if$ + } + if$ +} + +FUNCTION {output.address.publisher.date} +{ + address empty$ + 'skip$ + { address output + publisher empty$ + 'skip$ + { new.column + } + if$ + } + if$ + publisher output + format.date output +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem{" write$ + cite$ write$ + "}" write$ + newline$ + language empty$ + {"english" 'curlanguage :=} + {language 'curlanguage :=} + if$ + "\selectlanguageifdefined{" write$ + curlanguage write$ + "}" write$ newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.iin + " " * } + +FUNCTION {format.btitle} +{ title +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {tie.connect} + {"~" + swap$ * * + } + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.connect + series empty$ + 'skip$ + { bbl.of space.word * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { "there's a number but no series in " cite$ * warning$ + bbl.nnr } + { + %new.dblslash + new.sentence + series + bbl.nr + tie.or.space.connect} + if$ + number tie.or.space.connect + } + if$ + } + { "" } + if$ +} + +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + + +FUNCTION {convert.edition} +{ edition +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { convert.edition " " * bbl.edition * } + { convert.edition " " * bbl.edition * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { bbl.ppages pages n.dashify tie.connect } + { bbl.ppage pages tie.connect } + if$ + } + if$ +} + +FUNCTION {format.pages.page} +{ pages empty$ + { numpages empty$ + { "" } + { numpages bbl.pages tie.connect } + if$} + { format.pages} + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { + ", no." number tie.or.space.connect * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ": " * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.volume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.or.space.connect } + if$ +} + +FUNCTION {format.number} +{ number empty$ + { "" } + { bbl.nr number tie.or.space.connect } + if$ +} + + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type + } + if$ +} + +FUNCTION {format.tr.number} +{ type empty$ + { bbl.techrep } + 'type + if$ + number empty$ + { "" } + { number tie.or.space.connect } + if$ +} + +FUNCTION {author.before} +{ + author empty$ + 'skip$ + {author num.names$ #4 < + {format.authors output + new.sentence} + 'skip$ + if$} + if$ +} + +FUNCTION {bookauthor.before} +{ + bookauthor empty$ + 'skip$ + {bookauthor num.names$ #4 < + {format.bookauthors output + new.sentence} + 'skip$ + if$} + if$ +} + + +FUNCTION {author.after} +{ + author empty$ + 'skip$ + {author num.names$ #3 > + {format.authors.after output + new.semicolumn } + 'skip$ + if$} + if$ +} +FUNCTION {bookauthor.after} +{ + bookauthor empty$ + 'skip$ + {bookauthor num.names$ #3 > + {format.bookauthors.after output + new.semicolumn } + 'skip$ + if$} + if$ +} + +FUNCTION {editor.organization.after} +{ + compiler empty$ + {} + { format.compiler.after output + new.semicolumn + } + if$ + editor empty$ + {} + { format.editors.after output + new.semicolumn + } + if$ + organization empty$ + {} + {organization output + new.semicolumn + } + if$ +} + +FUNCTION {format.url} +{ url empty$ + { "" } + { after.sentence 'output.state := + "\BibUrl{ " url * "}" * + } + if$ +} + +FUNCTION {format.annote} +{ annote empty$ + { "" } +{ after.sentence 'output.state := + "\BibAnnote{" annote add.period$ * "}" * +} + if$ +} + +FUNCTION {article} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + new.dblslash + journal emphasize "journal" output.check + new.block + format.date output + new.block + format.volume output + format.number output + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {book} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + editor.organization.after + new.sentence + format.number.series output + new.block + format.edition output + new.block + output.address.publisher.date + new.block + format.bvolume output + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + author.before + format.title "title" output.check + new.slash + author.after + editor.organization.after + new.block + howpublished output + address output + format.date output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + new.dblslash + bookauthor.before + booktitle "booktitle" output.check + new.slash + bookauthor.after + editor.organization.after + new.block + format.edition output + new.block + format.number.series output + new.sentence + output.address.publisher.date + new.block + format.bvolume output + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + author.before + new.sentence + format.btitle "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + output.address.publisher.date + new.block + format.bvolume output + format.number.series output + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + author.before + new.sentence + format.title "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + new.block + address empty$ + { publisher output + format.date "year" output.check + } + { address output.nonnull + new.column + publisher output + format.date "year" output.check + } + if$ + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + new.block + format.btitle "title" output.check + author empty$ + { organization empty$ + { + address new.block.checka + address output + } + 'skip$ + if$ + } + { + organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + format.date output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" output.check + new.block + format.btitle "title" output.check + new.block + bbl.mthesis format.thesis.type output.nonnull + school "school" output.check + address output + format.date "year" output.check + new.block + note output + new.block + format.url output + format.annote output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.btitle output + howpublished new.block.checka + howpublished output + new.block + format.date output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle "title" output.check + new.column + bbl.phdthesis format.thesis.type output.nonnull + new.slash + school "school" output.check + new.block + output.address.publisher.date + new.block + format.pages.page output + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + format.btitle "title" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + address empty$ + { publisher output + format.date "year" output.check + } + { address output.nonnull + format.date "year" output.check + new.sentence + publisher output + } + if$ + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + author.before + new.sentence + format.title "title" output.check + new.column + format.tr.number output.nonnull + new.slash + author.after + editor.organization.after + new.block + address output + new.column + institution "institution" output.check + format.date "year" output.check + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + editor.organization.after + new.block + note "note" output.check + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"\bbljan{}"} + +MACRO {feb} {"\bblfeb{}"} + +MACRO {mar} {"\bblmar{}"} + +MACRO {apr} {"\bblapr{}"} + +MACRO {may} {"\bblmay{}"} + +MACRO {jun} {"\bbljun{}"} + +MACRO {jul} {"\bbljul{}"} + +MACRO {aug} {"\bblaug{}"} + +MACRO {sep} {"\bblsep{}"} + +MACRO {oct} {"\bbloct{}"} + +MACRO {nov} {"\bblnov{}"} + +MACRO {dec} {"\bbldec{}"} + +MACRO {acmcs} {"ACM Computing Surveys"} + +MACRO {acta} {"Acta Informatica"} + +MACRO {cacm} {"Communications of the ACM"} + +MACRO {ibmjrd} {"IBM Journal of Research and Development"} + +MACRO {ibmsj} {"IBM Systems Journal"} + +MACRO {ieeese} {"IEEE Transactions on Software Engineering"} + +MACRO {ieeetc} {"IEEE Transactions on Computers"} + +MACRO {ieeetcad} + {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} + +MACRO {ipl} {"Information Processing Letters"} + +MACRO {jacm} {"Journal of the ACM"} + +MACRO {jcss} {"Journal of Computer and System Sciences"} + +MACRO {scp} {"Science of Computer Programming"} + +MACRO {sicomp} {"SIAM Journal on Computing"} + +MACRO {tocs} {"ACM Transactions on Computer Systems"} + +MACRO {tods} {"ACM Transactions on Database Systems"} + +MACRO {tog} {"ACM Transactions on Graphics"} + +MACRO {toms} {"ACM Transactions on Mathematical Software"} + +MACRO {toois} {"ACM Transactions on Office Information Systems"} + +MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} + +MACRO {tcs} {"Theoretical Computer Science"} + +READ + + +FUNCTION {sortify} +{ purify$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { nameptr #1 > + { " " * } + 'skip$ + if$ + s nameptr + "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" + format.name$ 't := + nameptr numnames = t "others" = and + { "et al" * } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} + +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { + author num.names$ #4 < + {author sort.format.names } + {title sort.format.title} + if$ + } + if$ +} + +FUNCTION {author.title.sort} +{ author empty$ + { title empty$ + { key empty$ + { "to sort, need author, title, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { title sort.format.title } + if$ + } + { + author num.names$ #4 < + {author sort.format.names } + {title sort.format.title} + if$ + } + if$ +} + +FUNCTION {presort} +{ + author.title.sort + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} + +SORT + + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +FUNCTION {longest.label.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +EXECUTE {initialize.longest.label} + +ITERATE {longest.label.pass} + +FUNCTION {begin.bib} +{ "\begin{thebibliography}{" longest.label * "}" * write$ newline$ + "\def\selectlanguageifdefined#1{" write$ newline$ + "\expandafter\ifx\csname date#1\endcsname\relax" write$ newline$ + "\else\language\csname l@#1\endcsname\fi}" write$ newline$ + "\ifx\undefined\url\def\url#1{{\small #1}}\else\fi" write$ newline$ + "\ifx\undefined\BibUrl\def\BibUrl#1{\url{#1}}\else\fi" write$ newline$ + "\ifx\undefined\BibAnnote\long\def\BibAnnote#1{}\else\fi" write$ newline$ + "\ifx\undefined\BibEmph\def\BibEmph#1{\emph{#1}}\else\fi" write$ newline$ + preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} + +%% +%% End of file `utf8gost71s.bst'. diff --git a/BibTeX-Styles/utf8gost71u.bst b/BibTeX-Styles/utf8gost71u.bst new file mode 100644 index 0000000..6834453 --- /dev/null +++ b/BibTeX-Styles/utf8gost71u.bst @@ -0,0 +1,1608 @@ +%% +%% This is file `utf8gost71u.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% utf8gost.dtx (with options: `utf8gost71u') +%% +%% Copyright 1996-2005 Maksym Polyakov. +%% Version 2005.08.12 +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.2 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% Please, send bug reports via e-mail: +%% polyama at auburn dot edu +%% +%% 2005.08.12 Bug fix (long annote) +%% +%% 2003.06.06 contributions by Konstantin Vorontsov: +%% New ENTRY "annote" added for output annotations. +%% New commands BibUrl, BibAnnote added for customize urls and annotations. +%% +%% 2003.08.10 +%% New command BibEmph added for customize emphasizing. +%% +%% 2003.10.07 +%% Some bug fixes in names and date formatting. +%% +%% 2003.10.07 +%% Bug fix in INPROCEEDINGS. +%% +%% +%% This bibliography style attempts +%% to format bibliography according to +%% GOST 7.1-84 vd970321 +%% +%% For the Ukrainian|Russian bibliographic entries +%% you need to create field +%% language = {ukrainian|russian}. +%% Default language is English. +%% Field numpages for books must contain number of pages. +%% Optional field url will format url (using hyperref, if loaded). +%% +%% See examples in gost71.pdf and gost780.pdf +%% +%% Requires 8-bit bibtex with switch -B and csf file supporting cyrillic. +%% bibtex8 -B -c .csf +%% + +ENTRY + { address + annote + author + booktitle + bookauthor + chapter + edition + editor + compiler + howpublished + institution + journal + key + month + note + number + organization + pages + numpages + publisher + school + series + title + type + volume + year + language + booklanguage + url + urldate + eprint + eprinttype % = archivePrefix + eprintclass % = primaryClass + doi + } + {} + { label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block +after.dblslash after.slash after.column after.semicolumn} + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + #4 'after.dblslash := + #5 'after.slash := + #6 'after.column := + #7 'after.semicolumn := +} + +STRINGS { s t } + +STRINGS { curlanguage } + +FUNCTION {change.language} +{ booklanguage empty$ + {""} + {booklanguage 'curlanguage := + "\selectlanguageifdefined{" + curlanguage * + "}" * + } + if$ +} + +FUNCTION {output.nonnull} +%%%{ 's := +{ swap$ + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + " " "--- " * write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.dblslash = + { "~//" * change.language * " " * write$ } + { output.state after.slash = + { "~/ " * write$ } + { output.state after.column = + { ": " * write$ } + { output.state after.semicolumn = + { "; " * write$ } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ +%%% s +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.dblslash} +{ output.state before.all = + 'skip$ + { after.dblslash 'output.state := } + if$ +} + +FUNCTION {new.slash} +{ output.state before.all = + 'skip$ + { after.slash 'output.state := } + if$ +} + +FUNCTION {new.column} +{ output.state before.all = + 'skip$ + { after.column 'output.state := } + if$ +} + +FUNCTION {new.semicolumn} +{ output.state before.all = + 'skip$ + { after.semicolumn 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +FUNCTION {non.stop} +{ duplicate$ + "}" * add.period$ + #-1 #1 substring$ "." = +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\BibEmph{" swap$ * "}" * } + if$ +} + +FUNCTION {space.word} +{ " " swap$ * " " * } + +FUNCTION {bbl.edby} % { "\bbledby{}" } +{ curlanguage "english" = + {"Ed. by "} + { curlanguage "ukrainian" = + {"{Під ред. }"} + { curlanguage "russian" = + {"{Под ред. }"} + {"language is not defined: " language "edited by" * * warning$ "edited by"} + if$} + if$} + if$ +} + +FUNCTION {bbl.cmplr} +{ curlanguage "english" = + {"Compiler "} + { curlanguage "ukrainian" = + {"{Укл. }"} + { curlanguage "russian" = + {"{Сост. }"} + {"language is not defined: " language "compiler" * * warning$ "compiler"} + if$} + if$} + if$ +} + +FUNCTION {bbl.edition} % { "\bbledition{}" } +{ curlanguage "english" = + {"edition"} + { curlanguage "ukrainian" = + {"{вид.}"} + { curlanguage "russian" = + {"{изд.}"} + {"language is not defined: " language "edition" * * warning$ "edition"} + if$} + if$} + if$ +} + +FUNCTION {bbl.vvolume} % { "\bblVolume{}" } +{ curlanguage "english" = + {"Volume"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Том"} + {"language is not defined: " language "Volume" * * warning$ "Volume"} + if$} + if$ +} + +FUNCTION {bbl.vvol} % { "\bblVol{}" } +{ curlanguage "english" = + {"Vol."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Т."} + {"language is not defined: " language "Vol." * * warning$ "Vol."} + if$} + if$ +} + +FUNCTION {bbl.iissue} % { "\bblIssue{}" } +{ curlanguage "english" = + {"Issue"} + { curlanguage "ukrainian" = + {"Випуск"} + { curlanguage "russian" = + {"Выпуск"} + {"language is not defined: " language * warning$ "Issue"} + if$} + if$} + if$ +} + +FUNCTION {bbl.iiss} % { "\bblIss{}" } +{ curlanguage "english" = + {"Iss."} + { curlanguage "ukrainian" = + {"Вип."} + { curlanguage "russian" = + {"Вып."} + {"language is not defined: " language * warning$ "Issue"} + if$} + if$} + if$ +} + +FUNCTION {bbl.of} % { "\bblof{}" } +{ curlanguage "english" = + {"of"} + { curlanguage "ukrainian" = + {"{із}"} + { curlanguage "russian" = + {"{из}"} + {"language is not defined: " language "of" * * warning$ "of"} + if$} + if$} + if$ +} + +FUNCTION {bbl.etal} % { "\bblof{}" } +{ curlanguage "english" = + {"et~al."} + { curlanguage "ukrainian" = + {"{та~ін.}"} + { curlanguage "russian" = + {"{и~др.}"} + {"language is not defined: " language "at al" * * warning$ "at al."} + if$} + if$} + if$ +} + +FUNCTION {bbl.nnumber} % { "\bblNumber{}" } +{ curlanguage "english" = + {"Number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Номер"} + {"language is not defined: " language "Number" * * warning$ "Number"} + if$} + if$ +} + +FUNCTION {bbl.number} % { "\bblnumber{}" } +{ curlanguage "english" = + {"number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{номер}"} + {"language is not defined: " language "number" * * warning$ "number"} + if$} + if$ +} + +FUNCTION {bbl.nr} % { "\bblno{}" } +{ curlanguage "english" = + {"no."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{№}"} + {"language is not defined: " language "no." * * warning$ "no."} + if$} + if$ +} + +FUNCTION {bbl.nnr} % { "\bblno{}" } +{ curlanguage "english" = + {"No."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{№}"} + {"language is not defined: " language "No." * * warning$ "No."} + if$} + if$ +} + +FUNCTION {bbl.in} % { "\bblin{}" } +{ curlanguage "english" = + {"in"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{в}"} + {"language is not defined: " language "in" * * warning$ "in"} + if$} + if$ +} + +FUNCTION {bbl.iin} % { "\bblIn{}" } +{ curlanguage "english" = + {"In"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"В"} + {"language is not defined: " language "In" * * warning$ "In"} + if$} + if$ +} + +FUNCTION {bbl.pages} % { "\bblpp." } +{ curlanguage "english" = + {"pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + {"language is not defined: " language "pp." * * warning$ "pp."} + if$} + if$ +} + +FUNCTION {bbl.page} % { "\bblp." +{ curlanguage "english" = + {"p."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + {"language is not defined: " language "p." * * warning$ "p."} + if$} + if$ +} + +FUNCTION {bbl.ppages}% { "\bblPp." } +{ curlanguage "english" = + {"Pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + {"language is not defined: " language "Pp." * * warning$ "Pp."} + if$} + if$ +} + +FUNCTION {bbl.ppage} % { "\bblP." } +{ curlanguage "english" = + {"P."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + {"language is not defined: " language "P." * * warning$ "P."} + if$} + if$ +} + +FUNCTION {new.dblslash.checka} +{ empty$ + 'skip$ + 'new.dblslash + if$ +} + +FUNCTION {output.address.publisher} +{ + address empty$ + 'skip$ + { address output + publisher empty$ + 'skip$ + { new.column } + if$ + } + if$ + publisher output +} + +FUNCTION {bbl.urldate} +{ curlanguage "english" = + {"online; accessed"} + { curlanguage "ukrainian" = + { "{дата звернення}" } + { curlanguage "russian" = + { "{дата обращения}" } + { curlanguage "german" = + { "{online; abgerufen}" } + { "language is not defined: " language "urldate" * * warning$ "online; accessed" } + if$} + if$} + if$} +if$} + + +FUNCTION {format.eprint} +{ eprint empty$ + { "" } + { eprinttype empty$ + { "" } + { eprinttype "~: " *} + if$ + eprintclass empty$ + { } + { eprintclass * "/" *} + if$ + url empty$ + { eprint * } + { "\href{" * url * "}{" * eprint * "}" *} + if$ + } + if$ +} + + +FUNCTION {format.url} +{ url empty$ + { "" } + { + "URL: \BibUrl{" url * "}" * + urldate empty$ + { "" } + { " (" bbl.urldate * ": " * urldate * ")" * } + if$ * + } + if$ +} + + +FUNCTION {output.eprint.url} +{ + eprint empty$ + { format.url output } + { format.eprint output } + if$ +} + +FUNCTION {add.doi} +{ duplicate$ empty$ + 'skip$ + { doi empty$ + 'skip$ + { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } + if$ + } + if$ +} + +FUNCTION {add.medium} { } + +FUNCTION {enclose.square.brackets} { } + +FUNCTION {bbl.medium.text} +{ curlanguage "english" = + { "Text" } + { curlanguage "russian" = curlanguage "ukrainian" = or + { "{Текст}" } + { "language is not defined: " language "medium" * * warning$ "Text" } + if$} +if$} + +FUNCTION {bbl.medium.elres} +{ curlanguage "english" = + { "Electronic resource" } + { curlanguage "russian" = + { "{Электронный ресурс}" } + { curlanguage "ukrainian" = + { "{Електронний ресурс}" } + { "language is not defined: " language "medium" * * warning$ "Electronic resource" } + if$} + if$} +if$} + +FUNCTION {bbl.techrep} { "Tech. Rep." } +FUNCTION {bbl.mthesis} { "Master's thesis" } +FUNCTION {bbl.phdthesis} { "Ph.D. thesis" } + +FUNCTION {bbl.medium} +{ type$ "online" = + { bbl.medium.elres } + { bbl.medium.text } +if$} + +INTEGERS { nameptr namesleft numnames } + + +FUNCTION {format.names} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}{~jj}{~ff}" format.name$ 't := + nameptr #1 > + { + nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { + t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + + +FUNCTION {format.names.rev} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ff}{~vv}{~ll}{, jj}" + format.name$ 't := + nameptr #1 > + { + nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { + t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names emphasize} + if$ +} + +FUNCTION {format.bookauthors} +{ bookauthor empty$ + { "" } + { bookauthor format.names} + if$ +} + +FUNCTION {format.authors.after} +{ author empty$ + { "" } + { author format.names.rev} + if$ +} + +FUNCTION {format.bookauthors.after} +{ bookauthor empty$ + { "" } + { bookauthor format.names.rev} + if$ +} + +FUNCTION {format.editors.after} +{ editor empty$ + { "" } + { bbl.edby editor format.names.rev * + } + if$ +} + +FUNCTION {format.compiler.after} +{ compiler empty$ + { "" } + { bbl.cmplr compiler format.names.rev * + } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title + } + if$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { year ". " "--- " month * * * } + if$ + } + if$ +} + +FUNCTION {output.address.publisher.date} +{ + address empty$ + 'skip$ + { address output + publisher empty$ + 'skip$ + { new.column + } + if$ + } + if$ + publisher output + format.date output +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem{" write$ + cite$ write$ + "}" write$ + newline$ + language empty$ + {"english" 'curlanguage :=} + {language 'curlanguage :=} + if$ + "\selectlanguageifdefined{" write$ + curlanguage write$ + "}" write$ newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.iin + " " * } + +FUNCTION {format.btitle} +{ title +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {tie.connect} + {"~" + swap$ * * + } + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.connect + series empty$ + 'skip$ + { bbl.of space.word * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { "there's a number but no series in " cite$ * warning$ + bbl.nnr } + { + %new.dblslash + new.sentence + series + bbl.nr + tie.or.space.connect} + if$ + number tie.or.space.connect + } + if$ + } + { "" } + if$ +} + +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + + +FUNCTION {convert.edition} +{ edition +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { convert.edition " " * bbl.edition * } + { convert.edition " " * bbl.edition * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { bbl.ppages pages n.dashify tie.connect } + { bbl.ppage pages tie.connect } + if$ + } + if$ +} + +FUNCTION {format.pages.page} +{ pages empty$ + { numpages empty$ + { "" } + { numpages bbl.pages tie.connect } + if$} + { format.pages} + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { + ", no." number tie.or.space.connect * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ": " * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.volume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.or.space.connect } + if$ +} + +FUNCTION {format.number} +{ number empty$ + { "" } + { bbl.nr number tie.or.space.connect } + if$ +} + + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type + } + if$ +} + +FUNCTION {format.tr.number} +{ type empty$ + { bbl.techrep } + 'type + if$ + number empty$ + { "" } + { number tie.or.space.connect } + if$ +} + +FUNCTION {author.before} +{ + author empty$ + 'skip$ + {author num.names$ #4 < + {format.authors output + new.sentence} + 'skip$ + if$} + if$ +} + +FUNCTION {bookauthor.before} +{ + bookauthor empty$ + 'skip$ + {bookauthor num.names$ #4 < + {format.bookauthors output + new.sentence} + 'skip$ + if$} + if$ +} + + +FUNCTION {author.after} +{ + author empty$ + 'skip$ + {author num.names$ #3 > + {format.authors.after output + new.semicolumn } + 'skip$ + if$} + if$ +} +FUNCTION {bookauthor.after} +{ + bookauthor empty$ + 'skip$ + {bookauthor num.names$ #3 > + {format.bookauthors.after output + new.semicolumn } + 'skip$ + if$} + if$ +} + +FUNCTION {editor.organization.after} +{ + compiler empty$ + {} + { format.compiler.after output + new.semicolumn + } + if$ + editor empty$ + {} + { format.editors.after output + new.semicolumn + } + if$ + organization empty$ + {} + {organization output + new.semicolumn + } + if$ +} + + +FUNCTION {format.annote} +{ annote empty$ + { "" } +{ after.sentence 'output.state := + "\BibAnnote{" annote add.period$ * "}" * +} + if$ +} + +FUNCTION {article} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + new.dblslash + journal emphasize "journal" output.check + new.block + format.date output + new.block + format.volume output + format.number output + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {book} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + editor.organization.after + new.sentence + format.number.series output + new.block + format.edition output + new.block + output.address.publisher.date + new.block + format.bvolume output + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + author.before + format.title "title" output.check + new.slash + author.after + editor.organization.after + new.block + howpublished output + address output + format.date output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + new.dblslash + bookauthor.before + booktitle "booktitle" output.check + new.slash + bookauthor.after + editor.organization.after + new.block + format.edition output + new.block + format.number.series output + new.sentence + output.address.publisher.date + new.block + format.bvolume output + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + author.before + new.sentence + format.btitle "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + output.address.publisher.date + new.block + format.bvolume output + format.number.series output + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + author.before + new.sentence + format.title "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + new.block + address empty$ + { publisher output + format.date "year" output.check + } + { address output.nonnull + new.column + publisher output + format.date "year" output.check + } + if$ + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + new.block + format.btitle "title" output.check + author empty$ + { organization empty$ + { + address new.block.checka + address output + } + 'skip$ + if$ + } + { + organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + format.date output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" output.check + new.block + format.btitle "title" output.check + new.block + bbl.mthesis format.thesis.type output.nonnull + school "school" output.check + address output + format.date "year" output.check + new.block + note output + new.block + format.url output + format.annote output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.btitle output + howpublished new.block.checka + howpublished output + new.block + format.date output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle "title" output.check + new.column + bbl.phdthesis format.thesis.type output.nonnull + new.slash + school "school" output.check + new.block + output.address.publisher.date + new.block + format.pages.page output + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + format.btitle "title" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + address empty$ + { publisher output + format.date "year" output.check + } + { address output.nonnull + format.date "year" output.check + new.sentence + publisher output + } + if$ + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + author.before + new.sentence + format.title "title" output.check + new.column + format.tr.number output.nonnull + new.slash + author.after + editor.organization.after + new.block + address output + new.column + institution "institution" output.check + format.date "year" output.check + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + editor.organization.after + new.block + note "note" output.check + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {online} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.title add.doi add.medium "title" output.check + howpublished new.dblslash.checka + howpublished enclose.square.brackets output + editor.organization.after + new.sentence + new.block + output.address.publisher + format.date output + new.block + output.eprint.url + new.sentence + note output + format.annote output + fin.entry +} + +FUNCTION {internet} {online} +FUNCTION {www} {online} +FUNCTION {webpage} {online} +FUNCTION {electronic} {online} + + +FUNCTION {default.type} { misc } + +MACRO {jan} {"\bbljan{}"} + +MACRO {feb} {"\bblfeb{}"} + +MACRO {mar} {"\bblmar{}"} + +MACRO {apr} {"\bblapr{}"} + +MACRO {may} {"\bblmay{}"} + +MACRO {jun} {"\bbljun{}"} + +MACRO {jul} {"\bbljul{}"} + +MACRO {aug} {"\bblaug{}"} + +MACRO {sep} {"\bblsep{}"} + +MACRO {oct} {"\bbloct{}"} + +MACRO {nov} {"\bblnov{}"} + +MACRO {dec} {"\bbldec{}"} + +MACRO {acmcs} {"ACM Computing Surveys"} + +MACRO {acta} {"Acta Informatica"} + +MACRO {cacm} {"Communications of the ACM"} + +MACRO {ibmjrd} {"IBM Journal of Research and Development"} + +MACRO {ibmsj} {"IBM Systems Journal"} + +MACRO {ieeese} {"IEEE Transactions on Software Engineering"} + +MACRO {ieeetc} {"IEEE Transactions on Computers"} + +MACRO {ieeetcad} + {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} + +MACRO {ipl} {"Information Processing Letters"} + +MACRO {jacm} {"Journal of the ACM"} + +MACRO {jcss} {"Journal of Computer and System Sciences"} + +MACRO {scp} {"Science of Computer Programming"} + +MACRO {sicomp} {"SIAM Journal on Computing"} + +MACRO {tocs} {"ACM Transactions on Computer Systems"} + +MACRO {tods} {"ACM Transactions on Database Systems"} + +MACRO {tog} {"ACM Transactions on Graphics"} + +MACRO {toms} {"ACM Transactions on Mathematical Software"} + +MACRO {toois} {"ACM Transactions on Office Information Systems"} + +MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} + +MACRO {tcs} {"Theoretical Computer Science"} + +READ + + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +FUNCTION {longest.label.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +EXECUTE {initialize.longest.label} + +ITERATE {longest.label.pass} + +FUNCTION {begin.bib} +{ "\begin{thebibliography}{" longest.label * "}" * write$ newline$ + "\def\selectlanguageifdefined#1{" write$ newline$ + "\expandafter\ifx\csname date#1\endcsname\relax" write$ newline$ + "\else\language\csname l@#1\endcsname\fi}" write$ newline$ + "\ifx\undefined\url\def\url#1{{\small #1}}\else\fi" write$ newline$ + "\ifx\undefined\BibUrl\def\BibUrl#1{\url{#1}}\else\fi" write$ newline$ + "\ifx\undefined\BibAnnote\long\def\BibAnnote#1{}\else\fi" write$ newline$ + "\ifx\undefined\BibEmph\def\BibEmph#1{\emph{#1}}\else\fi" write$ newline$ + preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} + +%% +%% End of file `utf8gost71u.bst'. diff --git a/BibTeX-Styles/utf8gost780u.bst b/BibTeX-Styles/utf8gost780u.bst new file mode 100644 index 0000000..2a9d46e --- /dev/null +++ b/BibTeX-Styles/utf8gost780u.bst @@ -0,0 +1,1428 @@ +%% +%% This is file `utf8gost780u.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% utf8gost.dtx (with options: `utf8gost780u') +%% +%% Copyright 1996-2005 Maksym Polyakov. +%% Version 2005.08.12 +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.2 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% Please, send bug reports via e-mail: +%% polyama at auburn dot edu +%% +%% 2005.08.12 Bug fix (long annote) +%% +%% 2003.06.06 contributions by Konstantin Vorontsov: +%% New ENTRY "annote" added for output annotations. +%% New commands BibUrl, BibAnnote added for customize urls and annotations. +%% +%% 2003.08.10 +%% New command BibEmph added for customize emphasizing. +%% +%% 2003.10.07 +%% Some bug fixes in names and date formatting. +%% +%% 2003.10.07 +%% Bug fix in INPROCEEDINGS. +%% +%% +%% This bibliography style attempts +%% to format bibliography according to +%% GOST 7.1-84 and GOST 7.80-00 +%% +%% For the Ukrainian|Russian bibliographic entries +%% you need to create field +%% language = {ukrainian|russian}. +%% Default language is English. +%% Field numpages for books must contain number of pages. +%% Optional field url will format url (using hyperref, if loaded). +%% +%% See examples in gost71.pdf and gost780.pdf +%% +%% Requires 8-bit bibtex with switch -B and csf file supporting cyrillic. +%% bibtex8 -B -c .csf +%% + +ENTRY + { address + annote + author + booktitle + bookauthor + chapter + edition + editor + compiler + howpublished + institution + journal + key + month + note + number + organization + pages + numpages + publisher + school + series + title + type + volume + year + language + booklanguage + url + } + {} + { label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block +after.dblslash after.slash after.column after.semicolumn} + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + #4 'after.dblslash := + #5 'after.slash := + #6 'after.column := + #7 'after.semicolumn := +} + +STRINGS { s t } + +STRINGS { curlanguage } + +FUNCTION {change.language} +{ booklanguage empty$ + {""} + {booklanguage 'curlanguage := + "\selectlanguageifdefined{" + curlanguage * + "}" * + } + if$ +} + +FUNCTION {output.nonnull} +%%%{ 's := +{ swap$ + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + " " "--- " * write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.dblslash = + { "~//" * change.language * " " * write$ } + { output.state after.slash = + { "~/ " * write$ } + { output.state after.column = + { ": " * write$ } + { output.state after.semicolumn = + { "; " * write$ } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ +%%% s +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.dblslash} +{ output.state before.all = + 'skip$ + { after.dblslash 'output.state := } + if$ +} + +FUNCTION {new.slash} +{ output.state before.all = + 'skip$ + { after.slash 'output.state := } + if$ +} + +FUNCTION {new.column} +{ output.state before.all = + 'skip$ + { after.column 'output.state := } + if$ +} + +FUNCTION {new.semicolumn} +{ output.state before.all = + 'skip$ + { after.semicolumn 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +FUNCTION {non.stop} +{ duplicate$ + "}" * add.period$ + #-1 #1 substring$ "." = +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\BibEmph{" swap$ * "}" * } + if$ +} + +FUNCTION {space.word} +{ " " swap$ * " " * } + +FUNCTION {bbl.edby} % { "\bbledby{}" } +{ curlanguage "english" = + {"Ed. by "} + { curlanguage "ukrainian" = + {"{Під ред. }"} + { curlanguage "russian" = + {"{Под ред. }"} + {"language is not defined: " language "edited by" * * warning$ "edited by"} + if$} + if$} + if$ +} + +FUNCTION {bbl.cmplr} +{ curlanguage "english" = + {"Compiler "} + { curlanguage "ukrainian" = + {"{Укл. }"} + { curlanguage "russian" = + {"{Сост. }"} + {"language is not defined: " language "compiler" * * warning$ "compiler"} + if$} + if$} + if$ +} + +FUNCTION {bbl.edition} % { "\bbledition{}" } +{ curlanguage "english" = + {"edition"} + { curlanguage "ukrainian" = + {"{вид.}"} + { curlanguage "russian" = + {"{изд.}"} + {"language is not defined: " language "edition" * * warning$ "edition"} + if$} + if$} + if$ +} + +FUNCTION {bbl.vvolume} % { "\bblVolume{}" } +{ curlanguage "english" = + {"Volume"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Том"} + {"language is not defined: " language "Volume" * * warning$ "Volume"} + if$} + if$ +} + +FUNCTION {bbl.vvol} % { "\bblVol{}" } +{ curlanguage "english" = + {"Vol."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Т."} + {"language is not defined: " language "Vol." * * warning$ "Vol."} + if$} + if$ +} + +FUNCTION {bbl.iissue} % { "\bblIssue{}" } +{ curlanguage "english" = + {"Issue"} + { curlanguage "ukrainian" = + {"Випуск"} + { curlanguage "russian" = + {"Выпуск"} + {"language is not defined: " language * warning$ "Issue"} + if$} + if$} + if$ +} + +FUNCTION {bbl.iiss} % { "\bblIss{}" } +{ curlanguage "english" = + {"Iss."} + { curlanguage "ukrainian" = + {"Вип."} + { curlanguage "russian" = + {"Вып."} + {"language is not defined: " language * warning$ "Issue"} + if$} + if$} + if$ +} + +FUNCTION {bbl.of} % { "\bblof{}" } +{ curlanguage "english" = + {"of"} + { curlanguage "ukrainian" = + {"{із}"} + { curlanguage "russian" = + {"{из}"} + {"language is not defined: " language "of" * * warning$ "of"} + if$} + if$} + if$ +} + +FUNCTION {bbl.etal} % { "\bblof{}" } +{ curlanguage "english" = + {"et~al."} + { curlanguage "ukrainian" = + {"{та~ін.}"} + { curlanguage "russian" = + {"{и~др.}"} + {"language is not defined: " language "at al" * * warning$ "at al."} + if$} + if$} + if$ +} + +FUNCTION {bbl.nnumber} % { "\bblNumber{}" } +{ curlanguage "english" = + {"Number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"Номер"} + {"language is not defined: " language "Number" * * warning$ "Number"} + if$} + if$ +} + +FUNCTION {bbl.number} % { "\bblnumber{}" } +{ curlanguage "english" = + {"number"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{номер}"} + {"language is not defined: " language "number" * * warning$ "number"} + if$} + if$ +} + +FUNCTION {bbl.nr} % { "\bblno{}" } +{ curlanguage "english" = + {"no."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{№}"} + {"language is not defined: " language "no." * * warning$ "no."} + if$} + if$ +} + +FUNCTION {bbl.nnr} % { "\bblno{}" } +{ curlanguage "english" = + {"No."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{№}"} + {"language is not defined: " language "No." * * warning$ "No."} + if$} + if$ +} + +FUNCTION {bbl.in} % { "\bblin{}" } +{ curlanguage "english" = + {"in"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{в}"} + {"language is not defined: " language "in" * * warning$ "in"} + if$} + if$ +} + +FUNCTION {bbl.iin} % { "\bblIn{}" } +{ curlanguage "english" = + {"In"} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"В"} + {"language is not defined: " language "In" * * warning$ "In"} + if$} + if$ +} + +FUNCTION {bbl.pages} % { "\bblpp." } +{ curlanguage "english" = + {"pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + {"language is not defined: " language "pp." * * warning$ "pp."} + if$} + if$ +} + +FUNCTION {bbl.page} % { "\bblp." +{ curlanguage "english" = + {"p."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{с.}"} + {"language is not defined: " language "p." * * warning$ "p."} + if$} + if$ +} + +FUNCTION {bbl.ppages}% { "\bblPp." } +{ curlanguage "english" = + {"Pp."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + {"language is not defined: " language "Pp." * * warning$ "Pp."} + if$} + if$ +} + +FUNCTION {bbl.ppage} % { "\bblP." } +{ curlanguage "english" = + {"P."} + { curlanguage "ukrainian" = curlanguage "russian" = or + {"{С.}"} + {"language is not defined: " language "P." * * warning$ "P."} + if$} + if$ +} + + +FUNCTION {bbl.techrep} { "Tech. Rep." } +FUNCTION {bbl.mthesis} { "Master's thesis" } +FUNCTION {bbl.phdthesis} { "Ph.D. thesis" } + +INTEGERS { nameptr namesleft numnames } + + +FUNCTION {format.names} +{ + #1 "{vv~}{ll}{~jj}{,~ff}" format.name$ +} + + +FUNCTION {format.names.rev} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ff}{~vv}{~ll}{, jj}" + format.name$ 't := + nameptr #1 > + { + nameptr #4 = + numnames #4 > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { + t "others" = + t "~others" = + or + { " " * bbl.etal * } + { ", " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names emphasize} + if$ +} + +FUNCTION {format.bookauthors} +{ bookauthor empty$ + { "" } + { bookauthor format.names} + if$ +} + +FUNCTION {format.authors.after} +{ author empty$ + { "" } + { author format.names.rev} + if$ +} + +FUNCTION {format.bookauthors.after} +{ bookauthor empty$ + { "" } + { bookauthor format.names.rev} + if$ +} + +FUNCTION {format.editors.after} +{ editor empty$ + { "" } + { bbl.edby editor format.names.rev * + } + if$ +} + +FUNCTION {format.compiler.after} +{ compiler empty$ + { "" } + { bbl.cmplr compiler format.names.rev * + } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title + } + if$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { year ". " "--- " month * * * } + if$ + } + if$ +} + +FUNCTION {output.address.publisher.date} +{ + address empty$ + 'skip$ + { address output + publisher empty$ + 'skip$ + { new.column + } + if$ + } + if$ + publisher output + format.date output +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem{" write$ + cite$ write$ + "}" write$ + newline$ + language empty$ + {"english" 'curlanguage :=} + {language 'curlanguage :=} + if$ + "\selectlanguageifdefined{" write$ + curlanguage write$ + "}" write$ newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.iin + " " * } + +FUNCTION {format.btitle} +{ title +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {tie.connect} + {"~" + swap$ * * + } + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.connect + series empty$ + 'skip$ + { bbl.of space.word * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { "there's a number but no series in " cite$ * warning$ + bbl.nnr } + { + %new.dblslash + new.sentence + series + bbl.nr + tie.or.space.connect} + if$ + number tie.or.space.connect + } + if$ + } + { "" } + if$ +} + +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + + +FUNCTION {convert.edition} +{ edition +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { convert.edition " " * bbl.edition * } + { convert.edition " " * bbl.edition * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { bbl.ppages pages n.dashify tie.connect } + { bbl.ppage pages tie.connect } + if$ + } + if$ +} + +FUNCTION {format.pages.page} +{ pages empty$ + { numpages empty$ + { "" } + { numpages bbl.pages tie.connect } + if$} + { format.pages} + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { + ", no." number tie.or.space.connect * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ": " * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.volume} +{ volume empty$ + { "" } + { bbl.vvol volume tie.or.space.connect } + if$ +} + +FUNCTION {format.number} +{ number empty$ + { "" } + { bbl.nr number tie.or.space.connect } + if$ +} + + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type + } + if$ +} + +FUNCTION {format.tr.number} +{ type empty$ + { bbl.techrep } + 'type + if$ + number empty$ + { "" } + { number tie.or.space.connect } + if$ +} + +FUNCTION {author.before} +{ + author empty$ + 'skip$ + {author num.names$ #4 < + {format.authors output + new.sentence} + 'skip$ + if$} + if$ +} + +FUNCTION {bookauthor.before} +{ + bookauthor empty$ + 'skip$ + {bookauthor num.names$ #4 < + {format.bookauthors output + new.sentence} + 'skip$ + if$} + if$ +} + + +FUNCTION {author.after} +{ + author empty$ + 'skip$ + {format.authors.after output + new.semicolumn } + if$ +} +FUNCTION {bookauthor.after} +{ + bookauthor empty$ + 'skip$ + {format.bookauthors.after output + new.semicolumn } + if$ +} + +FUNCTION {editor.organization.after} +{ + compiler empty$ + {} + { format.compiler.after output + new.semicolumn + } + if$ + editor empty$ + {} + { format.editors.after output + new.semicolumn + } + if$ + organization empty$ + {} + {organization output + new.semicolumn + } + if$ +} + +FUNCTION {format.url} +{ url empty$ + { "" } + { after.sentence 'output.state := + "\BibUrl{ " url * "}" * + } + if$ +} + +FUNCTION {format.annote} +{ annote empty$ + { "" } +{ after.sentence 'output.state := + "\BibAnnote{" annote add.period$ * "}" * +} + if$ +} + +FUNCTION {article} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + new.dblslash + journal emphasize "journal" output.check + new.block + format.date output + new.block + format.volume output + format.number output + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {book} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + editor.organization.after + new.sentence + format.number.series output + new.block + format.edition output + new.block + output.address.publisher.date + new.block + format.bvolume output + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + author.before + format.title "title" output.check + new.slash + author.after + editor.organization.after + new.block + howpublished output + address output + format.date output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + new.dblslash + bookauthor.before + booktitle "booktitle" output.check + new.slash + bookauthor.after + editor.organization.after + new.block + format.edition output + new.block + format.number.series output + new.sentence + output.address.publisher.date + new.block + format.bvolume output + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + author.before + new.sentence + format.btitle "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + output.address.publisher.date + new.block + format.bvolume output + format.number.series output + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + author.before + new.sentence + format.title "title" output.check + new.slash + author.after + new.dblslash + booktitle "booktitle" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + new.block + address empty$ + { publisher output + format.date "year" output.check + } + { address output.nonnull + new.column + publisher output + format.date "year" output.check + } + if$ + new.block + format.pages.page output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + new.block + format.btitle "title" output.check + author empty$ + { organization empty$ + { + address new.block.checka + address output + } + 'skip$ + if$ + } + { + organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + format.date output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" output.check + new.block + format.btitle "title" output.check + new.block + bbl.mthesis format.thesis.type output.nonnull + school "school" output.check + address output + format.date "year" output.check + new.block + note output + new.block + format.url output + format.annote output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + title howpublished new.sentence.checkb + format.btitle output + howpublished new.block.checka + howpublished output + new.block + format.date output + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + new.sentence + format.btitle "title" output.check + new.column + bbl.phdthesis format.thesis.type output.nonnull + new.slash + school "school" output.check + new.block + output.address.publisher.date + new.block + format.pages.page output + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + format.btitle "title" output.check + new.slash + editor.organization.after + new.block + format.bvolume output + format.number.series output + address empty$ + { publisher output + format.date "year" output.check + } + { address output.nonnull + format.date "year" output.check + new.sentence + publisher output + } + if$ + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + author.before + new.sentence + format.title "title" output.check + new.column + format.tr.number output.nonnull + new.slash + author.after + editor.organization.after + new.block + address output + new.column + institution "institution" output.check + format.date "year" output.check + new.block + note output + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + author.before + format.btitle "title" output.check + new.slash + author.after + editor.organization.after + new.block + note "note" output.check + new.sentence + format.url output + format.annote output + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"\bbljan{}"} + +MACRO {feb} {"\bblfeb{}"} + +MACRO {mar} {"\bblmar{}"} + +MACRO {apr} {"\bblapr{}"} + +MACRO {may} {"\bblmay{}"} + +MACRO {jun} {"\bbljun{}"} + +MACRO {jul} {"\bbljul{}"} + +MACRO {aug} {"\bblaug{}"} + +MACRO {sep} {"\bblsep{}"} + +MACRO {oct} {"\bbloct{}"} + +MACRO {nov} {"\bblnov{}"} + +MACRO {dec} {"\bbldec{}"} + +MACRO {acmcs} {"ACM Computing Surveys"} + +MACRO {acta} {"Acta Informatica"} + +MACRO {cacm} {"Communications of the ACM"} + +MACRO {ibmjrd} {"IBM Journal of Research and Development"} + +MACRO {ibmsj} {"IBM Systems Journal"} + +MACRO {ieeese} {"IEEE Transactions on Software Engineering"} + +MACRO {ieeetc} {"IEEE Transactions on Computers"} + +MACRO {ieeetcad} + {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} + +MACRO {ipl} {"Information Processing Letters"} + +MACRO {jacm} {"Journal of the ACM"} + +MACRO {jcss} {"Journal of Computer and System Sciences"} + +MACRO {scp} {"Science of Computer Programming"} + +MACRO {sicomp} {"SIAM Journal on Computing"} + +MACRO {tocs} {"ACM Transactions on Computer Systems"} + +MACRO {tods} {"ACM Transactions on Database Systems"} + +MACRO {tog} {"ACM Transactions on Graphics"} + +MACRO {toms} {"ACM Transactions on Mathematical Software"} + +MACRO {toois} {"ACM Transactions on Office Information Systems"} + +MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} + +MACRO {tcs} {"Theoretical Computer Science"} + +READ + + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +FUNCTION {longest.label.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +EXECUTE {initialize.longest.label} + +ITERATE {longest.label.pass} + +FUNCTION {begin.bib} +{ "\begin{thebibliography}{" longest.label * "}" * write$ newline$ + "\def\selectlanguageifdefined#1{" write$ newline$ + "\expandafter\ifx\csname date#1\endcsname\relax" write$ newline$ + "\else\language\csname l@#1\endcsname\fi}" write$ newline$ + "\ifx\undefined\url\def\url#1{{\small #1}}\else\fi" write$ newline$ + "\ifx\undefined\BibUrl\def\BibUrl#1{\url{#1}}\else\fi" write$ newline$ + "\ifx\undefined\BibAnnote\long\def\BibAnnote#1{}\else\fi" write$ newline$ + "\ifx\undefined\BibEmph\def\BibEmph#1{\emph{#1}}\else\fi" write$ newline$ + preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} + +%% +%% End of file `utf8gost780u.bst'. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..3dbc023 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,54 @@ +## Формулирование проблем +Если возникают какие-то проблемы, то можете писать в gitter-чат. + +[![Join the chat at https://gitter.im/AndreyAkinshin/Russian-Phd-LaTeX-Dissertation-Template](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/AndreyAkinshin/Russian-Phd-LaTeX-Dissertation-Template?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +Желательно описывать проблемы с предоставлением [минимального рабочего примера](http://meta.tex.stackexchange.com/questions/228/ive-just-been-asked-to-write-a-minimal-example-what-is-that "Producing a concise Minimal Working Example") +(описание [минимального примера +для задания вопроса](https://dxdy.ru/post1315772.html#p1315772), связанного с LaTeX, +на русском языке), чтобы желающие вам помочь могли скопировать предоставленный +вами код и скомпилировать его, увидев то же, что видите вы. Формулировать +желаемые результаты стоит конкретным примером вида «вот что получаю, а вот что +хочу получить на выходе». + +Если хотите, чтобы решение проблемы поскорее попало в шаблон, то создавайте +Issue с предоставлением [минимального рабочего примера](http://meta.tex.stackexchange.com/questions/228/ive-just-been-asked-to-write-a-minimal-example-what-is-that "Producing a concise Minimal Working Example"). + +## Простые правки + +Если вы хотите сделать простую правку (исправить опечатку или дописать +что-нибудь полезное в инструкцию по установке), то это можно сделать +непосредственно через GitHub. Краткая инструкция: + +1. Форкаете репозиторий: для этого нужно нажать кнопку **Fork** в правом верхнем +углу с любой страницы репозитория. +2. Переходите к себе в профиль, там у вас будет форк репозитория с диссертацией. +Переходите в него, выбираете нужную страничку с инструкцией и тыкаете на карандаш +вверху справа (**edit this file**). +3. Редактируете файл, сохраняете изменения. +4. На странице с вашим форком появится большая зелёная кнопка «New Pull Request». +Нажимаете её и создаёте **Pull Request**. + +## Сложные правки + +Если вы хотите сделать сложную правку (например, поправить шаблон), то лучше бы +это сделать на локальной машине, проверить, что всё работает, а только после +этого сделать **Pull Request**. Проверить предлагаемые доработки необходимо в трёх +компиляторах (`pdflatex`, `xelatex`, `lualatex`), а также двух вариантах работы +с библиографией (`bibtex` и `biblatex`). +Если знакомы с утилитой `make`, то в корне репозитория прописана инструкция +`examples` для подобной проверки. Вызов `make examples` попробует собрать +автореферат и диссертацию тремя компиляторами в различных вариантах. + +Если вы не знакомы с системой контроля версий git, то можно начать со следующей +статьи: [Pull request'ы на GitHub или Как мне внести изменения в чужой проект](http://habrahabr.ru/post/125999/). + +## Стилистика +Желательно: +* выполнять индентацию четырьмя пробелами, в соответствии с [настройками latexindent](indent.yaml). +* не оставлять пробелов в конце строк +* оставлять в коце файла пустую строку +* использовать `LF` (т.е. не `CRLF`) для перевода строки + + (для Windows, может быть удобно использовать [автопреобразование](https://git-scm.com/book/ru/v1/%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0-Git-%D0%9A%D0%BE%D0%BD%D1%84%D0%B8%D0%B3%D1%83%D1%80%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5-Git#%D0%A4%D0%BE%D1%80%D0%BC%D0%B0%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5-%D0%B8-%D0%BF%D1%80%D0%BE%D0%B1%D0%B5%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5-%D1%81%D0%B8%D0%BC%D0%B2%D0%BE%D0%BB%D1%8B), `git config --local core.autocrlf true`) +* использовать UTF-8 diff --git a/Dissertation/acronyms.tex b/Dissertation/acronyms.tex new file mode 100644 index 0000000..5fb76f8 --- /dev/null +++ b/Dissertation/acronyms.tex @@ -0,0 +1 @@ +\printnomenclature[3.5cm] % Значение ширины столбца с обозначениями стоит подбирать вручную diff --git a/Dissertation/appendix.tex b/Dissertation/appendix.tex new file mode 100644 index 0000000..efb860a --- /dev/null +++ b/Dissertation/appendix.tex @@ -0,0 +1,820 @@ +\chapter{Примеры вставки листингов программного кода}\label{app:A} + +Для крупных листингов есть два способа. Первый красивый, но в нём могут быть +проблемы с поддержкой кириллицы (у вас может встречаться в~комментариях +и~печатаемых сообщениях), он представлен на листинге~\cref{lst:hwbeauty}. +\begin{ListingEnv}[!h]% настройки floating аналогичны окружению figure + \captiondelim{ } % разделитель идентификатора с номером от наименования + \caption{Программа ,,Hello, world`` на \protect\cpp}\label{lst:hwbeauty} + % окружение учитывает пробелы и табуляции и применяет их в сответсвии с настройками + \begin{lstlisting}[language={[ISO]C++}] + #include + using namespace std; + + int main() //кириллица в комментариях при xelatex и lualatex имеет проблемы с пробелами + { + cout << "Hello, world" << endl; //latin letters in commentaries + system("pause"); + return 0; + } + \end{lstlisting} +\end{ListingEnv}% +Второй не~такой красивый, но без ограничений (см.~листинг~\cref{lst:hwplain}). +\begin{ListingEnv}[!h] + \captiondelim{ } % разделитель идентификатора с номером от наименования + \caption{Программа ,,Hello, world`` без подсветки}\label{lst:hwplain} + \begin{Verb} + + #include + using namespace std; + + int main() //кириллица в комментариях + { + cout << "Привет, мир" << endl; + } + \end{Verb} +\end{ListingEnv} + +Можно использовать первый для вставки небольших фрагментов +внутри текста, а второй для вставки полного +кода в приложении, если таковое имеется. + +Если нужно вставить совсем короткий пример кода (одна или две строки), +то~выделение линейками и нумерация может смотреться чересчур громоздко. +В таких случаях можно использовать окружения \texttt{lstlisting} или +\texttt{Verb} без \texttt{ListingEnv}. Приведём такой пример +с указанием языка программирования, отличного от~заданного по умолчанию: +\begin{lstlisting}[language=Haskell] +fibs = 0 : 1 : zipWith (+) fibs (tail fibs) +\end{lstlisting} +Такое решение "--- со вставкой нумерованных листингов покрупнее +и~вставок без выделения для маленьких фрагментов "--- выбрано, +например, в~книге Эндрю Таненбаума и Тодда Остина по архитектуре +компьютера. + +Наконец, для оформления идентификаторов внутри строк +(функция \lstinline{main} и~тому подобное) используется +\texttt{lstinline} или, самое простое, моноширинный текст +(\texttt{\textbackslash texttt}). + +Пример~\cref{lst:internal3}, иллюстрирующий подключение переопределённого +языка. Может быть полезным, если подсветка кода работает криво. Без +дополнительного окружения, с подписью и ссылкой, реализованной встроенным +средством. +\begingroup +\captiondelim{ } % разделитель идентификатора с номером от наименования +\begin{lstlisting}[language={Renhanced},caption={Пример листинга c подписью собственными средствами},label={lst:internal3}] +## Caching the Inverse of a Matrix + +## Matrix inversion is usually a costly computation and there may be some +## benefit to caching the inverse of a matrix rather than compute it repeatedly +## This is a pair of functions that cache the inverse of a matrix. + +## makeCacheMatrix creates a special "matrix" object that can cache its inverse + +makeCacheMatrix <- function(x = matrix()) {#кириллица в комментариях при xelatex и lualatex имеет проблемы с пробелами + i <- NULL + set <- function(y) { + x <<- y + i <<- NULL + } + get <- function() x + setSolved <- function(solve) i <<- solve + getSolved <- function() i + list(set = set, get = get, + setSolved = setSolved, + getSolved = getSolved) + +} + + +## cacheSolve computes the inverse of the special "matrix" returned by +## makeCacheMatrix above. If the inverse has already been calculated (and the +## matrix has not changed), then the cachesolve should retrieve the inverse from +## the cache. + +cacheSolve <- function(x, ...) { + ## Return a matrix that is the inverse of 'x' + i <- x$getSolved() + if(!is.null(i)) { + message("getting cached data") + return(i) + } + data <- x$get() + i <- solve(data, ...) + x$setSolved(i) + i +} +\end{lstlisting} %$ %Комментарий для корректной подсветки синтаксиса +%вне листинга +\endgroup + +Листинг~\cref{lst:external1} подгружается из внешнего файла. Приходится +загружать без окружения дополнительного. Иначе по страницам не переносится. +\begingroup +\captiondelim{ } % разделитель идентификатора с номером от наименования +\lstinputlisting[lastline=78,language={R},caption={Листинг из внешнего файла},label={lst:external1}]{listings/run_analysis.R} +\endgroup + +\chapter{Очень длинное название второго приложения, в~котором продемонстрирована работа с~длинными таблицами}\label{app:B} + +\section{Подраздел приложения}\label{app:B1} +Вот размещается длинная таблица: +\fontsize{10pt}{10pt}\selectfont +\begin{longtable*}[c]{|l|c|l|l|} %longtable* появляется из пакета ltcaption и даёт ненумерованную таблицу + % \caption{Описание входных файлов модели}\label{Namelists} + %\\ + \hline + %\multicolumn{4}{|c|}{\textbf{Файл puma\_namelist}} \\ \hline + Параметр & Умолч. & Тип & Описание \\ \hline + \endfirsthead \hline + \multicolumn{4}{|c|}{\small\slshape (продолжение)} \\ \hline + Параметр & Умолч. & Тип & Описание \\ \hline + \endhead \hline + % \multicolumn{4}{|c|}{\small\slshape (окончание)} \\ \hline + % Параметр & Умолч. & Тип & Описание \\ \hline + % \endlasthead \hline + \multicolumn{4}{|r|}{\small\slshape продолжение следует} \\ \hline + \endfoot \hline + \endlastfoot + \multicolumn{4}{|l|}{\&INP} \\ \hline + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + \hline + %& & & \(\:\) \\ + \multicolumn{4}{|l|}{\&SURFPAR} \\ \hline + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + \hline +\end{longtable*} + +\normalsize% возвращаем шрифт к нормальному +\section{Ещё один подраздел приложения}\label{app:B2} + +Нужно больше подразделов приложения! +Конвынёры витюпырата но нам, тебиквюэ мэнтётюм позтюлант ед про. Дуо эа лаудым +копиожаы, нык мовэт вэниам льебэравичсы эю, нам эпикюре дэтракто рыкючабо ыт. + +Пример длинной таблицы с записью продолжения по ГОСТ 2.105: + +\begingroup +\centering +\small +\captionsetup[table]{skip=7pt} % смещение положения подписи +\begin{longtable}[c]{|l|c|l|l|} + \caption{Наименование таблицы средней длины}\label{tab:test5}% label всегда желательно идти после caption + \\[-0.45\onelineskip] + \hline + Параметр & Умолч. & Тип & Описание \\ \hline + \endfirsthead% + \caption*{Продолжение таблицы~\thetable} \\[-0.45\onelineskip] + \hline + Параметр & Умолч. & Тип & Описание \\ \hline + \endhead + \hline + \endfoot + \hline + \endlastfoot + \multicolumn{4}{|l|}{\&INP} \\ \hline + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + \hline + %& & & $\:$ \\ + \multicolumn{4}{|l|}{\&SURFPAR} \\ \hline + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ + kick & 1 & int & 0: инициализация без шума (\(p_s = const\)) \\ + & & & 1: генерация белого шума \\ + & & & 2: генерация белого шума симметрично относительно \\ + & & & экватора \\ + mars & 0 & int & 1: инициализация модели для планеты Марс \\ +\end{longtable} +\normalsize% возвращаем шрифт к нормальному +\endgroup +\section{Использование длинных таблиц с окружением \textit{longtabu}}\label{app:B2a} + +В таблице \cref{tab:test-functions} более книжный вариант +длинной таблицы, используя окружение \verb!longtabu! и разнообразные +\verb!toprule! \verb!midrule! \verb!bottomrule! из~пакета +\verb!booktabs!. Чтобы визуально таблица смотрелась лучше, можно +использовать следующие параметры: в самом начале задаётся расстояние +между строчками с~помощью \verb!arraystretch!. Таблица задаётся на +всю ширину, \verb!longtabu! позволяет делить ширину колонок +пропорционально "--- тут три колонки в~пропорции 1.1:1:4 "--- для каждой +колонки первый параметр в~описании \verb!X[]!. Кроме того, в~таблице +убраны отступы слева и справа с~помощью \verb!@{}! +в~преамбуле таблицы. К~первому и~второму столбцу применяется +модификатор + +\verb!>{\setlength{\baselineskip}{0.7\baselineskip}}!, + +\noindent который уменьшает межстрочный интервал в для текста таблиц (иначе +заголовок второго столбца значительно шире, а двухстрочное имя +сливается с~окружающими). Для первой и второй колонки текст в ячейках +выравниваются по~центру как по~вертикали, так и по горизонтали "--- +задаётся буквами \verb!m!~и~\verb!c!~в~описании столбца \verb!X[]!. + +Так как формулы большие "--- используется окружение \verb!alignedat!, +чтобы отступ был одинаковый у всех формул "--- он сделан для всех, хотя +для большей части можно было и не использовать. Чтобы формулы +занимали поменьше места в~каждом столбце формулы (где надо) +используется \verb!\textstyle! "--- он~делает дроби меньше, у~знаков +суммы и произведения "--- индексы сбоку. Иногда формула слишком большая, +сливается со следующей, поэтому после неё ставится небольшой +дополнительный отступ \verb!\vspace*{2ex}!. Для штрафных функций "--- +размер фигурных скобок задан вручную \verb!\Big\{!, т.\:к. не~умеет +\verb!alignedat! работать с~\verb!\left! и~\verb!\right! через +несколько строк/колонок. + +В примечании к таблице наоборот, окружение \verb!cases! даёт слишком +большие промежутки между вариантами, чтобы их уменьшить, в конце +каждой строчки окружения использовался отрицательный дополнительный +отступ \verb!\\[-0.5em]!. + +\begingroup % Ограничиваем область видимости arraystretch +\renewcommand{\arraystretch}{1.6}%% Увеличение расстояния между рядами, для улучшения восприятия. +\begin{longtabu} to \textwidth + {% + @{}>{\setlength{\baselineskip}{0.7\baselineskip}}X[1.1mc]% + >{\setlength{\baselineskip}{0.7\baselineskip}}X[1.1mc]% + X[4]@{}% + } + \caption{Тестовые функции для оптимизации, \(D\) "--- + размерность. Для всех функций значение в точке глобального + минимума равно нулю.\label{tab:test-functions}}\\% label всегда желательно идти после caption + + \toprule %%% верхняя линейка + Имя &Стартовый диапазон параметров &Функция \\ + \midrule %%% тонкий разделитель. Отделяет названия столбцов. Обязателен по ГОСТ 2.105 пункт 4.4.5 + \endfirsthead + + \multicolumn{3}{c}{\small\slshape (продолжение)} \\ + \toprule %%% верхняя линейка + Имя &Стартовый диапазон параметров &Функция \\ + \midrule %%% тонкий разделитель. Отделяет названия столбцов. Обязателен по ГОСТ 2.105 пункт 4.4.5 + \endhead + + \multicolumn{3}{c}{\small\slshape (окончание)} \\ + \toprule %%% верхняя линейка + Имя &Стартовый диапазон параметров &Функция \\ + \midrule %%% тонкий разделитель. Отделяет названия столбцов. Обязателен по ГОСТ 2.105 пункт 4.4.5 + \endlasthead + + \bottomrule %%% нижняя линейка + \multicolumn{3}{r}{\small\slshape продолжение следует} \\ + \endfoot + \endlastfoot + + сфера &\(\left[-100,\,100\right]^D\) & + \(\begin{aligned} + \textstyle f_1(x)=\sum_{i=1}^Dx_i^2 + \end{aligned}\) \\ + Schwefel 2.22 &\(\left[-10,\,10\right]^D\) & + \(\begin{aligned} + \textstyle f_2(x)=\sum_{i=1}^D|x_i|+\prod_{i=1}^D|x_i| + \end{aligned}\) \\ + Schwefel 1.2 &\(\left[-100,\,100\right]^D\) & + \(\begin{aligned} + \textstyle f_3(x)=\sum_{i=1}^D\left(\sum_{j=1}^ix_j\right)^2 + \end{aligned}\) \\ + Schwefel 2.21 &\(\left[-100,\,100\right]^D\) & + \(\begin{aligned} + \textstyle f_4(x)=\max_i\!\left\{\left|x_i\right|\right\} + \end{aligned}\) \\ + Rosenbrock &\(\left[-30,\,30\right]^D\) & + \(\begin{aligned} + \textstyle f_5(x)= + \sum_{i=1}^{D-1} + \left[100\!\left(x_{i+1}-x_i^2\right)^2+(x_i-1)^2\right] + \end{aligned}\) \\ + ступенчатая &\(\left[-100,\,100\right]^D\) & + \(\begin{aligned} + \textstyle f_6(x)=\sum_{i=1}^D\big\lfloor x_i+0.5\big\rfloor^2 + \end{aligned}\) \\ + зашумлённая квартическая &\(\left[-1.28,\,1.28\right]^D\) & + \(\begin{aligned} + \textstyle f_7(x)=\sum_{i=1}^Dix_i^4+rand[0,1) + \end{aligned}\)\vspace*{2ex}\\ + Schwefel 2.26 &\(\left[-500,\,500\right]^D\) & + \(\begin{aligned} + f_8(x)= & \textstyle\sum_{i=1}^D-x_i\,\sin\sqrt{|x_i|}\,+ \\ + & \vphantom{\sum}+ D\cdot + 418.98288727243369 + \end{aligned}\)\\ + Rastrigin &\(\left[-5.12,\,5.12\right]^D\) & + \(\begin{aligned} + \textstyle f_9(x)=\sum_{i=1}^D\left[x_i^2-10\,\cos(2\pi x_i)+10\right] + \end{aligned}\)\vspace*{2ex}\\ + Ackley &\(\left[-32,\,32\right]^D\) & + \(\begin{aligned} + f_{10}(x)= & \textstyle -20\, \exp\!\left( + -0.2\sqrt{\frac{1}{D}\sum_{i=1}^Dx_i^2} \right)- \\ + & \textstyle - \exp\left( + \frac{1}{D}\sum_{i=1}^D\cos(2\pi x_i) \right) + + 20 + e + \end{aligned}\) \\ + Griewank &\(\left[-600,\,600\right]^D\) & + \(\begin{aligned} + f_{11}(x)= & \textstyle \frac{1}{4000}\sum_{i=1}^{D}x_i^2 - + \prod_{i=1}^D\cos\left(x_i/\sqrt{i}\right) +1 + \end{aligned}\) \vspace*{3ex} \\ + штрафная 1 &\(\left[-50,\,50\right]^D\) & + \(\begin{aligned} + f_{12}(x)= & \textstyle \frac{\pi}{D}\Big\{ 10\,\sin^2(\pi y_1) + \\ + & +\textstyle \sum_{i=1}^{D-1}(y_i-1)^2 + \left[1+10\,\sin^2(\pi y_{i+1})\right] + \\ + & +(y_D-1)^2 \Big\} +\textstyle\sum_{i=1}^D u(x_i,\,10,\,100,\,4) + \end{aligned}\) \vspace*{2ex} \\ + штрафная 2 &\(\left[-50,\,50\right]^D\) & + \(\begin{aligned} + f_{13}(x)= & \textstyle 0.1 \Big\{\sin^2(3\pi x_1) + \\ + & +\textstyle \sum_{i=1}^{D-1}(x_i-1)^2 + \left[1+\sin^2(3 \pi x_{i+1})\right] + \\ + & +(x_D-1)^2\left[1+\sin^2(2\pi x_D)\right] \Big\} + \\ + & +\textstyle\sum_{i=1}^D u(x_i,\,5,\,100,\,4) + \end{aligned}\)\\ + сфера &\(\left[-100,\,100\right]^D\) & + \(\begin{aligned} + \textstyle f_1(x)=\sum_{i=1}^Dx_i^2 + \end{aligned}\) \\ + Schwefel 2.22 &\(\left[-10,\,10\right]^D\) & + \(\begin{aligned} + \textstyle f_2(x)=\sum_{i=1}^D|x_i|+\prod_{i=1}^D|x_i| + \end{aligned}\) \\ + Schwefel 1.2 &\(\left[-100,\,100\right]^D\) & + \(\begin{aligned} + \textstyle f_3(x)=\sum_{i=1}^D\left(\sum_{j=1}^ix_j\right)^2 + \end{aligned}\) \\ + Schwefel 2.21 &\(\left[-100,\,100\right]^D\) & + \(\begin{aligned} + \textstyle f_4(x)=\max_i\!\left\{\left|x_i\right|\right\} + \end{aligned}\) \\ + Rosenbrock &\(\left[-30,\,30\right]^D\) & + \(\begin{aligned} + \textstyle f_5(x)= + \sum_{i=1}^{D-1} + \left[100\!\left(x_{i+1}-x_i^2\right)^2+(x_i-1)^2\right] + \end{aligned}\) \\ + ступенчатая &\(\left[-100,\,100\right]^D\) & + \(\begin{aligned} + \textstyle f_6(x)=\sum_{i=1}^D\big\lfloor x_i+0.5\big\rfloor^2 + \end{aligned}\) \\ + зашумлённая квартическая &\(\left[-1.28,\,1.28\right]^D\) & + \(\begin{aligned} + \textstyle f_7(x)=\sum_{i=1}^Dix_i^4+rand[0,1) + \end{aligned}\)\vspace*{2ex}\\ + Schwefel 2.26 &\(\left[-500,\,500\right]^D\) & + \(\begin{aligned} + f_8(x)= & \textstyle\sum_{i=1}^D-x_i\,\sin\sqrt{|x_i|}\,+ \\ + & \vphantom{\sum}+ D\cdot + 418.98288727243369 + \end{aligned}\)\\ + Rastrigin &\(\left[-5.12,\,5.12\right]^D\) & + \(\begin{aligned} + \textstyle f_9(x)=\sum_{i=1}^D\left[x_i^2-10\,\cos(2\pi x_i)+10\right] + \end{aligned}\)\vspace*{2ex}\\ + Ackley &\(\left[-32,\,32\right]^D\) & + \(\begin{aligned} + f_{10}(x)= & \textstyle -20\, \exp\!\left( + -0.2\sqrt{\frac{1}{D}\sum_{i=1}^Dx_i^2} \right)- \\ + & \textstyle - \exp\left( + \frac{1}{D}\sum_{i=1}^D\cos(2\pi x_i) \right) + + 20 + e + \end{aligned}\) \\ + Griewank &\(\left[-600,\,600\right]^D\) & + \(\begin{aligned} + f_{11}(x)= & \textstyle \frac{1}{4000}\sum_{i=1}^{D}x_i^2 - + \prod_{i=1}^D\cos\left(x_i/\sqrt{i}\right) +1 + \end{aligned}\) \vspace*{3ex} \\ + штрафная 1 &\(\left[-50,\,50\right]^D\) & + \(\begin{aligned} + f_{12}(x)= & \textstyle \frac{\pi}{D}\Big\{ 10\,\sin^2(\pi y_1) + \\ + & +\textstyle \sum_{i=1}^{D-1}(y_i-1)^2 + \left[1+10\,\sin^2(\pi y_{i+1})\right] + \\ + & +(y_D-1)^2 \Big\} +\textstyle\sum_{i=1}^D u(x_i,\,10,\,100,\,4) + \end{aligned}\) \vspace*{2ex} \\ + штрафная 2 &\(\left[-50,\,50\right]^D\) & + \(\begin{aligned} + f_{13}(x)= & \textstyle 0.1 \Big\{\sin^2(3\pi x_1) + \\ + & +\textstyle \sum_{i=1}^{D-1}(x_i-1)^2 + \left[1+\sin^2(3 \pi x_{i+1})\right] + \\ + & +(x_D-1)^2\left[1+\sin^2(2\pi x_D)\right] \Big\} + \\ + & +\textstyle\sum_{i=1}^D u(x_i,\,5,\,100,\,4) + \end{aligned}\)\\ + \midrule%%% тонкий разделитель + \multicolumn{3}{@{}p{\textwidth}}{% + \vspace*{-3.5ex}% этим подтягиваем повыше + \hspace*{2.5em}% абзацный отступ - требование ГОСТ 2.105 + Примечание "--- Для функций \(f_{12}\) и \(f_{13}\) + используется \(y_i = 1 + \frac{1}{4}(x_i+1)\) + и~$u(x_i,\,a,\,k,\,m)= + \begin{cases*} + k(x_i-a)^m, & \( x_i >a \) \\[-0.5em] + 0, & \( -a\leq x_i \leq a \) \\[-0.5em] + k(-x_i-a)^m, & \( x_i <-a \) + \end{cases*} + $ + }\\ + \bottomrule %%% нижняя линейка +\end{longtabu} +\endgroup + +\section{Форматирование внутри таблиц}\label{app:B3} + +В таблице \cref{tab:other-row} пример с чересстрочным +форматированием. В~файле \verb+userstyles.tex+ задаётся счётчик +\verb+\newcounter{rowcnt}+ который увеличивается на~1 после каждой +строчки (как указано в преамбуле таблицы). Кроме того, задаётся +условный макрос \verb+\altshape+ который выдаёт одно +из~двух типов форматирования в~зависимости от чётности счётчика. + +В таблице \cref{tab:other-row} каждая чётная строчка "--- синяя, +нечётная "--- с наклоном и~слегка поднята вверх. Визуально это приводит +к тому, что среднее значение и~среднеквадратичное изменение +группируются и хорошо выделяются взглядом в~таблице. Сохраняется +возможность отдельные значения в таблице выделить цветом или +шрифтом. К первому и второму столбцу форматирование не применяется +по~сути таблицы, к шестому общее форматирование не~применяется для +наглядности. + +Так как заголовок таблицы тоже считается за строчку, то перед ним (для +первого, промежуточного и финального варианта) счётчик обнуляется, +а~в~\verb+\altshape+ для нулевого значения счётчика форматирования +не~применяется. + +\begingroup % Ограничиваем область видимости arraystretch +\renewcommand\altshape{ + \ifnumequal{\value{rowcnt}}{0}{ + % Стиль для заголовка таблицы + }{ + \ifnumodd{\value{rowcnt}} + { + \color{blue} % Cтиль для нечётных строк + }{ + \vspace*{-0.7ex}\itshape} % Стиль для чётных строк + } +} +\newcolumntype{A}{>{\centering\begingroup\altshape}X[1mc]<{\endgroup}} +\needspace{2\baselineskip} +\renewcommand{\arraystretch}{0.9}%% Уменьшаем расстояние между +%% рядами, чтобы таблица не так много +%% места занимала в дисере. +\begin{longtabu} to \textwidth {@{}X[0.27ml]@{}X[0.7mc]@{}A@{}A@{}A@{}X[0.98mc]@{}>{\setlength{\baselineskip}{0.7\baselineskip}}A@{}A<{\stepcounter{rowcnt}}@{}} + % \begin{longtabu} to \textwidth {@{}X[0.2ml]X[1mc]X[1mc]X[1mc]X[1mc]X[1mc]>{\setlength{\baselineskip}{0.7\baselineskip}}X[1mc]X[1mc]@{}} + \caption{Длинная таблица с примером чересстрочного форматирования\label{tab:other-row}}\vspace*{1ex}\\% label всегда желательно идти после caption + % \vspace*{1ex} \\ + + \toprule %%% верхняя линейка + \setcounter{rowcnt}{0} &Итера\-ции & JADE\texttt{++} & JADE & jDE & SaDE + & DE/rand /1/bin & PSO \\ + \midrule %%% тонкий разделитель. Отделяет названия столбцов. Обязателен по ГОСТ 2.105 пункт 4.4.5 + \endfirsthead + + \multicolumn{8}{c}{\small\slshape (продолжение)} \\ + \toprule %%% верхняя линейка + \setcounter{rowcnt}{0} &Итера\-ции & JADE\texttt{++} & JADE & jDE & SaDE + & DE/rand /1/bin & PSO \\ + \midrule %%% тонкий разделитель. Отделяет названия столбцов. Обязателен по ГОСТ 2.105 пункт 4.4.5 + \endhead + + \multicolumn{8}{c}{\small\slshape (окончание)} \\ + \toprule %%% верхняя линейка + \setcounter{rowcnt}{0} &Итера\-ции & JADE\texttt{++} & JADE & jDE & SaDE + & DE/rand /1/bin & PSO \\ + \midrule %%% тонкий разделитель. Отделяет названия столбцов. Обязателен по ГОСТ 2.105 пункт 4.4.5 + \endlasthead + + \bottomrule %%% нижняя линейка + \multicolumn{8}{r}{\small\slshape продолжение следует} \\ + \endfoot + \endlastfoot + + f1 & 1500 & \textbf{1.8E-60} & 1.3E-54 & 2.5E-28 & 4.5E-20 & 9.8E-14 & 9.6E-42 \\\nopagebreak + & & (8.4E-60) & (9.2E-54) & {\color{red}(3.5E-28)} & (6.9E-20) & (8.4E-14) & (2.7E-41) \\ + f2 & 2000 & 1.8E-25 & 3.9E-22 & 1.5E-23 & 1.9E-14 & 1.6E-09 & 9.3E-21 \\\nopagebreak + & & (8.8E-25) & (2.7E-21) & (1.0E-23) & (1.1E-14) & (1.1E-09) & (6.3E-20) \\ + f3 & 5000 & 5.7E-61 & 6.0E-87 & 5.2E-14 & {\color{green}9.0E-37} & 6.6E-11 & 2.5E-19 \\\nopagebreak + & & (2.7E-60) & (1.9E-86) & (1.1E-13) & (5.4E-36) & (8.8E-11) & (3.9E-19) \\ + f4 & 5000 & 8.2E-24 & 4.3E-66 & 1.4E-15 & 7.4E-11 & 4.2E-01 & 4.4E-14 \\\nopagebreak + & & (4.0E-23) & (1.2E-65) & (1.0E-15) & (1.8E-10) & (1.1E+00) & (9.3E-14) \\ + f5 & 3000 & 8.0E-02 & 3.2E-01 & 1.3E+01 & 2.1E+01 & 2.1E+00 & 2.5E+01 \\\nopagebreak + & & (5.6E-01) & (1.1E+00) & (1.4E+01) & (7.8E+00) & (1.5E+00) & (3.2E+01) \\ + f6 & 100 & 2.9E+00 & 5.6E+00 & 1.0E+03 & 9.3E+02 & 4.7E+03 & 4.5E+01 \\\nopagebreak + & & (1.2E+00) & (1.6E+00) & (2.2E+02) & (1.8E+02) & (1.1E+03) & (2.4E+01) \\ + f7 & 3000 & 6.4E-04 & 6.8E-04 & 3.3E-03 & 4.8E-03 & 4.7E-03 & 2.5E-03 \\\nopagebreak + & & (2.5E-04) & (2.5E-04) & (8.5E-04) & (1.2E-03) & (1.2E-03) & (1.4E-03) \\ + f8 & 1000 & 3.3E-05 & 7.1E+00 & 7.9E-11 & 4.7E+00 & 5.9E+03 & 2.4E+03 \\\nopagebreak + & & (2.3E-05) & (2.8E+01) & (1.3E-10) & (3.3E+01) & (1.1E+03) & (6.7E+02) \\ + f9 & 1000 & 1.0E-04 & 1.4E-04 & 1.5E-04 & 1.2E-03 & 1.8E+02 & 5.2E+01 \\\nopagebreak + & & (6.0E-05) & (6.5E-05) & (2.0E-04) & (6.5E-04) & (1.3E+01) & (1.6E+01) \\ + f10 & 500 & 8.2E-10 & 3.0E-09 & 3.5E-04 & 2.7E-03 & 1.1E-01 & 4.6E-01 \\\nopagebreak + & & (6.9E-10) & (2.2E-09) & (1.0E-04) & (5.1E-04) & (3.9E-02) & (6.6E-01) \\ + f11 & 500 & 9.9E-08 & 2.0E-04 & 1.9E-05 & 7.8E-04 & 2.0E-01 & 1.3E-02 \\\nopagebreak + & & (6.0E-07) & (1.4E-03) & (5.8E-05) & (1.2E-03) & (1.1E-01) & (1.7E-02) \\ + f12 & 500 & 4.6E-17 & 3.8E-16 & 1.6E-07 & 1.9E-05 & 1.2E-02 & 1.9E-01 \\\nopagebreak + & & (1.9E-16) & (8.3E-16) & (1.5E-07) & (9.2E-06) & (1.0E-02) & (3.9E-01) \\ + f13 & 500 & 2.0E-16 & 1.2E-15 & 1.5E-06 & 6.1E-05 & 7.5E-02 & 2.9E-03 \\\nopagebreak + & & (6.5E-16) & (2.8E-15) & (9.8E-07) & (2.0E-05) & (3.8E-02) & (4.8E-03) \\ + f1 & 1500 & \textbf{1.8E-60} & 1.3E-54 & 2.5E-28 & 4.5E-20 & 9.8E-14 & 9.6E-42 \\\nopagebreak + & & (8.4E-60) & (9.2E-54) & {\color{red}(3.5E-28)} & (6.9E-20) & (8.4E-14) & (2.7E-41) \\ + f2 & 2000 & 1.8E-25 & 3.9E-22 & 1.5E-23 & 1.9E-14 & 1.6E-09 & 9.3E-21 \\\nopagebreak + & & (8.8E-25) & (2.7E-21) & (1.0E-23) & (1.1E-14) & (1.1E-09) & (6.3E-20) \\ + f3 & 5000 & 5.7E-61 & 6.0E-87 & 5.2E-14 & 9.0E-37 & 6.6E-11 & 2.5E-19 \\\nopagebreak + & & (2.7E-60) & (1.9E-86) & (1.1E-13) & (5.4E-36) & (8.8E-11) & (3.9E-19) \\ + f4 & 5000 & 8.2E-24 & 4.3E-66 & 1.4E-15 & 7.4E-11 & 4.2E-01 & 4.4E-14 \\\nopagebreak + & & (4.0E-23) & (1.2E-65) & (1.0E-15) & (1.8E-10) & (1.1E+00) & (9.3E-14) \\ + f5 & 3000 & 8.0E-02 & 3.2E-01 & 1.3E+01 & 2.1E+01 & 2.1E+00 & 2.5E+01 \\\nopagebreak + & & (5.6E-01) & (1.1E+00) & (1.4E+01) & (7.8E+00) & (1.5E+00) & (3.2E+01) \\ + f6 & 100 & 2.9E+00 & 5.6E+00 & 1.0E+03 & 9.3E+02 & 4.7E+03 & 4.5E+01 \\\nopagebreak + & & (1.2E+00) & (1.6E+00) & (2.2E+02) & (1.8E+02) & (1.1E+03) & (2.4E+01) \\ + f7 & 3000 & 6.4E-04 & 6.8E-04 & 3.3E-03 & 4.8E-03 & 4.7E-03 & 2.5E-03 \\\nopagebreak + & & (2.5E-04) & (2.5E-04) & (8.5E-04) & (1.2E-03) & (1.2E-03) & (1.4E-03) \\ + f8 & 1000 & 3.3E-05 & 7.1E+00 & 7.9E-11 & 4.7E+00 & 5.9E+03 & 2.4E+03 \\\nopagebreak + & & (2.3E-05) & (2.8E+01) & (1.3E-10) & (3.3E+01) & (1.1E+03) & (6.7E+02) \\ + f9 & 1000 & 1.0E-04 & 1.4E-04 & 1.5E-04 & 1.2E-03 & 1.8E+02 & 5.2E+01 \\\nopagebreak + & & (6.0E-05) & (6.5E-05) & (2.0E-04) & (6.5E-04) & (1.3E+01) & (1.6E+01) \\ + f10 & 500 & 8.2E-10 & 3.0E-09 & 3.5E-04 & 2.7E-03 & 1.1E-01 & 4.6E-01 \\\nopagebreak + & & (6.9E-10) & (2.2E-09) & (1.0E-04) & (5.1E-04) & (3.9E-02) & (6.6E-01) \\ + f11 & 500 & 9.9E-08 & 2.0E-04 & 1.9E-05 & 7.8E-04 & 2.0E-01 & 1.3E-02 \\\nopagebreak + & & (6.0E-07) & (1.4E-03) & (5.8E-05) & (1.2E-03) & (1.1E-01) & (1.7E-02) \\ + f12 & 500 & 4.6E-17 & 3.8E-16 & 1.6E-07 & 1.9E-05 & 1.2E-02 & 1.9E-01 \\\nopagebreak + & & (1.9E-16) & (8.3E-16) & (1.5E-07) & (9.2E-06) & (1.0E-02) & (3.9E-01) \\ + f13 & 500 & 2.0E-16 & 1.2E-15 & 1.5E-06 & 6.1E-05 & 7.5E-02 & 2.9E-03 \\\nopagebreak + & & (6.5E-16) & (2.8E-15) & (9.8E-07) & (2.0E-05) & (3.8E-02) & (4.8E-03) \\ + \bottomrule %%% нижняя линейка +\end{longtabu} \endgroup + +\section{Стандартные префиксы ссылок}\label{app:B4} + +Общепринятым является следующий формат ссылок: \texttt{: