Text FormattingPrevent figure caption from splitting words?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
adam1234
Posts: 3
Joined: Thu Jul 30, 2009 8:57 pm

Prevent figure caption from splitting words?

Post by adam1234 »

Hello all - I am Adam from the U.S., and I am a new member of this forum.

I was wondering if there was anything I can do to prevent a figure caption from splitting words between two lines.

Here is an example of what my captions look like:
%-----
Figure 1 - This figure is wond-
erful and I hope to use it again
%-----

I don't want any words ('wonderful' in this case) to be split apart.

I am using:
\usepackage[labelfont=bf,margin=1in,labelsep=endash]{caption}

Does anyone have any ideas?

Thanks!
Adam

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Prevent figure caption from splitting words?

Post by gmedina »

Hi,

one option would be to use the justification=raggedright option for the caption package; i.e., you could load the package with something like

Code: Select all

\usepackage[labelfont=bf,margin=1in,labelsep=endash,justification=raggedright]{caption}
this suppresses the hyphenation for the captions, but of course their text will be now "raggedright".
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply