BibTex를 사용하여 LTR 기사에 RTL 인용을 삽입하는 방법은 무엇입니까?

BibTex를 사용하여 LTR 기사에 RTL 인용을 삽입하는 방법은 무엇입니까?

BibTeX를 사용하여 LTR(예: 영어) 기사에 RTL 인용(예: 페르시아어)을 삽입하려면 어떻게 해야 합니까?

답변1

우선 Bibtex가 없는 솔루션을 알아야 합니다. 해결 방법은 다음 예에서 설명됩니다.

\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}

그다음에는 bibtex를 이용한 해결 방법을 설명하겠습니다.

답변2

[ persian-bib] 패키지는 이중 언어(페르시아어/영어) 문서에 널리 사용되는 bibtex 스타일의 적용을 제공합니다. 따라서 다음에서 제공되는 bibtex 스타일 중 하나를 사용해야 합니다 persian-bib.

  • unsrt-fa
  • plain-fa
  • acm-fa
  • ieeetr-fa
  • plainnat-fa( natbib)
  • chicago-fa( natbib)
  • asa-fa( natbib)

따라서 페르시아어와 영어 참조가 모두 포함된 기사의 MWE는 다음과 같습니다.

%!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}

또한,

  • language각 bibtex 항목의 태그를 기록해 두십시오 .
  • \مرجع은 다음과 같습니다\cite

답변3

새 버전에서는페르시아 턱받이 패키지(버전 0.8), 이러한 상황에 사용할 수 있는 새로운 스타일 Persian-fa-inLTR.bst를 추가했습니다. 다음 예에서는 사용 방법을 보여줍니다.

% !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}

관련 정보