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

Unwanted line break for some cell text #16

Closed
lvjr opened this issue Jun 5, 2021 · 5 comments
Closed

Unwanted line break for some cell text #16

lvjr opened this issue Jun 5, 2021 · 5 comments
Labels
upstream Not an issue of this package

Comments

@lvjr
Copy link
Owner

lvjr commented Jun 5, 2021

In fixing issue #15, I found another issue:

\documentclass[11pt]{article}
\usepackage{tabularray}
\begin{document}
\begin{tblr}{ll}
\hline
Src-Addr & Dest-Addr \\
\hline
\end{tblr}
\end{document} 

image

The result is correct if we change font size to 10pt or 12pt.

@lvjr lvjr added bug Something isn't working upstream Not an issue of this package and removed bug Something isn't working labels Jun 5, 2021
@lvjr
Copy link
Owner Author

lvjr commented Jun 9, 2021

@lvjr lvjr closed this as completed Jun 9, 2021
@lvjr
Copy link
Owner Author

lvjr commented Jan 19, 2022

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} 

image

@lvjr
Copy link
Owner Author

lvjr commented Mar 2, 2024

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

@muzimuzhi
Copy link
Collaborator

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?"

@lvjr
Copy link
Owner Author

lvjr commented Mar 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Not an issue of this package
Projects
None yet
Development

No branches or pull requests

2 participants