4

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?

1
  • I'm sure we've as this before
    – cmhughes
    Sep 8, 2016 at 6:19

2 Answers 2

9

Place w_2 inside a group to displace the prime:

enter image description here

\documentclass{article}

\begin{document}

$w_2' \ {w_2}' \ w_2$

\end{document}
6

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)

1
  • 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!
    – Anomaly
    Sep 8, 2016 at 16:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .