Quantcast
Channel: Small vertical spacing glitch - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 5

Answer by egreg for Small vertical spacing glitch

$
0
0

I'd outright reject raising the y.

Here's a comparison between your \smash method and my method of equalizing the subscripts.

\documentclass[12pt,letterpaper,twoside]{book}\usepackage{lmodern}\usepackage{amsmath}\usepackage{fixcmex}% don't forget this if you use lmodern\usepackage{xcolor}\newcommand{\arule}{\rlap{\color{red}\smash{\vrule width 1cm depth0.1pt height 0pt}}}\begin{document}\begin{alignat*}{2}&\frac{\arule p_x^{\arule 2}}{2 m} \frac{p_{\smash{y}}^2}{2 m}&\qquad&\frac{p_x^{2}}{2 m} \frac{p_{\smash{y}}^2}{2 m}\\&\frac{\arule p_{\mathstrut x}^{\arule 2}}{2 m} \frac{p_{\mathstrut y}^2}{2 m}&&\frac{p_{\mathstrut x}^{2}}{2 m} \frac{p_{\mathstrut y}^2}{2 m}\end{alignat*}\end{document}

enter image description here

You might also try \smash[t]{\mathstrut}, exploiting the fact that neither letter has ascenders.


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images