How can I make a non-breaking space in reStructuredText?
You can also use |_|
in place of |nbsp|
which is less visually intrusive, given reStructuredText's goal of being readable as plain text.
I don't see the problem here, running docutils v0.9. At least rst2latex and rst2html are behaving properly regarding non-breaking whitespace. Latex generates ~ and html generates when you input a non-breaking character (\xa0, \0240).
Maybe you have an editor issue ? If you can manage to input the character, docutils will do the job.
You need the unicode directive, but it can only be used in substitutions. So you need to define a substitution like this:
.. |nbsp| unicode:: 0xA0
:trim:
and then use it like this:
xx |nbsp| xx
:trim:
is there to get rid of those spaces around the substitution.