1

searched a lot around to fix this issue, usually it only takes a few seconds but now I have no luck. LaTeX puts out this error message mentioned above, here's my code:

\usepackage{caption, subcaption}

...


\begin{figure}
\begin{subfigure}[h]
\includegraphics[scale=0.7]{kurzpass.png}
\caption[]{Filterkurve eines typischen Kurzpassfilters\footnotemark}
\label{fig:kurzpass}
\end{subfigure}
%

Error Message:

! Missing number, treated as zero.
 
                   \unhbox 
l.137 \includegraphics
                      [scale=0.7]{kurzpass.png}
? X
0

The subfigure environment provided by subcaption has the following format

\begin{subfigure}[<pos>]{<width>}
  % ...your subfigure here...
\end{subfigure}

While the <pos>ition is optional, you have to specify a <width> for the subfigure. You've neglected to do that.

To fix this, add a length, for example

\begin{subfigure}{.5\linewidth}
  % ...your subfigure here...
\end{subfigure}
  • Ah okay, Merci! But after doing this there is always a message like > Overfull \hbox (2.37161pt too wide) in paragraph at lines 137--138 or > Underfull \hbox (badness 10000) in paragraph at lines 136--147 i do not get it. – FreaxMATE Jul 31 at 17:44

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.