You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using \babeltags with RTL languages, the begin{tag}…\end{tag} environment gives unexpected behaviour when it starts a new paragraph. Under lualatex the paragraph direction remains LTR, but under xelatex it is implicitly set to RTL, hence the output is different. The xelatex output is still unexpected though, since the paragraph indent occurs on the left rather than the right.
This is because \babeltags uses \begin{otherlanguage*}{language}…\end{otherlanguage*} internally which is basically the same as \foreignlanguage{language}{…}.
I think it would make more sense to force \begin{language}…\end{language} to always behave like a paragraph. You could use \begin{language*}…\end{language*} for the current behaviour which seems more consistent with \begin{otherlanguage}{language} and \begin{otherlanguage*}{language}. This would match what polyglossia does and mean that document syntax could be the same for both babel and polyglosssia.
I realise this breaks backwards compatibility so may not be an acceptable solution.
Minimal example showing the bug
This MWE requires fontspec and the Noto Serif Hebrew font. (Sorry about the Hebrew diacritics not showing correctly in GitHub.)
Brief outline of the bug
When using
\babeltags
with RTL languages, thebegin{tag}…\end{tag}
environment gives unexpected behaviour when it starts a new paragraph. Underlualatex
the paragraph direction remains LTR, but underxelatex
it is implicitly set to RTL, hence the output is different. Thexelatex
output is still unexpected though, since the paragraph indent occurs on the left rather than the right.This is because
\babeltags
uses\begin{otherlanguage*}{language}…\end{otherlanguage*}
internally which is basically the same as\foreignlanguage{language}{…}
.I think it would make more sense to force
\begin{language}…\end{language}
to always behave like a paragraph. You could use\begin{language*}…\end{language*}
for the current behaviour which seems more consistent with\begin{otherlanguage}{language}
and\begin{otherlanguage*}{language}
. This would match whatpolyglossia
does and mean that document syntax could be the same for bothbabel
andpolyglosssia
.I realise this breaks backwards compatibility so may not be an acceptable solution.
Minimal example showing the bug
This MWE requires
fontspec
and theNoto Serif Hebrew
font. (Sorry about the Hebrew diacritics not showing correctly in GitHub.)lualatex
output:xelatex
output:Log file (required) and possibly PDF file
babeltags.log (
lualatex
)babeltags.log (
xelatex
)The text was updated successfully, but these errors were encountered: