# Error Message: “Missing number, treated as zero.”

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


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