Captions Longtable Tabularray – How to Bold Caption-Tag in Tabularray Table

captionslongtabletabularray

I'm using the caption package which works for normal table captions.

\RequirePackage[font=small, labelfont=bf, labelsep=period]{caption}

It makes the caption look like this: Table 3.1: xyz

Unfortunately, it doesn't work for longtblr from tabularray package. I need to set the caption-tag to bold as well and I don't know how to achieve that.

My longtblr definition:

    \begin{longtblr}[ caption = {Zoological gardens websites comparison results},
      label = {tab:websites},]{
      cells={valign=m,halign=c},
      row{1}={font=\bfseries,rowsep=8pt},
      colspec={QXXX},
      hlines,
      vlines,
    }
\SetCell{} \url{https://zoo.poznan.pl/} & Apache, Reveal.js, jQuery, Platform JS, Google Plus/Twitter widgets & Clean navigation bar, integrated ticketing system & Chaotic content presentation, overwhelming design \\ 
    \end{longtblr}

Regular table's caption look like:

Regular table

While longtblr caption look this way:

Longtblr caption

I would like them to look the same.

Best Answer

You can change the caption tag font like this:

\documentclass{article}

\RequirePackage[font=small, labelfont=bf, labelsep=period]{caption}
\usepackage{tabularray}

\begin{document}

\begin{table}[htbp]
\caption{normal table}
\end{table}

\NewTblrTheme{fancy}{
  \SetTblrStyle{caption-tag}{font=\bfseries\small}
}

\begin{longtblr}[  theme=fancy, caption = {Zoological gardens websites comparison results},
  label = {tab:websites},]{
  cells={valign=m,halign=c},
  row{1}={font=\bfseries,rowsep=8pt},
  colspec={QXXX},
  hlines,
  vlines,
}
test & test & test & test\\
\end{longtblr}

\end{document}

enter image description here