Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a question which concerns text formatting in captions and also in sections. For example when I type:

\begin{figure}
something

\caption{this is some caption text and it probably may be quite long.}
\end{figure}

Then result is:

something

this is some caption text and it pro-    
bably may be quite long.

The word 'probably' is divided and text in new line is aligned to left. I would like to stop word division and align entire text to center. I know that I can use mbox, but it's somehow irritating to write it all the time, so maybe some global setting would be nicer.

share|improve this question
    
What exactly do you mean with 'and also in sections' in your first sentence? You only mention figure caption afterwards. –  Martin Scharrer May 17 '11 at 10:35
    
I mean how to stop word division also in sections. –  scdmb May 17 '11 at 10:43
    
If with 'sections' you mean `\section' titles then this requires a completely different solution and should be asked as a separate question. –  Martin Scharrer May 17 '11 at 11:07

1 Answer 1

up vote 4 down vote accepted

load package caption with

\usepackage[justification=centering]{caption}
share|improve this answer
    
thanks, it works –  scdmb May 17 '11 at 10:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.