GeneralSmall question regarding referencing

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Crysis85
Posts: 3
Joined: Wed Dec 18, 2013 8:44 pm

Small question regarding referencing

Post by Crysis85 »

It may be a stupid question but I wonder
what's the difference between

Code: Select all

See picture \ref{fig:name} on page \pageref{fig:name}
and

Code: Select all

See picture ~\ref{fig:name} on page ~\pageref{fig:name}
with the tilda?
Tried both "versions" and the output looks the same...

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

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Small question regarding referencing

Post by josephwright »

Presumably you actually want
See picture~\ref{fig:name} on page~\pageref{fig:name}
The tilde is used to create a non-breaking space, so with a 'normal' space as well you've got too big a gap. You want a non-breaking space here so the number can't get split to the start of a line.
Joseph Wright
Post Reply