-
Notifications
You must be signed in to change notification settings - Fork 22
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
Unwanted line break for some cell text #16
Comments
It's a bug of XeTeX engine: |
With the latest package code, there is a workaround for XeTeX users: \makeatletter
\AddToHook{cmd/TblrAlignBoth/after}{\@rightskip=-1sp \rightskip=\@rightskip}
\AddToHook{cmd/TblrAlignLeft/after}{\@rightskip=-1sp plus 1fil \rightskip=\@rightskip}
\AddToHook{cmd/TblrAlignCenter/after}{\@rightskip=-1sp plus 1fil \rightskip=\@rightskip}
\AddToHook{cmd/TblrAlignRight/after}{\leftskip=-1sp plus 1fil}
\makeatother And the workaround doesn't break any existing test files. \documentclass[11pt]{article}
\usepackage{tabularray}
\begin{document}
\begin{tblr}{jj}
\hline
Src-Addr & Dest-Addr \\
Src-Addr & Dest-Addr1111 \\
\hline
\end{tblr}
\begin{tblr}{ll}
\hline
Src-Addr & Dest-Addr \\
Src-Addr & Dest-Addr1111 \\
\hline
\end{tblr}
\begin{tblr}{cc}
\hline
Src-Addr & Dest-Addr \\
Src-Addr & Dest-Addr1111 \\
\hline
\end{tblr}
\begin{tblr}{rr}
\hline
Src-Addr & Dest-Addr \\
Src-Addr & Dest-Addr1111 \\
\hline
\end{tblr}
\bigskip
\makeatletter
\AddToHook{cmd/TblrAlignBoth/after}{\@rightskip=-1sp \rightskip=\@rightskip}
\AddToHook{cmd/TblrAlignLeft/after}{\@rightskip=-1sp plus 1fil \rightskip=\@rightskip}
\AddToHook{cmd/TblrAlignCenter/after}{\@rightskip=-1sp plus 1fil \rightskip=\@rightskip}
\AddToHook{cmd/TblrAlignRight/after}{\leftskip=-1sp plus 1fil}
\makeatother
\begin{tblr}{jj}
\hline
Src-Addr & Dest-Addr \\
Src-Addr & Dest-Addr1111 \\
\hline
\end{tblr}
\begin{tblr}{ll}
\hline
Src-Addr & Dest-Addr \\
Src-Addr & Dest-Addr1111 \\
\hline
\end{tblr}
\begin{tblr}{cc}
\hline
Src-Addr & Dest-Addr \\
Src-Addr & Dest-Addr1111 \\
\hline
\end{tblr}
\begin{tblr}{rr}
\hline
Src-Addr & Dest-Addr \\
Src-Addr & Dest-Addr1111 \\
\hline
\end{tblr}
\end{document} |
There were some discussions on this XeTeX bug on tex-live mail list: https://tug.org/pipermail/tex-live/2024-January/thread.html https://tug.org/pipermail/tex-live/2024-February/thread.html |
Titled "Bug in 3.141592653-2.6-0.999995 (TeX Live 2023) with fontspec and tabularray?" |
Yes, and some one found a possible fix for the xetex bug. |
In fixing issue #15, I found another issue:
The result is correct if we change font size to
10pt
or12pt
.The text was updated successfully, but these errors were encountered: