lvjr / tabularray

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

caption/head alignment don't function #386

Closed matteofg closed 1 year ago

matteofg commented 1 year ago
\documentclass{article}
\usepackage{tabularray}
  \SetTblrStyle{head}{halign=l} % ??
\usepackage{caption}
  \captionsetup{singlelinecheck=false}

\begin{document}

\begin{table}
  \begin{talltblr}[caption = The caption]
    {
      colspec = *7{X[c]} ,
      hline{1,Z} ,
    }
    1   & 2 & 3 & 4 & 5 & 6 & 7 \\
    1   & 2 & 3 & 4 & 5 & 6 & 7 \\
    1   & 2 & 3 & 4 & 5 & 6 & 7 \\
    1   & 2 & 3 & 4 & 5 & 6 & 7 \\  
  \end{talltblr}
\end{table}

\begin{table}
  \caption{The caption}
  \begin{tblr}
    {
      colspec = *7{X[c]} ,
      hline{1,Z} ,
    }
    1   & 2 & 3 & 4 & 5 & 6 & 7 \\
    1   & 2 & 3 & 4 & 5 & 6 & 7 \\
    1   & 2 & 3 & 4 & 5 & 6 & 7 \\
    1   & 2 & 3 & 4 & 5 & 6 & 7 \\  
  \end{tblr}
\end{table}

\end{document}

I expected that \SetTblrStyle{head}{halign=l} to correspond to \captionsetup{singlelinecheck=false}. Caption alignment should have nothing to do with cell alignment (and therefore with column type). Maybe I misunderstood the halign key? Matteo

lvjr commented 1 year ago

Sorry, I need to document this in a future release:

\SetTblrTemplate{caption}{simple}

in tabularray package corresponds to

\captionsetup{singlelinecheck=false}

in caption package.

matteofg commented 1 year ago

Thank you for the clarification.

Matteo