Graphics, Figures & TablesCan I center legend?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
marcoesteves
Posts: 18
Joined: Tue Jun 09, 2009 3:33 pm

Can I center legend?

Post by marcoesteves »

Hello, usually latex centers legend.
But when I need a big legend, like a graphics legend, always align left.

How can I force center?

Code: Select all

\begin{figure}[H]
\center
\includegraphics[scale=0.7,bb=36.53 37.6 557 325.61]{grafico2.pdf}
\caption[Quantidade final de dinheiro na posse dos agentes]
{Quantidade final de dinheiro na posse dos agentes
\\m\_e -Quantidade de dinheiro na posse de produtores de bens de equipamento
\\m\_c -Quantidade de dinheiro na posse de produtores de bens de consumo
}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Can I center legend?

Post by Stefan Kottwitz »

Hi,

you could use the caption package, for instance

Code: Select all

\usepackage[justification=centering]{caption}
Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Can I center legend?

Post by localghost »

It's quite normal that the caption (not legend) occupies the full line width if it is longer than one line. Please explain what you are aiming at and we might be able to find an appropriate solution. It will be very helpful if you provide a minimal working example (MWE) that shows the undesired behaviour.


Best regards
Thorsten
Post Reply