1

When I use xindy for producing glossary in XeLatex I getting the following error:

xindy.pl: input file xindy -L persian-variant1 -C utf8 -I xindy -M %.xdy -t %.glg -o %.gls %.glo | 
xindy -L persian-variant1 -C utf8 -I xindy -M %.xdy -t %.blg -o %.bls %.blo |
xindy -L english -C utf8 -I xindy -M %.xdy -t %.alg -o %.acr %.acn does not exist at c:/texlive/2014/texmf-dist/scripts/xindy/xindy.pl line 542.
C:\texlive\2014\bin\win32\runscript.tlu:652: command failed with exit code 2:
perl.exe c:/texlive/2014/texmf-dist/scripts/xindy/xindy.pl "xindy -L persian-variant1 -C utf8 -I xindy -M %.xdy -t %.glg -o %.gls %.glo | 
xindy -L persian-variant1 -C utf8 -I xindy -M %.xdy -t %.blg -o %.bls %.blo |
xindy -L english -C utf8 -I xindy -M %.xdy -t %.alg -o %.acr %.acn"

What I must to do to get desired output?

2

Your texlive is old. According to the description of this page It was a bug from xindy in texlive 2014.
It has been fixed in the new texlive. You should download and install texlive 2018. Then run the following structure:


\documentclass[12pt]{book}
\usepackage[pagebackref=false,colorlinks,linkcolor=red,citecolor=magenta]{hyperref}
\usepackage[nottoc]{tocbibind}
\usepackage{makeidx}
\makeindex
\usepackage{xepersian}
\settextfont[Scale=1.2]{IRZar}  
\begin{document}
\tableofcontents
\chapter{فصل اول}
مطالب فصل اول اینجا وارد شوند. 
\index{توپولوژی} 
\section{بخش اول}
مطالب بخش اول اینجا وارد شوند.
\index{آینده} 
\index{انسان} 
\index{\lr{horizontal mode}}
\printindex
\end{document}

And also you have to make the folowing user:

xindy -L persian-variant1 -C utf8 -M numeric-sort -M latex -M latex-loc-fmts -M texindy %.idx

(option->configure texstudio->build->add-> xindy -L persian-variant1 -C utf8 -M numeric-sort -M latex -M latex-loc-fmts -M texindy %.idx ->ok) And compile it.(f1+above xindy user+f1 in texstudio)
You have the same output as following:


enter image description here

But in glossary you have to make the folowing user:

xindy -L persian-variant1 -C utf8 -I xindy -M %.xdy -t %.glg -o %.gls %.glo | 
xindy -L persian-variant1 -C utf8 -I xindy -M %.xdy -t %.blg -o %.bls %.blo |
xindy -L english -C utf8 -I xindy -M %.xdy -t %.alg -o %.acr %.acn

And this structure:

\documentclass{report}
\usepackage{dblfnote} 
\usepackage[xindy,acronym,nonumberlist=true]{glossaries}
\usepackage[pagebackref=false,colorlinks,linkcolor=blue,citecolor=magenta]{hyperref} 
\usepackage{xepersian}

\settextfont{XB Niloofar}
\setdigitfont[Scale=1.3]{PGaramond}
\setlatintextfont[Scale=1.2]{Times New Roman}
\newglossarystyle{myFaToEn}{%
    \renewenvironment{theglossary}{}{}
    \renewcommand*{\glsgroupskip}{\vskip 10mm}
    \renewcommand*{\glsgroupheading}[1]{\subsection*{\glsgetgrouptitle{##1}}}
    \renewcommand*{\glossentry}[2]{\noindent\glsentryname{##1}\dotfill\space \glsentrytext{##1}

    }
}
\newglossarystyle{myEntoFa}{% 
    \renewenvironment{theglossary}{}{}
    \renewcommand*{\glsgroupskip}{\vskip 10mm}
    \renewcommand*{\glsgroupheading}[1]{\begin{LTR} \subsection*{\glsgetgrouptitle{##1}} \end{LTR}} 
\renewcommand*{\glossentry}[2]{\noindent\glsentrytext{##1}\dotfill\space \glsentryname{##1}     
}
}
\newglossarystyle{myAbbrlist}{%
\renewenvironment{theglossary}{}{}
\renewcommand*{\glsgroupskip}{\vskip 10mm}
\renewcommand*{\glsgroupheading}[1]{\begin{LTR} \subsection*{\glsgetgrouptitle{##1}} \end{LTR}}
\renewcommand*{\glossentry}[2]{\noindent\glsentrytext{##1}\dotfill\space \Glsentrylong{##1}

}
\renewcommand*{\acronymname}{\rl{فهرست اختصارات
}}
} 
\newglossary[glg]{english}{gls}{glo}{واژه‌نامه انگلیسی به فارسی}
\newglossary[blg]{persian}{bls}{blo}{واژه‌نامه فارسی به انگلیسی}
\makeglossaries
\glsdisablehyper
\let\oldgls\gls
\let\oldglspl\glspl
\makeatletter
\renewrobustcmd*{\gls}{\@ifstar\@msgls\@mgls}
\newcommand*{\@mgls}[1] {\ifthenelse{\equal{\glsentrytype{#1}}{english}}{\oldgls{#1}\glsuseri{f-#1}}{\oldgls{#1}}}
\newcommand*{\@msgls}[1]{\ifthenelse{\equal{\glsentrytype{#1}}{english}}{\glstext{#1}\glsuseri{f-#1}}{\oldgls{#1}}}

\renewrobustcmd*{\glspl}{\@ifstar\@msglspl\@mglspl}
\newcommand*{\@mglspl}[1] {\ifthenelse{\equal{\glsentrytype{#1}}{english}}{\oldglspl{#1}\glsuseri{f-#1}}{\oldglspl{#1}}}
\newcommand*{\@msglspl}[1]{\ifthenelse{\equal{\glsentrytype{#1}}{english}}{\glsplural{#1}\glsuseri{f-#1}}{\oldglspl{#1}}}
\makeatother

\newcommand{\newword}[4]{
\newglossaryentry{#1}     {type={english},name={\lr{#2}},plural={#4},text={#3},description={}}
\newglossaryentry{f-#1} {type={persian},name={#3},text={\lr{#2}},description={}}
} 
\defglsentryfmt[english]{\glsgenentryfmt\ifglsused{\glslabel}{}{\LTRfootnote{\glsentryname{\glslabel}}}}
\defglsentryfmt[acronym]{\glsentryname{\glslabel}\ifglsused{\glslabel}{}{\LTRfootnote{\glsentrydesc{\glslabel}}}} 
\newcommand{\printabbreviation}{
\cleardoublepage
\phantomsection
\baselineskip=.75cm
\addcontentsline{toc}{chapter}{فهرست اختصارات}
\setglossarystyle{myAbbrlist}
\begin{RTL}
\Oldprintglossary[type=acronym] 
\end{RTL}
\clearpage
}%

\newcommand{\printacronyms}{\printabbreviation}
\let\Oldprintglossary\printglossary
\renewcommand{\printglossary}{
\let\appendix\relax
\clearpage
\phantomsection 
\twocolumn{}
\addcontentsline{toc}{chapter}{واژه نامه انگلیسی به فارسی}
\setglossarystyle{myEntoFa}
\Oldprintglossary[type=english]
\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{واژه نامه فارسی به انگلیسی}
\setglossarystyle{myFaToEn}
\Oldprintglossary[type=persian]
\onecolumn{}
}%
\newword{HAU}{Hausdorff Space}{فضای هاسدورف}{هاسدورف}
\newword{TOS}{Topology Space}{فضای توپولوژی}{فضای توپولوژی}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newacronym{WL}{w.l.o.g}{\lr{        
        Without Loss of Generality}}
\begin{document}
مثال برای دیگشنری‌ها و پانویس:
\\
 یک
\glspl{TOS}
را 
\glspl{HAU}
گویند هرگاه ...
\vspace*{3cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%مثال برای اختصارات: 
در این پایان‌نامه
\gls{WL}
تمام فضاها را در نظر می‌گیریم.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5555
دستور قرار دادن دیکشنری‌ها 
\printglossary
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
دستور قرار دادن  فهرست اختصارات
\printabbreviation
\end{document}

Good luck.

  • Thank you so much for your answer. Is there any way to fix this problem in TexLive 2014 without installing new version? – C.F.G Oct 23 '18 at 4:44
  • No. There is not. By considering the point that you have to update your packages. – SH.Madadpour Oct 23 '18 at 20:30

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.