lvjr / tabularray

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

How to set background of dotted/dashed hline? #217

Open jtl5770 opened 2 years ago

jtl5770 commented 2 years ago

MWE for this problem

\documentclass{article}
\usepackage{xcolor}
\usepackage{tabularray}

\begin{document}
\begin{tblr}{cells = {azure5}}
  Alpha & Beta & Gamma \\
  \hline[dashed, red]
  One   & Two  & Three \\
  Tic   & Tac  & Toe \\
\end{tblr}
\end{document}

dottedbackground

I don't seem to find a way to explicitly set the "non dashed/dotted" part of the hline (or vline). Could an argument similar to setting the foreground color be added?

lvjr commented 2 years ago

As a workaround, you can use negative rulesep to make two hlines overlap:

\documentclass{article}
\usepackage{xcolor}
\usepackage{tabularray}
\begin{document}
\begin{tblr}{cells = {azure5},rulesep=-0.4pt}
  Alpha & Beta & Gamma \\
  \hline[olive8]
  \hline[dashed, red]
  One   & Two  & Three \\
  Tic   & Tac  & Toe \\
\end{tblr}
\end{document}

image