Text FormattingHow do I: Prevent words from line break separation

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Eenzc
Posts: 48
Joined: Thu Jun 26, 2008 2:38 pm

How do I: Prevent words from line break separation

Post by Eenzc »

Hello,

In one of my captions under a figure I have the non hypenated words in situ

Unfortunately these have been split across two lines. How do I prevent this from happening?

Code: Select all


\caption{RCVs recorded at \SI{40}{V.s^{-1}} of Pt/Hg electrodes in PBS. The amount of Hg plated onto the Pt surface was varied by passing (a) 1 mC, (b) 10 mC, (c) 100 mC  and (d) 1 C. In each plot the continuous line represents the initial scan of each working electrode and the broken black line represents the same electrode after 30 minutes of continuous \textit{in situ} electrochemical cleaning.}

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How do I: Prevent words from line break separation

Post by localghost »

There are two possible solutions.

Code: Select all

\mbox{in situ}
in~situ

Best regards
Thorsten¹
Eenzc
Posts: 48
Joined: Thu Jun 26, 2008 2:38 pm

Re: How do I: Prevent words from line break separation

Post by Eenzc »

Thanks, that works.
littlegolem
Posts: 4
Joined: Sun Apr 29, 2012 3:17 pm

Re: How do I: Prevent words from line break separation

Post by littlegolem »

Hi, I tried to use \mbox in a section title on an abbreviation I didn't want LaTeX to separate; well, it worked, but now LaTeX complains on an overfull \hbox instead since it apparently keeps the abbreviation on the same row.

Why can't it just put it on the next row? It I want to give LaTeX a hint that it can break the line before the abbreviation, is there some command I can use to do that? Thanks in advance.
Post Reply