Often I see mm stuck with the number like this: 9mm semi auto pistol. However, in most situations we see "10 km", so are there specific rules in certain situations? Because it seems for gun the unit of measurement is stuck with the number, but in most other cases we separate them with a space. Also, is there a software that helps you format sentences? I found one for capitalization, but I am wondering if there's something for measurement units and spaces.
2Is the context fiction, or non-fiction? Description, or dialogue?– Arkenstein XIISep 17, 2019 at 0:54
1@blackbird: If the question is for a non-fiction piece, is the technical-writing tag appropriate for your question?– RrrSep 17, 2019 at 1:10
1Well, both technical writing and creative writing.– SayamanSep 17, 2019 at 21:55
For formatting S.I. units the standards are posted by the National Institute of Standards and Technology link.
To conform to the standard there should be a space between the numerical value of the quantity and the unit: "9 mm". The usual "9mm" is a non-standard format that has become accepted in common usage (for better or worse).
If you are doing technical documents that require properly formatted units, you might have to go to the extreme by using a system like LaTeX. (In which case there is the siunitx package to achieve just that.)