I am involved in the writing of a lot of scientific texts. A lot of them I (am forced to) do in LaTeX. However, I prefer InDesign, and use it more often than Latex.

Scientific/engineering texts often requires lots of numbers with units ("5 m", or "10 s", or whatever). The scientific styleguides I tend to write to usually want at least a space between number and unit, but even more preferable is an em-space. Latex has this nice package called siunitx, which handles a few things with regards to units. To my knowledge, it:

  • Deals with the em-space between number and unit
  • makes the number+unit pair non-breaking, IE, you never get '5' on the end of one line and 's' on the next
  • Handles the fact that you might want to change the writing style of a certain unit based on industry standards (Common example: gigabit-per-second should, in true 'SI' style, be written as Gb/s, but many electrical engineering works prefer Gbps instead). This can all be tweaked later.

The third point is something I don't really care about too much, but it would be nice if I could get a similar functionality in InDesign that handles the other two points: Make the space between them be em-space length, and have the entire thing be non-breaking. I've experimented around with paragraph and character styles, but it always ended up still being a hassle. Is there a 'correct' way of implementing this?

Edit: As pointed out, I was incorrect about the em-space (I will not change it in the original body to preserve context for the answer below). After more research, it is a debated topic among certain engineering, scientific and mathematical communities how wide this space should be (some saying it should be the width of a multiplication-dot, others using regular 'space', etc).

  • 3
    An em-space, really? Are you totally 100 % on that? It is the largest of all fixed width spaces. "A length of 3 m" looks positively weird.
    – Jongware
    May 28, 2020 at 14:48
  • You a re correct, it is not an em-space. I was told that once, and it sounded logical, but I wasn't aware how wide the em-space was and it was clearly wrong. The space used by siunitx is narrower than a standard space, but I'm not sure how narrow. It is also not a official ISO or SI standard, but to keep consistency with texts written with latex, I would like to also implement the narrower space.
    – Joren Vaes
    May 29, 2020 at 7:31

1 Answer 1


You can create a GREP style inside a paragraph style which uses a character style to apply a non-breaking attribute to a GREP string like \d+\ss✝. Which, in english, means any pair of 'number-space-s' will be forced to stick together on the same line. You can then duplicate this GREP style for other units like \d+\sm✝ and so on.

✝Note: depending on the format of your numbers, these strings may need more tweaks if, for instance, decimals are being used.

enter image description here

enter image description here

As to converting that space between number and units into an EM space, that can't be a 'live' action, like the GREP style above, but it can be achieved via a GREP find/replace and you can save this search for repeated usage, see below.

enter image description here

Also adding I agree with some of the comments that the EM space may actually be too much. Consider experimenting with narrower spaces, InDesign has a whole set of these.

enter image description here

  • 1
    If you convert all the spaces between numbers and units to em spaces (which is crazy wide, I would just use non-breaking spaces or maybe even a sixth spaces) you don't really need the non-breaking character style do you? BTW: Since we are dealing with typography: Shouldn't you use a dagger symbol (†) instead of latin cross emoji (✝)? 😁
    – Wolff
    May 28, 2020 at 15:39
  • Yes, there are a few different ways to approach this.
    – Lucian
    May 29, 2020 at 7:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.