summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/bibtex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-07-29 14:11:15 +0000
committerKarl Berry <karl@freefriends.org>2011-07-29 14:11:15 +0000
commit3af8d5df17178a99b098a782c231b0060fd29b4d (patch)
treea361060a2e13cc7c591b7a0d19e657b67efe1320 /Master/texmf-dist/bibtex
parenta236120bc64ff6dadaf9fcc1494099fcfb7ca7da (diff)
persian-bib (11jul11)
git-svn-id: svn://tug.org/texlive/trunk@23267 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/bibtex')
-rw-r--r--Master/texmf-dist/bibtex/bst/persian-bib/acm-fa.bst223
-rw-r--r--Master/texmf-dist/bibtex/bst/persian-bib/asa-fa.bst372
-rw-r--r--Master/texmf-dist/bibtex/bst/persian-bib/chicago-fa.bst500
-rw-r--r--Master/texmf-dist/bibtex/bst/persian-bib/ieeetr-fa.bst219
-rw-r--r--Master/texmf-dist/bibtex/bst/persian-bib/plain-fa.bst219
-rw-r--r--Master/texmf-dist/bibtex/bst/persian-bib/plainnat-fa.bst386
-rw-r--r--Master/texmf-dist/bibtex/bst/persian-bib/unsrt-fa.bst237
7 files changed, 1440 insertions, 716 deletions
diff --git a/Master/texmf-dist/bibtex/bst/persian-bib/acm-fa.bst b/Master/texmf-dist/bibtex/bst/persian-bib/acm-fa.bst
index 12e0a0ec8ea..48784e924e7 100644
--- a/Master/texmf-dist/bibtex/bst/persian-bib/acm-fa.bst
+++ b/Master/texmf-dist/bibtex/bst/persian-bib/acm-fa.bst
@@ -3,13 +3,13 @@
%%
%% by: Mahmood Amintoosi and Mostafa Vahedi, 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 of acm.bst
@@ -43,16 +43,13 @@ ENTRY
{ label }
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
-STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
- bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
- bbl.translator}% bbl.formatnames}
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 and M.Vahedi" }
@@ -63,7 +60,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$ }
@@ -85,6 +82,7 @@ FUNCTION {completed.message}
%% Persian Functions %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
FUNCTION {fa.isPersianLanguage}
{
language missing$
@@ -93,47 +91,151 @@ FUNCTION {fa.isPersianLanguage}
if$
}
-FUNCTION {keywords.fa}
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The languages selected here is ENGLISH and Farsi
+FUNCTION {bbl.and}
+{
+ fa.isPersianLanguage
+ {" و "}
+ {" and "}
+ if$
+}
+
+FUNCTION {bbl.editors}
+{
+fa.isPersianLanguage
+ { " ویراستاران "}
+ {" eds. "}
+if$
+}
+
+FUNCTION {bbl.editor}
+{
+fa.isPersianLanguage
+ { " ویراستار "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.edby}
+{
+fa.isPersianLanguage
+ { " ویراسته‌ی "}
+ { " edited by " }
+if$
+}
+
+FUNCTION {bbl.edition}
+{
+fa.isPersianLanguage
+ {" ویرایش "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.volume}
{
- " و " 'bbl.and :=
- " و دیگران" 'bbl.etal :=
- " ویراستاران " 'bbl.editors :=
- " ویراسته‌ی " 'bbl.editor :=
- " ویرایش " 'bbl.edition :=
- " جلد " 'bbl.volume :=
- " از " 'bbl.of :=
- " شماره " 'bbl.number :=
- " در " 'bbl.in :=
- " صفحات " 'bbl.pages :=
- " ص." 'bbl.page :=
- " فصل " 'bbl.chapter :=
- " سری " 'bbl.series :=
- " گزارش طرح تحقیقی" 'bbl.techrep :=
- " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
- " پایان‌نامه دکترا" 'bbl.phdthesis :=
- " ترجمه‌ی " 'bbl.translator :=
-}
-
-FUNCTION {keywords.en}
+fa.isPersianLanguage
+ {" جلد "}
+ { " vol."}
+if$
+}
+
+FUNCTION {bbl.of}
+{
+fa.isPersianLanguage
+ { " از "}
+ { " of " }
+if$
+}
+
+FUNCTION {bbl.number}
{
- " and " 'bbl.and :=
- " et~al." 'bbl.etal :=
- " Eds." 'bbl.editors :=
- " Ed." 'bbl.editor :=
- " Ed." 'bbl.edition :=
- " Vol." 'bbl.volume :=
- " of " 'bbl.of :=
- " No." 'bbl.number :=
- " In " 'bbl.in :=
- " pp." 'bbl.pages :=
- " p." 'bbl.page :=
- " Ch." 'bbl.chapter :=
- " Ser." 'bbl.series :=
- " Tech. Rep." 'bbl.techrep :=
- " Master's thesis" 'bbl.mthesis :=
- " Ph.D. thesis" 'bbl.phdthesis :=
- " Translator " 'bbl.translator :=
- %"{vv~}{ll}{, jj}{, f.}" 'bbl.formatnames :=
+fa.isPersianLanguage
+ {" شماره " }
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.nr}
+{
+fa.isPersianLanguage
+ {" شماره "}
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.in}
+{
+fa.isPersianLanguage
+ {" در "}
+ { " in " }
+if$
+}
+
+FUNCTION {bbl.pages}
+{
+fa.isPersianLanguage
+ {" صفحات "}
+ { " pp." }
+if$
+}
+
+FUNCTION {bbl.page}
+{
+fa.isPersianLanguage
+ {" ص." }
+ { " p." }
+if$
+}
+
+FUNCTION {bbl.chapter}
+{
+fa.isPersianLanguage
+ { " فصل " }
+ {" chap." }
+if$
+}
+
+FUNCTION {bbl.techrep}
+{
+fa.isPersianLanguage
+ { " گزارش طرح تحقیقی"}
+ { " Tech. Rep." }
+if$
+}
+
+FUNCTION {bbl.mthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه کارشناسی‌ارشد"}
+ { " Master's thesis" }
+if$
+}
+
+FUNCTION {bbl.phdthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه دکترا" }
+ { " Ph.D. thesis" }
+if$
+}
+
+FUNCTION {bbl.etal}
+{
+ fa.isPersianLanguage
+ {" و دیگران"}
+ {" et~al."}
+ if$
+}
+
+FUNCTION {bbl.translator}
+{
+ fa.isPersianLanguage
+ {"ترجمه‌ی "}
+ {"Translator "}
+ if$
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -189,13 +291,14 @@ FUNCTION {output.bibitem}
{
newline$
fa.isPersianLanguage
- { keywords.fa
- "\Persian" write$
- newline$ }
- { keywords.en
- "\Latin" write$
- newline$ }
+ { skip$ }
+ {
+ "\begin{LTRbibitems}" write$
+ newline$
+ "\resetlatinfont " write$
+ }
if$
+ newline$
"\bibitem{" write$
cite$ write$
"}" write$
@@ -208,6 +311,13 @@ FUNCTION {fin.entry}
{ add.period$
write$
newline$
+ fa.isPersianLanguage
+ {skip$}
+ { newline$
+ "\end{LTRbibitems}" write$
+ newline$
+ }
+ if$
}
FUNCTION {new.block}
@@ -800,13 +910,13 @@ FUNCTION {book}
{ output.bibitem
fa.isPersianLanguage
{
-format.authors output
+ format.authors output
new.block
format.btitle "title" output.check
format.edition output
-new.block
+ new.block
format.translators output
-format.editors output
+ format.editors output
}
{ author empty$
{ format.editors "author and editor" output.check }
@@ -815,7 +925,7 @@ format.editors output
{ "author and editor" editor either.or.check }
'skip$
if$
- }
+ }
if$
new.block
format.btitle "title" output.check
@@ -1319,7 +1429,6 @@ ITERATE {call.type$}
FUNCTION {end.bib}
{ newline$
"\end{thebibliography}" write$ newline$
- "\Persian" write$ newline$
}
EXECUTE {end.bib}
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'.
diff --git a/Master/texmf-dist/bibtex/bst/persian-bib/chicago-fa.bst b/Master/texmf-dist/bibtex/bst/persian-bib/chicago-fa.bst
index e2cde86684a..9969bfa29a2 100644
--- a/Master/texmf-dist/bibtex/bst/persian-bib/chicago-fa.bst
+++ b/Master/texmf-dist/bibtex/bst/persian-bib/chicago-fa.bst
@@ -3,7 +3,6 @@
%%
%% 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.
@@ -191,17 +190,15 @@ ENTRY
{}
{ label.year extra.label sort.year sort.label }
-INTEGERS { output.state before.all mid.sentence after.sentence after.block }
-STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
- bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.translator }%bbl.mthesis bbl.phdthesis }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block fa.isInLabel}
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" }
@@ -212,7 +209,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$ }
@@ -242,47 +239,181 @@ FUNCTION {fa.isPersianLanguage}
if$
}
-FUNCTION {keywords.fa}
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The languages selected here is ENGLISH and Farsi
+FUNCTION {bbl.and}
+{
+fa.isInLabel
+{" و "}% If authorfa exists
+{
+ fa.isPersianLanguage
+ {" و "}
+ {" and "}
+ if$
+}
+if$
+}
+
+FUNCTION {bbl.editors}
+{
+fa.isPersianLanguage
+ { " ویراستاران "}
+ {" eds. "}
+if$
+}
+
+FUNCTION {bbl.editor}
+{
+fa.isPersianLanguage
+ { " ویراستار "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.edby}
+{
+fa.isPersianLanguage
+ { " ویراسته‌ی "}
+ { " edited by " }
+if$
+}
+
+FUNCTION {bbl.edition}
+{
+fa.isPersianLanguage
+ {" ویرایش "}
+ {" ed." }
+if$
+}
+
+FUNCTION {bbl.volume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { " Volume "}
+if$
+}
+
+FUNCTION {bbl.of}
+{
+fa.isPersianLanguage
+ { " از "}
+ { " of " }
+if$
+}
+
+FUNCTION {bbl.number}
+{
+fa.isPersianLanguage
+ {" شماره " }
+ { " Number " }
+if$
+}
+
+% FUNCTION {bbl.nr}
+% {
+% fa.isPersianLanguage
+ % {" شماره "}
+ % { " no." }
+% if$
+% }
+
+FUNCTION {bbl.in}
+{
+fa.isPersianLanguage
+ {" در "}
+ { " In " }
+if$
+}
+
+FUNCTION {bbl.pages}
+{
+fa.isPersianLanguage
+ {" صفحات "}
+ { " pp." }
+if$
+}
+
+FUNCTION {bbl.page}
+{
+fa.isPersianLanguage
+ {" ص." }
+ { " p." }
+if$
+}
+
+FUNCTION {bbl.chapter}
{
- " و " 'bbl.and :=
- " و دیگران" 'bbl.etal :=
- " ویراستاران " 'bbl.editors :=
- " ویراسته‌ی " 'bbl.editor :=
- " ویرایش " 'bbl.edition :=
- " جلد " 'bbl.volume :=
- " از " 'bbl.of :=
- " شماره " 'bbl.number :=
- " در " 'bbl.in :=
- " صفحات " 'bbl.pages :=
- " ص." 'bbl.page :=
- " فصل " 'bbl.chapter :=
- " سری " 'bbl.series :=
- " گزارش طرح تحقیقی" 'bbl.techrep :=
- %" پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
- %" پایان‌نامه دکترا" 'bbl.phdthesis :=
- %" ترجمه‌ی " 'bbl.translator :=
-}
-
-FUNCTION {keywords.en}
+fa.isPersianLanguage
+ { " فصل " }
+ {" chap." }
+if$
+}
+
+FUNCTION {bbl.techrep}
+{
+fa.isPersianLanguage
+ { " گزارش طرح تحقیقی"}
+ { " Tech. Rep." }
+if$
+}
+
+FUNCTION {bbl.mthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه کارشناسی‌ارشد"}
+ { " Master's thesis" }
+if$
+}
+
+FUNCTION {bbl.phdthesis}
{
- " and " 'bbl.and :=
- " et~al." 'bbl.etal :=
- " Eds." 'bbl.editors :=
- " Ed." 'bbl.editor :=
- " Ed." 'bbl.edition :=
- " Vol." 'bbl.volume :=
- " of " 'bbl.of :=
- " No." 'bbl.number :=
- " In " 'bbl.in :=
- " pp.\ " 'bbl.pages :=
- " pp.\ " 'bbl.page :=
- " Ch." 'bbl.chapter :=
- " Ser." 'bbl.series :=
- " Tech. Rep." 'bbl.techrep :=
- %" Master's thesis" 'bbl.mthesis :=
- %" Ph.D. disseration" 'bbl.phdthesis :=
- %" Translator " 'bbl.translator :=
- %"{vv~}{ll}{, jj}{, f.}" 'bbl.formatnames :=
+fa.isPersianLanguage
+ {" پایان‌نامه دکترا" }
+ { " Ph.D. thesis" }
+if$
+}
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+% Added by M.Amintoosi
+FUNCTION {bbl.etal}
+{
+fa.isInLabel
+{" و دیگران"}% If authorfa exists
+{
+ fa.isPersianLanguage
+ {" و دیگران"}
+ {" et~al."}
+ if$
+}
+if$
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -395,6 +526,13 @@ FUNCTION {fin.entry}
{ add.period$
write$
newline$
+ fa.isPersianLanguage
+ {skip$}
+ {newline$
+ "\end{LTRbibitems}" write$
+ newline$
+ }
+ if$
}
FUNCTION {new.block}
@@ -544,6 +682,7 @@ FUNCTION {format.names}
FUNCTION {my.full.label}
{ 's :=
+
#1 'nameptr := % nameptr = 1;
s num.names$ 'numnames := % numnames = num.name$(s);
numnames 'namesleft :=
@@ -976,13 +1115,13 @@ FUNCTION {format.crossref.editor}
{ editor #1 "{vv~}{ll}" format.name$
editor num.names$ duplicate$
#2 >
- { pop$ " et~al." * }
+ { pop$ bbl.etal * }
{ #2 <
'skip$
{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
- { " et~al." * }
- { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ { bbl.etal * }
+ { bbl.and * editor #2 "{vv~}{ll}" format.name$ * }
if$
}
if$
@@ -1041,6 +1180,17 @@ FUNCTION {format.incoll.inproc.crossref}
%
FUNCTION {format.lab.names}
{ 's :=
+ authorfa empty$
+ {
+ %skip$
+ #0 'fa.isInLabel :=
+ }
+ {% If authorfa exists
+ authorfa 's :=
+ #1 'fa.isInLabel :=
+ }
+ if$
+
s num.names$ 'numnames :=
numnames #2 > % change number to number of others allowed before
% forcing "et al".
@@ -1064,26 +1214,11 @@ FUNCTION {format.lab.names}
while$
}
if$
+ #0 'fa.isInLabel := %reset fa.isInLabel
}
FUNCTION {author.key.label}
{
- % Push the two variables onto the stack
- bbl.etal
- bbl.and
- authorfa empty$
- {
- fa.isPersianLanguage
- {
- " و دیگران" 'bbl.etal :=
- " و " 'bbl.and :=
- }
- {
- " et~al." 'bbl.etal :=
- " and " 'bbl.and :=
- }
- if$
-
author empty$
{ key empty$
{
@@ -1094,42 +1229,52 @@ FUNCTION {author.key.label}
}
{ author format.lab.names }
if$
- }
- {
- " و دیگران" 'bbl.etal :=
- " و " 'bbl.and :=
- authorfa format.lab.names
- }
- if$
-
- % Pop the function result and store it on s
- 's :=
- % Push the two variables onto the stack
- 'bbl.and :=
- 'bbl.etal :=
- % push the result into stack
- s
+%
+% % Push the two variables onto the stack
+% bbl.etal
+% bbl.and
+% authorfa empty$
+% {
+% fa.isPersianLanguage
+% {
+% " و دیگران" 'bbl.etal :=
+% " و " 'bbl.and :=
+% }
+% {
+% bbl.etal 'bbl.etal :=
+% " and " 'bbl.and :=
+% }
+% if$
+%
+% author empty$
+% { key empty$
+% {
+% "no key, author in " cite$ * warning$
+% cite$ #1 #3 substring$ }
+% 'key
+% if$
+% }
+% { author format.lab.names }
+% if$
+% }
+% {
+% " و دیگران" 'bbl.etal :=
+% " و " 'bbl.and :=
+% authorfa format.lab.names
+% }
+% if$
+%
+% % Pop the function result and store it on s
+% 's :=
+% % Push the two variables onto the stack
+% 'bbl.and :=
+% 'bbl.etal :=
+% % push the result into stack
+% s
}
FUNCTION {editor.key.label}
{
- % Push the two variables onto the stack
- bbl.etal
- bbl.and
- authorfa empty$
- {
- fa.isPersianLanguage
- {
- " و دیگران" 'bbl.etal :=
- " و " 'bbl.and :=
- }
- {
- " et~al." 'bbl.etal :=
- " and " 'bbl.and :=
- }
- if$
-
-
editor empty$
{ key empty$
{ "no key, editor in " cite$ * warning$
@@ -1139,22 +1284,48 @@ FUNCTION {editor.key.label}
}
{ editor format.lab.names }
if$
-
- }
- {
- " و دیگران" 'bbl.etal :=
- " و " 'bbl.and :=
- authorfa format.lab.names
- }
- if$
-
- % Pop the function result and store it on s
- 's :=
- % Push the two variables onto the stack
- 'bbl.and :=
- 'bbl.etal :=
- % push the result into stack
- s
+% % Push the two variables onto the stack
+% bbl.etal
+% bbl.and
+% authorfa empty$
+% {
+% fa.isPersianLanguage
+% {
+% " و دیگران" 'bbl.etal :=
+% " و " 'bbl.and :=
+% }
+% {
+% bbl.etal 'bbl.etal :=
+% " and " 'bbl.and :=
+% }
+% if$
+%
+%
+% editor empty$
+% { key empty$
+% { "no key, editor in " cite$ * warning$
+% cite$ #1 #3 substring$ }
+% 'key
+% if$
+% }
+% { editor format.lab.names }
+% if$
+%
+% }
+% {
+% " و دیگران" 'bbl.etal :=
+% " و " 'bbl.and :=
+% authorfa format.lab.names
+% }
+% if$
+%
+% % Pop the function result and store it on s
+% 's :=
+% % Push the two variables onto the stack
+% 'bbl.and :=
+% 'bbl.etal :=
+% % push the result into stack
+% s
}
FUNCTION {author.key.organization.label}
@@ -1201,23 +1372,6 @@ FUNCTION {editor.key.organization.label}
FUNCTION {author.editor.key.label}
{
-
- % Push the two variables onto the stack
- bbl.etal
- bbl.and
- authorfa empty$
- {
- fa.isPersianLanguage
- {
- " و دیگران" 'bbl.etal :=
- " و " 'bbl.and :=
- }
- {
- " et~al." 'bbl.etal :=
- " and " 'bbl.and :=
- }
- if$
-
author empty$
{ editor empty$
{ key empty$
@@ -1232,21 +1386,52 @@ FUNCTION {author.editor.key.label}
{ author format.lab.names }
if$
- }
- {
- " و دیگران" 'bbl.etal :=
- " و " 'bbl.and :=
- authorfa format.lab.names
- }
- if$
-
- % Pop the function result and store it on s
- 's :=
- % Push the two variables onto the stack
- 'bbl.and :=
- 'bbl.etal :=
- % push the result into stack
- s
+%
+% % Push the two variables onto the stack
+% bbl.etal
+% bbl.and
+% authorfa empty$
+% {
+% fa.isPersianLanguage
+% {
+% " و دیگران" 'bbl.etal :=
+% " و " 'bbl.and :=
+% }
+% {
+% bbl.etal 'bbl.etal :=
+% " and " 'bbl.and :=
+% }
+% if$
+%
+% author empty$
+% { editor empty$
+% { key empty$
+% { "no key, author, or editor in " cite$ * warning$
+% cite$ #1 #3 substring$ }
+% 'key
+% if$
+% }
+% { editor format.lab.names }
+% if$
+% }
+% { author format.lab.names }
+% if$
+%
+% }
+% {
+% " و دیگران" 'bbl.etal :=
+% " و " 'bbl.and :=
+% authorfa format.lab.names
+% }
+% if$
+%
+% % Pop the function result and store it on s
+% 's :=
+% % Push the two variables onto the stack
+% 'bbl.and :=
+% 'bbl.etal :=
+% % push the result into stack
+% s
}
FUNCTION {calc.label}
@@ -1299,15 +1484,18 @@ FUNCTION {calc.label}
}
FUNCTION {output.bibitem}
-{ newline$
+{
+ #0 'fa.isInLabel := %Initialize fa.isInLabel
+ newline$
fa.isPersianLanguage
- { keywords.fa
- "\Persian" write$
- newline$ }
- { keywords.en
- "\Latin" write$
- newline$ }
+ { skip$ }
+ {
+ "\begin{LTRbibitems}" write$
+ newline$
+ "\resetlatinfont " write$
+ }
if$
+ newline$
"\bibitem[\protect\citeauthoryear{" write$
calc.label write$
@@ -1779,7 +1967,7 @@ FUNCTION {sort.format.names}
nameptr numnames = t "others" = and
- { " et~al" * }
+ { bbl.etal * }
{ t sortify * }
if$
@@ -1946,8 +2134,6 @@ INTEGERS { last.extra.num }
FUNCTION {initialize.extra.label.stuff}
{ #0 int.to.chr$ 'last.label :=
-
-
"" 'next.extra :=
#0 'last.extra.num :=
}
@@ -1972,8 +2158,6 @@ FUNCTION {forward.pass}
if$
}
-
-
FUNCTION {reverse.pass}
{ next.extra "b" =
{ "a" 'extra.label := }
@@ -1983,7 +2167,6 @@ FUNCTION {reverse.pass}
extra.label 'next.extra :=
}
-
EXECUTE {initialize.extra.label.stuff}
ITERATE {forward.pass}
@@ -2034,7 +2217,6 @@ ITERATE {call.type$}
FUNCTION {end.bib}
{ newline$
"\end{thebibliography}" write$ newline$
- "\Persian" write$ newline$
}
EXECUTE {end.bib}
diff --git a/Master/texmf-dist/bibtex/bst/persian-bib/ieeetr-fa.bst b/Master/texmf-dist/bibtex/bst/persian-bib/ieeetr-fa.bst
index d5cee901dd3..e1c1cbe6f8f 100644
--- a/Master/texmf-dist/bibtex/bst/persian-bib/ieeetr-fa.bst
+++ b/Master/texmf-dist/bibtex/bst/persian-bib/ieeetr-fa.bst
@@ -3,12 +3,12 @@
%%
%% by: Mahmood Amintoosi and Mostafa Vahedi, 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
ENTRY
@@ -22,7 +22,7 @@ ENTRY
institution
journal
key
-language
+ language
month
note
number
@@ -32,7 +32,7 @@ language
school
series
title
-translator
+ translator
type
volume
year
@@ -42,16 +42,13 @@ translator
INTEGERS { output.state before.all mid.sentence after.quote after.sentence
after.quoted.block after.block }
-STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
- bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
- bbl.translator}% bbl.formatnames}
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 and M.Vahedi" }
@@ -62,7 +59,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$ }
@@ -92,48 +89,152 @@ FUNCTION {fa.isPersianLanguage}
if$
}
-FUNCTION {keywords.fa}
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The languages selected here is ENGLISH and Farsi
+FUNCTION {bbl.and}
+{
+ fa.isPersianLanguage
+ {" و "}
+ {" and "}
+ if$
+}
+
+FUNCTION {bbl.editors}
+{
+fa.isPersianLanguage
+ { " ویراستاران "}
+ {" eds. "}
+if$
+}
+
+FUNCTION {bbl.editor}
+{
+fa.isPersianLanguage
+ { " ویراستار "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.edby}
+{
+fa.isPersianLanguage
+ { " ویراسته‌ی "}
+ { " edited by " }
+if$
+}
+
+FUNCTION {bbl.edition}
+{
+fa.isPersianLanguage
+ {" ویرایش "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.volume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { " vol."}
+if$
+}
+
+FUNCTION {bbl.of}
+{
+fa.isPersianLanguage
+ { " از "}
+ { " of " }
+if$
+}
+
+FUNCTION {bbl.number}
+{
+fa.isPersianLanguage
+ {" شماره " }
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.nr}
+{
+fa.isPersianLanguage
+ {" شماره "}
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.in}
+{
+fa.isPersianLanguage
+ {" در "}
+ { " in " }
+if$
+}
+
+FUNCTION {bbl.pages}
+{
+fa.isPersianLanguage
+ {" صفحات "}
+ { " pp." }
+if$
+}
+
+FUNCTION {bbl.page}
{
- " و " 'bbl.and :=
- " و دیگران" 'bbl.etal :=
- " ویراستاران " 'bbl.editors :=
- " ویراسته‌ی " 'bbl.editor :=
- " ویرایش " 'bbl.edition :=
- " جلد " 'bbl.volume :=
- " از " 'bbl.of :=
- " شماره " 'bbl.number :=
- " در " 'bbl.in :=
- " صفحات " 'bbl.pages :=
- " ص." 'bbl.page :=
- " فصل " 'bbl.chapter :=
- " سری " 'bbl.series :=
- " گزارش طرح تحقیقی" 'bbl.techrep :=
- " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
- " پایان‌نامه دکترا" 'bbl.phdthesis :=
- " ترجمه‌ی " 'bbl.translator :=
-}
-
-FUNCTION {keywords.en}
+fa.isPersianLanguage
+ {" ص." }
+ { " p." }
+if$
+}
+
+FUNCTION {bbl.chapter}
{
- " and " 'bbl.and :=
- " et~al." 'bbl.etal :=
- " Eds." 'bbl.editors :=
- " Ed." 'bbl.editor :=
- " Ed." 'bbl.edition :=
- " Vol." 'bbl.volume :=
- " of " 'bbl.of :=
- " No." 'bbl.number :=
- " In " 'bbl.in :=
- " pp." 'bbl.pages :=
- " p." 'bbl.page :=
- " Ch." 'bbl.chapter :=
- " Ser." 'bbl.series :=
- " Tech. Rep." 'bbl.techrep :=
- " Master's thesis" 'bbl.mthesis :=
- " Ph.D. disseration" 'bbl.phdthesis :=
- " Translator " 'bbl.translator :=
+fa.isPersianLanguage
+ { " فصل " }
+ {" chap." }
+if$
}
+FUNCTION {bbl.techrep}
+{
+fa.isPersianLanguage
+ { " گزارش طرح تحقیقی"}
+ { " Tech. Rep." }
+if$
+}
+
+FUNCTION {bbl.mthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه کارشناسی‌ارشد"}
+ { " Master's thesis" }
+if$
+}
+
+FUNCTION {bbl.phdthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه دکترا" }
+ { " Ph.D. thesis" }
+if$
+}
+
+FUNCTION {bbl.etal}
+{
+ fa.isPersianLanguage
+ {" و دیگران"}
+ {" et~al."}
+ if$
+}
+
+FUNCTION {bbl.translator}
+{
+ fa.isPersianLanguage
+ {"ترجمه‌ی "}
+ {"Translator "}
+ if$
+}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% End of Persian Functions %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -197,15 +298,17 @@ FUNCTION {output.check}
}
FUNCTION {output.bibitem}
-{ newline$
+{
+ newline$
fa.isPersianLanguage
- { keywords.fa
- "\Persian" write$
- newline$ }
- { keywords.en
- "\Latin" write$
- newline$ }
+ { skip$ }
+ {
+ "\begin{LTRbibitems}" write$
+ newline$
+ "\resetlatinfont " write$
+ }
if$
+ newline$
"\bibitem{" write$
cite$ write$
"}" write$
@@ -225,6 +328,13 @@ FUNCTION {fin.entry}
if$
write$
newline$
+ fa.isPersianLanguage
+ {skip$}
+ { newline$
+ "\end{LTRbibitems}" write$
+ newline$
+ }
+ if$
}
FUNCTION {new.block}
@@ -1141,7 +1251,6 @@ ITERATE {call.type$}
FUNCTION {end.bib}
{ newline$
"\end{thebibliography}" write$ newline$
- "\Persian" write$ newline$
}
EXECUTE {end.bib}
diff --git a/Master/texmf-dist/bibtex/bst/persian-bib/plain-fa.bst b/Master/texmf-dist/bibtex/bst/persian-bib/plain-fa.bst
index 5568bf2d76a..6308589bd22 100644
--- a/Master/texmf-dist/bibtex/bst/persian-bib/plain-fa.bst
+++ b/Master/texmf-dist/bibtex/bst/persian-bib/plain-fa.bst
@@ -3,15 +3,14 @@
%%
%% by: Mahmood Amintoosi and Mostafa Vahedi
%% 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
-
ENTRY
{ address
author
@@ -23,7 +22,7 @@ ENTRY
institution
journal
key
-language
+ language
month
note
number
@@ -33,7 +32,7 @@ language
school
series
title
-translator
+ translator
type
volume
year
@@ -42,16 +41,13 @@ translator
{ label }
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
-STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
- bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
- bbl.translator}% bbl.formatnames}
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 and M.Vahedi" }
@@ -62,7 +58,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$ }
@@ -92,47 +88,151 @@ FUNCTION {fa.isPersianLanguage}
if$
}
-FUNCTION {keywords.fa}
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The languages selected here is ENGLISH and Farsi
+FUNCTION {bbl.and}
+{
+ fa.isPersianLanguage
+ {" و "}
+ {" and "}
+ if$
+}
+
+FUNCTION {bbl.editors}
+{
+fa.isPersianLanguage
+ { " ویراستاران "}
+ {" eds. "}
+if$
+}
+
+FUNCTION {bbl.editor}
+{
+fa.isPersianLanguage
+ { " ویراستار "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.edby}
{
- " و " 'bbl.and :=
- " و دیگران" 'bbl.etal :=
- " ویراستاران " 'bbl.editors :=
- " ویراسته‌ی " 'bbl.editor :=
- " ویرایش " 'bbl.edition :=
- " جلد " 'bbl.volume :=
- " از " 'bbl.of :=
- " شماره " 'bbl.number :=
- " در " 'bbl.in :=
- " صفحات " 'bbl.pages :=
- " ص." 'bbl.page :=
- " فصل " 'bbl.chapter :=
- " سری " 'bbl.series :=
- " گزارش طرح تحقیقی" 'bbl.techrep :=
- " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
- " پایان‌نامه دکترا" 'bbl.phdthesis :=
- " ترجمه‌ی " 'bbl.translator :=
-}
-
-FUNCTION {keywords.en}
+fa.isPersianLanguage
+ { " ویراسته‌ی "}
+ { " edited by " }
+if$
+}
+
+FUNCTION {bbl.edition}
{
- " and " 'bbl.and :=
- " et~al." 'bbl.etal :=
- " Eds." 'bbl.editors :=
- " Ed." 'bbl.editor :=
- " Ed." 'bbl.edition :=
- " Vol." 'bbl.volume :=
- " of " 'bbl.of :=
- " No." 'bbl.number :=
- " In " 'bbl.in :=
- " pp." 'bbl.pages :=
- " p." 'bbl.page :=
- " Ch." 'bbl.chapter :=
- " Ser." 'bbl.series :=
- " Tech. Rep." 'bbl.techrep :=
- " Master's thesis" 'bbl.mthesis :=
- " Ph.D. disseration" 'bbl.phdthesis :=
- " Translator " 'bbl.translator :=
- %"{vv~}{ll}{, jj}{, f.}" 'bbl.formatnames :=
+fa.isPersianLanguage
+ {" ویرایش "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.volume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { " vol."}
+if$
+}
+
+FUNCTION {bbl.of}
+{
+fa.isPersianLanguage
+ { " از "}
+ { " of " }
+if$
+}
+
+FUNCTION {bbl.number}
+{
+fa.isPersianLanguage
+ {" شماره " }
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.nr}
+{
+fa.isPersianLanguage
+ {" شماره "}
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.in}
+{
+fa.isPersianLanguage
+ {" در "}
+ { " in " }
+if$
+}
+
+FUNCTION {bbl.pages}
+{
+fa.isPersianLanguage
+ {" صفحات "}
+ { " pp." }
+if$
+}
+
+FUNCTION {bbl.page}
+{
+fa.isPersianLanguage
+ {" ص." }
+ { " p." }
+if$
+}
+
+FUNCTION {bbl.chapter}
+{
+fa.isPersianLanguage
+ { " فصل " }
+ {" chap." }
+if$
+}
+
+FUNCTION {bbl.techrep}
+{
+fa.isPersianLanguage
+ { " گزارش طرح تحقیقی"}
+ { " Tech. Rep." }
+if$
+}
+
+FUNCTION {bbl.mthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه کارشناسی‌ارشد"}
+ { " Master's thesis" }
+if$
+}
+
+FUNCTION {bbl.phdthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه دکترا" }
+ { " Ph.D. thesis" }
+if$
+}
+
+FUNCTION {bbl.etal}
+{
+ fa.isPersianLanguage
+ {" و دیگران"}
+ {" et~al."}
+ if$
+}
+
+FUNCTION {bbl.translator}
+{
+ fa.isPersianLanguage
+ {"ترجمه‌ی "}
+ {"Translator "}
+ if$
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -188,13 +288,14 @@ FUNCTION {output.bibitem}
{
newline$
fa.isPersianLanguage
- { keywords.fa
- "\Persian" write$
- newline$ }
- { keywords.en
- "\Latin" write$
- newline$ }
+ { skip$ }
+ {
+ "\begin{LTRbibitems}" write$
+ newline$
+ "\resetlatinfont " write$
+ }
if$
+ newline$
"\bibitem{" write$
cite$ write$
"}" write$
@@ -207,6 +308,13 @@ FUNCTION {fin.entry}
{ add.period$
write$
newline$
+ fa.isPersianLanguage
+ {skip$}
+ { newline$
+ "\end{LTRbibitems}" write$
+ newline$
+ }
+ if$
}
FUNCTION {new.block}
@@ -1267,7 +1375,6 @@ ITERATE {call.type$}
FUNCTION {end.bib}
{ newline$
"\end{thebibliography}" write$ newline$
- "\Persian" write$ newline$
}
EXECUTE {end.bib}
diff --git a/Master/texmf-dist/bibtex/bst/persian-bib/plainnat-fa.bst b/Master/texmf-dist/bibtex/bst/persian-bib/plainnat-fa.bst
index e31e2b2d201..2ee7debbf7f 100644
--- a/Master/texmf-dist/bibtex/bst/persian-bib/plainnat-fa.bst
+++ b/Master/texmf-dist/bibtex/bst/persian-bib/plainnat-fa.bst
@@ -3,12 +3,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
%% File: `plainnat.bst'
%% A modification of `plain.bst' for use with natbib package
@@ -60,7 +60,7 @@
ENTRY
{ address
author
- authorfa
+ authorfa
booktitle
chapter
doi
@@ -73,7 +73,7 @@ ENTRY
issn
journal
key
- language
+ language
month
note
number
@@ -83,7 +83,7 @@ ENTRY
school
series
title
- translator
+ translator
type
url
volume
@@ -92,10 +92,7 @@ ENTRY
{}
{ label extra.label sort.label short.list }
-INTEGERS { output.state before.all mid.sentence after.sentence after.block }
-STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
- bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep }%bbl.mthesis bbl.phdthesis
-%}%bbl.translator}% bbl.formatnames}
+INTEGERS { output.state before.all mid.sentence after.sentence after.block fa.isInLabel}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Persian Functions %%
@@ -109,47 +106,189 @@ FUNCTION {fa.isPersianLanguage}
if$
}
-FUNCTION {keywords.fa}
+% Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The languages selected here is ENGLISH and Farsi
+FUNCTION {bbl.and}
+{
+fa.isInLabel
+{" و "}% If authorfa exists
+{
+ fa.isPersianLanguage
+ {" و "}
+ {" and "}
+ if$
+}
+if$
+}
+
+FUNCTION {bbl.editors}
+{
+fa.isPersianLanguage
+ { "ویراستاران"}
+ { "eds."}
+if$
+}
+
+FUNCTION {bbl.editor}
+{
+fa.isPersianLanguage
+ { "ویراستار"}
+ { "ed." }
+if$
+}
+
+FUNCTION {bbl.edby}
{
- " و " 'bbl.and :=
- " و دیگران" 'bbl.etal :=
- " ویراستاران " 'bbl.editors :=
- " ویراسته‌ی " 'bbl.editor :=
- " ویرایش " 'bbl.edition :=
- " جلد " 'bbl.volume :=
- " از " 'bbl.of :=
- " شماره " 'bbl.number :=
- " در " 'bbl.in :=
- " صفحات " 'bbl.pages :=
- " ص." 'bbl.page :=
- " فصل " 'bbl.chapter :=
- " سری " 'bbl.series :=
- " گزارش طرح تحقیقی" 'bbl.techrep :=
-% " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
- % " پایان‌نامه دکترا" 'bbl.phdthesis :=
- % " ترجمه‌ی " 'bbl.translator :=
-}
-
-FUNCTION {keywords.en}
+fa.isPersianLanguage
+ { " ویراسته‌ی "}
+ { " edited by " }
+if$
+}
+
+FUNCTION {bbl.edition}
+{
+fa.isPersianLanguage
+ {" ویرایش "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.volume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { " vol."}
+if$
+}
+
+FUNCTION {bbl.of}
+{
+fa.isPersianLanguage
+ { " از "}
+ { " of " }
+if$
+}
+
+FUNCTION {bbl.number}
{
- " and " 'bbl.and :=
- " et~al." 'bbl.etal :=
- " Eds." 'bbl.editors :=
- " Ed." 'bbl.editor :=
- " Ed." 'bbl.edition :=
- " Vol." 'bbl.volume :=
- " of " 'bbl.of :=
- " No." 'bbl.number :=
- " In " 'bbl.in :=
- " pp." 'bbl.pages :=
- " p." 'bbl.page :=
- " Ch." 'bbl.chapter :=
- " Ser." 'bbl.series :=
- " Tech. Rep." 'bbl.techrep :=
- % " Master's thesis" 'bbl.mthesis :=
- % " Ph.D. disseration" 'bbl.phdthesis :=
- % " Translator " 'bbl.translator :=
- %"{vv~}{ll}{, jj}{, f.}" 'bbl.formatnames :=
+fa.isPersianLanguage
+ {" شماره " }
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.nr}
+{
+fa.isPersianLanguage
+ {" شماره "}
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.in}
+{
+fa.isPersianLanguage
+ {" در "}
+ { " in " }
+if$
+}
+
+FUNCTION {bbl.pages}
+{
+fa.isPersianLanguage
+ {" صفحات "}
+ { " pp." }
+if$
+}
+
+FUNCTION {bbl.page}
+{
+fa.isPersianLanguage
+ {" ص." }
+ { " p." }
+if$
+}
+
+FUNCTION {bbl.chapter}
+{
+fa.isPersianLanguage
+ { " فصل " }
+ {" chap." }
+if$
+}
+
+FUNCTION {bbl.techrep}
+{
+fa.isPersianLanguage
+ { " گزارش طرح تحقیقی"}
+ { " Tech. Rep." }
+if$
+}
+
+FUNCTION {bbl.mthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه کارشناسی‌ارشد"}
+ { " Master's thesis" }
+if$
+}
+
+FUNCTION {bbl.phdthesis}
+{
+fa.isPersianLanguage
+ {" پایان‌نامه دکترا" }
+ { " Ph.D. thesis" }
+if$
+}
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+% Added by M.Amintoosi
+FUNCTION {bbl.etal}
+{
+fa.isInLabel
+{" و دیگران"}% If authorfa exists
+{
+ fa.isPersianLanguage
+ {" و دیگران"}
+ {" et~al."}
+ if$
+}
+if$
+}
+
+FUNCTION {bbl.translator}
+{
+fa.isPersianLanguage
+ { " ترجمه‌ی "}
+ {" Translated by "}
+if$
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -206,6 +345,13 @@ FUNCTION {fin.entry}
{ add.period$
write$
newline$
+ fa.isPersianLanguage
+ {skip$}
+ { newline$
+ "\end{LTRbibitems}" write$
+ newline$
+ }
+ if$
}
FUNCTION {new.block}
@@ -361,11 +507,11 @@ FUNCTION {format.translators}
{ "" }
{ fa.isPersianLanguage
{
- " ترجمه‌ی " translator format.names *
+ bbl.translator translator format.names *
}
{
translator format.names
- ", " " translated by " * *
+ ", " bbl.translator * *
}
if$
}
@@ -389,7 +535,12 @@ FUNCTION {format.issn}
FUNCTION {format.url}
{ url empty$
{ "" }
- { new.block "URL \url{" url * "}" * }
+ {
+ fa.isPersianLanguage
+ {new.block "\url{" url * "}" * }
+ {new.block "URL \url{" url * "}" * }
+ if$
+ }
if$
}
@@ -478,15 +629,18 @@ FUNCTION {make.full.names}
}
FUNCTION {output.bibitem}
-{ newline$
+{
+ #0 'fa.isInLabel := %Initialize fa.isInLabel
+ newline$
fa.isPersianLanguage
- { keywords.fa
- "\Persian" write$
- newline$ }
- { keywords.en
- "\Latin" write$
- newline$ }
+ { skip$ }
+ {
+ "\begin{LTRbibitems}" write$
+ newline$
+ "\resetlatinfont " write$
+ }
if$
+ newline$
"\bibitem[" write$
label write$
")" make.full.names duplicate$ short.list =
@@ -1246,6 +1400,17 @@ FUNCTION {chop.word}
FUNCTION {format.lab.names}
{ 's :=
+ authorfa empty$
+ {
+ %skip$
+ #0 'fa.isInLabel :=
+ }
+ {% If authorfa exists
+ authorfa 's :=
+ #1 'fa.isInLabel :=
+ }
+ if$
+
s #1 "{vv~}{ll}" format.name$
s num.names$ duplicate$
#2 >
@@ -1260,100 +1425,36 @@ FUNCTION {format.lab.names}
if$
}
if$
+ #0 'fa.isInLabel := %reset fa.isInLabel
}
FUNCTION {author.key.label}
{
- % Push the two variables onto the stack
- bbl.etal
- bbl.and
- authorfa empty$
- {
- fa.isPersianLanguage
- {
- " و دیگران" 'bbl.etal :=
- " و " 'bbl.and :=
- }
- {
- " et~al." 'bbl.etal :=
- " and " 'bbl.and :=
- }
- if$
-
- author empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { author format.lab.names }
- if$
- }
- {
- " و دیگران" 'bbl.etal :=
- " و " 'bbl.and :=
- authorfa format.lab.names
- }
- if$
-
- % Pop the function result and store it on s
- 's :=
- % Push the two variables onto the stack
- 'bbl.and :=
- 'bbl.etal :=
- % push the result into stack
- s
-
+ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
}
FUNCTION {author.editor.key.label}
{
-
- % Push the two variables onto the stack
- bbl.etal
- bbl.and
- authorfa empty$
- {
- fa.isPersianLanguage
- {
- " و دیگران" 'bbl.etal :=
- " و " 'bbl.and :=
- }
- {
- " et~al." 'bbl.etal :=
- " and " 'bbl.and :=
- }
- if$
-
- author empty$
- { editor empty$
- { key empty$
- { "no key, author, or editor in " cite$ * warning$
- cite$ #1 #3 substring$ }
- 'key
- if$
- }
- { editor format.lab.names }
- if$
- }
- { author format.lab.names }
- if$
-
- }
- {
- " و دیگران" 'bbl.etal :=
- " و " 'bbl.and :=
- authorfa format.lab.names
+ author empty$
+ { editor empty$
+ { key empty$
+ { "no key, author, or editor in " cite$ * warning$
+ cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
}
- if$
-
- % Pop the function result and store it on s
- 's :=
- % Push the two variables onto the stack
- 'bbl.and :=
- 'bbl.etal :=
- % push the result into stack
- s
+ { author format.lab.names }
+ if$
}
FUNCTION {author.key.organization.label}
@@ -1645,7 +1746,6 @@ ITERATE {call.type$}
FUNCTION {end.bib}
{ newline$
"\end{thebibliography}" write$ newline$
- "\Persian" write$ newline$
}
EXECUTE {end.bib}
diff --git a/Master/texmf-dist/bibtex/bst/persian-bib/unsrt-fa.bst b/Master/texmf-dist/bibtex/bst/persian-bib/unsrt-fa.bst
index 75794270c5e..438f78b36d7 100644
--- a/Master/texmf-dist/bibtex/bst/persian-bib/unsrt-fa.bst
+++ b/Master/texmf-dist/bibtex/bst/persian-bib/unsrt-fa.bst
@@ -3,7 +3,6 @@
%%
%% by: Mahmood Amintoosi and Mostafa Vahedi, 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.
@@ -11,8 +10,6 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Original Copyright
-%%%%%%%%%%% History:
-
ENTRY
{ address
author
@@ -43,16 +40,13 @@ translator
{ label }
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
-STRINGS {bbl.and bbl.etal bbl.editors bbl.editor bbl.edition bbl.volume bbl.of bbl.number
- bbl.in bbl.pages bbl.page bbl.chapter bbl.series bbl.techrep bbl.mthesis bbl.phdthesis
- bbl.translator }
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.5" }
+FUNCTION{bst.file.date} { "2011/07/01" }
FUNCTION{bst.file.website} { "http://www.parsilatex.com" }
FUNCTION{bst.file.authors} {"M.Amintoosi and M.Vahedi" }
@@ -63,7 +57,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$ }
@@ -93,46 +87,151 @@ FUNCTION {fa.isPersianLanguage}
if$
}
-FUNCTION {keywords.fa}
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The languages selected here is ENGLISH and Farsi
+FUNCTION {bbl.and}
+{
+ fa.isPersianLanguage
+ {" و "}
+ {" and "}
+ if$
+}
+
+FUNCTION {bbl.editors}
+{
+fa.isPersianLanguage
+ { " ویراستاران "}
+ {" eds. "}
+if$
+}
+
+FUNCTION {bbl.editor}
+{
+fa.isPersianLanguage
+ { " ویراستار "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.edby}
+{
+fa.isPersianLanguage
+ { " ویراسته‌ی "}
+ { " edited by " }
+if$
+}
+
+FUNCTION {bbl.edition}
+{
+fa.isPersianLanguage
+ {" ویرایش "}
+ {" ed. " }
+if$
+}
+
+FUNCTION {bbl.volume}
+{
+fa.isPersianLanguage
+ {" جلد "}
+ { " vol."}
+if$
+}
+
+FUNCTION {bbl.of}
+{
+fa.isPersianLanguage
+ { " از "}
+ { " of " }
+if$
+}
+
+FUNCTION {bbl.number}
+{
+fa.isPersianLanguage
+ {" شماره " }
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.nr}
+{
+fa.isPersianLanguage
+ {" شماره "}
+ { " no." }
+if$
+}
+
+FUNCTION {bbl.in}
+{
+fa.isPersianLanguage
+ {" در "}
+ { " in " }
+if$
+}
+
+FUNCTION {bbl.pages}
+{
+fa.isPersianLanguage
+ {" صفحات "}
+ { " pp." }
+if$
+}
+
+FUNCTION {bbl.page}
+{
+fa.isPersianLanguage
+ {" ص." }
+ { " p." }
+if$
+}
+
+FUNCTION {bbl.chapter}
+{
+fa.isPersianLanguage
+ { " فصل " }
+ {" chap." }
+if$
+}
+
+FUNCTION {bbl.techrep}
+{
+fa.isPersianLanguage
+ { " گزارش طرح تحقیقی"}
+ { " Tech. Rep." }
+if$
+}
+
+FUNCTION {bbl.mthesis}
{
- " و " 'bbl.and :=
- " و دیگران" 'bbl.etal :=
- " ویراستاران " 'bbl.editors :=
- " ویراسته‌ی " 'bbl.editor :=
- " ویرایش " 'bbl.edition :=
- " جلد " 'bbl.volume :=
- " از " 'bbl.of :=
- " شماره " 'bbl.number :=
- " در " 'bbl.in :=
- " صفحات " 'bbl.pages :=
- " ص." 'bbl.page :=
- " فصل " 'bbl.chapter :=
- " سری " 'bbl.series :=
- " گزارش طرح تحقیقی" 'bbl.techrep :=
- " پایان‌نامه کارشناسی‌ارشد" 'bbl.mthesis :=
- " پایان‌نامه دکترا" 'bbl.phdthesis :=
- " ترجمه‌ی " 'bbl.translator :=
-}
-
-FUNCTION {keywords.en}
+fa.isPersianLanguage
+ {" پایان‌نامه کارشناسی‌ارشد"}
+ { " Master's thesis" }
+if$
+}
+
+FUNCTION {bbl.phdthesis}
{
- " and " 'bbl.and :=
- " et~al." 'bbl.etal :=
- " eds." 'bbl.editors :=
- " ed." 'bbl.editor :=
- " ed." 'bbl.edition :=
- " Vol." 'bbl.volume :=
- " of " 'bbl.of :=
- " No." 'bbl.number :=
- " In " 'bbl.in :=
- " pp." 'bbl.pages :=
- " p." 'bbl.page :=
- " Ch." 'bbl.chapter :=
- " Ser." 'bbl.series :=
- " Tech. Rep." 'bbl.techrep :=
- " Master's thesis" 'bbl.mthesis :=
- " Ph.D. disseration" 'bbl.phdthesis :=
- " Translator " 'bbl.translator :=
+fa.isPersianLanguage
+ {" پایان‌نامه دکترا" }
+ { " Ph.D. thesis" }
+if$
+}
+
+FUNCTION {bbl.etal}
+{
+ fa.isPersianLanguage
+ {" و دیگران"}
+ {" et~al."}
+ if$
+}
+
+FUNCTION {bbl.translator}
+{
+ fa.isPersianLanguage
+ {"ترجمه‌ی "}
+ {"Translator "}
+ if$
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -187,13 +286,14 @@ FUNCTION {output.check}
FUNCTION {output.bibitem}
{ newline$
fa.isPersianLanguage
- { keywords.fa
- "\Persian" write$
- newline$ }
- { keywords.en
- "\Latin" write$
- newline$ }
+ { skip$ }
+ {
+ "\begin{LTRbibitems}" write$
+ newline$
+ "\resetlatinfont " write$
+ }
if$
+ newline$
"\bibitem{" write$
cite$ write$
"}" write$
@@ -206,6 +306,13 @@ FUNCTION {fin.entry}
{ add.period$
write$
newline$
+ fa.isPersianLanguage
+ {skip$}
+ { newline$
+ "\end{LTRbibitems}" write$
+ newline$
+ }
+ if$
}
FUNCTION {new.block}
@@ -283,6 +390,7 @@ FUNCTION {field.or.null}
if$
}
+
FUNCTION {emphasize}
{ duplicate$ empty$
{ pop$ "" }
@@ -290,6 +398,7 @@ FUNCTION {emphasize}
if$
}
+
INTEGERS { nameptr namesleft numnames }
FUNCTION {format.names}
@@ -439,8 +548,8 @@ FUNCTION {format.bvolume}
{ "" }
{ bbl.volume volume tie.or.space.connect
series empty$
-'skip$
-{ bbl.of * series emphasize * }
+ 'skip$
+ { bbl.of * series emphasize * }
if$
"volume and number" number either.or.check
}
@@ -523,18 +632,18 @@ FUNCTION {format.vol.num.pages}
number empty$
'skip$
{ "(" number * ")" * *
- volume empty$
-{ "there's a number but no volume in " cite$ * warning$ }
-'skip$
- if$
+ 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$
+ { pop$ format.pages }
+ { ":" * pages n.dashify * }
+ if$
}
if$
}
@@ -1109,12 +1218,8 @@ ITERATE {call.type$}
FUNCTION {end.bib}
{ newline$
"\end{thebibliography}" write$ newline$
- "\Persian" write$ newline$
}
EXECUTE {end.bib}
EXECUTE{completed.message}
-%%
-%% by Mahmood Amintoosi
-%%
%% End of file `unsrt-fa.bst'.