Graphics, Figures & TablesLine break for Equation inside a Figure Caption

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
FluxCapacitor
Posts: 1
Joined: Sun Mar 11, 2012 10:28 pm

Line break for Equation inside a Figure Caption

Post by FluxCapacitor »

I have a caption for a figure:

Code: Select all

\caption{This is some text. Here $a_{\text{perpendicular}} / a_{\text{in-plane}}$ = 1.}
But, I get error "Underfull \hbox (badness 2671) in paragraph". Which, as I understand it occurs because the equation is too long to fit on the line and when it gets shifted to the next line, it leaves too much white space in the previous line.

So I'm wondering, how can I break up the equation so that "$a_{\text{perpendicular}} /" appears on one line in the caption and the rest appears on the next line. Thanks!

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

Line break for Equation inside a Figure Caption

Post by Stefan Kottwitz »

Hi,

welcome to the board!

You could insert \allowbreak right after the /, such as

Code: Select all

\caption{This is some text. Here $a_{\text{perpendicular}} /\allowbreak a_{\text{in-plane}}$ = 1.}
Stefan
LaTeX.org admin
Post Reply