diff options
author | Karl Berry <karl@freefriends.org> | 2023-12-15 22:00:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-12-15 22:00:26 +0000 |
commit | 4583e0fc63149780198e761628bdb8e844c1e421 (patch) | |
tree | 673f595c0a653bfb62ed0cf86d7051eba0325d52 /Master/texmf-dist/bibtex/bst | |
parent | a3c02f8d194a4de843bebe633690ddbd8942ead6 (diff) |
iran-bibtex (15dec23)
git-svn-id: svn://tug.org/texlive/trunk@69137 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/bibtex/bst')
-rw-r--r-- | Master/texmf-dist/bibtex/bst/iran-bibtex/iran.bst | 1876 |
1 files changed, 1551 insertions, 325 deletions
diff --git a/Master/texmf-dist/bibtex/bst/iran-bibtex/iran.bst b/Master/texmf-dist/bibtex/bst/iran-bibtex/iran.bst index d830b9f3b0b..f4534d5d621 100644 --- a/Master/texmf-dist/bibtex/bst/iran-bibtex/iran.bst +++ b/Master/texmf-dist/bibtex/bst/iran-bibtex/iran.bst @@ -1,6 +1,6 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% -%% This file is “iran.bst”, +%% This file is “iran.bst”, %% generated with the DOCSTRIP utility and then modified to support %% bilingual (English/Latin, and Persian). %% @@ -64,6 +64,7 @@ ENTRY by % the added field chapter collaboration + comment % the added field commentator % the added field compiler % the added field doi @@ -78,6 +79,7 @@ ENTRY introduction % the added field isbn issn + issue % the added field journal key language @@ -474,8 +476,8 @@ FUNCTION {bbl.semicolon} FUNCTION {bbl.techrep} { is.language.persian - {""} - {""} + {"گزارش"} + {"tech. rep."} if$ } @@ -483,7 +485,7 @@ FUNCTION {bbl.translator} { is.language.persian {"مترجم"} - {"tran."} + {"trans."} if$ } @@ -1091,7 +1093,7 @@ FUNCTION {format.doi} doi empty$ { "" } { - bbl.doi "u" change.case$ ": \doi{" * doi * "}" * + bbl.doi "u" change.case$ ":\doi{" * doi * "}" * } if$ } @@ -1123,12 +1125,7 @@ FUNCTION {format.note} FUNCTION {format.title} { - title - duplicate$ empty$ - 'skip$ - { "t" change.case$ } - if$ - "title" bibinfo.check + title "title" bibinfo.check duplicate$ empty$ 'skip$ { @@ -1327,14 +1324,108 @@ FUNCTION {format.date} +FUNCTION {format.article.comment} +{ + comment +} + + + +FUNCTION {format.article.journal} +{ + journal remove.dots emphasize +} + + + +FUNCTION {format.article.jour.iss.vol.num.pp} +{ + journal empty$ not + { + issue empty$ not + { issue bbl.comma * " " *} + { "" } + if$ + format.article.journal * + volume empty$ not + { + number empty$ not + { + pages empty$ not + { + " " * volume * " " * + "(" * number * ")" * ": " * + pages * + } + { + " " * volume * bbl.comma * + " " * bbl.number * "~" * number * + } + if$ + } + { + pages empty$ not + { + " " * volume * ": " * + pages * + } + { + " " * volume * + } + if$ + } + if$ + } + { + number empty$ not + { + pages empty$ not + { + bbl.comma * " " * bbl.number * "~" * number * + ": " * pages * + } + { + bbl.comma * " " * bbl.number * "~" * number * + } + if$ + } + { + pages empty$ not + { + bbl.comma * " " * pages * + } + 'skip$ + if$ + } + if$ + } + if$ + } + { + "journal" output.check + } + if$ +} + + + FUNCTION {format.btitle} { title "title" bibinfo.check duplicate$ empty$ 'skip$ - { - emphasize - } + { emphasize } + if$ +} + + + +FUNCTION {format.title.in.books} +{ + title "title" bibinfo.check + duplicate$ empty$ + 'skip$ + { emphasize } if$ } @@ -1351,26 +1442,17 @@ FUNCTION {either.or.check} FUNCTION {format.bvolume} { - volume empty$ not - { - volumes empty$ not - { - bbl.volume volume "~" swap$ * * - bbl.of separate.by.space volumes * - * - } - { - bbl.volume volume "~" swap$ * * - } - if$ - } + volume empty$ + { "" } { - volumes empty$ not - { - volumes bbl.volumes "~" swap$ * * - } - { "" } + bbl.volume volume tie.or.space.prefix + "volume" bibinfo.check * * + series "series" bibinfo.check + duplicate$ empty$ + 'pop$ + { emphasize ", " * swap$ * } if$ + "volume and number" number either.or.check } if$ } @@ -1378,33 +1460,33 @@ FUNCTION {format.bvolume} FUNCTION {format.number.series} { - series empty$ not + volume empty$ { - number empty$ not - { - series " " * number * - } - { series field.or.null } - if$ - } - { - number empty$ not + number empty$ + { series field.or.null } { - output.state mid.sentence = - { bbl.number } - { bbl.number capitalize } + series empty$ + { number "number" bibinfo.check } + { + output.state mid.sentence = + { bbl.number } + { bbl.number capitalize } + if$ + number tie.or.space.prefix "number" bibinfo.check * * + bbl.in space.word * + series "series" bibinfo.check * + } if$ - number "~" swap$ * * } - { "" } if$ } + { "" } if$ } -FUNCTION {format.bvolume.series.number} +FUNCTION {format.book.volume.series.number} { volume empty$ not { @@ -1414,13 +1496,13 @@ FUNCTION {format.bvolume.series.number} { number empty$ not { - bbl.volume "~" * volume * + bbl.volume capitalize "~" * volume * " " * bbl.of * " " * volumes * add.period$ " " * series emphasize * " " * number * } { - bbl.volume "~" * volume * + bbl.volume capitalize "~" * volume * " " * bbl.of * " " * volumes * add.period$ " " * series emphasize * } @@ -1429,12 +1511,12 @@ FUNCTION {format.bvolume.series.number} { number empty$ not { - bbl.volume "~" * volume * + bbl.volume capitalize "~" * volume * " " * bbl.of * " " * volumes * add.period$ " " * bbl.number * "~" * number * } { - bbl.volume "~" * volume * + bbl.volume capitalize "~" * volume * " " * bbl.of * " " * volumes * } if$ @@ -1446,12 +1528,12 @@ FUNCTION {format.bvolume.series.number} { number empty$ not { - bbl.volume "~" * volume * + bbl.volume capitalize "~" * volume * " " * bbl.of * " " * series emphasize * " " * number * } { - bbl.volume "~" * volume * + bbl.volume capitalize "~" * volume * " " * bbl.of * " " * series emphasize * } if$ @@ -1459,11 +1541,11 @@ FUNCTION {format.bvolume.series.number} { number empty$ not { - bbl.volume "~" * volume * add.period$ + bbl.volume capitalize "~" * volume * add.period$ " " * bbl.number * "~" * number * } { - bbl.volume "~" * volume * add.period$ + bbl.volume capitalize "~" * volume * add.period$ } if$ } @@ -1533,6 +1615,441 @@ FUNCTION {format.bvolume.series.number} +FUNCTION {format.booktitle} +{ + booktitle "booktitle" bibinfo.check + emphasize +} + + + +FUNCTION {format.incoll.chapter.booktitle.volume.pages} +{ + booktitle empty$ not + { + chapter empty$ not + { + bbl.chapter capitalize "~" * chapter * + " " * bbl.in * " " * format.booktitle * + pages empty$ not + { + bbl.comma * " " * pages * add.period$ + } + { + add.period$ + } + if$ + volume empty$ not + { + volumes empty$ not + { + " " * bbl.volume capitalize * "~" * volume * " " * bbl.of * " " * volumes * add.period$ + } + { + " " * bbl.volume capitalize * "~" * volume * add.period$ + } + if$ + } + { + volumes empty$ not + { + " " * volumes * "~" * bbl.volumes * add.period$ + } + { + skip$ + } + if$ + } + if$ + } + { + word.in format.booktitle * + pages empty$ not + { + volume empty$ not + { + volumes empty$ not + { + " " * volume * ": " * pages * add.period$ + " " * volumes * "~" * bbl.volumes * add.period$ + } + { + " " * volume * ": " * pages * add.period$ + } + if$ + } + { + volumes empty$ not + { + bbl.comma * " " * pages * add.period$ + " " * volumes * "~" * bbl.volumes * add.period$ + } + { + bbl.comma * " " * pages * add.period$ + } + if$ + } + if$ + } + { + add.period$ + volume empty$ not + { + volumes empty$ not + { + " " * bbl.volume capitalize * "~" * volume * + " " * bbl.of * " " * volumes * add.period$ + } + { + " " * bbl.volume capitalize * "~" * volume * add.period$ + } + if$ + } + { + volumes empty$ not + { + " " * volumes * "~" * bbl.volumes * add.period$ + } + { + skip$ + } + if$ + } + if$ + } + if$ + } + if$ + } + { + "" + } + if$ +} + + + +INTEGERS { emph.series } +FUNCTION {format.incoll.series.number} +{ + author empty$ not + { + translator empty$ not + { #1 'emph.series := } + { + edition empty$ not + { #1 } + { #0 } + if$ + impression empty$ not + { #1 } + { #0 } + if$ + + 'emph.series := + } + if$ + } + { + compiler empty$ not + { + translator empty$ not + { #1 'emph.series := } + { + edition empty$ not + { #1 } + { #0 } + if$ + impression empty$ not + { #1 } + { #0 } + if$ + + 'emph.series := + } + if$ + } + { + editor empty$ not + { + translator empty$ not + { #1 'emph.series := } + { + edition empty$ not + { #1 } + { #0 } + if$ + impression empty$ not + { #1 } + { #0 } + if$ + + 'emph.series := + } + if$ + } + { + edition empty$ not + { #1 } + { #0 } + if$ + impression empty$ not + { #1 } + { #0 } + if$ + + 'emph.series := + } + if$ + } + if$ + } + if$ + series empty$ not + { + emph.series #0 > + { + number empty$ not + { series emphasize " " * number * } + { series emphasize } + if$ + } + { + number empty$ not + { series " " * number * } + { series } + if$ + } + if$ + } + { + number empty$ not + { bbl.number capitalize "~" * number * } + { "" } + if$ + } + if$ +} + + + +FUNCTION {format.inproc.booktitle.volume.pages} +{ + booktitle empty$ not + { + volume empty$ not + { + volumes empty$ not + { + pages empty$ not + { + format.booktitle " " * + volume * ": " * pages * add.period$ + " " * volumes * "~" * bbl.volumes * + } + { + format.booktitle add.period$ + " " * bbl.volume * "~" * volume * bbl.of * " " * volumes * + } + if$ + } + { + pages empty$ not + { + format.booktitle " " * + volume * ": " * pages * + } + { + format.booktitle add.period$ + " " * bbl.volume * "~" * volume * + } + if$ + } + if$ + } + { + volumes empty$ not + { + pages empty$ not + { + format.booktitle " " * + bbl.comma * " " * pages * add.period$ + volumes * "~" * bbl.volumes + } + { + format.booktitle " " * add.period$ + " " * volumes * "~" * bbl.volumes * + } + if$ + } + { + pages empty$ not + { + format.booktitle " " * + bbl.comma * " " * pages * + } + { + format.booktitle + } + if$ + } + if$ + } + if$ + } + { + "" + } + if$ +} + + + +FUNCTION {format.inproc.series.number} +{ + author empty$ not + { + translator empty$ not + { #1 'emph.series := } + { + edition empty$ not + { #1 } + { #0 } + if$ + impression empty$ not + { #1 } + { #0 } + if$ + + 'emph.series := + } + if$ + } + { + edition empty$ not + { #1 } + { #0 } + if$ + impression empty$ not + { #1 } + { #0 } + if$ + + 'emph.series := + } + if$ + series empty$ not + { + emph.series #0 > + { + number empty$ not + { series emphasize " " * number * } + { series emphasize } + if$ + } + { + number empty$ not + { series " " * number * } + { series } + if$ + } + if$ + } + { + number empty$ not + { bbl.number capitalize "~" * number * } + { "" } + if$ + } + if$ +} + + + +FUNCTION {format.conf.series.number.pages} +{ + series empty$ not + { + number empty$ not + { + pages empty$ not + { + series + bbl.comma * " " * bbl.number * "~" * number * + bbl.comma * " " * pages * + } + { + series + bbl.comma * " " * bbl.number * "~" * number * + } + if$ + } + { + pages empty$ not + { + series + bbl.comma * " " * pages * + } + { series } + if$ + } + if$ + } + { "" } + if$ +} + + + +FUNCTION {format.conf.org.publisher.address} +{ + organization empty$ not + { + publisher empty$ not + { + address empty$ not + { + organization add.period$ + address * ": " * publisher * + } + { + organization add.period$ + publisher * + } + if$ + } + { + address empty$ not + { + organization + bbl.comma * " " * address * + } + { + organization + } + if$ + } + if$ + } + { + publisher empty$ not + { + address empty$ not + { address ": " * publisher *} + { publisher } + if$ + } + { + address empty$ not + { address } + { "" } + if$ + } + if$ + } + if$ +} + + + +FUNCTION {format.proc.org.publisher.address} { format.conf.org.publisher.address } + + + FUNCTION {format.edition} { edition duplicate$ empty$ @@ -1726,14 +2243,6 @@ FUNCTION {format.chapter.pages} -FUNCTION {format.booktitle} -{ - booktitle "booktitle" bibinfo.check - emphasize -} - - - FUNCTION {format.in.ed.booktitle} { format.booktitle @@ -1948,8 +2457,7 @@ FUNCTION {format.book.crossref} FUNCTION {format.incoll.inproc.crossref} { - word.in - " \cite{" * crossref * "}" * + word.in " \cite{" * crossref * "}" * } @@ -1992,6 +2500,13 @@ FUNCTION {format.organization.address} +FUNCTION {format.organization} +{ + organization "organization" bibinfo.check +} + + + STRINGS {oldname} FUNCTION {name.or.dash} @@ -2057,7 +2572,7 @@ FUNCTION {begin.bibitem} -FUNCTION {finish.entry} +FUNCTION {end.bibitem} { add.period$ write$ newline$ @@ -2076,83 +2591,142 @@ FUNCTION {finish.entry} % Function to format entries -FUNCTION {article} -{ begin.bibitem - format.authors "author" output.check - author format.key output - name.or.dash - format.date "year" output.check - date.block - format.title "title" output.check - new.block - crossref missing$ - { - journal - remove.dots - "journal" bibinfo.check - emphasize - "journal" output.check - add.blank - format.vol.num.pages output - } - { format.article.crossref output.nonnull - format.pages output - } - if$ - new.block format.issn output - new.block format.doi output - new.block - format.note output - new.block format.eprint output - new.block format.url output - finish.entry -} - - - -FUNCTION {book} -{ +FUNCTION {article} % THIS ENTRY TYPE IS NOT COMPATIBLE WITH IRAN MANUAL OF STYLE +{ begin.bibitem author empty$ not { format.authors output.nonnull name.or.dash format.date "year" output.check - new.block format.btitle "title" output.check - translator empty$ + new.block format.title "title" output.check + new.sentence format.article.comment output + new.sentence format.by output + crossref missing$ { + new.sentence format.translatedby output + new.sentence format.translateyear output + new.sentence format.edby output + new.sentence format.article.jour.iss.vol.num.pp output + new.sentence format.note output + new.sentence format.issn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { + format.article.crossref output.nonnull + format.pages output + } + if$ + } + { %%% if author is empty, proceeds with editor + editor empty$ not + { + format.editors output.nonnull + name.or.dash + format.date "year" output.check + new.block format.title "title" output.check + new.sentence format.article.comment output + new.sentence format.by output crossref missing$ { - new.sentence format.edition output - new.sentence format.impression output - new.sentence format.by output - new.sentence format.bvolume.series.number output - new.sentence format.incollaborationwith output - new.sentence format.commentatedby output - new.sentence format.compiledby output - new.sentence format.edby output - new.sentence format.introby output - new.sentence format.prefaceby output - new.sentence format.afterwordby output - new.sentence format.publisher.address output + new.sentence format.translatedby output + new.sentence format.translateyear output + new.sentence format.article.jour.iss.vol.num.pp output new.sentence format.note output - new.sentence format.isbn output + new.sentence format.issn output new.sentence format.doi output new.sentence format.urldate output new.sentence format.url output } { - new.block format.book.crossref output.nonnull + format.article.crossref output.nonnull + format.pages output + } + if$ + } + { %%% if author, and editor are empty, proceeds with translator + translator empty$ not + { + format.translators output.nonnull + name.or.dash + new.sentence format.translateyear output + new.block format.title "title" output.check + new.sentence format.article.comment output + new.sentence format.by output + new.sentence format.date output + crossref missing$ + { + new.sentence format.edby output + new.sentence format.article.jour.iss.vol.num.pp output + new.sentence format.note output + new.sentence format.issn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { + format.article.crossref output.nonnull + format.pages output + } + if$ + } + { %%% if author, editor, and translator are empty, proceeds with key + key empty$ not + { + format.title "title" output.nonnull + name.or.dash + format.date "year" output.check + new.sentence format.by output + crossref missing$ + { + new.sentence format.edby output + new.sentence format.article.jour.iss.vol.num.pp output + new.sentence format.note output + new.sentence format.issn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { + format.article.crossref output.nonnull + format.pages output + } + if$ + } + { + "author, translator, and key" output.check + } + if$ } if$ } + if$ + } + if$ + end.bibitem +} + + + +FUNCTION {book} +{ + begin.bibitem + author empty$ not + { + format.authors output.nonnull + name.or.dash + format.date "year" output.check + new.block format.title.in.books "title" output.check + crossref missing$ { new.sentence format.edition output new.sentence format.impression output new.sentence format.by output new.sentence format.translatedby output new.sentence format.translateyear output - new.sentence format.bvolume.series.number output + new.sentence format.book.volume.series.number output new.sentence format.incollaborationwith output new.sentence format.commentatedby output new.sentence format.compiledby output @@ -2167,48 +2741,26 @@ FUNCTION {book} new.sentence format.urldate output new.sentence format.url output } + { + new.block format.book.crossref output.nonnull + } if$ } - { %%% if author field is empty, proceed with compiler + { %%% if author field is empty, proceeds with compiler compiler empty$ not { format.compilers output.nonnull name.or.dash format.date "year" output.check - new.block format.btitle "title" output.check - translator empty$ - { - crossref missing$ - { - new.sentence format.edition output - new.sentence format.impression output - new.sentence format.by output - new.sentence format.bvolume.series.number output - new.sentence format.incollaborationwith output - new.sentence format.commentatedby output - new.sentence format.edby output - new.sentence format.introby output - new.sentence format.prefaceby output - new.sentence format.afterwordby output - new.sentence format.publisher.address output - new.sentence format.note output - new.sentence format.isbn output - new.sentence format.doi output - new.sentence format.urldate output - new.sentence format.url output - } - { - new.block format.book.crossref output.nonnull - } - if$ - } + new.block format.title.in.books "title" output.check + crossref missing$ { new.sentence format.edition output new.sentence format.impression output new.sentence format.by output new.sentence format.translatedby output new.sentence format.translateyear output - new.sentence format.bvolume.series.number output + new.sentence format.book.volume.series.number output new.sentence format.incollaborationwith output new.sentence format.commentatedby output new.sentence format.edby output @@ -2222,47 +2774,26 @@ FUNCTION {book} new.sentence format.urldate output new.sentence format.url output } + { + new.block format.book.crossref output.nonnull + } if$ } - { %%% if author, and compiler fields are empty, proceed with editor + { %%% if author, and compiler fields are empty, proceeds with editor editor empty$ not { format.editors output.nonnull name.or.dash format.date "year" output.check - new.block format.btitle "title" output.check - translator empty$ - { - crossref missing$ - { - new.sentence format.edition output - new.sentence format.impression output - new.sentence format.by output - new.sentence format.bvolume.series.number output - new.sentence format.incollaborationwith output - new.sentence format.commentatedby output - new.sentence format.introby output - new.sentence format.prefaceby output - new.sentence format.afterwordby output - new.sentence format.publisher.address output - new.sentence format.note output - new.sentence format.isbn output - new.sentence format.doi output - new.sentence format.urldate output - new.sentence format.url output - } - { - new.block format.book.crossref output.nonnull - } - if$ - } + new.block format.title.in.books "title" output.check + crossref missing$ { new.sentence format.edition output new.sentence format.impression output new.sentence format.by output new.sentence format.translatedby output new.sentence format.translateyear output - new.sentence format.bvolume.series.number output + new.sentence format.book.volume.series.number output new.sentence format.incollaborationwith output new.sentence format.commentatedby output new.sentence format.introby output @@ -2275,20 +2806,23 @@ FUNCTION {book} new.sentence format.urldate output new.sentence format.url output } + { + new.block format.book.crossref output.nonnull + } if$ } - { %%% if author, compiler, and editor fields are empty, proceed translator + { %%% if author, compiler, and editor fields are empty, proceeds with translator translator empty$ not { format.translators output.nonnull name.or.dash new.sentence format.translateyear output - new.block format.btitle "title" output.check + new.block format.title.in.books "title" output.check new.sentence format.edition output new.sentence format.impression output new.sentence format.by output new.sentence format.date output - new.sentence format.bvolume.series.number output + new.sentence format.book.volume.series.number output new.sentence format.incollaborationwith output new.sentence format.commentatedby output new.sentence format.introby output @@ -2301,17 +2835,18 @@ FUNCTION {book} new.sentence format.urldate output new.sentence format.url output } - { %%% if author, compiler, editor, and translator fields are empty, proceed key + { %%% if author, compiler, editor, and translator fields are empty, proceeds with key key empty$ not { - format.btitle "title" output.check + format.title.in.books "title" output.check + name.or.dash format.date "year" output.check crossref missing$ { new.sentence format.edition output new.sentence format.impression output new.sentence format.by output - new.sentence format.bvolume.series.number output + new.sentence format.book.volume.series.number output new.sentence format.incollaborationwith output new.sentence format.commentatedby output new.sentence format.introby output @@ -2341,13 +2876,14 @@ FUNCTION {book} if$ } if$ - finish.entry + end.bibitem } -FUNCTION {booklet} -{ begin.bibitem +FUNCTION {booklet} % THIS ENTRY TYPE IS NOT COMPATIBLE WITH IRAN MANUAL OF STYLE +{ + begin.bibitem format.authors output author format.key output name.or.dash @@ -2363,13 +2899,14 @@ FUNCTION {booklet} format.note output format.eprint output format.url output - finish.entry + end.bibitem } -FUNCTION {inbook} -{ begin.bibitem +FUNCTION {inbook} % THIS ENTRY TYPE IS NOT COMPATIBLE WITH IRAN MANUAL OF STYLE +{ + begin.bibitem author empty$ { format.editors "author and editor" output.check editor format.key output @@ -2389,7 +2926,7 @@ FUNCTION {inbook} crossref missing$ { format.bvolume output - format.chapter.pages "chapter and pages" output.check + format.chapter.pages output%"chapter and pages" output.check new.block format.number.series output format.edition output @@ -2411,89 +2948,369 @@ FUNCTION {inbook} format.note output format.eprint output format.url output - finish.entry + end.bibitem } FUNCTION {incollection} -{ +{ begin.bibitem - format.authors "author" output.check - author format.key output - name.or.dash - format.date "year" output.check - date.block - format.title "title" output.check - new.block - crossref missing$ + author empty$ not { - format.in.ed.booktitle "booktitle" output.check - format.number.series output - format.edition output - format.chapter.pages output - new.sentence - format.publisher.address output - format.isbn output + format.authors output.nonnull + name.or.dash + format.date "year" output.check + new.block format.title "title" output.check + crossref missing$ + { + new.sentence format.by output + new.sentence format.incoll.chapter.booktitle.volume.pages output + new.sentence format.edition output + new.sentence format.impression output + new.sentence format.translatedby output + new.sentence format.translateyear output + new.sentence format.incoll.series.number output + new.sentence format.compiledby output + new.sentence format.edby output + new.sentence format.publisher.address output + new.sentence format.note output + new.sentence format.isbn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { + new.block format.incoll.inproc.crossref output.nonnull + } + if$ } - { - format.incoll.inproc.crossref output.nonnull - format.chapter.pages output + { %%% if author field is empty, proceeds with compiler + compiler empty$ not + { + format.compilers output.nonnull + name.or.dash + format.date "year" output.check + new.block format.title "title" output.check + crossref missing$ + { + new.sentence format.by output + new.sentence format.incoll.chapter.booktitle.volume.pages output + new.sentence format.edition output + new.sentence format.impression output + new.sentence format.translatedby output + new.sentence format.translateyear output + new.sentence format.incoll.series.number output + new.sentence format.edby output + new.sentence format.publisher.address output + new.sentence format.note output + new.sentence format.isbn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { + new.block format.incoll.inproc.crossref output.nonnull + } + if$ + } + { %%% if author, and compiler fields are empty, proceeds with editor + editor empty$ not + { + format.editors output.nonnull + name.or.dash + format.date "year" output.check + new.block format.title "title" output.check + crossref missing$ + { + new.sentence format.by output + new.sentence format.incoll.chapter.booktitle.volume.pages output + new.sentence format.edition output + new.sentence format.impression output + new.sentence format.translatedby output + new.sentence format.translateyear output + new.sentence format.incoll.series.number output + new.sentence format.publisher.address output + new.sentence format.note output + new.sentence format.isbn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { + new.block format.incoll.inproc.crossref output.nonnull + } + if$ + } + { %%% if author, compiler, and editor fields are empty, proceeds with translator + translator empty$ not + { + format.translators output.nonnull + name.or.dash + new.sentence format.translateyear output + new.block format.title "title" output.check + new.sentence format.by output + new.sentence format.date output + new.sentence format.incoll.chapter.booktitle.volume.pages output + new.sentence format.edition output + new.sentence format.impression output + new.sentence format.incoll.series.number output + new.sentence format.compiledby output + new.sentence format.edby output + new.sentence format.publisher.address output + new.sentence format.note output + new.sentence format.isbn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { %%% if author, compiler, editor, and translator fields are empty, proceeds with key + key empty$ not + { + format.title "title" output.check + name.or.dash + format.date "year" output.check + new.sentence format.by output + crossref missing$ + { + new.sentence format.incoll.chapter.booktitle.volume.pages output + new.sentence format.edition output + new.sentence format.impression output + new.sentence format.incoll.series.number output + new.sentence format.compiledby output + new.sentence format.edby output + new.sentence format.publisher.address output + new.sentence format.note output + new.sentence format.isbn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { + new.block format.incoll.inproc.crossref output.nonnull + } + if$ + } + { + "author, compiler, editor, translator, and key" output.check + } + if$ + } + if$ + } + if$ + } + if$ } if$ - format.doi output - new.block - format.note output - format.eprint output - format.url output - finish.entry + end.bibitem } FUNCTION {inproceedings} -{ begin.bibitem - format.authors "author" output.check - author format.key output - name.or.dash - format.date "year" output.check - date.block - format.title "title" output.check - new.block - crossref missing$ - { format.in.ed.booktitle "booktitle" output.check - format.number.series output - format.pages output - new.sentence - publisher empty$ - { format.organization.address output } - { organization "organization" bibinfo.check output - format.publisher.address output +{ + begin.bibitem + author empty$ not + { + format.authors output.nonnull + name.or.dash + format.date "year" output.check + new.block format.title "title" output.check + new.sentence format.by output + crossref missing$ + { + new.sentence format.inproc.booktitle.volume.pages output + new.sentence format.edition output + new.sentence format.impression output + new.sentence format.translatedby output + new.sentence format.translateyear output + new.sentence format.inproc.series.number output + new.sentence format.compiledby output + new.sentence format.edby output + new.sentence format.publisher.address output + new.sentence format.note output + new.sentence format.isbn output + new.sentence format.issn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { + format.incoll.inproc.crossref output.nonnull + format.pages output } if$ - format.isbn output - format.issn output } - { format.incoll.inproc.crossref output.nonnull - format.pages output + { %%% if author field is empty, proceeds with translator + translator empty$ not + { + format.translators output.nonnull + name.or.dash + new.sentence format.translateyear output + new.block format.title "title" output.check + new.sentence format.by output + new.sentence format.date output + crossref missing$ + { + new.sentence format.inproc.booktitle.volume.pages output + new.sentence format.edition output + new.sentence format.impression output + new.sentence format.inproc.series.number output + new.sentence format.compiledby output + new.sentence format.edby output + new.sentence format.publisher.address output + new.sentence format.note output + new.sentence format.isbn output + new.sentence format.issn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { + format.incoll.inproc.crossref output.nonnull + format.pages output + } + if$ + } + { %%% if author, and translator fields are empty, proceeds with key + key empty$ not + { + format.title "title" output.check + name.or.dash + format.date "year" output.check + new.sentence format.by output + crossref missing$ + { + new.sentence format.inproc.booktitle.volume.pages output + new.sentence format.edition output + new.sentence format.impression output + new.sentence format.inproc.series.number output + new.sentence format.compiledby output + new.sentence format.edby output + new.sentence format.publisher.address output + new.sentence format.note output + new.sentence format.isbn output + new.sentence format.issn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { + format.incoll.inproc.crossref output.nonnull + format.pages output + } + if$ + } + { + "author, translator, and key" output.check + } + if$ + } + if$ } if$ - format.doi output - new.block - format.note output - format.eprint output - format.url output - finish.entry + end.bibitem } -FUNCTION {conference} { inproceedings } +FUNCTION {conference} +{ + begin.bibitem + author empty$ not + { + format.authors output.nonnull + name.or.dash + format.date "year" output.check + new.block format.title "title" output.check + new.sentence format.by output + crossref missing$ + { + new.sentence format.translatedby output + new.sentence format.translateyear output + new.sentence format.conf.series.number.pages output + new.sentence format.edby output + new.sentence format.conf.org.publisher.address output + new.sentence format.note output + new.sentence format.issn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { + format.incoll.inproc.crossref output.nonnull + format.pages output + } + if$ + } + { %%% if author is empty, proceeds with translator + translator empty$ not + { + format.translators output.nonnull + name.or.dash + new.sentence format.translateyear output + new.block format.title "title" output.check + new.sentence format.by output + new.sentence format.date output + crossref missing$ + { + new.sentence format.conf.series.number.pages output + new.sentence format.edby output + new.sentence format.conf.org.publisher.address output + new.sentence format.note output + new.sentence format.issn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { + format.incoll.inproc.crossref output.nonnull + format.pages output + } + if$ + } + { %%% if author, and translator are empty, proceeds with key + key empty$ not + { + format.title "title" output.check + name.or.dash + format.date "year" output.check + new.sentence format.by output + crossref missing$ + { + new.sentence format.conf.series.number.pages output + new.sentence format.edby output + new.sentence format.conf.org.publisher.address output + new.sentence format.note output + new.sentence format.issn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { + format.incoll.inproc.crossref output.nonnull + format.pages output + } + if$ + } + { + "author, translator, and key" output.check + } + if$ + } + if$ + } + if$ + end.bibitem + +} -FUNCTION {manual} -{ begin.bibitem +FUNCTION {manual} % THIS ENTRY TYPE IS NOT COMPATIBLE WITH IRAN MANUAL OF STYLE +{ + begin.bibitem format.authors output author format.key output name.or.dash @@ -2509,13 +3326,14 @@ FUNCTION {manual} format.note output format.eprint output format.url output - finish.entry + end.bibitem } -FUNCTION {mastersthesis} -{ begin.bibitem +FUNCTION {mastersthesis} % THIS ENTRY TYPE IS NOT COMPATIBLE WITH IRAN MANUAL OF STYLE +{ + begin.bibitem format.authors "author" output.check author format.key output name.or.dash @@ -2532,13 +3350,14 @@ FUNCTION {mastersthesis} format.note output format.eprint output format.url output - finish.entry + end.bibitem } -FUNCTION {misc} -{ begin.bibitem +FUNCTION {misc} % THIS ENTRY TYPE IS NOT COMPATIBLE WITH IRAN MANUAL OF STYLE +{ + begin.bibitem format.authors output author format.key output name.or.dash @@ -2552,13 +3371,14 @@ FUNCTION {misc} format.note output format.eprint output format.url output - finish.entry + end.bibitem } -FUNCTION {phdthesis} -{ begin.bibitem +FUNCTION {phdthesis} % THIS ENTRY TYPE IS NOT COMPATIBLE WITH IRAN MANUAL OF STYLE +{ + begin.bibitem format.authors "author" output.check author format.key output name.or.dash @@ -2575,42 +3395,107 @@ FUNCTION {phdthesis} format.note output format.eprint output format.url output - finish.entry + end.bibitem } FUNCTION {proceedings} -{ begin.bibitem - format.editors output - editor format.key output - name.or.dash - format.date "year" output.check - date.block - format.btitle "title" output.check - format.bvolume output - format.number.series output - new.sentence - publisher empty$ - { format.organization.address output } - { organization "organization" bibinfo.check output - format.publisher.address output +{ + begin.bibitem + editor empty$ not + { + format.editors output.nonnull + name.or.dash + format.date "year" output.check + new.block format.title.in.books "title" output.check + new.sentence format.edition output + new.sentence format.impression output + new.sentence format.translatedby output + new.sentence format.translateyear output + new.sentence format.book.volume.series.number output + new.sentence format.compiledby output + new.sentence format.proc.org.publisher.address output + new.sentence format.note output + new.sentence format.isbn output + new.sentence format.issn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { %%% if editor field is empty, proceeds with compiler + compiler empty$ not + { + format.compilers output.nonnull + name.or.dash + format.date "year" output.check + new.block format.title.in.books "title" output.check + new.sentence format.edition output + new.sentence format.impression output + new.sentence format.translatedby output + new.sentence format.translateyear output + new.sentence format.book.volume.series.number output + new.sentence format.proc.org.publisher.address output + new.sentence format.note output + new.sentence format.isbn output + new.sentence format.issn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { %%% if editor, and compiler fields are empty, proceeds with translator + translator empty$ not + { + format.translators output.nonnull + name.or.dash + new.sentence format.translateyear output + new.block format.title.in.books "title" output.check + new.sentence format.edition output + new.sentence format.impression output + new.sentence format.book.volume.series.number output + new.sentence format.proc.org.publisher.address output + new.sentence format.note output + new.sentence format.isbn output + new.sentence format.issn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { + key empty$ not + { + format.title.in.books "title" output.check + name.or.dash + format.date "year" output.check + new.block format.edition output + new.sentence format.impression output + new.sentence format.book.volume.series.number output + new.sentence format.proc.org.publisher.address output + new.sentence format.note output + new.sentence format.isbn output + new.sentence format.issn output + new.sentence format.doi output + new.sentence format.urldate output + new.sentence format.url output + } + { + "editor, compiler, translator, and key" output.check + } + if$ + } + if$ + } + if$ } if$ - format.isbn output - format.issn output - format.doi output - new.block - format.note output - format.eprint output - format.url output - finish.entry + end.bibitem } -FUNCTION {techreport} -{ begin.bibitem +FUNCTION {techreport} % THIS ENTRY TYPE IS NOT COMPATIBLE WITH IRAN MANUAL OF STYLE +{ + begin.bibitem format.authors "author" output.check author format.key output name.or.dash @@ -2627,13 +3512,14 @@ FUNCTION {techreport} format.note output format.eprint output format.url output - finish.entry + end.bibitem } -FUNCTION {unpublished} -{ begin.bibitem +FUNCTION {unpublished} % THIS ENTRY TYPE IS NOT COMPATIBLE WITH IRAN MANUAL OF STYLE +{ + begin.bibitem format.authors "author" output.check author format.key output name.or.dash @@ -2645,7 +3531,7 @@ FUNCTION {unpublished} format.note "note" output.check format.eprint output format.url output - finish.entry + end.bibitem } @@ -2670,7 +3556,7 @@ FUNCTION {sortify} -% Length of the label +% Length of the label name of the entry INTEGERS { len } @@ -2686,7 +3572,7 @@ FUNCTION {chop.word} -% Format the label name +% Function to create the label name of the entry FUNCTION {label.and} { @@ -2745,7 +3631,7 @@ FUNCTION {format.lab.names} " " * label.etal * } { - label.and separate.by.space * s #2 "{vv~}{ll}" format.name$ * + bbl.comma * " " * label.and separate.by.space * s #2 "{vv~}{ll}" format.name$ * } if$ } @@ -2779,35 +3665,115 @@ FUNCTION {author.key.label} 'key if$ } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ + author empty$ { - author format.lab.names + editor empty$ + { + key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ } + { author format.lab.names } if$ } -FUNCTION {author.editor.key.label} +FUNCTION {editor.key.label} { - author empty$ not + editor empty$ { - author format.lab.names + key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ } { - compiler empty$ not + editor format.lab.names + } + if$ +} + + + +FUNCTION {article.creator.label.order} +{ + author empty$ not + { author format.lab.names } + { + editor empty$ not + { editor format.lab.names } { - compiler format.lab.names + translator empty$ not + { translator format.lab.names } + { + key empty$ not + 'key + { cite$ #1 #3 substring$ } + if$ + } + if$ } + if$ + } + if$ +} + + + +FUNCTION {book.creator.label.order} +{ + author empty$ not + { author format.lab.names } + { + compiler empty$ not + { compiler format.lab.names } { editor empty$ not - { - editor format.lab.names - } + { editor format.lab.names } { translator empty$ not + { translator format.lab.names } { - translator format.lab.names + key empty$ not + 'key + { cite$ #1 #3 substring$ } + if$ } + if$ + } + if$ + } + if$ + } + if$ +} + + + +FUNCTION {incoll.creator.label.order} +{ + author empty$ not + { author format.lab.names } + { + compiler empty$ not + { compiler format.lab.names } + { + editor empty$ not + { editor format.lab.names } + { + translator empty$ not + { translator format.lab.names } { key empty$ not 'key @@ -2825,17 +3791,65 @@ FUNCTION {author.editor.key.label} -FUNCTION {editor.key.label} +FUNCTION {proc.creator.label.order} { - editor empty$ + editor empty$ not + { editor format.lab.names } { - key empty$ - { cite$ #1 #3 substring$ } - 'key + compiler empty$ not + { compiler format.lab.names } + { + translator empty$ not + { translator format.lab.names } + { + key empty$ not + 'key + { cite$ #1 #3 substring$ } + if$ + } + if$ + } if$ } + if$ +} + + + +FUNCTION {conf.creator.label.order} +{ + author empty$ not + { author format.lab.names } { - editor format.lab.names + translator empty$ not + { translator format.lab.names } + { + key empty$ not + 'key + { cite$ #1 #3 substring$ } + if$ + } + if$ + } + if$ +} + + + +FUNCTION {inproc.creator.label.order} +{ + author empty$ not + { author format.lab.names } + { + translator empty$ not + { translator format.lab.names } + { + key empty$ not + 'key + { cite$ #1 #3 substring$ } + if$ + } + if$ } if$ } @@ -2844,14 +3858,37 @@ FUNCTION {editor.key.label} FUNCTION {calc.short.authors} { - type$ "book" = - type$ "inbook" = - or - 'author.editor.key.label + type$ "article" = + 'article.creator.label.order { - type$ "proceedings" = - 'editor.key.label - 'author.key.label + type$ "book" = + 'book.creator.label.order + { + type "incollection" = + 'incoll.creator.label.order + { + type$ "proceedings" = + 'proc.creator.label.order + { + type "conference" = + 'conf.creator.label.order + { + type "inproceedings" = + 'inproc.creator.label.order + { + type "inbook" = + 'author.editor.key.label + 'author.key.label + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } if$ } if$ @@ -2983,15 +4020,95 @@ FUNCTION {author.sort} { key sortify } if$ } + { author sort.format.names } + 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 {editor.sort} +{ + editor empty$ + { + key empty$ + { + "to sort, need editor or key in " cite$ * warning$ + "" + } + { + key sortify + } + if$ + } + { + editor sort.format.names + } + if$ +} + + + +FUNCTION {article.creator.sort.order} +{ + author empty$ not { author sort.format.names } + { + editor empty$ not + { + editor sort.format.names + } + { + translator empty$ not + { + translator sort.format.names + } + { + key empty$ not + { + key sortify + } + { + "to sort, need author, editor, translator, or key in " cite$ * warning$ + "" + } + if$ + } + if$ + } + if$ + } if$ } -FUNCTION {author.editor.sort} +FUNCTION {book.creator.sort.order} { author empty$ not { @@ -3034,22 +4151,108 @@ FUNCTION {author.editor.sort} -FUNCTION {editor.sort} +FUNCTION {incoll.creator.sort.order} { - editor empty$ + author empty$ not { - key empty$ + author sort.format.names + } + { + compiler empty$ not { - "to sort, need editor or key in " cite$ * warning$ - "" + compiler sort.format.names } { - key sortify + editor empty$ not + { + editor sort.format.names + } + { + translator empty$ not + { + translator sort.format.names + } + { + key empty$ not + { + key sortify + } + { + "to sort, need author, compiler, editor, translator, or key in " cite$ * warning$ + "" + } + if$ + } + if$ + } + if$ } if$ } + if$ +} + + + +FUNCTION {proc.creator.sort.order} +{ + editor empty$ not + { editor sort.format.names } { - editor sort.format.names + compiler empty$ not + { compiler sort.format.names } + { + translator empty$ not + { translator sort.format.names } + { + key empty$ not + 'key + { cite$ #1 #3 substring$ } + if$ + } + if$ + } + if$ + } + if$ +} + + + +FUNCTION {conf.creator.sort.order} +{ + author empty$ not + { author sort.format.names } + { + translator empty$ not + { translator sort.format.names } + { + key empty$ not + 'key + { cite$ #1 #3 substring$ } + if$ + } + if$ + } + if$ +} + + + +FUNCTION {inproc.creator.sort.order} +{ + author empty$ not + { author sort.format.names } + { + translator empty$ not + { translator sort.format.names } + { + key empty$ not + 'key + { cite$ #1 #3 substring$ } + if$ + } + if$ } if$ } @@ -3062,14 +4265,37 @@ FUNCTION {presort} label sortify " " * - type$ "book" = - type$ "inbook" = - or - 'author.editor.sort + type$ "article" = + 'article.creator.sort.order { - type$ "proceedings" = - 'editor.sort - 'author.sort + type$ "book" = + 'book.creator.sort.order + { + type "incollection" = + 'incoll.creator.sort.order + { + type$ "proceedings" = + 'proc.creator.sort.order + { + type "conference" = + 'conf.creator.sort.order + { + type "inproceedings" = + 'inproc.creator.sort.order + { + type "inbook" = + 'author.editor.sort + 'author.sort + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } if$ } if$ |