0

I am using both table and longtblr within \documentclass{wlscirep} (that you can find in "Template for submissions to Scientific Reports"). I have noticed that the caption title for the table (please see Table 1 in the following example) is in bold, but not the caption title of longtblr (please see table 2 in the following example). How can I change the caption title of longtblr into bold?

\documentclass[twocolumn,fleqn,10pt,dvipsnames,table]{wlscirep}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{multirow, booktabs, tabularx, longtable}
\usepackage{multirow, makecell}
\usepackage{xurl}
\usepackage{booktabs}
\usepackage{xfp} 
\usepackage{color}

\title{Supplementary Information for...}
\author[1]{Luke}
\affil[1]{University of }

% Add longtable and xcolor packages and define a color
\definecolor{white}{HTML}{FFFFFF} 

\usepackage{multirow, makecell}
\usepackage{tikz}
\usepackage{tabularray}
\usepackage{gensymb}


\begin{document}
\maketitle


\section*{Supplementary Text}
\subsection*{Notes about ...}
This is about...



\begin{table}[ht]
\centering
\begin{tabular}{|l|l|l|}
\hline
Condition & n & p \\
\hline
A & 5 & 0.1 \\
\hline
B & 10 & 0.01 \\
\hline
\end{tabular}
\caption{\label{tab:example}Legend (350 words max). Example legend text.}
\end{table}


\rowcolors{1}{white}{white}


    \begin{longtblr}[
        caption = {This is a summary of...},
        ]{
            colspec={m{0.9cm} m{0.1cm} m{0.6cm} m{1cm} m{3cm} m{7.3cm} m{1.5cm}},
            column{6}={preto={\minipage{\linewidth}}, appto={\endminipage}},
            row{1}={font=\bfseries}, 
            row{2,5,7-8,11-13,20-26,30,33-34,36,39-40,42}={bg=white},
            hline{1,Z}=0.8pt, hline{2}=0.4pt, 
            hline{4,8,10,12-13,15-19,21-26,28-29,32,34,38,40}=dotted, 
            hline{3,5-7,9,11,14,20,27,30-31,33,35,36-37,39,41,42-43}=solid,
            rowhead=1
        }

        Day
        &
        & Month
        & Hours
        & Event
        & Description
        & Further Info
        \\
        %-------------------------------------------------
        Friday
        & $6$
        & February
        & 08 $-$ 19
        & Musical festival
        & 
        Something here ...
        & Multiple 
        \\
        %-------------------------------------------------
        \SetCell[r=2]{l} Saturday 
        & \SetCell[r=2]{l} 8 
        & \SetCell[r=2]{l} February
        & 08
        & Birthday
        & On Saturdays...
        & Multiple 
        \\
        &
        &
        & 9
        & Local Cup \newline
        & Soemthing here...
        & Single
        \\
        % -------------------------------------------------
    \end{longtblr}



\end{document}

enter image description here

0

1 Answer 1

1

As described in this answer, you can try to define a theme that enables bold caption tags.

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

\begin{document}

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


\begin{longtblr}[  theme=fancy, caption = {This is a summary of...},]
        {
            colspec={m{0.9cm} m{0.1cm} m{0.6cm} m{1cm} m{3cm} m{7.3cm} m{1.5cm}},
            column{6}={preto={\minipage{\linewidth}}, appto={\endminipage}},
            row{1}={font=\bfseries}, 
            row{2,5,7-8,11-13,20-26,30,33-34,36,39-40,42}={bg=white},
            hline{1,Z}=0.8pt, hline{2}=0.4pt, 
            hline{4,8,10,12-13,15-19,21-26,28-29,32,34,38,40}=dotted, 
            hline{3,5-7,9,11,14,20,27,30-31,33,35,36-37,39,41,42-43}=solid,
            rowhead=1
        }

        Day
        &
        & Month
        & Hours
        & Event
        & Description
        & Further Info
        \\
        %-------------------------------------------------
        Friday
        & $6$
        & February
        & 08 $-$ 19
        & Musical festival
        & 
        Something here ...
        & Multiple 
        \\
        %-------------------------------------------------
        \SetCell[r=2]{l} Saturday 
        & \SetCell[r=2]{l} 8 
        & \SetCell[r=2]{l} February
        & 08
        & Birthday
        & On Saturdays...
        & Multiple 
        \\
        &
        &
        & 9
        & Local Cup \newline
        & Soemthing here...
        & Single
        \\
        % -------------------------------------------------
    \end{longtblr}

(Would have posted a link to the answer as a comment, but can't do that yet.)

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.