# Caption is not justified using \mathsf

For using the IEEE Access template there is problem with subfigures for me (The whole file containing the code can be downloaded from here). One needs to use

\usepackage[caption=false]{subfig}


However, I noticed when one uses $\mathsf{M}$ inside caption, the resulting caption is not in justified form. How one can resolve this problem?

The minimal code:

\documentclass{ieeeaccess}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}

\usepackage{accents}
\usepackage{stmaryrd}
\usepackage{mathtools}
\usepackage[mathscr]{euscript}
\let \eucal \mathscr

\usepackage{amsmath,amsthm}

\usepackage{dblfloatfix}
\usepackage[Symbol]{upgreek}

\usepackage[caption=false]{subfig}

\begin{document}

\begin{figure}[t!]
%   \vspace*{-5mm}
\subfloat[]{
\includegraphics[scale=0.77]{fig1.png}
}
\label{channel1}
\subfloat[]{
\includegraphics[scale=0.77]{fig1.png}
}
\label{fig1}
\caption[fig1]{If
colleague to carefully proofread your paper. $\mathsf{M}$ spelling.  If
\label{fig:fig1}
\end{figure}

\EOD

\end{document}

• As always on the site please provide a full minimal example, then it is a lot easier for others to test your issues. – daleif Jun 15 '20 at 9:22
• @daleif: I just added the minimal code. – Amin Jun 15 '20 at 21:10
• @daleif: I also uploaded the whole file concerning the template. – Amin Jun 15 '20 at 21:21
• The ieeeaccess class uses a different model for figures and the figure environment doesn't work. There is no provision, as far as I can see, for subfigures. – egreg Jun 15 '20 at 21:36
• @Zarko: As you see after removing [caption=false]', the caption style (the color and etc) is changed and is not in IEEE Access style. – Amin Jun 15 '20 at 21:48

As far as I can see, ieeeaccess has no provision for supporting multiple subfloats.

In the code that follows I show how to trick it into making the correct caption. I also show the standard syntax for figures used by the class, to show that the caption is typeset similarly and that \mathsf has no role whatsoever in the issue.

Beware of using this, because the people at IEEE might reject your manuscript for not being compliant.

\documentclass{ieeeaccess}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{accents}
\usepackage{stmaryrd}
\usepackage{mathtools}
\usepackage[mathscr]{euscript}
\let \eucal \mathscr

\usepackage{amsmath,amsthm}

\usepackage{dblfloatfix}
\usepackage[Symbol]{upgreek}

\usepackage[caption=false]{subfig}

\usepackage{lipsum}% just for the example

\begin{document}

\lipsum[1][1-4]

\begin{figure}[!t]
\centering
\edef\xfigwd{\the\columnwidth}% to trick IEEEaccess

\subfloat[]{%
\includegraphics[width=0.4\linewidth]{example-image}\label{channel1}%
\subfloat[]{%
\includegraphics[width=0.4\linewidth]{example-image}\label{fig1}%
}

\caption{If your native language is not English, please get a native English-speaking
colleague to carefully proofread your paper. $\mathsf{M}$ spelling.  If
\label{fig:fig1}
\end{figure}

\lipsum[2][1-3]

\Figure[t!][width=0.9\columnwidth]{example-image}{%
If your native language is not English, please get a native English-speaking
`