tabularray icon indicating copy to clipboard operation
tabularray copied to clipboard

What about a `lines` option that would set both `hlines` and `vlines`?

Open dbitouze opened this issue 7 months ago • 5 comments

What about a lines option that would set both hlines and vlines?

This would be useful to avoid repetition, for example in the following case:

\begin{tblr}{
  hlines = {red,1mm,dotted},
  vlines = {red,1mm,dotted},
  }
...
\end{tblr}

dbitouze avatar May 28 '25 17:05 dbitouze

You can also use \DeclareTblrKeys for this:

\documentclass{article}
\usepackage{tabularray}
\usepackage{ninecolors}
\DeclareTblrKeys{table/inner}{
  hvlines .meta:n = {
    hlines = {#1},
    vlines = {#1}
  }
}
\begin{document}

\begin{tblr}{
  hvlines = {red, dashed}
}
  Head    & Head  & Head   & Head \\
  Alpha   & Beta  & Gamma  & Delta \\
  Epsilon & Zeta  & Eta    & Theta \\
  Iota    & Kappa & Lambda & Mu    \\
  Alpha   & Beta  & Gamma  & Delta \\
  Epsilon & Zeta  & Eta    & Theta \\
  Iota    & Kappa & Lambda & Mu
\end{tblr}

\end{document} 
Image

lvjr avatar Jun 05 '25 08:06 lvjr

Nice! But what about providing it by the package?

dbitouze avatar Jun 05 '25 08:06 dbitouze

Sorry, I will keep tabularray minimal and extendable.

lvjr avatar Jun 05 '25 09:06 lvjr

I can understand but this would be just a tiny enhancement.

dbitouze avatar Jun 05 '25 10:06 dbitouze

BTW, I would prefer the name hvlines.

muzimuzhi avatar Jun 07 '25 16:06 muzimuzhi

Too bad this is closed as not planned!

dbitouze avatar Nov 01 '25 14:11 dbitouze