Thank you so much, William. <br><br><div><span class="gmail_quote">2007/7/20, William Adams <<a href="mailto:will.adams@frycomm.com">will.adams@frycomm.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Jul 20, 2007, at 9:50 AM, Manuel Souto Pico wrote:<br><br>> I would like to know if it's possible to have a subscript and a<br>> superscript<br>> at the same and vertically aligned.<br>><br>> What I'm doing now is x_{a}^{b} o x^{b}_{a} but a and b are not
<br>> aligned.<br><br>You'll need a strut or invisible box of some sort to make the box for<br>the ``a'' as tall as that for the ``b'' --- probably the best thing<br>to do is to define a macro which takes three arguments,
e.g.:<br><br>\documentclass{minimal}<br>\newcommand{\supersub}[3]{#1^{#2\vphantom{b}}_{#3\vphantom{b}}}<br>\begin{document}<br>$x^a_b$ $x^b_a$ $\supersub{x}{a}{b}$ $\supersub{x}{b}{a}$<br>\end{document}</blockquote><div><br>
Your code works perfectly. <br><br>I was surprised to see that, if I compile the file using those five lines and nothing else, I can get aligned scripts by simply typing $x^a_b$. However, in my document, this is not so. <br>
<br>So I run a few tests and it seems there's an incompatibility with the package gb4e, which is used for glosses and examples in linguistics. If I remove it, the scripts a and b are aligned in $x^a_b$.<br></div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I believe.<br><br>I'd suggest checking out Gratzer's Math Into LaTeX to be sure of a
<br>good answer though.</blockquote><div><br>Thanks so much again. <br><br>Cheers, Manuel<br><br></div></div>