我正在用 MiKTeX 为 Frontiers 杂志撰写一篇 LaTeX 文章。他们的 documentclass (frontiersin.org/design/zip/Frontiers_LaTeX_Templates.zip) 将 \tablename 定义为 Table。我想在补充表格部分*中将其更改。我尚未在此论坛上找到可行的解决方案。
这是我的 MWE:
\documentclass[utf8]{FrontiersinHarvard}
\def\firstAuthorLast{Dodgson}
\begin{document}
\onecolumn
\section*{Main}
'Twas brillig
\begin{table}[h!]
\caption{{packages used by FrontiersinHarvard}}
\begin{verbatim}
\usepackage{parskip}[=v1]
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[labelsep=quad,indention=10pt]{caption}
\usepackage[labelfont=bf,list=true]{subcaption}
\end{verbatim}
\end{table}
\section*{Supplementary Tables}
\setcounter{table}{0}
\renewcommand{\thetable}{S\arabic{table}}
\renewcommand{\tablename}{Supplementary Table}
\begin{table}[h!]
\caption{Linear Coefficients.}
\begin{verbatim}
1 3 -2
2 1 4
3 5 -1
\end{verbatim}
\end{table}
\end{document}
答案1
该类模拟了float
包,并且还
\def\fnum@table{Table~\thetable}
稍后在适当的位置用\caption
代替。修复它。\tablename
\documentclass[utf8]{FrontiersinHarvard}
\def\firstAuthorLast{Dodgson}
% fix \tablename
\makeatletter
\renewcommand{\fnum@table}{\tablename~\thetable}
\makeatother
\begin{document}
\onecolumn
\section*{Main}
'Twas brillig
\begin{table}[h!]
\caption{{packages used by FrontiersinHarvard}}
\begin{verbatim}
\usepackage{parskip}[=v1]
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[labelsep=quad,indention=10pt]{caption}
\usepackage[labelfont=bf,list=true]{subcaption}
\end{verbatim}
\end{table}
\section*{Supplementary Tables}
\setcounter{table}{0}
\renewcommand{\thetable}{S\arabic{table}}
\renewcommand{\tablename}{Supplementary Table}
\begin{table}[h!]
\caption{Linear Coefficients.}
\begin{verbatim}
1 3 -2
2 1 4
3 5 -1
\end{verbatim}
\end{table}
\end{document}