4

In latex, if I want to write $F$ with subscripts and superscripts, as F_a^b I get \[F_a^b\]. In my case though I want the b to be a superscript but slight after a -- that is not directly on top of a. How would I do that?

5
  • Welcome to TeX.SX! Please don't use $$....$$ -- it's deprecated. Use \[...\] instead. Are you thinking of covariant, contravariant indices, perhaps?
    – user31729
    Aug 7 '15 at 19:58
  • Oh maybe if this is what they are called? Aug 7 '15 at 20:00
  • Woops! I edited it, using [\...], but I do not assume this is what you mean, isn't it? Aug 7 '15 at 20:01
  • \[ F_{a}^{\,b} \] perhaps
    – user31729
    Aug 7 '15 at 20:02
  • Corrected the 'typo' ;-)
    – user31729
    Aug 7 '15 at 20:05
7

A quick and dirty way is to use \, for example for the superscript, which inserts a smaller space, \; even more and \quad will add (too) much space.

As an alternative, the \indices - macro from tensor - package can be used if the covariant-contravariant way of superscripts/subscripts is needed!

\documentclass{article}

%\usepackage{mathtools}

\usepackage{tensor}

\begin{document}

Normal: 
\[ F_{a}^{b} \]

Some spacing:

\[ F_{a}^{\,b} \]

Some more spacing:
\[ F_{a}^{\;b} \]

Incredible more spacing:
\[ F_{a}^{\quad b} \]

With tensor - package: \verb!\indices! - command:

\[ F\indices{_a^b}\]

\end{document}

enter image description here

2

Some variants:

\documentclass{article}
\begin{document}
\[
  F_a^b, F_a^{\,b}, F_a^{\>b}, F_a^{\;b}, {F_a}^b
\]
\end{document}

Result

1

this is the style of sub- and superscripts used for tensor notation, which, i have been led to believe, can go on and on ...

the example here is probably bogus, but the technique is straightforward.

\documentclass{article}
\begin{document}
\[
  F_a{}^b{}_c{}^d
\]
\end{document}

enter image description here

0

The other answers already pin-down how to do this in math mode. In case you or someone else is interested in doing this in text mode, here is how:

F\textsubscript{a}\textsuperscript{b}

The above will typeset "F" horizontally followed by a subscript "a" horizontally followed by a superscript "b".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.