I'm trying to include a caption for a figure with two subfigures with quite some math. However, I get:
Undefined control sequence
I've tried to replace the the $
with \begin{math}
and \end{math}
but that only gave the error:
Argument of \@caption has an extra }.
\documentclass{report}
\usepackage[english]{babel}
\usepackage[superscript]{cite}
\usepackage{fixltx2e}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{caption}
\usepackage{subcaption}
\usepackage[export]{adjustbox}
\usepackage{gensymb}
\usepackage{tabulary}
\usepackage{hyphenat}
\usepackage{bbm}
\begin{document}
\begin{figure}[!h]
\centering
\begin{subfigure}[t]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth,valign=t]{ResultsFlapWinglets}
\end{subfigure}
\begin{subfigure}[t]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth,valign=t]{ResultsFlapFences}
\end{subfigure}
\caption{The experiments have been carried out with freestream velocity $u = 30 m/s$,
angle of attack $\alfa = 10\degree$ and flap deflection $\delta_{f} = 32\degree$.}
\label{fig:FenceResults}
\end{figure}
\end{document}
siunitx
to format units, bithm/s
and degree.\centering
instructions inside thesubfigure
environments are unnecessary because the graphs take up the full width of the subfigures. (ii) You may want to instruct LaTeX to create a bit more horizontal separation between the two subfigures. You could do so by inserting the instruction\quad
or, better yet,\hspace*{\fill}
.