kvafa / bidi

Bidirectional typesetting in plain TeX and LaTeX, using XeTeX
https://ctan.org/pkg/bidi
6 stars 1 forks source link

\XeTeX and \XeLaTeX "already defined" #39

Open wujastyk opened 11 months ago

wujastyk commented 11 months ago

Brief outline of the issue

Lines 140-144 of latex-xetex-bibdi.def

%\bidi@newrobustcmd*{\XeTeX}{\LR{\leavevmode$\smash{\hbox{X\lower.5ex
%  \hbox{\kern-.125em\bidi@reflect@box{E}}\kern-.1667em \TeX}}$}}
%\bidi@newrobustcmd*{\XeLaTeX}{\LR{\leavevmode$\smash{\hbox{X\lower.5ex
%  \hbox{\kern-.125em\bidi@reflect@box{E}}\kern-.1667em \LaTeX}}$}}

are causing an error message for me of the type,

[\XeTeX | \XeLaTeX ] already defined 

I have a multilingual document using a special journal style and class that's pretty stable (HSSA), so it's hard for me to give an MWE. I've eliminated the obvious things: xltextra, fontspec. I'm not using arabtex. I am using polyglossia with other languages (greek, sanskrit, chinese). This issue arises when I add

\setotherlanguage{persian}
\newfontfamily\persianfont{Noto Sans Arabic}

Check/indicate

Minimal example showing the issue

% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode

\documentclass{hssa}
\usepackage{hssa}
%
\setotherlanguage{persian}  % this line alone produces the error message
%\newfontfamily\persianfont{Noto Sans Arabic}

\begin{document}
Hello world!
\end{document}

Expected behavior

Log and PDF files

sarma-kkk.log sarma-kkk.pdf