diff options
Diffstat (limited to 'Master/texmf-dist/bibtex/bst/persian-bib/asa-fa.bst')
-rw-r--r-- | Master/texmf-dist/bibtex/bst/persian-bib/asa-fa.bst | 372 |
1 files changed, 192 insertions, 180 deletions
diff --git a/Master/texmf-dist/bibtex/bst/persian-bib/asa-fa.bst b/Master/texmf-dist/bibtex/bst/persian-bib/asa-fa.bst index e05d612db4a..551c1cdacee 100644 --- a/Master/texmf-dist/bibtex/bst/persian-bib/asa-fa.bst +++ b/Master/texmf-dist/bibtex/bst/persian-bib/asa-fa.bst @@ -5,12 +5,12 @@ %% %% by: Mahmood Amintoosi, m.amintoosi@gmail.com %% For XePersian, a Persian Typsetting Package in XeTeX -%% 2010/01/15 %% It may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either this version %% of this license or (at your option) any later version. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %% Original Copyright %% ---------------------------------------- @@ -63,7 +63,7 @@ ENTRY { address author - authorfa + authorfa booktitle chapter edition @@ -72,7 +72,7 @@ ENTRY institution journal key - language + language month note number @@ -82,7 +82,7 @@ ENTRY school series title - translator + translator type volume year @@ -91,14 +91,15 @@ ENTRY { label extra.label sort.label short.list } INTEGERS { output.state before.all mid.sentence after.sentence after.block fa.isInLabel} +% fa.isInLabel is set in format.lab.names FUNCTION {is.print.banners.to.terminal} { #1 } %%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% FILE VERSION AND BANNER %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%% -FUNCTION{bst.file.version} { "0.4" } -FUNCTION{bst.file.date} { "2010/01/15" } +FUNCTION{bst.file.version} { "0.6" } +FUNCTION{bst.file.date} { "2011/07/01" } FUNCTION{bst.file.website} { "http://www.parsilatex.com" } FUNCTION{bst.file.authors} {"M.Amintoosi" } @@ -109,7 +110,7 @@ FUNCTION {banner.message} top$ "-- This is a BibTeX style for XePersian: " bst.file.website * %top$ - %"-- See the " quote$ * "bibtex-fa_userguide.pdf" * quote$ * " manual for usage information." * + %"-- See the " quote$ * "Persian-bib-userguide.pdf" * quote$ * " manual for usage information." * top$ } { skip$ } @@ -131,6 +132,7 @@ FUNCTION {completed.message} %% Persian Functions %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%% + FUNCTION {fa.isPersianLanguage} { language missing$ @@ -139,146 +141,9 @@ FUNCTION {fa.isPersianLanguage} if$ } - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% End of Persian Functions %% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - -FUNCTION {init.state.consts} -{ #0 'before.all := - #1 'mid.sentence := - #2 'after.sentence := - #3 'after.block := -} - -STRINGS { s t } - -FUNCTION {output.nonnull} -{ 's := - output.state mid.sentence = - { ", " * write$ } - { output.state after.block = - { add.period$ write$ - newline$ - "\newblock " write$ - } - { output.state before.all = - 'write$ - { add.period$ " " * write$ } - 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.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 {date.block} -{ - skip$ -} - -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.checkb} -{ empty$ - swap$ empty$ - and - 'skip$ - 'new.block - if$ -} - -FUNCTION {field.or.null} -{ duplicate$ empty$ - { pop$ "" } - 'skip$ - if$ -} - -FUNCTION {emphasize} -{ duplicate$ empty$ - { pop$ "" } - { "\textit{" swap$ * "}" * } - if$ -} - -FUNCTION {capitalize} -{ "u" change.case$ "t" change.case$ } - -FUNCTION {space.word} -{ " " swap$ * " " * } - % Here are the language-specific definitions for explicit words. % Each function has a name bbl.xxx where xxx is the English word. - % The language selected here is ENGLISH + % The languages selected here is ENGLISH and Farsi FUNCTION {bbl.and} { fa.isInLabel @@ -286,7 +151,7 @@ fa.isInLabel { fa.isPersianLanguage {" و "} - {"and"} + {" and "} if$ } if$ @@ -295,16 +160,16 @@ if$ FUNCTION {bbl.editors} { fa.isPersianLanguage - { " ویراستاران "} - {"eds."} + { "ویراستاران"} + { "eds."} if$ } FUNCTION {bbl.editor} { fa.isPersianLanguage - { " ویراستار "} - {"ed." } + { "ویراستار"} + { "ed." } if$ } @@ -312,7 +177,7 @@ FUNCTION {bbl.edby} { fa.isPersianLanguage { " ویراستهی "} - { "edited by" } + { " edited by " } if$ } @@ -320,7 +185,7 @@ FUNCTION {bbl.edition} { fa.isPersianLanguage {" ویرایش "} - {"ed." } + {" ed. " } if$ } @@ -328,7 +193,7 @@ FUNCTION {bbl.volume} { fa.isPersianLanguage {" جلد "} - { "vol."} + { " vol."} if$ } @@ -336,7 +201,7 @@ FUNCTION {bbl.of} { fa.isPersianLanguage { " از "} - { "of" } + { " of " } if$ } @@ -344,7 +209,7 @@ FUNCTION {bbl.number} { fa.isPersianLanguage {" شماره " } - { "no." } + { " no." } if$ } @@ -352,7 +217,7 @@ FUNCTION {bbl.nr} { fa.isPersianLanguage {" شماره "} - { "no." } + { " no." } if$ } @@ -360,7 +225,7 @@ FUNCTION {bbl.in} { fa.isPersianLanguage {" در "} - { "in" } + { " in " } if$ } @@ -368,7 +233,7 @@ FUNCTION {bbl.pages} { fa.isPersianLanguage {" صفحات "} - { "pp." } + { " pp." } if$ } @@ -376,7 +241,7 @@ FUNCTION {bbl.page} { fa.isPersianLanguage {" ص." } - { "p." } + { " p." } if$ } @@ -384,7 +249,7 @@ FUNCTION {bbl.chapter} { fa.isPersianLanguage { " فصل " } - {"chap." } + {" chap." } if$ } @@ -392,7 +257,7 @@ FUNCTION {bbl.techrep} { fa.isPersianLanguage { " گزارش طرح تحقیقی"} - { "Tech. Rep." } + { " Tech. Rep." } if$ } @@ -400,7 +265,7 @@ FUNCTION {bbl.mthesis} { fa.isPersianLanguage {" پایاننامه کارشناسیارشد"} - { "Master's thesis" } + { " Master's thesis" } if$ } @@ -408,7 +273,7 @@ FUNCTION {bbl.phdthesis} { fa.isPersianLanguage {" پایاننامه دکترا" } - { "Ph.D. thesis" } + { " Ph.D. thesis" } if$ } @@ -443,16 +308,166 @@ FUNCTION {bbl.th} FUNCTION {bbl.etal} { fa.isInLabel -{" و دیگران "}% If authorfa exists +{" و دیگران"}% If authorfa exists { fa.isPersianLanguage - {" و دیگران "} + {" و دیگران"} {" et~al."} if$ } if$ } +FUNCTION {bbl.translator} +{ +fa.isPersianLanguage + { " ترجمهی "} + {" Translated by "} +if$ +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% End of Persian Functions %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := +} + +STRINGS { s t } + +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + 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$ + fa.isPersianLanguage + {skip$} + { newline$ + "\end{LTRbibitems}" write$ + newline$ + } + if$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block '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 {date.block} +{ + skip$ +} + +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.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\textit{" swap$ * "}" * } + if$ +} + +FUNCTION {capitalize} +{ "u" change.case$ "t" change.case$ } + +FUNCTION {space.word} +{ " " swap$ * " " * } MACRO {jan} {"Jan."} @@ -628,11 +643,11 @@ FUNCTION {format.translators} { "" } { fa.isPersianLanguage { - " ترجمهی " translator format.names * + bbl.translator translator format.names * } { translator format.names - ", translated by: " * + bbl.translator * } if$ } @@ -670,7 +685,7 @@ FUNCTION {format.title} { "" } { title fa.isPersianLanguage - {"\faenquote{" swap$ *} + {"\faquote{" swap$ *} {"\enquote{" swap$ *} if$ non.stop @@ -779,18 +794,17 @@ FUNCTION {make.full.names} FUNCTION {output.bibitem} { - #0 'fa.isInLabel := + #0 'fa.isInLabel := %Initialize fa.isInLabel newline$ fa.isPersianLanguage - { - "\Persian" write$ - newline$ - } + { skip$ } { - "\Latin" write$ + "\begin{LTRbibitems}" write$ newline$ - } + "\resetlatinfont " write$ + } if$ + newline$ "\bibitem[{" write$ label write$ ")" make.full.names duplicate$ short.list = @@ -1052,6 +1066,7 @@ FUNCTION {format.in.ed.booktitle} if$ } + FUNCTION {format.thesis.type} { type empty$ 'skip$ @@ -1480,7 +1495,7 @@ FUNCTION {format.lab.names} if$ } if$ - + #0 'fa.isInLabel := %reset fa.isInLabel } FUNCTION {author.key.label} @@ -1735,7 +1750,7 @@ FUNCTION {begin.bib} if$ "\begin{thebibliography}{" number.label int.to.str$ * "}" * write$ newline$ - "\newcommand{\faenquote}[1]{''#1``}" + "\newcommand{\faquote}[1]{''#1``}" write$ newline$ "\newcommand{\enquote}[1]{``#1''}" write$ newline$ @@ -1752,11 +1767,8 @@ ITERATE {call.type$} FUNCTION {end.bib} { newline$ "\end{thebibliography}" write$ newline$ - "\Persian" write$ newline$ } EXECUTE {end.bib} EXECUTE{completed.message} -%% End of customized bst file -%% %% End of file `asa-fa.bst'. |