Positive and Negative thin spaces in LaTeX

At times in LaTeX you want to introduce a small space between words. This is especially important in mathematical typesetting. Just adding a little bit of space hairspace, can alter the aesthetic look of the equation or mathematical entity substantially. For example consider this expression:

$|a|^{2}$

This produces the following
Screenshot 2020-04-04 at 15.47.51
The | braces are too close to the character “a”. To create a better version of this we introduce a small hairspace between the two. The code for hairspace is \,.
$|\,a\,|^{2}$
This produces a much nicer looking expression.
Screenshot 2020-04-04 at 15.47.55
This feature of hairspace was known to me for some time. But the problem came when I had to create a negative space. Take for example this expression:
 $F_{eff} = kx$
The result of this is not so nice looking as you can see:
Screenshot 2020-04-04 at 16.06.38
But then I came to know about a negative hairspace. The code for it is \!. Now let us introduce this in the above expression
$F_{e\!f\!\!f} = kx$
The result is much better visually:
Screenshot 2020-04-04 at 16.10.33

Leave a Reply

Your email address will not be published.