2

We have used the multibib package with \newcites{ب} command.

Because this letter "ب" is one of the Persian letters, latex makes .aux file with the strange and undefined name and its variable in any computer (like ظ..aux). So we can't write unique commands to build our reference. Like bibtex A.aux.

How can I solve this problem?

We want latex show ‍‍[الف1] in output pdf.

\documentclass{scrartcl}

\usepackage[resetlabels,labeled]{multibib}

\usepackage{xepersian}
\settextfont{XB Niloofar}
\newcommand{\ReferenceDocuments}{\rl{مستندات مرجع}}
\newcommand{\RelevantDocumentation}{\rl{مستندات ذیربط}}
\newcites{الف,ب}{\ReferenceDocuments%
,
\RelevantDocumentation}
\begin{document}
یک استناد به مستندات مرجع
 \cite{bb} 
 یک استناد به مستندات ذیربط
  \citeالف{aa}
  یک استناد به مراجع اصلی
 \citeالف{cc}
 یک استناد دیگر 
 \citeب{dd}

\renewcommand{\refname}{\rl{مراجع}}
\bibliographystyle{plain-fa}
\bibliography{lit}                 

\bibliographystyleالف{plain}
\bibliographyالف{lit}         

\bibliographystyleب{plain}
\bibliographyب{lit}          

\end{document}

.bib file:

@Article{aa,
  author =   {Author, A.},
  title =    {Title},
  journal =  {Journal},
  year =     2000
}

@ARTICLE{bb,
  AUTHOR =  {واحدی, مصطفی},
  TITLE =  {درختان پوشای کمینه دورنگی مسطح},
  JOURNAL =  {مجله فارسی نمونه},
  VOLUME =  {1},
  YEAR =  {1387},
  NUMBER =  {2},
  MONTH =  {آبان},
  PAGES =  {22-30},
  LANGUAGE =   {Persian}
}

@ARTICLE{dd,
  AUTHOR =  {بهبودی‌فام, حسین},
  TITLE =  {یک عنوان درست و درمون},
  JOURNAL =  {مجله فارسی نمونه},
  VOLUME =  {1},
  YEAR =  {1387},
  NUMBER =  {2},
  MONTH =  {آبان},
  PAGES =  {22-30},
  LANGUAGE =   {Persian}
}

@ARTICLE{cc,
  AUTHOR =  {بهبودی, احمد},
  TITLE =  {یک عنوان درست و درمون},
  JOURNAL =  {مجله فارسی نمونه},
  VOLUME =  {1},
  YEAR =  {1387},
  NUMBER =  {2},
  MONTH =  {آبان},
  PAGES =  {22-30},
  LANGUAGE =   {Persian}
}

Output pdf: enter image description here

  • What you could try is copy ب.aux to A.aux, then run bibtex A, then copy A.bbl to ب.bbl, and the same for the other one. I tried this on my Mac and it worked. I don't know any Persian, so I cannot check if the output is correct. – Piet van Oostrum Jan 9 '17 at 16:05
  • Thank you for your comment. Your idea is correct. Even running ب.aux is correct but my goal is to have a true file name. Because in every computer it makes .aux file with a variable name so we can not use unique commands to build. – hossein behboodi Jan 9 '17 at 16:34
  • What operating system do you use? Because on my Mac I can just run bibtex ب.aux and bibtex الف.aux without problems. – Piet van Oostrum Jan 9 '17 at 16:45
  • I have windows with texlive 2016.Can you say me what is the file name that built with xelatex main? Is it الف.aux or ظ..aux and other like this? – hossein behboodi Jan 9 '17 at 16:56
  • The files I get are الف.aux and ب.aux. MacOS uses utf-8 for file names, while Windows uses utf-16, if I am correct. Maybe that makes a difference. Because your document probably is in utf-8, which is the default for xelatex and lualatex. I compiled with xelatex. – Piet van Oostrum Jan 9 '17 at 22:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.