I noticed this symbol in an example. Including or excluding this from the source doesn't change anything. However, if I include \~, it puts a ~ on the first letter of the next word. So, what could be purpose of including ~ in the code? Also, how do I print the ~ only in my document?
Asked
Active
Viewed 9,010 times
7
cgnieder
- 66,645
Yogesh Yadav
- 873
1 Answers
13
As stated in the comments, ~ inserts a non-breaking space. This means that you tell the typesetting algorithm that it should not insert a linebreak here. This is useful when making references. For example, if you write
according to the Pythagorean theorem there is a lot to be learned
form a triangle. You might see in equation \eqref{eq:1} there is
some need for
is typeset as

however,
according to the Pythagorean theorem there is a lot to be learned
form a triangle. You might see in equation~\eqref{eq:1} there is
some need for
will ensure that equation and (1) stay on the same line.

one twobut it won't betweenone~two. The latter will stay in the same line together. – cgnieder May 17 '15 at 11:47