1

I'm trying to caption some subfigures with a label, but I'm also trying to slightly stretch the text of the subfigures. It seems when I apply these two pieces of code together, I get an error. Can anyone see what I'm doing wrong?

\documentclass[12pt, twoside]{report}

\usepackage{caption}
\usepackage{subcaption}
\captionsetup{font={stretch=1.3}} %This appears incompatable

\begin{document}
    \begin{figure}
        \begin{subfigure}{\linewidth}
            \caption*{Unnumbered sub-image caption} %This appears incompatable
        \end{subfigure}
    \end{figure}
\end{document}
1

Solved it. I forget to add the package {setspace} at the beginning.

\documentclass[12pt, twoside]{report}

\usapackage{setspace}
\usepackage{caption}
\usepackage{subcaption}
\captionsetup{font={stretch=1.3}} %This appears incompatable

\begin{document}
    \begin{figure}
        \begin{subfigure}{\linewidth}
            \caption*{Unnumbered sub-image caption} %This appears incompatable
        \end{subfigure}
    \end{figure}
\end{document}

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.