When I type $w_{2}'$
, the result looks like the prime is before the subscript or perhaps right above it. However, my intended result it "w two prime" not "w prime 2", which are two different things. I've managed to kludge it into looking how I want with $w_{2}\hspace{.05em}'$
, but this is very cumbersome and feels deeply wrong. Is there an elegant solution to this problem?
-
I'm sure we've as this before– cmhughesSep 8, 2016 at 6:19
2 Answers
Place w_2
inside a group to displace the prime:
\documentclass{article}
\begin{document}
$w_2' \ {w_2}' \ w_2$
\end{document}
Whilst there is some mathematical logic to your argument, TeX follows the traditional typesetting convention here of not staggering sub/supscripts by default.w_{2}'
is w_{2}^{\prime}
and always in TeX, w_x^y
is the same as w^y_x
and set with the sub and superscript attached directly to the base.
{w_x}^y
or w_x\vphantom{w}^y
would do what you want (in slightly different ways)
-
While I accepted the other answer, since it shows a solution to my problem very clearly, visually, and succinctly, this is also a good answer because explains why TeX doesn't do this by default. Thanks!– AnomalySep 8, 2016 at 16:00