Bug in 3.141592653-2.6-0.999995 (TeX Live 2023) with fontspec and tabularray?
Ross Alexander
evilross at yahoo.co.uk
Mon Jan 29 13:25:04 CET 2024
When formatting a tabular with tabularray and setting \mainfont{Latin Modern Roman}[Scale=0.80] some cells are have incorrect line breaks. This only happens in very particular circumstances, where the scale is set to exactly 0.8, the font is Latin Modern Roman (or TeX Gyre Termes) and this is the mainfont. This doesn't happen if I use lualatex. Below is the code but it may be easier to see the issue by going to https://wormhole.hepazulian.net/public/texworks/ and looking at tb-ex.pdf and tb-lua.pdf. The directory contains the source, log and output files.
Regards,Ross
\documentclass[a4paper]{article}
\RequirePackage{fontspec}
\RequirePackage{tabularray}
\RequirePackage{tabularx}
%% \setmainfont{TeX Gyre Pagella}[Color=violet,Scale=0.8,Ligatures=TeX]
%% \setmainfont{TeX Gyre Termes}[Color=violet,Scale=0.8]
\newfontfamily{\lmscaleeight}{Latin Modern Roman}[Scale=0.8]
\newfontfamily{\lmscaleseven}{Latin Modern Roman}[Scale=0.7]
\setmainfont{Latin Modern Roman}[Scale=0.80]
%% \setmainfont{Linux Libertine O}[Scale=0.8,Ligatures=TeX]
%% \setsansfont{Linux Biolinum O}[Scale=0.7,Color=red,Ligatures=TeX]
\begin{document}
With tabularx
\bigskip
\typeout{tabularx}
\begin{tabularx}{\linewidth}{Xll} \hline
Adjustments & Height & Weight \\ \hline
Human Male & +0" & 100\% \\
Human Female & -4" & 80\% \\
Orc Male & -4" & 110\% \\
Orc Female & -6" & 100\% \\
Elf Male & +5" & 80\% \\
Elf Female & +2" & 65\% \\
\end{tabularx}
\bigskip
With tblr
\bigskip
\typeout{tblr with mainfont}
%% \lmscaleeight
\begin{tblr}{colspec={Xll},
hline{1-2}={1.0pt},row{1}={font=\bfseries}}
Adjustments & Height & Weight \\
Human Male & +0" & 100\% \\
Human Female & -4" & 80\% \\
Orc Male & -4" & 110\% \\
Orc Female & -6" & 100\% \\
Elf Male & +5" & 80\% \\
Elf Female & +2" & 65\% \\
\end{tblr}
\typeout{tblr with lmscaleeight}
\lmscaleeight
\bigskip
Using custom font
\bigskip
\begin{tblr}{colspec={Xll},
hline{1-2}={1.0pt},row{1}={font=\bfseries}}
Adjustments & Height & Weight \\
Human Male & +0" & 100\% \\
Human Female & -4" & 80\% \\
Orc Male & -4" & 110\% \\
Orc Female & -6" & 100\% \\
Elf Male & +5" & 80\% \\
Elf Female & +2" & 65\% \\
\end{tblr}
\end{document}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex-live/attachments/20240129/3d60acab/attachment.htm>
More information about the tex-live
mailing list.