Sometimes math formulas become part of a word - eg:
- "d-1-dimensional" (eg d-1-dimensional sphere, d-1-dimensional hyperplane, d-k-dimensional subspace)
- "mxn-matrix" or mxn-dimensional (matrix for example)
- "d=3-dimensional" (eg: in the d=3-dimensional case...)
If I write for example $d-1$-dimensional in LaTeX, the resulting spacing
looks very bad in my point of view as it suggest to read each math symbol as a single word ("d minus one-dimensional") instead of combining them to one word "d-minus-one-dimensional".
For the specific case of Spacing in "$d=2$-dimensional", I got already a very good answer: https://tex.stackexchange.com/a/504362/128042, now I would like to generalize this question here.
I am both interested in
- opinions what would be good typography- how the spacing should look like and
- elegant LaTeX-code that does this spacing in a more automated way - e.g. defining a command that autmomatically removes all horizontal spaces of a given argument. So that I can call something like
\mathword{d-1}{dimensional}


$(d-1)$\nobreakdash dimensionalmakes sense,$d=3$-dimensionalis meaningless. Also the space of m × n matrices is$mn$\nobreakdash dimensional. – egreg Nov 21 '19 at 16:52\nobreakdash; i.e., it should read "While $(d-1)$\nobreakdash-dimensional [...]" – user94293 Nov 21 '19 at 22:39