Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Placement of sub/superscripts

5 views
Skip to first unread message

Henrik Holm

unread,
Dec 9, 2001, 5:59:42 AM12/9/01
to
Dear all,

I use ^\mathsf{T} for transpose of a vector/matrix. What I
have found is that the subscript of a tansposed vector changes
its placement, it is pushed downwards a little. Is there a
way to avoid this? I have looked through the amsldoc in
search of «subscript», but the entries I found did not seem to
apply to my problem. I also looked to see if the tensind
package could help me, with no luck.

Semi-minimal example (the same thing happens without the font
changes):

\documentclass{article}
\begin{document}
$\mathbf{f}_j^\mathsf{T} \mathbf{f}_j$
\end{document}


Henrik

Panos Hilaris

unread,
Dec 9, 2001, 6:31:22 AM12/9/01
to
Henrik Holm wrote:


Try the following:

\documentclass{article}
\begin{document}
$\mathbf{f}_j^\mathsf{T} \mathbf{f}_j$

$\mathbf{f}_j^\mathsf{T} \mathbf{f}_j^{\phantom{\mathsf{T}}}$
\end{document}

(Maybe \vphantom is better than \phantom)

If you do not want to always type ``phantom'', The TeXbook, page
179, says that you can change some font dimensions in order to
have all subscripts always put at the same place relative, but I
do not know the details. Someone else might help you.

With friendly salutations,
Panos Hilaris

Henrik Holm

unread,
Dec 9, 2001, 7:36:21 AM12/9/01
to
[Panos Hilaris]

> Try the following:
>
> \documentclass{article}
> \begin{document}
> $\mathbf{f}_j^\mathsf{T} \mathbf{f}_j$
>
> $\mathbf{f}_j^\mathsf{T} \mathbf{f}_j^{\phantom{\mathsf{T}}}$
> \end{document}
>
> (Maybe \vphantom is better than \phantom)

Oh, this is almost embarrassing, considering that I recently
read about \vphantom in conjunction with \mathstrut. Oh well.


> If you do not want to always type ``phantom'', The TeXbook, page
> 179, says that you can change some font dimensions in order to
> have all subscripts always put at the same place relative, but I
> do not know the details.

That might actually be a very god idea... however, I'm not
enough of a TeXnician to dive into details like this. And
although it would be fun and interesting to learn more about
it, I haven't got the time. But cosidering that I already am
using the macros \newcommand{\vek}{\mathbf} and
\newcommand{\T}{\mathsf{T}}, it was not too much of a hassle
to define

\newcommand{\vek}[1]{\mathbf{#1}^\vphantom{\T}}

and

\newcommand{\vekT}[1]{\mathbf{#1}^\T}

and replace the occurences of ^\T accordingly.


Thanks for your suggestions and pointers!


Henrik.

Michael J Downes

unread,
Dec 10, 2001, 9:40:24 AM12/10/01
to
Henrik Holm <h.h...@spray.no> writes:

> I use ^\mathsf{T} for transpose of a vector/matrix. What I
> have found is that the subscript of a tansposed vector changes
> its placement, it is pushed downwards a little. Is there a
> way to avoid this? I have looked through the amsldoc in
> search of «subscript», but the entries I found did not seem to
> apply to my problem.

For this information you would need to consult Appendix G of the
TeXbook. TeX handling of sub and sup placement is determined by the
fontdimen's of math font 2 (which is usually cmsy). Normally a lone
superscript is placed fairly low, so that it will not collide with
descenders or subscripts from the line above. But when a superscript and
subscript occur together, they are positioned differently to ensure a
minimum amount of space between them.

The rules in Appendix G are a complex web of compromises. When you
change something to make one kind of construct look better, it tends to
have unanticipated side effects in other kinds of constructs.

0 new messages