tblr 标题无法与 Springer Nature 配合使用

tblr 标题无法与 Springer Nature 配合使用

我之所以使用tblr这些包是因为创建好看的表格更容易,但它们不适用于 Springer Nature。

附上代码,问题如图。

    \documentclass[default,iicol]{sn-jnl}
    \usepackage{lipsum}
    \usepackage{makecell}
    \usepackage{xcolor}%
    \usepackage{tabularray}
    \UseTblrLibrary{amsmath, varwidth}
    
    \usepackage{caption}
    \usepackage{cleveref}
    %\usepackage{float}     % not recommended 
    
    \begin{document}
    \begin{table}[ht]
        \centering
    \begin{tblr}
    {
      colspec = {|m{0.03\textwidth}|  % <-- use 'm', not 'p', 
                  m{0.03\textwidth}| 
                  Q[c,{0.03\textwidth}]|
                  Q[c,{0.03\textwidth}]|
                  Q[c,{0.03\textwidth}]|
                    },
    hline{1,2} = {1pt,solid},
    hline{3-5,7-9,11-13,15-17} = {dashed},
    hline{6,10,14,18} = {solid},
    row{1} = {gray!30},
     %  cell{4-8,10-16,20-24,28-32,36-40}{2}={c=2}{h,0.6\paperwidth},
      measure=vbox,
      row{1-Z} = {font=\small},
    cell{1}{1-Z} = {font=\small\bfseries},
    cell{1-Z}{1} = {font=\small\bfseries},
    %   cell{1,9,17,25,33}{1-2} = {font=\small\bfseries},
    } 
    x & y & c & d & l \\
    \end{tblr}
    \caption{YYYYYYYYY.}
    \label{tabVII}
    \end{table}

\Cref{tabVIII} outlines \dots

\lipsum[1-6]
\end{document}

在此处输入图片描述

答案1

该类存在错误。它使用了未加载的包中的命令。

\documentclass{sn-jnl}

\begin{document}
text
\end{document}

错误

! Undefined control sequence.
\__hook begindocument ->\SetFootnoteHook 
                                         {\hspace *{-8pt}}\DeclareNewFootnot...
l.214 \begin{document}
                      
? 
! Undefined control sequence.
\__hook begindocument ...8pt}}\DeclareNewFootnote 
                                                  {A}[gobble]\setlength {\sk...
l.214 \begin{document}
                      
? 
! Undefined control sequence.
<argument> \skip \footinsA 
                           
l.214 \begin{document}
                      
? 
! Missing number, treated as zero.
<to be read again> 
                   p
l.214 \begin{document}
                      
? 
! Undefined control sequence.
\__hook begindocument ...tinsA }{0pt}\definecolor 
                                                  {artcatboxgray}{cmyk}{0.0,...
l.214 \begin{document}
                      
? 
! Undefined control sequence.
\__hook begindocument ...}}}{}\allowdisplaybreaks 
                                                  \Gm@savelength {paperwidth...

您可以通过加载缺失的软件包来修复该问题:

\documentclass{sn-jnl}
\usepackage{manyfoot}
\usepackage{xcolor}
\usepackage{amsmath}
\begin{document}
text
\end{document}

答案2

问题已通过切换到longtblr并删除\begin{table}\end{table}来解决

\begin{longtblr}[caption={},label={}]
\end{longtblr}

没有找到解决方案tblr

答案3

我采用了类似的方法@戴安娜使用talltblr而不是longtblr和一些额外的格式定制:

\DefTblrTemplate{caption-tag}{default}{\textbf{Table\hspace{0.25em}\thetable}}
\DefTblrTemplate{caption-sep}{default}{\enskip}


\begin{talltblr}[caption={},label={}]
\end{talltblr}

相关内容