The code \thepage of
yields the output 3of
.
I can fix it by writing \thepage~of
, but what causes this in the first place? I can't imagine when it would be useful.
macrosspacing
The code \thepage of
yields the output 3of
.
I can fix it by writing \thepage~of
, but what causes this in the first place? I can't imagine when it would be useful.
Best Answer
A TeX macro 'eats' the white space after it, so
\TeX nician
is typeset as TeXnician, and\thepage of
is typeset as3of
. You can either type\thepage~of
, or\thepage\ of
, or\thepage{} of
. In the first case the space is unbreakable, in the others it is not.Update: if you need space after macros for any reason, try
xspace
package: