I am using the following code to list 3 figures in one line. It is working well and showing the figure if I remove the \subcaption
for each figure. However, when I include the (\subcaption
)s, it shows the figure with the subcaptions but with error shown in the image below. Any suggestion(s)?
\begin{figure}[H]
%A
\centering
\begin{minipage}[t]{\dimexpr.355\textwidth-1em} % 0.335 represents the horizontal spacing
\centering
\includegraphics[width=\textwidth]{Fig14_VOL1_Annotated}
\subcaption{ CA $ < \ang{90}$}
\label{Fig14:A}
\end{minipage}\hfill
%B
\begin{minipage}[t]{\dimexpr.355\textwidth-1em}
\centering
\includegraphics[width=\textwidth]{Fig14_volumegreater90Annotated}
\subcaption{CA $ > \ang{90}$}
\label{Fig14:B}
\end{minipage}\hfill
%C
\begin{minipage}[t]{\dimexpr.355\textwidth-1em}
\centering
\includegraphics[width=\textwidth]{Fig14_vmiddlev1withannotation}
\subcaption{CA $=\ang{90}$}
\label{Fig14:C}
\end{minipage}\hfill
\caption{Volume and contact angle calculations according to CA value }
\label{Fig.14}
\end{figure}
subfigure
instead ofminipage
. Did you do\usepackage{subcaption}
?\documentclass{...}
, the required\usepackage
's,\begin{document}
, and\end{document}
. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.subfig
package. Thesubfig
package does not offer a\subcaption
command, and you cannot load both,subfig
andsubcaption
. So instead of usingminipage
plus\subcaption
, use\subfloat
instead. Seesubfig
documentation for details about the syntax of\subfloat
.