Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With xelatex + color package, \color_ensure_current: leaves 1 in input stream #1085

Closed
muzimuzhi opened this issue Apr 14, 2022 · 0 comments
Closed
Assignees
Labels
bug Something isn't working l3backend Issues with the low-level backend code

Comments

@muzimuzhi
Copy link
Contributor

Example:

% !TeX TS-program = xelatex
\documentclass{article}
\usepackage{color}

\begin{document}
\ExplSyntaxOn

\hbox_set:Nn \l_tmpa_box
  { \color_ensure_current: }
\box_use:N \l_tmpa_box

\ExplSyntaxOff
\end{document}
  • Expected: Box \l_tmpa_box is empty
  • Actual: it contains a character 1.

Analysis:

With xelatex + color package, initially \current@color holds ␣Black (a normal space followed by word Black). \color_ensure_current: is defined as

\cs_new_protected:Npn \color_ensure_current:
  {
    \__color_backend_pickup:N \l__color_current_tl
    \__color_select:N \l__color_current_tl
  }
  • Before 94aa846 in Enable creation of new color models #757, \__color_backend_pickup:N \l__color_current_tl will set \l__color_current_tl to be {spot}{Black 1}.
  • But now (since l3backend 2020-08-07 I think), \__color_current_tl is set to be {Black}{1}. Since Black is an unknown color model, \__color_select:nn {Black}{1}, the intermediate expansion result of \__color_select:N \l__color_current_tl, leaves 1 in input stream.
@josephwright josephwright self-assigned this Apr 14, 2022
@josephwright josephwright added bug Something isn't working l3backend Issues with the low-level backend code labels Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working l3backend Issues with the low-level backend code
Projects
None yet
Development

No branches or pull requests

2 participants