25

How to split a long figure caption to multiple line? Using \\ doesn't work.

\begin{figure}[H]
\includegraphics[width=1\textwidth]{x.jpg}
\caption{line 1...
    line 2...
    line 3...} 
\label{fig1}
\end{figure}
3
  • 4
    Explicit line breaks can be given with \newline. For more sophisticated caption styling use the caption package. May 5, 2013 at 18:33
  • 1
    Also don't use [H] (It's almost always a bad idea) May 5, 2013 at 21:20
  • 1
    In beamer \newline works, but the caption is not centered, any suggestions?
    – adrin
    May 26, 2014 at 18:34

1 Answer 1

25

Load the caption package; now you can use the standard line change command \\:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{caption}

\begin{document}

\begin{figure}
\includegraphics[width=1\textwidth]{x}
\caption{line 1 \\line 2 \\ line 3 } 
\label{fig1}
\end{figure}

\end{document}

enter image description here

The demo option for graphicx simply replaces actual figures with black rectangles; do not use that option in your actual document.

1
  • 5
    using "\usepackage{caption}" with "\documentclass[conference]{IEEEtran}" cause an incompatibility formation, putting all caption on left side. Do you any additional suggest? Oct 25, 2017 at 17:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .