4

I am writing an article in LaTeX for a Frontiers journal with MiKTeX. Their documentclass (frontiersin.org/design/zip/Frontiers_LaTeX_Templates.zip) defines \tablename as Table. I would like to change it in a section* for supplementary tables. I've yet to find a solution on this board that works.

Here is my 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}

Here is the output: output

1 Answers1

3

The class emulates the float package and also does

\def\fnum@table{Table~\thetable}

This is later used by \caption instead of \tablename in the appropriate place. Fix it.

\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}

enter image description here

egreg
  • 1,121,712