[XeTeX] vertically aligned sub and superscript

John Was john.was at ntlworld.com
Fri Jul 20 18:39:42 CEST 2007


Hmm.

I would just have  enclosed the third element in a \llap{} command!  But 
certainly specifying a new control sequence to cover all three is a good 
idea if this is a recurrent requirement - that way you can tinker with the 
definition of the control sequence until it's just right, then all examples 
will be adjusted accordingly.

John

----- Original Message ----- 
From: "William Adams" <will.adams at frycomm.com>
To: "Unicode-based TeX for Mac OS X and other platforms" <xetex at tug.org>
Sent: Friday, July 20, 2007 3:26 PM
Subject: JunkEmail: Re: [XeTeX] vertically aligned sub and superscript


> On Jul 20, 2007, at 9:50 AM, Manuel Souto Pico wrote:
>
>> I would like to know if it's possible to have a subscript and a
>> superscript
>> at the same and vertically aligned.
>>
>> What I'm doing now is x_{a}^{b} o x^{b}_{a} but a and b are not
>> aligned.
>
> You'll need a strut or invisible box of some sort to make the box for
> the ``a'' as tall as that for the ``b'' --- probably the best thing
> to do is to define a macro which takes three arguments, e.g.:
>
> \documentclass{minimal}
> \newcommand{\supersub}[3]{#1^{#2\vphantom{b}}_{#3\vphantom{b}}}
> \begin{document}
> $x^a_b$ $x^b_a$ $\supersub{x}{a}{b}$ $\supersub{x}{b}{a}$
> \end{document}
>
> I believe.
>
> I'd suggest checking out Gratzer's Math Into LaTeX to be sure of a
> good answer though.
>
> William
>
> -- 
> William Adams
> senior graphic designer
> Fry Communications
>
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex
> 


More information about the XeTeX mailing list