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

Font commands will be considered undefined if certain conditions are met. #294

Closed
Meiting-Wang opened this issue Aug 20, 2022 · 3 comments
Closed
Labels
bug report Something isn't working v2025 surprise Breaking change in version 2025
Milestone

Comments

@Meiting-Wang
Copy link

Hello Mr. Lu. I find that in the table body of tblr and longtblr environemts,\rmfamily, \bfseries, \heiti, \fangsong, and other font commands will be considered undefined if (1) they are followed by Chinese(I use package ctex to reach support for chinese), (2) I compile with xelatex or lualatex, and (3) I add the option "verb".

So this could be caused by conflicting conditions above?

Best wishes

PS.
my system: win10
Tex Live version: TeX 3.141592653 (TeX Live 2022)
tlmgr update time: August 6, 2022
My MWE:

image

\documentclass{article}
\usepackage{ctex}
\usepackage{tabularray}


\begin{document}

\section{Test}

% no problem here
\begin{tblr}{
  hline{1,Z}={1pt,solid},
}
rmfamily & \bfseries bfseries & \ttfamily ttfamily & \itshape itshape \\
宋体 & \bfseries 黑体 & \ttfamily 仿宋 & \itshape 楷书 \\
宋体 & \heiti 黑体 & \fangsong 仿宋 & \kaishu 楷书 \\
\end{tblr}

% no problem here
\begin{tblr}{
  verb,
  hline{1,Z}={1pt,solid},
}
rmfamily & \bfseries bfseries & \ttfamily ttfamily & \itshape itshape \\
中文 & 中文 & 中文 & 中文 \\
中文 & 中文 & 中文 & 中文 \\
\end{tblr}

% There is a problem here.
\begin{tblr}{
  verb,
  hline{1,Z}={1pt,solid},
}
rmfamily & \bfseries bfseries & \ttfamily ttfamily & \itshape itshape \\
\bfseries 中文 & 中文 & 中文 & 中文 \\
中文 & 中文 & 中文 & 中文 \\
\end{tblr}


\end{document}
@davidcarlisle
Copy link

davidcarlisle commented Aug 20, 2022

@lvjr may be able to fix that in the package, but a simple workaround is add {}

\bfseries{}中文

works fine, it is not \bfseries that is undefined but \bfseries中文 as the space is dropped by the verb processing and 中文 are considered as letters as part of the command name. {} forces the \bfseries name to end.

@Meiting-Wang
Copy link
Author

@davidcarlisle Thank you for your answer, from which I know the cause of the bug and a temporary solution.

@lvjr lvjr added the bug report Something isn't working label Aug 21, 2022
@lvjr
Copy link
Owner

lvjr commented Mar 1, 2023

Since version 2023A, verb option was obsolete. Please use \fakeverb command from codehigh package instead.

@lvjr lvjr closed this as completed Mar 1, 2023
@lvjr lvjr added this to the 2023A milestone Mar 1, 2023
@lvjr lvjr added the next surprise Breaking change around the corner label Mar 1, 2023
@lvjr lvjr closed this as not planned Won't fix, can't repro, duplicate, stale Mar 1, 2023
@lvjr lvjr added v2025 surprise Breaking change in version 2025 and removed next surprise Breaking change around the corner labels Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something isn't working v2025 surprise Breaking change in version 2025
Projects
None yet
Development

No branches or pull requests

3 participants