summaryrefslogtreecommitdiff
path: root/biblio/bibtex/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'biblio/bibtex/contrib')
-rw-r--r--biblio/bibtex/contrib/iran-bibtex/README.md33
-rw-r--r--biblio/bibtex/contrib/iran-bibtex/iran-bibtex-cp1256fa.csf124
-rw-r--r--biblio/bibtex/contrib/iran-bibtex/iran-bibtex.sty113
-rw-r--r--biblio/bibtex/contrib/iran-bibtex/iran-structure.pdfbin0 -> 61876 bytes
-rw-r--r--biblio/bibtex/contrib/iran-bibtex/iran-structure.tex181
-rw-r--r--biblio/bibtex/contrib/iran-bibtex/iran.bst3239
6 files changed, 3690 insertions, 0 deletions
diff --git a/biblio/bibtex/contrib/iran-bibtex/README.md b/biblio/bibtex/contrib/iran-bibtex/README.md
new file mode 100644
index 0000000000..9acac96926
--- /dev/null
+++ b/biblio/bibtex/contrib/iran-bibtex/README.md
@@ -0,0 +1,33 @@
+# iran-bibtex — Iran Manual of Style Citation Guide for BibTeX
+The iran-bibtex package is a LaTeX package that provides a BibTeX style based on the [Iran Manual of Style](https://imos.irandoc.ac.ir) (1st edn., 2016) guide to Persian, and English information sources.
+
+Numerous examples of the use of this package have been prepared and are available in [the package's GitHub repository](https://github.com/farshadrasuli/iran-bibtex).
+
+The bibliography style produced by `makebst` program ([custom-bib](https://ctan.org/pkg/custom-bib) package), then modified to implement Persian/Farsi language and be compatible with the Iran Manual of Style guidelines. A file named `iran-bibtex-cp1256fa.csf` is prepared (based on the [ascii.csf](https://ctan.org/tex-archive/biblio/bibtex/bibtex-x/csf/ascii.csf) file) for this package to sort references alphabetically (Persian/Farsi, then English).
+
+**Important note:** If you want the references to be sorted in alphabetical order, where Persian/Farsi is placed first and then English/Latin, you must run `bibtex8 -W -c iran-bibtex-cp1256fa` for compilation, and your bibliography database file (*.bib) must be encoded in `utf8` encryption. If you want to place English/Latin first, run `bibtex` for compilation and there is no need `utf8` encryption for the `bib` file.
+
+This package relies on [natbib](https://ctan.org/pkg/natbib) package and works only with [xepersian](https://ctan.org/pkg/xepersian) package.
+
+
+## Copyright
+Copyright (c) 2023 Farshad Rasuli (farshad.rasuli@gmail.com).
+
+This package distributed under the LaTeX Project Public License. It may be distributed and/or modified under the LaTeX Project Public License, version 1.3c or higher. The latest version of this license is at: http://www.latex-project.org/lppl.txt
+
+This work is “author-maintained” (as per LPPL maintenance status)
+by Farshad Rasuli.
+
+The repository for the package is located at: https://github.com/farshadrasuli/iran-bibtex
+
+
+## Reporting issues
+If you want to report any bugs or issues, please use [the issue tracker](https://github.com/farshadrasuli/iran-bibtex/issues). In doing so, please always explain your issue well enough and always include a minimal working example showing the issue.
+
+
+## Change log
+First version release date: 2023/12/12.
+
+v0.1.0 (2023/12/12)
+ 1. First release on CTAN, and GitHub.
+ 2. Support `@book` entry only \ No newline at end of file
diff --git a/biblio/bibtex/contrib/iran-bibtex/iran-bibtex-cp1256fa.csf b/biblio/bibtex/contrib/iran-bibtex/iran-bibtex-cp1256fa.csf
new file mode 100644
index 0000000000..33455ae16b
--- /dev/null
+++ b/biblio/bibtex/contrib/iran-bibtex/iran-bibtex-cp1256fa.csf
@@ -0,0 +1,124 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% FILE: $RCSfile: cp1256fa.csf,v $
+%% $Revision: 1.0 $
+%% $Date: 2023/12/8 $
+%%
+%% AUTHOR: Farshad Rasuli <farshad.rasuli@gmail.com>
+%%
+%% CHARACTER SET: ASCII + Persian/Farsi (Code Page 1256)
+%%
+%%
+%% SORTING ORDER: Persian-English
+%%
+%%
+%% WARNING
+%%
+%% This is a BibTeX Codepage and Sort definition file (CSF). It is
+%% used to define the 8-bit character set used by BibTeX and the
+%% order in which those characters should be sorted.
+%%
+%% This file will only work with the 8-bit implementation of BibTeX
+%% written by Niel Kempson and Alejandro Aguilar-Sierra.
+%%
+%%
+%% CHANGE LOG
+%%
+%% $Log: cp1256fa.csf,v $
+%%
+%% Revision 1.0 2023/12/8 rasuli
+%% Initial release
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%
+%% SORTING ORDER
+%%
+%% The sorting order defined is the Persian language sorting order then the
+%% natural English language sorting order (i.e. 0..9AaBb..YyZz). Any other
+%% characters will be sorted after the characters in the \order section.
+%%
+\order{
+ ۰
+ ۱
+ ۲
+ ۳
+ ۴
+ ۵
+ ۶
+ ۷
+ ۸
+ ۹
+ ء أ إ ئ ؤ
+ آ
+ ا
+ ب
+ پ
+ ت ة
+ ث
+ ج
+ چ
+ ح
+ خ
+ د
+ ذ
+ ر
+ ز
+ ژ
+ س
+ ش
+ ص
+ ض
+ ط
+ ظ
+ ع
+ غ
+ ف
+ ق
+ ک ك
+ گ
+ ل
+ م
+ ن
+ و
+ ه
+ ی ي
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ A a
+ B b
+ C c
+ D d
+ E e
+ F f
+ G g
+ H h
+ I i
+ J j
+ K k
+ L l
+ M m
+ N n
+ O o
+ P p
+ Q q
+ R r
+ S s
+ T t
+ U u
+ V v
+ W w
+ X x
+ Y y
+ Z z
+}
diff --git a/biblio/bibtex/contrib/iran-bibtex/iran-bibtex.sty b/biblio/bibtex/contrib/iran-bibtex/iran-bibtex.sty
new file mode 100644
index 0000000000..4ace41b7e7
--- /dev/null
+++ b/biblio/bibtex/contrib/iran-bibtex/iran-bibtex.sty
@@ -0,0 +1,113 @@
+%%
+%% This is file “iran-bibtex.sty”,
+%%
+%% __________________________________________________
+%% Copyright (c) 2023 Farshad Rasuli
+%%
+%% It may be distributed and/or modified under the LaTeX Project
+%% Public License version 1.3c or higher. The latest version of the
+%% Lisense is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is “author-maintained” (as per LPPL maintenance status)
+%% by Farshad Rasuli.
+%%
+%% Location on CTAN: /macros/xetex/latex/iran-bibtex
+%%
+%% Homepage: http://github.com/farshadrasuli/iran-bibtex
+%%
+%% Issue tracker: https://github.com/farshadrasuli/iran-bibtex/issues
+%%
+%%
+
+
+
+% === Package structure: Identification
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{iran-bibtex}
+\def\iranbibtex@version{0.1}
+\def\iranbibtexdate{2023/12/12} % December 12th, 2023
+\def\iranbibtexfirstrelease{2023/12/12} % December 12th, 2023
+\edef\@iranbibtex@info{%
+****************************************************^^J%
+* ^^J%
+* iran-bibtex package^^J%
+* ^^J%
+* Description: This package is an implementation of^^J%
+* the Iran Manual of Style (1st edition, 2016)^^J%
+* citation guide to Persian and English information^^J%
+* sources in BibTeX.^^J%
+* ^^J%
+* Copyright (c) 2023 Farshad Rasuli^^J%
+* ^^J%
+****************************************************^^J%
+}
+
+
+% === Package structure: Preliminary declarations
+
+\RequirePackage{natbib}
+
+
+
+% === Package structures: Options
+
+%% iran bibliography style: author-year style, ordered by authors' name
+\DeclareOption{iran}
+{%
+ \setcitestyle{authoryear,% citation mode
+ round,% braces
+ aysep={},% between author and year
+ }%
+ \bibliographystyle{iran}%
+}
+
+
+%% iran bibliography style: author-year style, ordered by year
+\DeclareOption{iran-year}
+{%
+ \setcitestyle{authoryear,% citation mode
+ round,% braces
+ aysep={},% between author and year
+ }%
+ \bibliographystyle{iran}%
+}
+
+
+
+
+\ProcessOptions\relax
+
+
+
+
+
+% === Package structure: Provide commands
+
+%% provide command for bibliography environment
+\newcommand{\enquote}[1]{``#1''}
+\newcommand{\faquote}[1]{«#1»}
+\providecommand{\url}[1]{{\tt #1}}
+\providecommand{\doi}[1]{{\tt #1‏}}
+
+
+
+
+
+% === Package structure: Change extra label (2000a, b, ...) to persian harfi
+
+\providecommand{\natexlaben}[1]{#1}
+
+\providecommand{\natexlabfa}[1]{#1}
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file “iran-bibtex.sty”. \ No newline at end of file
diff --git a/biblio/bibtex/contrib/iran-bibtex/iran-structure.pdf b/biblio/bibtex/contrib/iran-bibtex/iran-structure.pdf
new file mode 100644
index 0000000000..2b9a1f0a9f
--- /dev/null
+++ b/biblio/bibtex/contrib/iran-bibtex/iran-structure.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/iran-bibtex/iran-structure.tex b/biblio/bibtex/contrib/iran-bibtex/iran-structure.tex
new file mode 100644
index 0000000000..ef3bea05a4
--- /dev/null
+++ b/biblio/bibtex/contrib/iran-bibtex/iran-structure.tex
@@ -0,0 +1,181 @@
+\documentclass[a4paper,11pt]{article}
+
+\usepackage{enumitem}
+\usepackage{hyperref}
+
+\usepackage[localise,perpagefootnote=on,computeautoilg=on]{xepersian}
+\settextfont{Parsi Nevis}
+\setpersianmonofont{Vazir Code}
+\setlatintextfont{Parsi Nevis}
+
+\SepMark{-}
+
+\eqcommand{چ‌ر}{lr}
+
+\begin{document}
+\title{خلاصه‌ای از ساختار چیدمان مشخصه‌ها در شیوه‌ی استاددهی {\tt iran.bst}}
+\author{فرشاد رسولی\thanks{رایانامه: \url{farshad.rasuli@gmail.com}}}
+\date{نسخه‌ی ۰٫۱ --- ۲۱ آذر ۱۴۰۲}
+\maketitle
+
+
+\begin{description}
+\item[مدخل (\lr{entry}):] به هر اثری که اطلاعات شناسنامه‌ای آن برای استناددهی در نوشتار وارد میگردد گفته میشود. مدخل میتواند از نوع \verb|@book|، \verb|@incollection|، \verb|@article|، \verb|@inproceeding|، \verb|@masterthesis|، \verb|@phdthesis|، \verb|@misc|، و غیره باشد.
+\item[مشخصه (\lr{field}):] به هر یک از مشخصه‌های شناسنامه‌ای مدخل مانند \lr{\tt author}، \lr{\tt title}، \lr{\tt year}، و غیره گفته میشود.
+\end{description}
+
+
+
+
+
+
+
+
+
+
+\section{کتاب}
+در این بخش، طرح چیدمان مشخصه‌های مدخل کتاب (\verb|@book|) ارائه شده است.
+
+
+
+
+
+\subsection{کتابهایی که زیر نام نویسنده مرتب میشوند}
+اگر برای مدخل کتاب، مشخصه‌ی \verb|author| وارد گردد، زیر نام نویسنده مرتب میشود.
+
+\subsubsection*{کتابهای ترجمه نشده}
+مدخل کتابی که مشخصه‌ی \verb|translator| آن خالی باشد، به صورت زیر فهرست میشود.
+
+\begin{itemize}[nosep]
+\begin{latin}
+\item[] []
+{\tt author}. {\tt year}. {\tt title}. {\tt edition} edn. {\tt impression} imp. by {\tt by}. {\tt volume volumes series number}. In collaboration with {\tt collaboration}. Commented by {\tt commentator}. Compiled by {\tt compiler}. Edited by {\tt editor}. Introduction by {\tt introduction}. Preface by {\tt preface}. Afterwords by {\tt afterword}. {\tt address}:{\tt publisher}. {\tt note}. ISBN: {\tt isbn}. DOI: {\tt doi}. Retrieved {\tt urldate}. URL: {\tt url}.
+\end{latin}
+
+\item[] []
+{\persianttfamily نویسنده}. {\persianttfamily تاریخ}. {\persianttfamily عنوان}. ویرایش {\persianttfamily …}. چاپ {\persianttfamily …}. نوشته‌ی {\persianttfamily …}. {\persianttfamily جلد فروست}. با همکاری {\persianttfamily …}. با یادداشت {\persianttfamily …}. گردآوری {\persianttfamily …}. ویراسته‌ی {\persianttfamily …}. با مقدمه‌ی {\persianttfamily …}. با پیش‌گفتار {\persianttfamily …}. با پس‌گفتار {\persianttfamily …}. {\persianttfamily محل نشر}:{\persianttfamily ناشر}. شابک: {\persianttfamily …}. شناسه‌ی دیجیتال: {\persianttfamily …}. دسترسی در {\persianttfamily …}. تارنما: {\persianttfamily …}.
+\end{itemize}
+
+
+
+\subsubsection*{کتابهای ترجمه شده}
+مدخل کتابی که مشخصه‌ی \verb|translator| آن وارد شود به صورت زیر فهرست میشود.
+
+\begin{itemize}[nosep]
+\begin{latin}
+\item[] []
+{\tt author}. {\tt year}. {\tt title}. {\tt edition} edn. {\tt impression} imp. by {\tt by}. Translated by {\tt translator}. {\tt translateyear}. {\tt volume volumes series number}. In collaboration with {\tt collaboration}. Commented by {\tt commentator}. Compiled by {\tt compiler}. Edited by {\tt editor}. Introduction by {\tt introduction}. Preface by {\tt preface}. Afterwords by {\tt afterword}. {\tt address}:{\tt publisher}. {\tt note}. ISBN: {\tt isbn}. DOI: {\tt doi}. Retrieved {\tt urldate}. URL: {\tt url}.
+\end{latin}
+
+\item[] []
+{\persianttfamily نویسنده}. {\persianttfamily تاریخ}. {\persianttfamily عنوان}. ویرایش {\persianttfamily …}. چاپ {\persianttfamily …}. نوشته‌ی {\persianttfamily …}. ترجمه‌ی {\persianttfamily …}. {\persianttfamily تاریخ ترجمه}. {\persianttfamily جلد فروست}. با همکاری {\persianttfamily …}. با یادداشت {\persianttfamily …}. گردآوری {\persianttfamily …}. ویراسته‌ی {\persianttfamily …}. با مقدمه‌ی {\persianttfamily …}. با پیش‌گفتار {\persianttfamily …}. با پس‌گفتار {\persianttfamily …}. {\persianttfamily محل نشر}:{\persianttfamily ناشر}. شابک: {\persianttfamily …}. شناسه‌ی دیجیتال: {\persianttfamily …}. دسترسی در {\persianttfamily …}. تارنما: {\persianttfamily …}.
+\end{itemize}
+
+
+
+
+
+\subsection{کتابهایی که زیر نام گردآورده مرتب میشوند}
+اگر برای مدخل کتاب، مشخصه‌ی \verb|author| وارد نشود، در صورت وجود مشخصه‌ی \verb|compiler|، زیر نام گردآونده مرتب میشود.
+
+\subsubsection*{کتابهای ترجمه نشده}
+مدخل کتابی که مشخصه‌ی \verb|translator| آن خالی باشد، به صورت زیر فهرست میشود.
+
+\begin{itemize}[nosep]
+\begin{latin}
+\item[] []
+{\tt compiler}, comp(s). {\tt year}. {\tt title}. {\tt edition} edn. {\tt impression} imp. by {\tt by}. {\tt volume volumes series number}. In collaboration with {\tt collaboration}. Commented by {\tt commentator}. Edited by {\tt editor}. Introduction by {\tt introduction}. Preface by {\tt preface}. Afterwords by {\tt afterword}. {\tt address}:{\tt publisher}. {\tt note}. ISBN: {\tt isbn}. DOI: {\tt doi}. Retrieved {\tt urldate}. URL: {\tt url}.
+\end{latin}
+
+\item[] []
+{\persianttfamily گردآورنده}، گردآورنده‌‌‌‌(گان). {\persianttfamily تاریخ}. {\persianttfamily عنوان}. ویرایش {\persianttfamily …}. چاپ {\persianttfamily …}. نوشته‌ی {\persianttfamily …}. {\persianttfamily جلد فروست}. با همکاری {\persianttfamily …}. با یادداشت {\persianttfamily …}. ویراسته‌ی {\persianttfamily …}. با مقدمه‌ی {\persianttfamily …}. با پیش‌گفتار {\persianttfamily …}. با پس‌گفتار {\persianttfamily …}. {\persianttfamily محل نشر}:{\persianttfamily ناشر}. شابک: {\persianttfamily …}. شناسه‌ی دیجیتال: {\persianttfamily …}. دسترسی در {\persianttfamily …}. تارنما: {\persianttfamily …}.
+\end{itemize}
+
+
+
+\subsubsection*{کتابهای ترجمه شده}
+مدخل کتابی که مشخصه‌ی \verb|translator| آن وارد شود به صورت زیر فهرست میشود.
+
+\begin{itemize}[nosep]
+\begin{latin}
+\item[] []
+{\tt compiler}, comp(s). {\tt year}. {\tt title}. {\tt edition} edn. {\tt impression} imp. by {\tt by}. Translated by {\tt translator}. {\tt translateyear}. {\tt volume volumes series number}. In collaboration with {\tt collaboration}. Commented by {\tt commentator}. Edited by {\tt editor}. Introduction by {\tt introduction}. Preface by {\tt preface}. Afterwords by {\tt afterword}. {\tt address}:{\tt publisher}. {\tt note}. ISBN: {\tt isbn}. DOI: {\tt doi}. Retrieved {\tt urldate}. URL: {\tt url}.
+\end{latin}
+
+\item[] []
+{\persianttfamily گردآورنده}، گردآورنده‌‌‌‌(گان). {\persianttfamily تاریخ}. {\persianttfamily عنوان}. ویرایش {\persianttfamily …}. چاپ {\persianttfamily …}. نوشته‌ی {\persianttfamily …}. ترجمه‌ی {\persianttfamily …}. {\persianttfamily تاریخ ترجمه}. {\persianttfamily جلد فروست}. با همکاری {\persianttfamily …}. با یادداشت {\persianttfamily …}. ویراسته‌ی {\persianttfamily …}. با مقدمه‌ی {\persianttfamily …}. با پیش‌گفتار {\persianttfamily …}. با پس‌گفتار {\persianttfamily …}. {\persianttfamily محل نشر}:{\persianttfamily ناشر}. شابک: {\persianttfamily …}. شناسه‌ی دیجیتال: {\persianttfamily …}. دسترسی در {\persianttfamily …}. تارنما: {\persianttfamily …}.
+\end{itemize}
+
+
+
+
+
+\subsection{کتابهایی که زیر نام ویراستار مرتب میشوند}
+اگر برای مدخل کتاب، مشخصه‌های \verb|author|، و \verb|compiler| وارد نشوند، در صورت وجود مشخصه‌ی \verb|editor|، زیر نام ویراستار مرتب میشود.
+
+\subsubsection*{کتابهای ترجمه نشده}
+مدخل کتابی که مشخصه‌ی \verb|translator| آن خالی باشد، به صورت زیر فهرست میشود.
+
+\begin{itemize}[nosep]
+\begin{latin}
+\item[] []
+{\tt editor}, ed(s). {\tt year}. {\tt title}. {\tt edition} edn. {\tt impression} imp. by {\tt by}. {\tt volume volumes series number}. In collaboration with {\tt collaboration}. Commented by {\tt commentator}. Introduction by {\tt introduction}. Preface by {\tt preface}. Afterwords by {\tt afterword}. {\tt address}:{\tt publisher}. {\tt note}. ISBN: {\tt isbn}. DOI: {\tt doi}. Retrieved {\tt urldate}. URL: {\tt url}.
+\end{latin}
+
+\item[] []
+{\persianttfamily ویراستار}، ویراستار(ان). {\persianttfamily تاریخ}. {\persianttfamily عنوان}. ویرایش {\persianttfamily …}. چاپ {\persianttfamily …}. نوشته‌ی {\persianttfamily …}. {\persianttfamily جلد فروست}. با همکاری {\persianttfamily …}. با یادداشت {\persianttfamily …}. با مقدمه‌ی {\persianttfamily …}. با پیش‌گفتار {\persianttfamily …}. با پس‌گفتار {\persianttfamily …}. {\persianttfamily محل نشر}:{\persianttfamily ناشر}. شابک: {\persianttfamily …}. شناسه‌ی دیجیتال: {\persianttfamily …}. دسترسی در {\persianttfamily …}. تارنما: {\persianttfamily …}.
+\end{itemize}
+
+
+
+\subsubsection*{کتابهای ترجمه شده}
+مدخل کتابی که مشخصه‌ی \verb|translator| آن وارد شود به صورت زیر فهرست میشود.
+
+\begin{itemize}[nosep]
+\begin{latin}
+\item[] []
+{\tt editor}, ed(s). {\tt year}. {\tt title}. {\tt edition} edn. {\tt impression} imp. by {\tt by}. Translated by {\tt translator}. {\tt translateyear}. {\tt volume volumes series number}. In collaboration with {\tt collaboration}. Commented by {\tt commentator}. Introduction by {\tt introduction}. Preface by {\tt preface}. Afterwords by {\tt afterword}. {\tt address}:{\tt publisher}. {\tt note}. ISBN: {\tt isbn}. DOI: {\tt doi}. Retrieved {\tt urldate}. URL: {\tt url}.
+\end{latin}
+
+\item[] []
+{\persianttfamily ویراستار}، ویراستار(ان). {\persianttfamily تاریخ}. {\persianttfamily عنوان}. ویرایش {\persianttfamily …}. چاپ {\persianttfamily …}. نوشته‌ی {\persianttfamily …}. ترجمه‌ی {\persianttfamily …}. {\persianttfamily تاریخ ترجمه}. {\persianttfamily جلد فروست}. با همکاری {\persianttfamily …}. با یادداشت {\persianttfamily …}. ویراسته‌ی {\persianttfamily …}. با مقدمه‌ی {\persianttfamily …}. با پیش‌گفتار {\persianttfamily …}. با پس‌گفتار {\persianttfamily …}. {\persianttfamily محل نشر}:{\persianttfamily ناشر}. شابک: {\persianttfamily …}. شناسه‌ی دیجیتال: {\persianttfamily …}. دسترسی در {\persianttfamily …}. تارنما: {\persianttfamily …}.
+\end{itemize}
+
+
+
+
+
+\subsection{کتابهایی که زیر نام مترجم مرتب میشوند}
+اگر برای مدخل کتاب، مشخصه‌های \verb|author|، \verb|compiler|، و \verb|editor| وارد نشوند، در صورت وجود مشخصه‌ی \verb|translator|، زیر نام مترجم مرتب میشود.
+
+\begin{itemize}[nosep]
+\begin{latin}
+\item[] []
+{\tt translator}, tran(s). {\tt translateyear}. {\tt title}. {\tt edition} edn. {\tt impression} imp. by {\tt by}. {\tt year}. {\tt volume volumes series number}. In collaboration with {\tt collaboration}. Commented by {\tt commentator}. Introduction by {\tt introduction}. Preface by {\tt preface}. Afterwords by {\tt afterword}. {\tt address}:{\tt publisher}. {\tt note}. ISBN: {\tt isbn}. DOI: {\tt doi}. Retrieved {\tt urldate}. URL: {\tt url}.
+\end{latin}
+
+\item[] []
+{\persianttfamily مترجم}، مترجم(‍ان). {\persianttfamily تاریخ ترجمه}. {\persianttfamily عنوان}. ویرایش {\persianttfamily …}. چاپ {\persianttfamily …}. نوشته‌ی {\persianttfamily …}. {\persianttfamily تاریخ}. {\persianttfamily جلد فروست}. با همکاری {\persianttfamily …}. با یادداشت {\persianttfamily …}. ویراسته‌ی {\persianttfamily …}. با مقدمه‌ی {\persianttfamily …}. با پیش‌گفتار {\persianttfamily …}. با پس‌گفتار {\persianttfamily …}. {\persianttfamily محل نشر}:{\persianttfamily ناشر}. شابک: {\persianttfamily …}. شناسه‌ی دیجیتال: {\persianttfamily …}. دسترسی در {\persianttfamily …}. تارنما: {\persianttfamily …}.
+\end{itemize}
+
+
+
+
+
+\subsection{کتابهایی که زیر عنوان مرتب میشوند}
+اگر برای مدخل کتاب، مشخصه‌های \verb|author|، \verb|compiler|، \verb|editor|، و \verb|translator| وارد نشوند، باید مشخصه‌ی \verb|key| آن مدخل برابر با مشخصه‌ی \verb|title| وارد شود که زیر عنوان مرتب گردد.
+
+\begin{itemize}[nosep]
+\begin{latin}
+\item[] []
+{\tt title}. {\tt year}. {\tt edition} edn. {\tt impression} imp. by {\tt by}. {\tt volume volumes series number}. In collaboration with {\tt collaboration}. Commented by {\tt commentator}. Introduction by {\tt introduction}. Preface by {\tt preface}. Afterwords by {\tt afterword}. {\tt address}:{\tt publisher}. {\tt note}. ISBN: {\tt isbn}. DOI: {\tt doi}. Retrieved {\tt urldate}. URL: {\tt url}.
+\end{latin}
+
+\item[] []
+{\persianttfamily عنوان}. {\persianttfamily تاریخ}. ویرایش {\persianttfamily …}. چاپ {\persianttfamily …}. نوشته‌ی {\persianttfamily …}. {\persianttfamily جلد فروست}. با همکاری {\persianttfamily …}. با یادداشت {\persianttfamily …}. ویراسته‌ی {\persianttfamily …}. با مقدمه‌ی {\persianttfamily …}. با پیش‌گفتار {\persianttfamily …}. با پس‌گفتار {\persianttfamily …}. {\persianttfamily محل نشر}:{\persianttfamily ناشر}. شابک: {\persianttfamily …}. شناسه‌ی دیجیتال: {\persianttfamily …}. دسترسی در {\persianttfamily …}. تارنما: {\persianttfamily …}.
+\end{itemize}
+
+
+
+
+\end{document} \ No newline at end of file
diff --git a/biblio/bibtex/contrib/iran-bibtex/iran.bst b/biblio/bibtex/contrib/iran-bibtex/iran.bst
new file mode 100644
index 0000000000..d830b9f3b0
--- /dev/null
+++ b/biblio/bibtex/contrib/iran-bibtex/iran.bst
@@ -0,0 +1,3239 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% This file is “iran.bst”,
+%% generated with the DOCSTRIP utility and then modified to support
+%% bilingual (English/Latin, and Persian).
+%%
+%% Bibliography style for BibTeX base on “Iran Manual of Style”.
+%%
+%% Created, and maintained by
+%% Copyright (c) 2023 Farshad Rasuli <farshad.rasuli@gmail.com>
+%%
+%%
+%% This bibliography style (bst) is part of the “iran-bibtex” package.
+%%
+%% CTAN: https://ctan.org/pkg/iran-bibtex
+%% Homepage: https://github.com/farshadrasuli/iran-bibtex
+%% Bug tracker: https://github.com/farshadrasuli/iran-bibtex/issues
+%%
+%%
+%%
+%% This file can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License version 1.3c, or any later version.
+%% The latest version of the License is at: latex-project.org/lppl.txt
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%------------------------------------------------------------------------------
+% This bibliography style file is intended for texts in ENGLISH, and Persian.
+% This is an author-year citation style bibliography. This style file is based
+% on natbib.sty package by Patrick W. Daly.
+% The form of the \bibitem entries is
+% \bibitem[Jones et al.(1990)]{key}...
+% \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+% The essential feature is that the label (the part in brackets) consists
+% of the author names, as they should appear in the citation, with the year
+% in parentheses following. There must be no space before the opening
+% parenthesis!
+%
+% The \cite command functions as follows:
+% \cite{key} => (Jones et al. 1990)
+% \citet{key} => Jones et al. (1990)
+% \citet*{key} => Jones, Baker, and Smith (1990)
+% \citep{key} => (Jones et al., 1990)
+% \citep*{key} => (Jones, Baker, and Smith, 1990)
+% \citep[chap. 2]{key} => (Jones et al., 1990, chap. 2)
+% \citep[e.g.][]{key} => (e.g. Jones et al., 1990)
+% \citep[e.g.][p. 32]{key} => (e.g. Jones et al., 1990, p. 32)
+% \citeauthor{key} => Jones et al.
+% \citeauthor*{key} => Jones, Baker, and Smith
+% \citeyear{key} => 1990
+%------------------------------------------------------------------------------
+
+
+
+ENTRY
+{
+ address
+ afterword % the added field
+ archive
+ author
+ authorfa % the added field
+ booktitle
+ by % the added field
+ chapter
+ collaboration
+ commentator % the added field
+ compiler % the added field
+ doi
+ edition
+ editor
+ eid
+ eprint
+ foreword % the added field
+ howpublished
+ impression % the added field
+ institution
+ introduction % the added field
+ isbn
+ issn
+ journal
+ key
+ language
+ month
+ note
+ number
+ numpages
+ organization
+ pages
+ preface % the added field
+ publisher
+ school
+ series
+ title
+ translator % the added field
+ translateyear % the added field
+ type
+ url
+ urldate % the added field
+ volume
+ volumes % the added field
+ year
+}
+{}
+{
+ label
+ extra.label
+ sort.label
+ short.list
+}
+
+
+
+
+
+% Basic boolean functions
+
+FUNCTION {not}
+{
+ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{
+ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{
+ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+
+
+
+
+
+% check for language of entry
+
+FUNCTION {is.language.persian}
+{
+ language missing$
+ {#0}
+ { language "l" change.case$ "persian" = }
+ if$
+}
+
+
+
+
+
+% Here are the language-specific definitions for explicit words.
+% Each function has a name bbl.xxx where xxx is the English word.
+
+FUNCTION {bbl.afterwordby}
+{
+ is.language.persian
+ {"با پس‌گفتار"}
+ {"afterword by"}
+ if$
+}
+
+FUNCTION {bbl.and}
+{
+ is.language.persian
+ {"و"}
+ {"and"}
+ if$
+}
+
+FUNCTION {bbl.annotator}
+{
+ is.language.persian
+ {"حاشیه‌نویس"}
+ {"ann."}
+ if$
+}
+
+FUNCTION {bbl.annotatedby}
+{
+ is.language.persian
+ {"با حاشیه‌ی"}
+ {"annotated by"}
+ if$
+}
+
+FUNCTION {bbl.andothers}
+{
+ is.language.persian
+ {"و~دیگران"}
+ {"and~others"}
+ if$
+}
+
+FUNCTION {bbl.by}
+{
+ is.language.persian
+ {"نوشته‌ی"}
+ {"by"}
+ if$
+}
+
+FUNCTION {bbl.chapter}
+{
+ is.language.persian
+ {"فصل"}
+ {"chapter"}
+ if$
+}
+
+FUNCTION {bbl.collaboration}
+{
+ is.language.persian
+ {"همکار"}
+ {"coll."}
+ if$
+}
+
+FUNCTION {bbl.comma}
+{
+ is.language.persian
+ {"،"}
+ {","}
+ if$
+}
+
+FUNCTION {bbl.commentator}
+{
+ is.language.persian
+ {"یادداشت‌نویس"}
+ {"comm."}
+ if$
+}
+
+FUNCTION {bbl.commentatedby}
+{
+ is.language.persian
+ {"با یادداشت"}
+ {"commentated by"}
+ if$
+}
+
+FUNCTION {bbl.compiler}
+{
+ is.language.persian
+ {"گردآورنده"}
+ {"comp."}
+ if$
+}
+
+FUNCTION {bbl.compilers}
+{
+ is.language.persian
+ {"گردآورندگان"}
+ {"comps."}
+ if$
+}
+
+FUNCTION {bbl.compiledby}
+{
+ is.language.persian
+ {"گردآوری"}
+ {"compiled by"}
+ if$
+}
+
+FUNCTION {bbl.doi}
+{
+ is.language.persian
+ {"شناسه‌ی دیجیتال"}
+ {"doi"}
+ if$
+}
+
+FUNCTION {bbl.dquote}
+{
+ is.language.persian
+ {"\faquote{" swap$ * add.period$ "}" *}
+ {"\enquote{" swap$ * add.period$ "}" *}
+ if$
+}
+
+FUNCTION {bbl.editor}
+{
+ is.language.persian
+ {"ویراستار"}
+ {"ed."}
+ if$
+}
+
+FUNCTION {bbl.editors}
+{
+ is.language.persian
+ {"ویراستاران"}
+ {"eds."}
+ if$
+}
+
+FUNCTION {bbl.edby}
+{
+ is.language.persian
+ {"ویراسته‌ی"}
+ {"edited by"}
+ if$
+}
+
+FUNCTION {bbl.edition}
+{
+ is.language.persian
+ {"ویرایش"}
+ {"edn."}
+ if$
+}
+
+FUNCTION {bbl.eidpp}
+{
+ is.language.persian
+ {"صص"}
+ {"pages"}
+ if$
+}
+
+FUNCTION {bbl.etal}
+{
+ is.language.persian
+ {"و~همکاران"}
+ {"et~al."}
+ if$
+
+}
+
+FUNCTION {bbl.forewordby}
+{
+ is.language.persian
+ {"با پیش‌گفتار"}
+ {"forword by"}
+ if$
+}
+
+FUNCTION {bbl.impression}
+{
+ is.language.persian
+ {"چاپ"}
+ {"imp."}
+ if$
+}
+
+FUNCTION {bbl.in}
+{
+ is.language.persian
+ {"در"}
+ {"in"}
+ if$
+}
+
+FUNCTION {bbl.incollaborationwith}
+{
+ is.language.persian
+ {"با همکاری"}
+ {"in collaboration with"}
+ if$
+}
+
+FUNCTION {bbl.introby}
+{
+ is.language.persian
+ {"با مقدمه‌ی"}
+ {"introduction by"}
+ if$
+}
+
+FUNCTION {bbl.isbn}
+{
+ is.language.persian
+ {"شابک"}
+ {"isbn"}
+ if$
+}
+
+FUNCTION {bbl.issn}
+{
+ is.language.persian
+ {"شاپا"}
+ {"issn"}
+ if$
+}
+
+FUNCTION {bbl.mthesis}
+{
+ is.language.persian
+ {"پایان‌نامه‌ی کارشناسی‌ارشد"}
+ {"Master's thesis"}
+ if$
+}
+
+FUNCTION {bbl.number}
+{
+ is.language.persian
+ {"ش."}
+ {"no."}
+ if$
+}
+
+FUNCTION {bbl.nr}
+{
+ is.language.persian
+ {"ش."}
+ {"no."}
+ if$
+}
+
+FUNCTION {bbl.of}
+{
+ is.language.persian
+ {"از"}
+ {"of"}
+ if$
+}
+
+FUNCTION {bbl.page}
+{
+ is.language.persian
+ {""}
+ {""}
+ if$
+}
+
+FUNCTION {bbl.pages}
+{
+ is.language.persian
+ {""}
+ {""}
+ if$
+}
+
+FUNCTION {bbl.prefaceby}
+{
+ is.language.persian
+ {"با پیش‌گفتار"}
+ {"preface by"}
+ if$
+}
+
+FUNCTION {bbl.phdthesis}
+{
+ is.language.persian
+ {"رساله‌ی دکتری"}
+ {"PhD dissertation"}
+ if$
+}
+
+FUNCTION {bbl.retrieved}
+{
+ is.language.persian
+ {"دسترسی در"}
+ {"retrieved"}
+ if$
+}
+
+FUNCTION {bbl.semicolon}
+{
+ is.language.persian
+ {"؛"}
+ {";"}
+ if$
+}
+
+FUNCTION {bbl.techrep}
+{
+ is.language.persian
+ {""}
+ {""}
+ if$
+}
+
+FUNCTION {bbl.translator}
+{
+ is.language.persian
+ {"مترجم"}
+ {"tran."}
+ if$
+}
+
+FUNCTION {bbl.translators}
+{
+ is.language.persian
+ {"مترجمان"}
+ {"trans."}
+ if$
+}
+
+FUNCTION {bbl.translatedby}
+{
+ is.language.persian
+ {"ترجمه‌ی"}
+ {"translated by"}
+ if$
+}
+
+FUNCTION {bbl.url}
+{
+ is.language.persian
+ {"تارنما"}
+ {"url"}
+ if$
+}
+
+FUNCTION {bbl.volume}
+{
+ is.language.persian
+ {"ج."}
+ {"vol."}
+ if$
+}
+
+FUNCTION {bbl.volumes}
+{
+ is.language.persian
+ {"ج."}
+ {"vols."}
+ if$
+}
+
+
+
+
+
+% Functions to declare position
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{
+ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+
+
+% Functions to print output
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{
+ 's :=
+ output.state mid.sentence =
+ { bbl.comma * " " * 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$
+}
+
+
+
+
+
+% Functions to control format of entry
+
+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 {no.blank.or.punct}
+{
+ "\hspace{0pt}" * before.all 'output.state :=
+}
+
+
+
+FUNCTION {date.block}
+{
+ new.block
+}
+
+
+
+FUNCTION {non.stop}
+{
+ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+
+
+STRINGS {z}
+
+FUNCTION {remove.dots}
+{
+ 'z :=
+ ""
+ {
+ z empty$ not
+ }
+ {
+ z #1 #2 substring$
+ duplicate$ "\." =
+ {
+ z #3 global.max$ substring$ 'z := *
+ }
+ {
+ pop$
+ z #1 #1 substring$
+ z #2 global.max$ substring$ 'z :=
+ duplicate$ "." =
+ 'pop$
+ { * }
+ if$
+ }
+ if$
+ }
+ while$
+}
+
+
+
+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$ "" }
+ { "{\it " swap$ * "}" * }
+ if$
+}
+
+
+
+FUNCTION {tie.or.space.prefix}
+{
+ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+
+
+
+FUNCTION {separate.by.space}
+{ " " swap$ * " " * }
+
+
+
+
+
+% Macro for abbreviation of month
+
+MACRO {jan} {"Jan"}
+
+MACRO {feb} {"Feb"}
+
+MACRO {mar} {"Mar"}
+
+MACRO {apr} {"Apr"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun"}
+
+MACRO {jul} {"Jul"}
+
+MACRO {aug} {"Aug"}
+
+MACRO {sep} {"Sep"}
+
+MACRO {oct} {"Oct"}
+
+MACRO {nov} {"Nov"}
+
+MACRO {dec} {"Dec"}
+
+
+
+
+
+% Functions to check and warn bibinfo
+
+FUNCTION {bibinfo.check}
+{
+ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ {
+ duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ {
+ swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {bibinfo.warn}
+{
+ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ {
+ duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ {
+ swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+
+
+
+
+
+% Functions to format fields
+
+INTEGERS { nameptr namesleft numnames }
+
+STRINGS { bibinfo}
+
+FUNCTION {format.names}
+{
+ 'bibinfo :=
+ duplicate$ empty$
+ 'skip$
+ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ {
+ namesleft #0 >
+ }
+ {
+ s nameptr
+ duplicate$ #1 >
+ { "{ff~}{vv~}{ll}{, jj}" }
+ { "{vv~}{ll}{, ff}{, jj}" }
+ if$
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ {
+ bbl.comma * " " * t *
+ }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ bbl.comma *
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ separate.by.space * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ }
+ if$
+}
+
+
+
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$
+ 'skip$
+ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ {
+ namesleft #0 >
+ }
+ {
+ s nameptr
+ "{ff~}{vv~}{ll}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ {
+ bbl.comma * " " * t *
+ }
+ {
+ s nameptr "{ll}" format.name$
+ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ bbl.comma *
+ t "others" =
+ {
+
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ separate.by.space * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ }
+ if$
+}
+
+
+
+FUNCTION {format.key}
+{
+ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+
+
+FUNCTION {format.authors}
+{ author "author" format.names }
+
+
+
+FUNCTION {get.bbl.editor}
+{
+ editor num.names$ #1 >
+ 'bbl.editors
+ 'bbl.editor
+ if$
+}
+
+FUNCTION {format.editors}
+{
+ editor "editor" format.names
+ duplicate$ empty$
+ 'skip$
+ {
+ bbl.comma * " " * get.bbl.editor *
+ }
+ if$
+}
+
+
+
+FUNCTION {get.bbl.compiler}
+{
+ compiler num.names$ #1 >
+ 'bbl.compilers
+ 'bbl.compiler
+ if$
+}
+
+FUNCTION {format.compilers}
+{
+ compiler "compiler" format.names
+ duplicate$ empty$
+ 'skip$
+ {
+ bbl.comma * " " * get.bbl.compiler *
+ }
+ if$
+}
+
+
+
+FUNCTION {get.bbl.translator}
+{
+ translator num.names$ #1 >
+ 'bbl.translators
+ 'bbl.translator
+ if$
+}
+
+FUNCTION {format.translators}
+{
+ translator "translator" format.names
+ duplicate$ empty$
+ 'skip$
+ {
+ bbl.comma * " " * get.bbl.translator *
+ }
+ if$
+}
+
+
+
+FUNCTION {format.eprint}
+{
+ eprint duplicate$ empty$
+ 'skip$
+ {
+ "\eprint"
+ archive empty$
+ 'skip$
+ { "[" * archive * "]" * }
+ if$
+ "{" * swap$ * "}" *
+ }
+ if$
+}
+
+
+
+FUNCTION {format.url}
+{
+ url duplicate$ empty$
+ { pop$ "" }
+ {
+ bbl.url "u" change.case$ ": \url{" * swap$ * "}" *
+ }
+ if$
+}
+
+
+
+FUNCTION {format.urldate}
+{
+ urldate duplicate$ empty$
+ { pop$ "" }
+ { bbl.retrieved capitalize " " * swap$ * }
+ if$
+}
+
+
+
+FUNCTION {format.isbn}
+{
+ isbn "isbn" bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ {
+ bbl.isbn "u" change.case$ ": " * swap$ *
+ }
+ if$
+}
+
+
+
+FUNCTION {format.issn}
+{
+ issn "issn" bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ {
+ bbl.issn "u" change.case$ ": " * swap$ *
+ }
+ if$
+}
+
+FUNCTION {format.doi}
+{
+ doi empty$
+ { "" }
+ {
+ bbl.doi "u" change.case$ ": \doi{" * doi * "}" *
+ }
+ if$
+}
+
+
+
+FUNCTION {format.note}
+{
+ note empty$ not
+ {
+ note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ { "" }
+ if$
+}
+
+
+
+FUNCTION {format.title}
+{
+ title
+ duplicate$ empty$
+ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ {
+ bbl.dquote
+ }
+ if$
+}
+
+
+
+FUNCTION {format.full.names}
+{
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ {
+ namesleft #0 >
+ }
+ {
+ s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ {
+ bbl.comma * " " * t *
+ }
+ {
+ s nameptr "{ll}" format.name$
+ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ numnames #2 >
+ { bbl.comma * }
+ 'skip$
+ if$
+ bbl.and
+ separate.by.space * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+
+FUNCTION {author.editor.key.full}
+{
+ author empty$
+ {
+ editor empty$
+ {
+ key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ {
+ editor format.full.names
+ }
+ if$
+ }
+ {
+ author format.full.names
+ }
+ if$
+}
+
+
+
+FUNCTION {author.key.full}
+{
+ author empty$
+ {
+ key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ {
+ author format.full.names
+ }
+ if$
+}
+
+
+
+FUNCTION {editor.key.full}
+{
+ editor empty$
+ {
+ key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ {
+ editor format.full.names
+ }
+ if$
+}
+
+
+
+FUNCTION {make.full.names}
+{
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ {
+ type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ {
+ t empty$ not
+ }
+ {
+ t #1 #1 substring$
+ "-" =
+ {
+ t #1 #2 substring$
+ "--" = not
+ {
+ "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ {
+ {
+ t #1 #1 substring$ "-" =
+ }
+ {
+ "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ {
+ t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+
+
+FUNCTION {word.in}
+{
+ bbl.in capitalize " " *
+}
+
+
+
+FUNCTION {format.date}
+{
+ year "year" bibinfo.check
+ duplicate$ empty$
+ {
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ after.sentence 'output.state :=
+}
+
+
+
+FUNCTION {format.btitle}
+{
+ title "title" bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ {
+ emphasize
+ }
+ if$
+}
+
+
+
+FUNCTION {either.or.check}
+{
+ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+
+FUNCTION {format.bvolume}
+{
+ volume empty$ not
+ {
+ volumes empty$ not
+ {
+ bbl.volume volume "~" swap$ * *
+ bbl.of separate.by.space volumes *
+ *
+ }
+ {
+ bbl.volume volume "~" swap$ * *
+ }
+ if$
+ }
+ {
+ volumes empty$ not
+ {
+ volumes bbl.volumes "~" swap$ * *
+ }
+ { "" }
+ if$
+ }
+ if$
+}
+
+
+FUNCTION {format.number.series}
+{
+ series empty$ not
+ {
+ number empty$ not
+ {
+ series " " * number *
+ }
+ { series field.or.null }
+ if$
+ }
+ {
+ number empty$ not
+ {
+ output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number "~" swap$ * *
+ }
+ { "" }
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION {format.bvolume.series.number}
+{
+ volume empty$ not
+ {
+ volumes empty$ not
+ {
+ series empty$ not
+ {
+ number empty$ not
+ {
+ bbl.volume "~" * volume *
+ " " * bbl.of * " " * volumes * add.period$
+ " " * series emphasize *
+ " " * number *
+ }
+ {
+ bbl.volume "~" * volume *
+ " " * bbl.of * " " * volumes * add.period$
+ " " * series emphasize *
+ }
+ if$
+ }
+ {
+ number empty$ not
+ {
+ bbl.volume "~" * volume *
+ " " * bbl.of * " " * volumes * add.period$
+ " " * bbl.number * "~" * number *
+ }
+ {
+ bbl.volume "~" * volume *
+ " " * bbl.of * " " * volumes *
+ }
+ if$
+ }
+ if$
+ }
+ {
+ series empty$ not
+ {
+ number empty$ not
+ {
+ bbl.volume "~" * volume *
+ " " * bbl.of * " " * series emphasize *
+ " " * number *
+ }
+ {
+ bbl.volume "~" * volume *
+ " " * bbl.of * " " * series emphasize *
+ }
+ if$
+ }
+ {
+ number empty$ not
+ {
+ bbl.volume "~" * volume * add.period$
+ " " * bbl.number * "~" * number *
+ }
+ {
+ bbl.volume "~" * volume * add.period$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ {
+ volumes empty$ not
+ {
+ series empty$ not
+ {
+ number empty$ not
+ {
+ volumes "~" * bbl.volumes * add.period$
+ " " * series *
+ " " * number *
+ }
+ {
+ volumes "~" * bbl.volumes * add.period$
+ " " * series *
+ }
+ if$
+ }
+ {
+ number empty$ not
+ {
+ volumes "~" * bbl.volumes * add.period$
+ " " * bbl.number * "~" * number *
+ }
+ {
+ volumes "~" * bbl.volumes * add.period$
+ }
+ if$
+ }
+ if$
+ }
+ {
+ series empty$ not
+ {
+ number empty$ not
+ {
+ series
+ " " * number *
+ }
+ {
+ series
+ }
+ if$
+ }
+ {
+ number empty$ not
+ {
+ bbl.number "~" * number *
+ }
+ {
+ ""
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION {format.edition}
+{
+ edition duplicate$ empty$
+ 'skip$
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$
+ change.case$
+ "edition" bibinfo.check
+ is.language.persian
+ { bbl.edition " " * swap$ * }
+ { " " * bbl.edition * }
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION {format.impression}
+{
+ impression duplicate$ empty$ not
+ {
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$
+ change.case$
+ is.language.persian
+ { bbl.impression " " * swap$ * }
+ { " " * bbl.impression * }
+ if$
+ }
+ 'skip$
+ if$
+}
+
+
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{
+ 't :=
+ #0 'multiresult :=
+ {
+ multiresult not
+ t empty$ not
+ and
+ }
+ {
+ t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+
+
+FUNCTION {format.pages}
+{
+ pages duplicate$ empty$
+ 'skip$
+ {
+ duplicate$ multi.page.check
+ {
+ n.dashify
+ }
+ {
+ }
+ if$
+ "pages" bibinfo.check
+ }
+ if$
+}
+
+
+
+FUNCTION {format.journal.pages}
+{
+ pages duplicate$ empty$ 'pop$
+ {
+ swap$ duplicate$ empty$
+ {
+ pop$ pop$ format.pages
+ }
+ {
+ ": " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION {format.journal.eid}
+{
+ eid "eid" bibinfo.check
+ duplicate$ empty$
+ 'pop$
+ {
+ swap$
+ duplicate$ empty$
+ 'skip$
+ {
+ ": " *
+ }
+ if$
+ swap$ *
+ numpages empty$
+ 'skip$
+ {
+ bbl.eidpp numpages tie.or.space.prefix
+ "numpages" bibinfo.check * *
+ " (" swap$ * ")" * *
+ }
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION {format.vol.num.pages}
+{
+ volume field.or.null
+ duplicate$ empty$
+ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ number "number" bibinfo.check
+ duplicate$ empty$
+ 'skip$
+ {
+ swap$
+ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "~(" swap$ * ")" *
+ }
+ if$
+ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+
+
+FUNCTION {format.chapter.pages}
+{
+ chapter empty$
+ 'format.pages
+ {
+ type empty$
+ { bbl.chapter }
+ {
+ type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { bbl.comma * " " * format.pages * }
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ emphasize
+}
+
+
+
+FUNCTION {format.in.ed.booktitle}
+{
+ format.booktitle
+ duplicate$ empty$
+ 'skip$
+ {
+ format.bvolume
+ duplicate$ empty$
+ 'pop$
+ { bbl.comma " " * swap$ * * }
+ if$
+ editor "editor" format.names.ed
+ duplicate$ empty$
+ 'pop$
+ {
+ bbl.edby capitalize " " * swap$ *
+ swap$
+ add.period$ " " * swap$ *
+ }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+
+
+
+FUNCTION {format.by}
+{
+ by empty$ not
+ {
+ by "by" format.names.ed
+ bbl.by " " * swap$ *
+ }
+ { "" }
+ if$
+}
+
+
+
+FUNCTION {format.incollaborationwith}
+{
+ collaboration empty$ not
+ {
+ collaboration "collaboration" format.names.ed
+ bbl.incollaborationwith capitalize " " * swap$ *
+ }
+ { "" }
+ if$
+}
+
+
+
+FUNCTION {format.commentatedby}
+{
+ commentator empty$ not
+ {
+ commentator "commentator" format.names.ed
+ bbl.commentatedby capitalize " " * swap$ *
+ }
+ { "" }
+ if$
+}
+
+
+
+FUNCTION {format.compiledby}
+{
+ compiler empty$ not
+ {
+ compiler "compiler" format.names.ed
+ bbl.compiledby capitalize " " * swap$ *
+ }
+ { "" }
+ if$
+}
+
+
+
+FUNCTION {format.edby}
+{
+ editor empty$ not
+ {
+ editor "editor" format.names.ed
+ bbl.edby capitalize " " * swap$ *
+ }
+ { "" }
+ if$
+}
+
+
+
+FUNCTION {format.translatedby}
+{
+ translator empty$ not
+ {
+ translator "translator" format.names.ed
+ bbl.translatedby capitalize " " * swap$ *
+ }
+ { "" }
+ if$
+}
+
+
+FUNCTION {format.translateyear}
+{
+ translateyear empty$ not
+ {
+ translateyear
+ }
+ { "" }
+ if$
+ before.all 'output.state :=
+ after.sentence 'output.state :=
+}
+
+
+
+FUNCTION {format.introby}
+{
+ introduction empty$ not
+ {
+ introduction "introduction" format.names.ed
+ bbl.introby capitalize " " * swap$ *
+ }
+ { "" }
+ if$
+}
+
+
+
+FUNCTION {format.prefaceby}
+{
+ preface empty$ not
+ {
+ preface "preface" format.names.ed
+ bbl.prefaceby capitalize " " * swap$ *
+ }
+ { "" }
+ if$
+}
+
+
+
+FUNCTION {format.afterwordby}
+{
+ afterword empty$ not
+ {
+ afterword "afterword" format.names.ed
+ bbl.afterwordby capitalize " " * swap$ *
+ }
+ { "" }
+ if$
+}
+
+
+
+FUNCTION {format.thesis.type}
+{
+ type duplicate$ empty$
+ 'pop$
+ {
+ swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+
+
+
+FUNCTION {format.tr.number}
+{
+ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+
+
+
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+
+
+
+FUNCTION {format.book.crossref}
+{
+ volume duplicate$ empty$
+ {
+ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ {
+ bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of separate.by.space *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+
+
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+
+
+
+FUNCTION {format.org.or.pub}
+{
+ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ {
+ address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION {format.publisher.address}
+{
+ publisher "publisher" bibinfo.check format.org.or.pub
+}
+
+
+
+FUNCTION {format.organization.address}
+{
+ organization "organization" bibinfo.check format.org.or.pub
+}
+
+
+
+STRINGS {oldname}
+
+FUNCTION {name.or.dash}
+{
+ 's :=
+ oldname empty$
+ { s 'oldname := s }
+ {
+ s oldname =
+ { "---{}---{}---" }
+ { s 'oldname := s }
+ if$
+ }
+ if$
+}
+
+
+
+
+
+% Functions to open, and close the bibitem
+
+INTEGERS { is.authorfa.exist }
+
+FUNCTION {begin.bibitem}
+{
+ #0 'is.authorfa.exist :=
+ newline$
+ is.language.persian
+ {
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names
+ duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ }
+ {
+ "\begin{LTRbibitems}" write$
+ "\resetlatinfont" write$
+ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names
+ duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ }
+ if$
+ ""
+ before.all 'output.state :=
+}
+
+
+
+FUNCTION {finish.entry}
+{
+ add.period$ write$
+ newline$
+ is.language.persian
+ 'skip$
+ {
+ "\end{LTRbibitems}" write$
+ newline$
+ }
+ if$
+}
+
+
+
+
+
+% 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}
+{
+ 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$
+ {
+ 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.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.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.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.note output
+ new.sentence format.isbn output
+ new.sentence format.doi output
+ new.sentence format.urldate output
+ new.sentence format.url output
+ }
+ if$
+ }
+ { %%% if author field is empty, proceed 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.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.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
+ }
+ if$
+ }
+ { %%% if author, and compiler fields are empty, proceed 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.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.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
+ }
+ if$
+ }
+ { %%% if author, compiler, and editor fields are empty, proceed translator
+ translator empty$ not
+ {
+ format.translators output.nonnull
+ name.or.dash
+ new.sentence format.translateyear output
+ new.block format.btitle "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.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
+ }
+ { %%% if author, compiler, editor, and translator fields are empty, proceed key
+ key empty$ not
+ {
+ format.btitle "title" output.check
+ 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.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$
+ }
+ {
+ "author, compiler, editor, translator, and key" output.check
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ finish.entry
+}
+
+
+
+FUNCTION {booklet}
+{ begin.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.isbn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ finish.entry
+}
+
+
+
+FUNCTION {inbook}
+{ begin.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ name.or.dash
+ }
+ { format.authors output.nonnull
+ name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.number.series output
+ format.edition output
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ crossref missing$
+ { format.isbn output }
+ 'skip$
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ finish.entry
+}
+
+
+
+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$
+ {
+ 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.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ finish.entry
+}
+
+
+
+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
+ }
+ if$
+ format.isbn output
+ format.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ finish.entry
+}
+
+
+
+FUNCTION {conference} { inproceedings }
+
+
+
+FUNCTION {manual}
+{ begin.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ finish.entry
+}
+
+
+
+FUNCTION {mastersthesis}
+{ 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
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ finish.entry
+}
+
+
+
+FUNCTION {misc}
+{ begin.bibitem
+ format.authors output
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ finish.entry
+}
+
+
+
+FUNCTION {phdthesis}
+{ 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
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ finish.entry
+}
+
+
+
+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
+ }
+ if$
+ format.isbn output
+ format.issn output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ finish.entry
+}
+
+
+
+FUNCTION {techreport}
+{ begin.bibitem
+ format.authors "author" output.check
+ author format.key output
+ name.or.dash
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ format.eprint output
+ format.url output
+ finish.entry
+}
+
+
+
+FUNCTION {unpublished}
+{ 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
+ format.doi output
+ new.block
+ format.note "note" output.check
+ format.eprint output
+ format.url output
+ finish.entry
+}
+
+
+
+FUNCTION {default.type} { misc }
+
+
+
+
+
+% Reading bibliography database (.bib) file
+
+READ
+
+
+
+FUNCTION {sortify}
+{
+ purify$
+ "l" change.case$
+}
+
+
+
+% Length of the label
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{
+ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+
+
+% Format the label name
+
+FUNCTION {label.and}
+{
+ is.language.persian
+ { "و" }
+ {
+ authorfa missing$
+ { "and" }
+ { "و" }
+ if$
+ }
+ if$
+}
+
+FUNCTION {label.etal}
+{
+ is.language.persian
+ { "و~همکاران" }
+ {
+ authorfa missing$
+ { "et~al." }
+ { "و~همکاران" }
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION {format.lab.names}
+{
+ 's :=
+ authorfa empty$
+ {
+ #0 'is.authorfa.exist :=
+ }
+ {
+ authorfa 's :=
+ #1 'is.authorfa.exist :=
+ }
+ if$
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ #3 >
+ {
+ " " * label.etal *
+ }
+ {
+ s num.names$ #2 <
+ 'skip$
+ {
+ s num.names$ #3 <
+ {
+ s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * label.etal *
+ }
+ {
+ label.and separate.by.space * s #2 "{vv~}{ll}" format.name$ *
+ }
+ if$
+ }
+ {
+ s #3 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * label.etal *
+ }
+ {
+ bbl.comma * " " * s #2 "{vv~}{ll}" format.name$ *
+ bbl.comma * " " * label.and separate.by.space * s #3 "{vv~}{ll}" format.name$ *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ #0 'is.authorfa.exist :=
+}
+
+
+
+FUNCTION {author.key.label}
+{
+ author empty$
+ {
+ key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ {
+ author format.lab.names
+ }
+ if$
+}
+
+
+
+FUNCTION {author.editor.key.label}
+{
+ author empty$ 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
+ { cite$ #1 #3 substring$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+
+
+FUNCTION {editor.key.label}
+{
+ editor empty$
+ {
+ key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ {
+ editor format.lab.names
+ }
+ if$
+}
+
+
+
+FUNCTION {calc.short.authors}
+{
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ {
+ type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+
+
+FUNCTION {calc.label}
+{
+ calc.short.authors
+ short.list
+ "("
+ *
+ author empty$ not
+ {
+ year duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+ }
+ {
+ compiler empty$ not
+ {
+ year duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+ }
+ {
+ editor empty$ not
+ {
+ year duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+ }
+ {
+ translator empty$ not
+ {
+ translateyear duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+ }
+ {
+ year duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ *
+ 'label :=
+}
+
+
+
+
+
+% Functions for sort
+
+FUNCTION {sort.format.names}
+{
+ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ {
+ namesleft #0 >
+ }
+ {
+ s nameptr
+ "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 =
+ t "others" =
+ and
+ { "zzzzz" 't := }
+ 'skip$
+ if$
+ t sortify *
+ }
+ {
+ t sortify *
+ }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+
+
+FUNCTION {sort.format.title}
+{
+ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+
+
+
+FUNCTION {author.sort}
+{
+ author empty$
+ {
+ key empty$
+ {
+ "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ {
+ author sort.format.names
+ }
+ if$
+}
+
+
+
+FUNCTION {author.editor.sort}
+{
+ author empty$ not
+ {
+ author sort.format.names
+ }
+ {
+ compiler empty$ not
+ {
+ compiler 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, compiler, editor, translator, or key in " cite$ * warning$
+ ""
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ 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 {presort}
+{
+ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ {
+ type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { last.label next.extra }
+
+INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label }
+
+FUNCTION {initialize.extra.label.stuff}
+{
+ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ "a" chr.to.int$ #1 - 'last.extra.num.blank :=
+ last.extra.num.blank 'last.extra.num.extended :=
+ #0 'number.label :=
+}
+
+
+
+FUNCTION {forward.pass}
+{
+ last.label label =
+ {
+ last.extra.num #1 + 'last.extra.num :=
+ last.extra.num "z" chr.to.int$ >
+ {
+ "a" chr.to.int$ 'last.extra.num :=
+ last.extra.num.extended #1 + 'last.extra.num.extended :=
+ }
+ 'skip$
+ if$
+ last.extra.num.extended last.extra.num.blank >
+ {
+ last.extra.num.extended int.to.chr$
+ last.extra.num int.to.chr$
+ * 'extra.label :=
+ }
+ {
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ if$
+ }
+ {
+ "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+
+
+
+FUNCTION {reverse.pass}
+{
+ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label duplicate$ empty$
+ 'skip$
+ {
+ is.language.persian
+ { "{\natexlabfa{" swap$ * "}}" * }
+ { "{\natexlaben{" swap$ * "}}" * }
+ if$
+ }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+
+
+EXECUTE {initialize.extra.label.stuff}
+
+ITERATE {forward.pass}
+
+REVERSE {reverse.pass}
+
+FUNCTION {bib.sort.order}
+{
+ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+
+ITERATE {bib.sort.order}
+
+SORT
+
+
+FUNCTION {begin.bib}
+{
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" write$
+ newline$
+ "% generated by iran.bst," write$
+ newline$
+ "% this bibliography style is part of the `iran-bib` package." write$
+ newline$
+ "% copyright (c) 2023 Farshad Rasuli <farshad.rasuli@gmail.com>" write$
+ newline$
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" write$
+ newline$
+ newline$
+ newline$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" * write$
+ newline$
+}
+
+
+EXECUTE {begin.bib}
+
+
+EXECUTE {init.state.consts}
+
+
+ITERATE {call.type$}
+
+
+FUNCTION {end.bib}
+{
+ newline$
+ "\end{thebibliography}" write$
+ newline$
+}
+
+
+EXECUTE {end.bib}
+
+
+
+%%
+%% End of file `iran.bst'. \ No newline at end of file