I usually use a tblr oder tabularx within the table environment, but I have some long tables with (at least for me) not so easy formatting, which I place in a longtblr. If I place the longtblr within a table environment the page break is not working and the table is placed on a spot that doesn´t fit the content.
If I keep it the way I have it now, I need to adjust the formatting of my caption within tabularray (longtblr).
For table enviornment I use:
\usepackage[tableposition=top, font=small, labelfont=bf, belowskip=6pt, aboveskip=6pt]{caption}
\setlength{\abovecaptionskip}{6pt plus 3pt minus 2pt}
\setlength{\belowcaptionskip}{6pt plus 3pt minus 2pt}
For the tabularray I have so far:
\usepackage{tabularray}
\NewDocumentCommand \TblrAlignCenter { } { \centering }
\SetTblrStyle{caption-tag}{\bfseries}
The size and skip are still not the same and I don´t find how I can adjust it. Additionally, a multiline caption is not centered but aligned left. Would be great to get some insights.
For the size the following works (although I don´t know what each line does):
\ExplSyntaxOn
\prg_generate_conditional_variant:Nnn \tl_if_empty:n { e } { TF }
\let \IfTokenListEmpty = \tl_if_empty:eTF
\ExplSyntaxOff
\DefTblrTemplate{firsthead}{default}{%
\addtocounter{table}{-1}%
\IfTokenListEmpty{\InsertTblrText{entry}}{%
\captionof{table}{\InsertTblrText{caption}}%
}{%
\captionof{table}[\InsertTblrText{entry}]{\InsertTblrText{caption}}%
}%
}
\DefTblrTemplate{middlehead,lasthead}{default}{%
\addtocounter{table}{-1}%
\captionof{table}[]{\InsertTblrText{caption}(Continued)}%
}
\SetTblrTemplate{caption-lot}{empty}
Thx in advance!
longtblroftabularraysee https://tex.stackexchange.com/questions/628900/ – Zarko Nov 29 '22 at 03:31@Zarko Thanks for the help!
– Sam R Nov 30 '22 at 10:50