Centering Caption for TeX Document Figure

  • Thread starter Thread starter Juggler123
  • Start date Start date
  • Tags Tags
    Figure
Click For Summary
SUMMARY

The discussion focuses on centering captions in TeX documents, specifically when using the LaTeX typesetting system. The user provided a code snippet for including a figure and expressed difficulty with the default left alignment of multi-line captions. The solution involves using the "caption" package with the option \usepackage[justification=centering]{caption}, which effectively centers all lines of the caption. This method is confirmed as a definitive solution for achieving the desired formatting in LaTeX.

PREREQUISITES
  • Familiarity with LaTeX typesetting
  • Understanding of figure inclusion in LaTeX documents
  • Knowledge of the "caption" package in LaTeX
  • Basic experience with formatting options in LaTeX
NEXT STEPS
  • Research the "caption" package documentation for additional formatting options
  • Learn about other LaTeX packages that enhance figure and caption handling
  • Explore advanced LaTeX typesetting techniques for complex documents
  • Investigate best practices for multi-line captions in academic papers
USEFUL FOR

TeX users, academic writers, and researchers who need to format figures and captions in LaTeX documents effectively.

Juggler123
Messages
80
Reaction score
0
Hi I know this isn't general math but I didn't know where else to post!

I'm using this code to put a figure into my TeX document:

\begin{figure}[htp]
\centering
\includegraphics[scale=0.5]{A}
\caption{Flow patterns for non-Newtonian fluids for increasing rotational speeds ($\omega_{1}<\omega_{2}<\omega_{3}$) [39]}\label{A}
\end{figure}

The problem is that the caption is long and it runs onto two lines, the default setting in LaTeX is that the second line in the caption is flushed left but I would like both of the lines of the caption to be centred.

I've had a look at some possible solutions but can't really make any sense of them!

Can anyone help?
Thanks.
 
Physics news on Phys.org
You may include the "caption" package with the appropriate option:
Code:
\usepackage[justification=centering]{caption}
Source:
http://anorien.csc.warwick.ac.uk/mirrors/CTAN/macros/latex/contrib/caption/caption-eng.pdf
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 6 ·
Replies
6
Views
18K
  • · Replies 2 ·
Replies
2
Views
2K