3

For all of my figures I am getting a line break after the first letter, so for example my PDF looks like

Figure 1: V
arying negative h values are plotted

All of the text is centered because I am using \centering. Here is the tex for one of the figures:

\subsection*{3}
\begin{figure}
\centering
\includegraphics{Capture2.PNG}
\begin{caption}
Varying negative h values are plotted
\end{caption}
\end{figure}

I have never seen this before, and am unsure of what I am doing differently. I see this behavior both on writelatex.com as well as when compiled locally.

  • 1
    Use \caption{<content>} – azetina Jan 22 '14 at 16:59
  • 3
    It's \caption{Varying negative values} – egreg Jan 22 '14 at 16:59
5

Using

\begin{caption}
    <content>
\end{caption}

is inappropriate. Rather use the command \caption{<content>}. See the MWE below illustrating the effects.

enter image description here

\documentclass[letterpaper]{article}
\usepackage[demo]{graphicx}
\begin{document}

\begin{figure}
\centering
\includegraphics{Capture2.PNG}
% The below use for the declaration of a caption is wrong
\begin{caption}
Varying negative h values are plotted
\end{caption}
\end{figure}

\begin{figure}
\centering
\includegraphics{Capture2.PNG}
\caption{Varying negative h values are plotted} % correct
\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.