A long time ago I wrote about how to produce Čech cohomology groups in LaTeX, while in the previous post there is the Čech-to-derived spectral sequence making an appearance, and when I took the first screenshot in that blogpost I realised there was something wrong with the positioning of the exponent. Compare:

Positioning of the exponent in Cech cohomology: bad


Positioning of the exponent in Cech cohomology: good

The first one is the naive approach, obtained by using


The problem with it is that the accent raises the height of the box, thereby raising the exponent too. But visually speaking the $q$ and $p$ should be on the same height. This is done by using the \smash macro (which already exists in Plain TeX, and is not part of mathtools which I mistakingly thought up to today) which basically annihilates the height from its argument in all layout computations. It can create a horrendous mess, but here it is the solution.

To make sure that our macro is as generally applicable as possible we do insert the height of the argument which will then act as the total height of the result using the \vphantom macro:



which results in the second screenshot.

The irony is that if I wouldn't be using macros, there wouldn't be a problem, as TeX will not treat it as one high box if you hardcode everything. Oh well...