3

${\Lambda^a}_b$ compiles to the desired result:

enter image description here

However, if I want to add both superscript and subscript on $\Bar{\Lambda}$, the superscript and subscript always align:

enter image description here

I tried to add braces on different locations, but these attempts do not work, and they all compiles to the result above. \Bar is in amsmath, using \bar in native LaTeX does not work either.

{\Bar{\Lambda}^a}_b
{{\Bar\Lambda}^a}_b
{{\Bar{\Lambda}}^a}_b

How can I force the superscript and subscript misalign in this situation?

A compilable minimal example:

\documentclass[utf8]{article}
\usepackage{amsmath,amssymb}
\usepackage{graphicx}
\usepackage{fullpage}
\usepackage{setspace}
\usepackage{verbatim}

\onehalfspacing

\begin{document}

Aligned superscript and subscript:

$$ \Lambda_a^b, \bar{\Lambda}_a^b $$

Misaligned superscript and subscript:

$$ {\Lambda_a}^b, \text{This does not work: } {\bar{\Lambda}_a}^b $$

\end{document}

l fx
  • 33

1 Answers1

6

This is mostly a FAQ, but perhaps not for the particular case. You need to add an empty atom, otherwise the braces around the accented atom would be removed.

But you can also exploit the tensor package and get even better spacing.

\documentclass{article}
\usepackage{amsmath}
\usepackage{tensor}

\begin{document}

We can get the subscript and superscript not aligned with standard methods [ {\Lambda^{a}}{b} \quad {{}\bar{\Lambda}^{a}}{b} ] but we can exploit the \texttt{tensor} package [ \tensor{\Lambda}{^{a}{b}} \quad \tensor{\bar{\Lambda}}{^{a}{b}} ] and even get better horizontal spacing (look closely).

\end{document}

enter image description here

Note 1. \Bar and \bar are completely equivalent with amsmath, that defines the former for back compatibility with former versions where the two commands did different things: the capitalized version was used for correctly staggering accents vertically.

Note 2. NEVER use $$ in a LaTeX document environment, see Why is \[ ... \] preferable to $$ ... $$?

Note 3. Never leave a blank line before a math display.

egreg
  • 1,121,712