bidi-tex / bidi

Bidirectional typesetting in plain TeX and LaTeX, using XeTeX
Other
3 stars 0 forks source link

patching \end #10

Closed davidcarlisle closed 5 years ago

davidcarlisle commented 5 years ago

see the example at

https://tex.stackexchange.com/questions/512720/bidi-patching-error-in-xelatex

in the 2019 LaTeX release \begin and \end are robust so the current check of the definition fails and produces the following in all documents.


Package bidi Warning: Patching '\begin' failed!
(bidi)                '\bidi@AtBeginEnvironment' will not work.

Package bidi Warning: Patching '\end' failed!
(bidi)                '\bidi@AtEndEnvironment' will not work.

Package bidi Warning: Patching '\end' failed!
(bidi)                '\bidi@AfterEndEnvironment' will not work.

@vafakl are you able to push an update here or do you want us to update ctan for this?

The 2019 definition of \end is robust with the real definition in \end<space>

\@namedef{end }#1{%
  \csname end#1\endcsname\@checkend{#1}%
  \expandafter\endgroup\if@endpe\@doendpe\fi
  \if@ignore\@ignorefalse\ignorespaces\fi}

so bidi needs to check if \end<space> exists and if so patch that rather than \end.

user-is-inactive-forever commented 5 years ago

Dear David,

Thanks for this. I will not be able to update the bidi package any time soon. If you feel the urgent need to update it, please do so.

Best wishes, Vafa Khalighi

davidcarlisle commented 5 years ago

update uploaded to ctan