lvjr / tabularray

Typeset tabulars and arrays with LaTeX3
https://ctan.org/pkg/tabularray
247 stars 22 forks source link

Report: Unexpected vertical space with jiazhu.sty used #392

Open ChihSee-Hsie opened 1 year ago

ChihSee-Hsie commented 1 year ago

While using package jiazhu (not included in CTAN, but in ctex-kit) in environment tblr, there would be an unexpected vertical space at the bottom of the cell with command \jiazhu used, the height of which is about 1 \baselineskip.

MWE as followed:

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

\begin{document}
\begin{tblr}{colspec={XX}, hlines, vlines, columns={0.2\textwidth, l}} % tabularray
〇〇\jiazhu{〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇} & 〇〇\jiazhu{〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇}\\
〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇              & 〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇\\
〇〇\jiazhu{〇〇}                                 & 〇〇\jiazhu{〇〇}\\
\end{tblr}

\begin{tabularx}{0.4\textwidth}{|X|X|} % tabularx as comparison.
\hline
〇〇\jiazhu{〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇} & 〇〇\jiazhu{〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇}\\
\hline
〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇              & 〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇〇\\
\hline
〇〇\jiazhu{〇〇}                                 & 〇〇\jiazhu{〇〇}\\
\hline
\end{tabularx}
\end{document}

The build result (TL 2023, XeLaTeX) is as followed:

test.pdf ,

and here is the package jiazhu (in .txt format) included in ctex-kit.

Thanks for the attention.

lvjr commented 1 year ago

Here is a minimal example based on @Sophanatprime's comment on https://github.com/CTeX-org/ctex-kit/issues/658.

\documentclass{article}
\usepackage{tabularray}
\begin{document}

\newcommand\jzbreak{\hskip0pt plus 5pt\penalty-100\hskip0pt plus-5pt\relax}

\begin{tblr}{hlines, vlines, columns={0.2\textwidth, l, appto=\jzbreak}} % tabularray
12 12 12 12 12 12 12 12 12 12 12 12 & 12 12 12 12 12 12 12 12 12 12 12 12\\
12 12 12 12 12 12 12 12             & 12 12 12 12 12 12 12 12\\ 
12 12 12 12                         & 12 12 12 12\\
\end{tblr}

\end{document}

image