reutenauer / polyglossia

An alternative to Babel for XeLaTeX and LuaLaTeX
http://www.ctan.org/pkg/polyglossia
MIT License
187 stars 52 forks source link

fails with lettrine and arabic #564

Closed wujastyk closed 1 year ago

wujastyk commented 1 year ago

TL22.

bidi's documentation says it supports lettrine, but I'm having trouble.

MWE:

% !TeX TS-program = xelatex
% !TeX encoding = UTF-8
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{english}
\usepackage{lettrine} % position 2
\setotherlanguage{arabic}

%\usepackage{lettrine} % position 1

\begin{document}
\lettrine{H}{ere is a nice beginning} to a paragraph.  The current document contains no 
words, but we need some phrases as a base to create the random text from. The current 
document contains no words, but we need some phrases as a base to create the random 
text from.  
\end{document}

When lettrine is invoked at position 1, I get

Package bidi Error: Oops! you have loaded package lettrine after bidi package on your document again. 
\begin{document}

And at position 2, I get

Undefined control sequence. \lettrine{H}{ere is a nice beginning}

Any suggestions would be welcome.
Thanks.

jspitz commented 1 year ago

This looks to me more like a bidi than a polyglossia bug. I get the same two errors with

% !TeX TS-program = xelatex
% !TeX encoding = UTF-8
\documentclass{article}
\usepackage{lettrine}% position 1
\usepackage{bidi}
%\usepackage{lettrine} % position 2

\begin{document}
    \lettrine{H}{ere is a nice beginning} to a paragraph.  The current document contains no 
    words, but we need some phrases as a base to create the random text from. The current 
    document contains no words, but we need some phrases as a base to create the random 
    text from.  
\end{document}

I'd suggest you file a bug report against kvafa/bidi/issues

wujastyk commented 1 year ago

will do. Thanks for looking at it.