1

I do not understand why this generates a Underfull \hbox (badness 10000) warning:

\documentclass{article}

\usepackage{enumitem} \usepackage{tabularray} \UseTblrLibrary{varwidth} \usepackage{xcolor}

\NewDocumentEnvironment{mytblr}{+b}{ \noindent\begin{tblr}{hlines, vlines, colspec={X[1]X[2]}, measure=vbox, row{1} = {gray8,font=\bfseries}, stretch=-1, rowsep=4pt, row{2-Z} = {font=\footnotesize}} #1 \end{tblr} }{}

\begin{document}

\begin{mytblr} Case & Description \ A & B \ C & D \ \end{mytblr}

\end{document}

Thank you in advance!

leparc
  • 163

1 Answers1

2

There is a % missing at the end of l.11. Without it, the unprotected line ending will act like a space, making your new environment too wide to fit in a single line.

\documentclass{article}

\usepackage{enumitem} \usepackage{tabularray} \UseTblrLibrary{varwidth} \usepackage{xcolor}

\NewDocumentEnvironment{mytblr}{+b}{% \noindent\begin{tblr}{hlines, vlines, colspec={X[1]X[2]}, measure=vbox, row{1} = {gray8,font=\bfseries}, stretch=-1, rowsep=4pt, row{2-Z} = {font=\footnotesize}} #1 \end{tblr}% }{}

\begin{document}

\begin{mytblr} Case & Description \ A & B \ C & D \ \end{mytblr}

\end{document}

  • Thank you very much, this has been a tricky one for me… – leparc Aug 23 '23 at 10:04
  • I wonder if this behaviour shouldn't be corrected in the tabularray package, to avoid this warning when there is no text afterwards. – leparc Aug 23 '23 at 10:05
  • 1
    @leparc It is standard latex behaviour, see https://tex.stackexchange.com/questions/7453/what-is-the-use-of-percent-signs-at-the-end-of-lines-why-is-my-macro-creat – samcarter_is_at_topanswers.xyz Aug 23 '23 at 10:05
  • Thank you very much for the comment. I do not think I've ever experienced this impact in such a significant way before using tabularray. – leparc Aug 23 '23 at 11:08