5
\$\begingroup\$

when typesetting numbers and units, my preferred way is to have a space between them for better readability. For instance, one would typeset

24 V

instead of

24V

It is actually not only my preferred way of writing because it just reads easier, it is also the way recommended by standards like the US NIST or German DIN.

My only problem is that a line break between the number and the value would cremate all the good things about the whole thing. I've searched some, and found that the nobr html command is actually dirty style (and not supported by SE anyway). Also, when just wanting to write something simple like 24 V, using the LaTeX markdown \$\text{ 5 V}\$ seems a bit too much.

Thus, my question: What is the best way of using a blank character and preventing a line break at the same time?

\$\endgroup\$
3
\$\begingroup\$

Just use a non-breaking space between the number and unit?

24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V 24 V

Code:

24 V 24 V 24 V 24 V 24 V 24 V //Repeat 50x
\$\endgroup\$
  • 2
    \$\begingroup\$ Thanks. I clicked to get into the editing mode of your answer and saw how it's done: " " instead of " " \$\endgroup\$ – zebonaut Jun 11 '11 at 16:35
  • \$\begingroup\$ Hm, looks like those spaces are gonna cost me... :-/ \$\endgroup\$ – stevenvh Jun 12 '12 at 7:59
  • \$\begingroup\$ @stevenvh, or just use normal spaces and let someone else edit in the correction, putting the unit on the same line is not a trivial edit is it? \$\endgroup\$ – Kortuk Jun 12 '12 at 17:20
-5
\$\begingroup\$

Forgettaboutit. So the units ends up on the next line after the value just like other words do, big deal. Why must the value and its units not be allowed to flow when it's fine for other words that belong together to flow? It's OK to break "five feet" or "six volts" but not "6 V"? That makes no sense. Once you've decided that there should be a space between the value and its units, I think you have given up the right to insist they be on the same line.

Of course this only applies to text that is obviously flowed. Tables and other things with fixed formatting is a differnt story, but I don't think that is what is being asked about here anyway.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .