Text FormattingUndivisible Cross reference

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
gwada74
Posts: 42
Joined: Fri Nov 26, 2010 5:28 pm

Undivisible Cross reference

Post by gwada74 »

Hi,

I do not want my cross references to be divisible when they arrive at the end of a line. For example :
bkbkbekbekabk Fig.
1
I would like it forced to :
bkbkbekbekabk Fig.1
How can I do ?
Last edited by gwada74 on Mon Mar 21, 2011 10:06 pm, edited 1 time in total.

Recommended reading 2024:

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

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

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

Re: Undivisible Cross reference

Post by localghost »

Every documentation about LaTeX basic suggest to use the tilde character (~) as unbreakable space.


Thorsten
gwada74
Posts: 42
Joined: Fri Nov 26, 2010 5:28 pm

Re: Undivisible Cross reference

Post by gwada74 »

I agree but with cross reference you use \ref{tag} and I do not know how LaTeX manage the conversion. Where should I put ~ ? If the chapter number is part of the numbering how make sure that the number will be : 1.1 with chapter.figure number.
I should be able to force LaTeX to that \ref{tag} should be written Fig~.~1~.~1.
gwada74
Posts: 42
Joined: Fri Nov 26, 2010 5:28 pm

Re: Undivisible Cross reference

Post by gwada74 »

Ok I have the solution, i am using \mbox{\ref{}}. It is working fine.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Undivisible Cross reference

Post by localghost »

A simple Figure~\ref{label} should also do.
Post Reply