更改 tabularray 的 talltblr 和 longtblr 环境中的行距​​ caption

更改 tabularray 的 talltblr 和 longtblr 环境中的行距​​ caption

tabularray talltblr我想更改使用环境生成的标题中的行距或基线拉伸longtblr,以模仿包的“拉伸”选项caption

TblrTemplate但是,如果我在或在caption-textcaption-tag选项中使用 \onehalfspacing 则不起作用

梅威瑟:

\documentclass{article}
\usepackage[spanish,mexico]{babel}
\usepackage{tabularray}
\usepackage{caption}
\usepackage{graphicx} % Required for inserting images

\captionsetup[table]{%
        format=plain,
        labelsep = newline,
        singlelinecheck = false,
        labelfont = bf,
        textfont = it,
        font = {small,doublespacing},
        position = above,
        }%

\DefTblrTemplate{conthead-text}{default}{(Continuación)}
\DefTblrTemplate{contfoot-text}{default}{Continúa en la siguiente página}
\DefTblrTemplate{caption-tag}{default}{\bfseries\small Tabla\hspace{0.25em}\thetable}
\DefTblrTemplate{caption-sep}{default}{.}
\DefTblrTemplate{caption-text}{default}{\itshape\small \InsertTblrText{caption}}

\DefTblrTemplate{caption}{default}{
\doublespacing
 \UseTblrTemplate{caption-tag}{default}%
 \UseTblrTemplate{caption-sep}{default}\par%
 \UseTblrTemplate{caption-text}{default}%
}

\DefTblrTemplate{capcont}{default}{%
\doublespacing
 \UseTblrTemplate{caption-tag}{default}%
 \UseTblrTemplate{caption-sep}{default}\par%
 \UseTblrTemplate{caption-text}{default}
 \UseTblrTemplate{conthead-text}{default}%
}

\begin{document}

\section{Introduction}

\begin{table}[htbp]
    \centering
    \captionsetup{width=5cm}
    \caption{Example of a table with caption using tabular and caption package}
    \begin{tabular}{|c|c|c|c|}
    \hline
       a & b & filler text & filler text\\
    \hline
       a & b & filler text & filler text\\
    \hline
       a & b & filler text & filler text\\
    \hline
       a & b & filler text & filler text\\
    \hline
    \end{tabular}
    \label{tab:my_label}
\end{table}

\begin{table}[htbp]
    \centering
    \begin{tblr}[tall, caption={Example of a table with caption using tabularray package}]{colspec={cccc},hlines,vlines}
       a & b & filler text & filler text\\
       a & b & filler text & filler text\\
       a & b & filler text & filler text\\
       a & b & filler text & filler text\\
    \end{tblr}
\end{table}

\end{document}

结果

相关内容