Latex 表引用问题和缺失 \endcsname 插入

Latex 表引用问题和缺失 \endcsname 插入

我正在尝试交叉引用 LaTeX 中的表格,但遇到了“缺少 \endcsname 插入”错误。有人知道如何修复这个问题吗?

这是生成表的代码:

\begin{table}[h!]
\centering
\begin{threeparttable}
    \caption{Descriptive Statistics over Beliefs - Treatment WS1}
    \label{table:descriptiveB_WS1}
    \estauto{table2.tex}{4}{c}
    \Fignote{this table presents descriptive statistics related to beliefs over the Accountant and Managers' actions in treatment WS1. Beliefs are on a 6-point scale, representing the number of participants in a session that. Note that, for each participant, beliefs were elicited over actions unavailable under that participants role only.}
\end{threeparttable}
\end{table}

\ref{table:descriptiveB_WS1} presents descriptive statistics related to beliefs over the Accountant and Managers' actions in treatment WS1.

与提交文件相关的序言是

\usepackage{multirow}
\newcommand{\dtoprule}{\specialrule{1pt}{0pt}{0.4pt}%
            \specialrule{0.3pt}{0pt}{\belowrulesep}%
            }
\newcommand{\dbottomrule}{\specialrule{0.3pt}{0pt}{0.4pt}%
            \specialrule{1pt}{0pt}{\belowrulesep}%
            }
\usepackage[justification=centering]{caption}   % to reset the headers of tables
\usepackage{rotating}   % for sidewaystable
\usepackage{pdflscape}
%\numberwithin{table}{section}    % reset the Table numbering for each section
\usepackage{booktabs}   % neatly formatting lines in estout
\usepackage{threeparttable}   % allows note width below figures to match figure width, nest table within it
\usepackage{dcolumn}    % aligning decimals
    \newcolumntype{d}[1]{D{.}{.}{#1}}
%\usepackage{libertine}% Linux Libertine, may favourite text font
%\usepackage[euler-digits]{eulervm}% A pretty math font
\newcommand{\sym}[1]{\rlap{#1}}
\usepackage{siunitx} % centering in tables
    \sisetup{
        detect-mode,
        tight-spacing       = true,
        group-digits        = false ,
        input-signs     = ,
        input-symbols       = ( ) [ ] - + *,
        input-open-uncertainty  = ,
        input-close-uncertainty = ,
        table-align-text-post   = true
    }

% Note/Source/Text after Tables
\newcommand{\Figtext}[1]{%
 \begin{tablenotes}[para,flushleft]
 \hspace{6pt}
 \hangindent=1.75em
 \small
 #1
 \end{tablenotes}
}

\newcommand{\Fignote}[1]{\Figtext{\emph{Note:~}~#1}} % Add figure text
\newcommand{\Figsource}[1]{\Figtext{\emph{Source:~}~#1}} % Add figure source
\newcommand{\Starnote}{\Figtext{* p < 0.1, ** p < 0.05, *** p < 0.01. Standard errors in parentheses.}}% Add significance stars

\makeatletter %this is needed to allow latex to revert to prior installations to fix noalign error
\let\estinput=\@@input %define a new input command so that we can still flatten the document

\newcommand{\estwide}[3]{ %estwide environment
    \vspace{.75ex}{
        \begin{tabular*}
        {\textwidth}{@{\hskip\tabcolsep\extracolsep\fill}l*{#2}{#3}}
        \toprule
        \estinput{#1}
        \bottomrule
        \addlinespace[.75ex]
        \end{tabular*}
        }
    }

\newcommand{\estauto}[3]{ % estauto environment
    \vspace{.75ex}{
        \begin{tabular}{l*{#2}{#3}}
        \toprule \toprule
        \estinput{#1}
        \bottomrule \bottomrule
        \addlinespace[.75ex]
        \end{tabular}
        }
    }

% Allow line breaks with \\ in specialcells
    \newcommand{\specialcell}[2][c]{
    \begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}

相关内容