Como posso inserir uma citação RTL (por exemplo, persa) em um artigo LTR (por exemplo, inglês) usando BibTeX?
Responder1
A princípio você deve conhecer a solução sem bibtex. A solução é explicada no exemplo a seguir:
\documentclass[10pt,twocolumn,a4paper]{article}
\usepackage{fontspec}
\newfontfamily\Persianfont[Script=Arabic,Scale=1]{XB Niloofar}
\makeatletter
\TeXXeTstate=1
\def\Persiantext#1{\begingroup\beginR\Persianfont#1\endR\endgroup}
\def\Persianbibitem#1{\begin{RTLbibitems}\Persiantext{#1}\par\end{RTLbibitems}}
\makeatother
\usepackage{bidi}
\begin{document}
\section{Introduction}
You can use Persian and Arabic text between Latin text, with bidi package and the
above Persiantext command.
For example you may have an Arabic paragraph such as follows:
\begin{RTL}
\Persiantext{آدمی در عالم خاکی نمیآید بدست}
\end{RTL}
Or a brief text such as:
\Persiantext{این متن}
between your Latin text.
Also you may have Persian or Arabic references such as this Persian
\cite{Amintoosi87afzayesh} and this Latin \cite{Baker02limits} references
with the above Persianbibitem command.
\begin{thebibliography}{1}
\bibitem{Amintoosi87afzayesh}
\Persianbibitem{
امینطوسی، محمود، مزینی، ناصر، و فتحی، محمود. افزایش وضوح ناحیهای. در چهاردهمین کنفرانس ملی سالانه انجمن کامپیوتر ایران، صفحات ۱۰۱-۱۰۸، تهران، ایران، اسفند ۱۳۸۷. دانشگاه امیرکبیر.}
\bibitem{Baker02limits}
Baker, Simon and Kanade, Takeo. Limits on super-resolution and how to break them. IEEE Trans. Pattern Anal. Mach. Intell., 24(9):1167--1183, 2002.
\end{thebibliography}
\end{document}
Depois disso explicarei a solução com o bibtex.
Responder2
O persian-bib
pacote [ ] fornece adaptação de alguns estilos bibtex amplamente usados para um documento bilíngue (persa/inglês). Portanto, você deve usar um dos estilos bibtex fornecidos em persian-bib
:
unsrt-fa
plain-fa
acm-fa
ieeetr-fa
plainnat-fa
(requernatbib
)chicago-fa
(requernatbib
)asa-fa
(requernatbib
)
Portanto, um MWE de um artigo com referências em persa e inglês é o seguinte
%!TEX TS-PROGRAM=xelatex
\begin{filecontents}{refs.bib}
@article{h1,
author = {حسن ذاکری and سجاد ازگلی},
year = {1392},
title = {روش طراحی کنترلگر \lr{PI} برای دستهای از سامانههای غیرخطی دارای عدم قطعیت به کمک تجزیه مجموع مربعات},
pages = {47--59},
volume = {11},
number = {2},
journal = {مجله کنترل},
language={persian}
}
@inproceedings{h2,
title={Robust PI Design for Chaos Control Using Sum of Squares Approach},
author={Zakeri, Hasan and Ozgoli, Sadjaad},
booktitle={The 2nd International Conference on Control, Instrumentation, and Automation (ICCIA2011)},
language={latin}
}
\end{filecontents}
\documentclass{article}
\usepackage{xepersian}
\begin{document}
سلام. این یک تکه متن فارسی~\مرجع{h1} همراه با چند مرجع میباشد~\cite{h2}.
سلام. این یک تکه متن فارسی~\مرجع{h1} همراه با چند مرجع میباشد~\cite{h2}.
سلام. این یک تکه متن فارسی~\مرجع{h1} همراه با چند مرجع میباشد~\cite{h2}.
سلام. این یک تکه متن فارسی~\مرجع{h1} همراه با چند مرجع میباشد~\cite{h2}.
\begin{latin}
Some latin text~\cite{h1} with some citation~\cite{h1,h2}.
Some latin text~\cite{h1} with some citation~\cite{h1,h2}.
Some latin text~\cite{h1} with some citation~\cite{h1,h2}.
Some latin text~\cite{h1} with some citation~\cite{h1,h2}.
\end{latin}
\bibliographystyle{ieeetr-fa}
\bibliography{refs.bib}
\end{document}
Também,
- anote a
language
tag de cada entrada do bibtex; \مرجع
é equivalente a\cite
Responder3
Na nova versão doPacote de babador persa(Versão 0.8), adicionei um novo estilo Persian-fa-inLTR.bst, que pode ser usado para essas situações. O exemplo a seguir mostra como usá-lo:
% !TEX TS-program = XeLaTeX
\begin{filecontents}{SomeReferences.bib}
@CONFERENCE{Amintoosi87afzayesh,
AUTHOR = {امینطوسی,محمود and مزینی,ناصر and فتحی,محمود},
TITLE = {افزایش وضوح ناحیهای},
BOOKTITLE = {چهاردهمین کنفرانس ملی سالانه انجمن کامپیوتر ایران},
YEAR = {۱۳۸۷},
ORGANIZATION = {دانشگاه امیرکبیر},
ADDRESS = {تهران، ایران},
month = {اسفند},
pages = {۱۰۱-۱۰۸},
LANGUAGE = {Persian},
url = {http://www.civilica.com/Paper-ACCSI14-ACCSI14_107.htm}
}
@article{Baker02limits,
author = {Baker,, Simon and Kanade,, Takeo},
title = {Limits on Super-Resolution and How to Break Them},
journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
volume = {24},
number = {9},
year = {2002},
issn = {0162-8828},
pages = {1167--1183},
publisher = {IEEE Computer Society},
address = {Washington, DC, USA}
}
\end{filecontents}
\documentclass[10pt,a4paper]{article}
\usepackage{listings}
\usepackage{fontspec}
\newfontfamily\Persianfont[Script=Arabic,Scale=1]{Yas}
\makeatletter
\TeXXeTstate=1
\def\Persiantext#1{\begingroup\beginR\Persianfont#1\endR\endgroup}
\makeatother
\usepackage{bidi}
\begin{document}
\title{Persian-Arabic References in Latin Documnets}
\author{ Mahmood Amintoosi \\
Hakim Sabzevari University\\
Sabzevar, Iran\\
{\small [email protected] }}
\date{}
\maketitle
\section{Introduction}
Suppose the you want to have Persian or Arabic references such as this Persian
\cite{Amintoosi87afzayesh} and this Latin \cite{Baker02limits} references. In this case - with the power of bidi package - Persian-faLTR.bst style in Persian-bib package is the right solution.
You should insert the following codes in the premable of your document and use a suitable style in your documnet:
\begin{lstlisting}[language=tex,breaklines=true, basicstyle=\ttfamily, numberstyle=\footnotesize, numbersep=10pt, captionpos=b, frame=single, breakatwhitespace=false]
\usepackage{fontspec}
\newfontfamily\Persianfont[Script=Arabic,Scale=1]{Yas}
\makeatletter
\TeXXeTstate=1
\def\Persiantext#1{\begingroup\beginR\Persianfont#1\endR\endgroup}
\makeatother
\end{lstlisting}
Note that the encoding of your .bib file should be UTF-8.
Also you can use Persian and Arabic text between Latin text, with bidi package and the
above Persiantext command.
For example you may have a Persian paragraph such as follows:
\begin{RTL}
\Persiantext{آدمی در عالم خاکی نمیآید بدست}
\end{RTL}
Or a brief text such as:
\Persiantext{این متن}
between your Latin text.
\bibliographystyle{plain-fa-inLTR}
\bibliography{SomeReferences}
\end{document}