Math & ScienceDouble Superscript Problem

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
M.A
Posts: 58
Joined: Sun Nov 30, 2008 10:42 am

Double Superscript Problem

Post by M.A »

Hi all
I need to write something like this

Code: Select all

    \[ {\hat A_i^j}^T \]
However, it gives me error.
While the following works normally:

Code: Select all

    \[ {A_i^j}^T \]
It seems that the problem is with the hat. How to solve this?

Thanks
Last edited by M.A on Sat Jun 18, 2011 7:00 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Double Superscript Problem

Post by localghost »

Code: Select all

\documentclass{article}

\begin{document}
  \[
    \hat{A}_i^j\strut^T
  \]
\end{document}

Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
M.A
Posts: 58
Joined: Sun Nov 30, 2008 10:42 am

Double Superscript Problem

Post by M.A »

Thanks alot, it works now. But with one half line spacing, the second superscript is too high. How to solve this ?

Code: Select all

 \documentclass[]{article}
 \def\baselinestretch{1.5}
 \begin{document}
    \[ {\hat A_i^j}\strut^T \]
 \end{document}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Double Superscript Problem

Post by Stefan Kottwitz »

This works:

Code: Select all

\documentclass[]{article}
\def\baselinestretch{1.5}
\begin{document}
  \newcommand*{\expression}{\hat A_i^j}
  \[ \expression{\vphantom\expression}^T \]
\end{document}
Btw. I would use the setspace package instead of redefining \baselinestretch.

Stefan
LaTeX.org admin
M.A
Posts: 58
Joined: Sun Nov 30, 2008 10:42 am

Re: Double Superscript Problem

Post by M.A »

Thanks alot, it works!

Note: I am using a journal class file, so I copied the definition of \baselinestretch from the class file to reproduce the problem.
Post Reply