19.7.2 \spacefactor command: Assigning an explicit space factor

As mentioned above, the \spacefactor command allows explicitly setting the current space factor to the given value, as in

\spacefactor=3000

Such an explicit assignment is almost never needed; the following sections describe the higher-level commands that are typically used. You can see the current value with \the\spacefactor or \showthe\spacefactor, as usual with parameters. It can be used only in paragraph mode or LR mode (see Modes).

Finally, not normally related to \spacefactor itself, despite appearances, if you get errors like:

You can't use `\spacefactor' in vertical mode
You can't use `\spacefactor' in math mode
Improper \spacefactor

then you have likely tried to redefine an internal command, and LaTeX thinks it’s not typesetting normal text at the point of the error. See \makeatletter & \makeatother.


Unofficial LaTeX2e reference manual