Formulas and program fragments are most pleasantly displayed together on one line, but sometimes LaTeX inserts a line-break in the middle. How can I avoid that? That is, how do I get the behavior of   from HTML?

asked 08 Jan '12, 14:47

Martin%20Dybdal's gravatar image

Martin Dybdal ♦♦
1.1k123282
accept rate: 69%

edited 10 Jan '12, 13:31

Nana%20Girotti's gravatar image

Nana Girotti ♦
1164


To make a non-breaking space in LaTeX, use ~ (also known as the tie because it ties two things together).

An example of its use:

Look at Figure~\ref{fig:duck}. Such a lovely duck.

Note, for doing that sort of references, I recommend \autoref instead, but it was the most meaningful example I could come up with.

link

answered 08 Jan '12, 15:16

Sebastian%20Paaske%20T%C3%B8rholm's gravatar image

Sebastian Pa... ♦♦
86531133
accept rate: 41%

edited 08 Jan '12, 15:20

1

The ~ is more commonly known as tilde. The term "tie" can also refer to the symbol ⁀ used to tie two notes together in a musical score. (e.g. ♪⁀♩)

The tilde can also be used to force a space in math mode. Sometimes LaTeX decides that a space is unnecessary, but if you think otherwise, the tilde can be used to force that space to appear (another way is to escape the space with a backslash, like so: \ )

(08 Jan '12, 17:00) Martin Dybdal ♦♦ Martin%20Dybdal's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×122
×12

Asked: 08 Jan '12, 14:47

Seen: 12,686 times

Last updated: 10 Jan '12, 13:31

powered by OSQA