10

I was told

setting \thinmuskip to zero is wrong.

Why is that so?

I am deliberately asking this generically, because the statement was so generic.


I used this method to enhance the typography of things like $A + (2n+1)B$ where I feel, the spacing around the 2nd + should be smaller than around the first one (Gestalt law of proximity).

enter image description here
enter image description here

mhchem
  • 3,485
  • 12
  • 37

1 Answers1

9

There is a bit of confusion here.

TeX uses \medmuskip around binary operation symbols; whether the space around the two + signs in A+(2n+1)B should be the same or different is a stylistic question. In my opinion the spaces should be the same.

TeX uses \thinmuskip in various places, most importantly at the sides of an operator under certain circumstances. An example is worth several words in order to show it should never be set to zero:

$2\sin x$

\thinmuskip=0mu

$2\sin x$

\bye

Compile with pdftex.

enter image description here

Is this enough of a reason?


About \medmuskip, here is a comparison:

$A+(2n+1)B$

$A+\hbox{\medmuskip=0mu$(2n+1)$}B$

\bye

enter image description here

Note that TeX won't use the spacings related to \medmuskip or \thickmuskip in subscripts or superscripts, but will still insert those related to \thinmuskip.

egreg
  • 1,121,712
  • In chemistry, there is no \sin or similar, just + or -. So I should be safe. However, I found that one instance that I used because math inside \text looses the information that it is inside a subscript $X_{a+b,\text{\ensuremath{a+b}}}$. I'd be glad if that could be solved otherwise. Should I raise a new question? – mhchem Jul 25 '17 at 11:43
  • @mhchem \newif\ifinsubscript then ... $X_{\insubscripttrue a+b, \text{\ensuremath{\ifinsubscript\scriptstyle\fi a+b}}}$. Is that enough? Of course you can automate, or create symbolic names, but the idea is mostly that. (I don't remember if \..true were global assignments, in that case, add \insubscriptfalse at the end of the subscript. – Manuel Jul 25 '17 at 11:58
  • @mhchem Yes, \text in some sense loses the information, but it can be fixed. I seem to remember something of this kind. A new question with details seems the most suitable strategy. – egreg Jul 25 '17 at 12:26
  • --> https://tex.stackexchange.com/q/383156/73371 – mhchem Jul 25 '17 at 12:41