tabularray icon indicating copy to clipboard operation
tabularray copied to clipboard

How to set background of dotted/dashed hline?

Open jtl5770 opened this issue 2 years ago • 1 comments

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?

jtl5770 avatar Mar 23 '22 13:03 jtl5770

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

lvjr avatar Mar 24 '22 08:03 lvjr