[texhax] \protect in LaTeX2e

Robert Hunt reh10 at cam.ac.uk
Tue Oct 5 18:28:07 CEST 2004


Ian.Collier at comlab.ox.ac.uk wrote:
> 
> reh10 at cam.ac.uk (Robert Hunt) has declared:
> >The situation in which this arose was in fact an equation: e.g. $0 <
> >\nolinebreak x < 1$. Using \nobreakspace is therefore not an option,
> >unfortunately.
> 
> In that case you can simply place braces around the bits in which you
> don't want a linebreak. ${0<x}<1$

That's no good because it removes the stretchability from the spaces in
{0<x} whilst leaving them in <1. If the line gets stretched when it is
justified, the spacing in the equation might end up being very poor.

But in any case, my real point is not whether there are alternatives to
using \protect\nolinebreak, but that an average user is unlikely to
realise that he needs to \protect the \nolinebreak in the first place;
and the error message if he doesn't \protect it is less than helpful.

Anyway, thanks for the various suggestions...



More information about the texhax mailing list