0

I am writing a document with the imsart style package. My figures and tables have different styles despite both being generated with the \caption command, image attached. Why is this happening? I would like both to have the same style throughout my document, but am not sure which one and would like to try each. How could I implement this?

The relevant code in the imsart.sty file follows, but I am not sure how to read it. It appears to suggest using the \makecaption macro instead of \caption, but this is undefined when I apply it.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% table, figure

\def\fnum@table{\tablename~\thetable}
\setlength\belowcaptionskip{4\p@}

\renewenvironment{table}
               {\let\@makecaption\@maketablecaption\@float{table}}
               {\end@float}
\renewenvironment{table*}
               {\let\@makecaption\@maketablecaption\@dblfloat{table}}
               {\end@dblfloat}

\long\def\@maketablecaption#1#2{%
      \tablecaption@shape\tablecaption@size%
      {\tablename@size #1}\tablename@skip #2\par
      \vskip\belowcaptionskip}

\setattribute{tablecaption}{shape}{\centering}
\setattribute{tablecaption}{size} {\footnotesize\itshape}
\setattribute{tablename}   {size} {\scshape}
\setattribute{tablename}   {skip} {\endgraf}


% figure : use \@makecaption:
\renewcommand\figurename{Fig}

\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \footnotesize
  \sbox\@tempboxa{\itshape\textsc{#1}. #2}%
  \ifdim \wd\@tempboxa >\hsize
    \itshape\textsc{#1}. #2\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}

\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \figurecaption@size
  \sbox\@tempboxa{{\figurename@size #1}\figurename@skip #2}%
  \ifdim \wd\@tempboxa >\hsize
    {\figurename@size #1}\figurename@skip #2\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}

\setattribute{figurecaption}{size}{\footnotesize\itshape}
\setattribute{figurename}   {size}{\scshape}
\setattribute{figurename}   {skip}{.~}


\def\@floatboxreset{%
        \reset@font
        \@setminipage
        \singlespacing
        \footnotesize
        \centering
}

\if@aihplayout
  \setattribute{tablecaption}{size} {\footnotesize}
  \setattribute{figurecaption}{size}{\footnotesize}
\fi

\if@bjpslayout
  \setattribute{tablename}   {size} {\bfseries\upshape}
  \setattribute{tablename}   {skip} {\enskip}

  \setattribute{figurename}   {size}{\bfseries\upshape}
  \setattribute{figurename}   {skip}{\enskip}
  \def\figurename{Figure}
\fi
2
  • 3
    If you intent to publish your article in IMS journals, don't change anything what they prepare in their "template" (\documentclass).It is designed so, that document look as they like to have it.
    – Zarko
    Jul 28 '21 at 8:59
  • Thank you! This is just for a preprint.
    – taurus
    Jul 28 '21 at 17:06
4

It should be easier to override the fonts in the .tex file:

\documentclass{article}
\usepackage{imsart}
\begin{document}
\begin{figure}[h!]
  Figure content
  \caption{Figure caption}
\end{figure}

\begin{table}[h!]
  \caption{Table Caption}
  Table content
\end{table}

\renewcommand{\figurename}{\textsc{Figure}}
\begin{figure}[h!]
  Figure content  
  \caption{\textsc{Figure caption}}
\end{figure}

\renewcommand{\tablename}{\textsc{Tab.}}
\begin{table}[h!]
  \caption{\textsc{Table Caption}}
  Table content
\end{table}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.