CTeX-org / ctex-kit

Macro Packages and Scripts for Chinese TeX users
976 stars 124 forks source link

ctexhook needs be adapted to next latex version #532

Closed u-fischer closed 4 years ago

u-fischer commented 4 years ago

We just released a new development version of the next LaTeX version, In this dev release we implemented a new hook system and extended the existing set of hooks.

Details can be found in the announcement: https://www.latex-project.org/news/2020/07/22/latex-dev-2020-10-1b/

This changes break with xecjk as ctexhook patches \document in an incompatible way.

%compile with xelatex-dev
% LaTeX2e <2020-10-01> pre-release-7 (develop 2020-7-22 branch)
% L3 programming layer <2020-07-17> xparse <2020-03-03>
\documentclass[10pt]{book}

%\usepackage{xeCJK}

\RequirePackage {ctexhook}
\begin{document}
abc
\end{document}

gives

! Extra \endgroup.
\CTEX@document@left@hook ->\group_end: 
                                       \g__ctex_end_preamble_hook_tl \group_...
l.24 \begin{document}

Please adapt ctexhook so that is doesn't fail when the final release in October hits the streets.

The new hooks should allow ctex to add the needed code without patching \document. If you need help with the implementation or have questions please open an issue at the latex2e github.

Ulrike Fischer, LaTeX team