Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [superscripts]

{superscripts} are smaller characters appearing set slightly above the normal line.

138
votes
8answers
91k views

Left and right subscript / superscript

I am trying to put two subscripts at the left and right of a character. For example, something like: _{t} p_{x} where p is in the middle. How do you do this?
347
votes
7answers
452k views

Superscript outside math mode

What is the easiest way to superscript text outside of math mode? For example, let's say I want to write the $n^{th}$ element, but without the math mode's automatic italicization of the th. And what ...
245
votes
9answers
220k views

What's the quickest way to write “2nd” “3rd” etc in LaTeX?

If I want to use abbreviations for second, third and so on in my LaTeX documents, I am currently doing this: 2$^{nd}$ which seems unsatisfactory. Is there a macro I'm missing? I'm sure I could define ...
17
votes
5answers
4k views

Double superscript error involving tilde

When I write {{\tilde{C}}^{0}_{har}}^{\Gamma} (or the same with fewer curly brackets) in Tex I obtain a double superscript error and I can't solve it. Does someone know how to fix this?
6
votes
1answer
2k views

superscripts with xelatex? (footnotes, natbib)

This example illustrates some conflict between xelatex and natbib- and footnote-generated superscripts. The semi-colon between distinct citations is not typeset as a superscript, nor is the dagger. ...
20
votes
5answers
24k views

Superscripts before a letter in math

I was writing this formula: $$^gp = ^gR^l_l+^go_l$$ $g$ are superscripts, but they should be close to other letters. How can I solve this problem?
29
votes
4answers
29k views

How to typeset indices before a symbol?

I know how to write a usual index with the help of the underscore, but I seem to be unable to find out how to write an (upper/lower) index in front of a letter/text. These kind of indices are common ...
4
votes
2answers
1k views

How to change parameters for \textsuperscript{} in french?

I try to put \textsuperscript{ère} with Roman digits everywhere in document but as I understood the command \textsuperscript{} in French makes effect for all symbols except of "è"? This solution ...
44
votes
7answers
5k views

How do I typeset a tenfold powering (a tower-of-powers) with LaTeX?

How do I write x^x^x^x^x^x^x^x^x^x? My LaTeX distribution doesn't wanna eat it, it stops swallowing stuff at the double power x^x^x. What I'm aiming at is essentially building a telescope out of X's ...
10
votes
1answer
1k views

Redefine the default depth of superscript and subscript document-wide

The behavior of subscript and supscript operator _ and ^ is like a blackbox to me, I am curious if I could redefine the behavior of them globally for a document. I searched the forum and found ...
6
votes
2answers
321 views

Arrows in superscripts

I have something like this: \int\limits _{\left[a,c\right]}f I would like to add the arrow over the [a,b] to emphasize the directionality, but when I try to use: \int\limits _{\overrightarrow{\left[...
26
votes
3answers
3k views

maths nested superscripts and subscripts displayed incorrectly inline

I am having a strange bug when using nested superscripts and subscripts in inline math (displaystyle works fine). This behaviour is the same independently of the font used or the compiler (orginally ...
24
votes
2answers
799 views

How to prevent superscripts from moving under \sqrt?

When I put an expression with superscripts under a \sqrt, the superscripts (here "vis") move down a bit. How can I prevent that, so that it looks consistent no matter whether it's under a root or not? ...
8
votes
2answers
17k views

\vphantom and superscripts

The superscripts position is exactly the same for these two statements: \vphantom{\int}^S and {}^S How can I get the superscript higher up? Edit The \intis just an example. Here is another one: \...
11
votes
2answers
8k views

The \prescript command from the mathtools package gives incorrect alignment

The spacing I'm getting with the \prescript command from the mathtools package seems wrong. Here is a MWE: \documentclass{article} \usepackage{amsmath,mathtools} \begin{document} $\prescript{14}{2}{\...
11
votes
2answers
2k views

biblatex: How to remove the comma before ed./eds.?

How can I remove the comma before ed. or eds. and put this abbreviation in parentheses? I'm using biblatex. For example this reference: Dozy, Reinhart, ed.: Supplément aux dictionnaires arabes. ...
7
votes
2answers
2k views

Superscript page numbers with natbib

I'm with an annoying problem with natbib. When the super parameter is used, the citation happily goes superscript but the page or chapter number doesn't. \documentclass{article} \usepackage[numbers, ...
7
votes
3answers
15k views

lyx shortcut for superscript and subscript

Instead of using the menu for Insert->Formatting->Superscript or Subscript, I would like to use a keyboard shortcut. I tried Tools->Preferences->Shortcuts, there are already shortcuts for math-...
0
votes
3answers
535 views

How to solve this error (missing $)

This error keeps popping while making my table: ! Missing $ inserted. <inserted text> $ l.196 \textit{E} & 13.21 \cdot\rho_{dry}$+0.73 \cdot $\% Min$-0.06$\cdot$ ...? ...
15
votes
3answers
1k views

Adjust box around hyperref footnote links

Is it possible to adjust the size of the box around the footnote links produced by hyperref? Specifically, I would like to move the base of the box closer to the base of the object inside. \...
11
votes
1answer
477 views

Capture a macro's subscripts/superscripts by the macro

Is it possible to capture sub-/superscripts added to a macro by the macro itself? Consider the following example: \newcommand{\fx}[1]{f(x)} \fx{x} % -> f(x) \fx{x}^2 % -> f(x)² Now the ...
9
votes
1answer
3k views

Defining a newcommand with sub- or superscript and avoiding “double subscript” error

I often use shortcuts defined via \newcommand. However sometimes it causes a "double subscript" problem if a shortcut contains a subscript and I try to add one more subscript when using it. I am ...
12
votes
2answers
2k views

Weird relative positioning of superscript and subscript with \dot, \bar

Minimal working example: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \[ {A^\mu}_\nu \] \[ {\bar{A}^\mu}_\nu \] \end{document} The result is. Why is the placement of ...
8
votes
2answers
243 views

Adjusting kerning with LuaTeX and realscripts

I'm using the realscript package to get true super- and subscripts with LuaLaTex. However I'm not pleased with kerning of superscripts with the font I'm using, Linux Libertine. I've tried to adjust ...
7
votes
4answers
319 views

How can I capture both superscripts and subscripts after a macro

This question piggy-backs on the answer to Capture a macro's subscripts/superscripts by the macro by egreg. I'm attempting to use the xparse package to create some macros and I'd rather not have ...
5
votes
2answers
131 views

Using superscript after \middle

I'd like to write this formula with all parenthesis of the same size N = \left( \frac{s}{2} \right)^2 - \left( \frac{d}{2} \right)^2 so I tried N = \left( \frac{s}{2} \middle)^2 - \middle( \frac{d}{...
3
votes
1answer
161 views

Subtleties in placing superscripts: explaining what TeX is actually doing

Starting from this question I tried investigating what TeX is actually doing while typesetting different subscripts, ie, how it decides how much to shift the superscript up, in order to make it a ...
58
votes
3answers
343k views

vector arrow with superscript

I want to have a vector with a superscript: \vec{o}^t But this gives very bad results: the t is overlapping with the vector arrow. How do I fix this (and why does this give bad results in the first ...
21
votes
3answers
71k views

Vertically aligning textsuperscript and textsubscript together

I would like to show both super and subscript together some text. I tried this sometext\textsuperscript{1}\textsubscript{2} But 2 does not show up right below 1. Thanks for your help. Also ...
12
votes
1answer
340 views

Is there a way to stop the vertical spread of multiple super- and sub-scripts?

I'd like to be able to place multiple sub and superscripts (in maths mode) on an element without having them expand vertically. That is, so that in the output of ${x^2_4}^6_8$, the 2 and 6 were ...
38
votes
3answers
49k views

Double superscript error

I'm a relative beginner with Lyx. When I type in this code I'm hoping for T' to be followed by superscripts and subscripts. Instead I get a "double superscript" error when I try to view the pdf \[ T'...
15
votes
2answers
2k views

Differences in vertical positioning of superscripts and subscripts depending on grouping (`{ }`): Why? Caveats? Workarounds?

This question about {(x+y)}^2 vs (x+y)^2 drew my attention to the slightly different vertical positioning of super- and subscripts for such expressions. Compare (x+y)^8_8 (left) and {(x+y)}^8_8 (right)...
12
votes
3answers
2k views

Avoiding overlapping superscripts and subscripts in matrices

I was working on some calculus today and tried to typeset a matrix of partial derivatives and ran into some trouble. Here is my code: \documentclass{minimal} \usepackage{mathtools} \begin{document} \...
9
votes
2answers
244 views

Superscripts too high after macros defined with \DeclarePairedDelimiter

I have a macro for absolute value (using \DeclarePairedDelimiter from mathtools): \DeclarePairedDelimiter{\abs}{\lvert}{\rvert} This works great in terms of adjusting the size of fences etc. But the ...
8
votes
1answer
1k views

How to reduce the spacing between punctuation and the superscript citation

I'm using biblatex with the autocite=superscript option, so I can use \autocite to switch the interpunction and a superscript citation when the \autocite command is placed before an period or comma. I'...
15
votes
3answers
1k views

By default, how much do ^ and _ raise and lower the text box in superscript and subscript respectively?

I'm trying to define a set of commands for superscript and subscript, but cannot use the characters ^ and _ in doing so. I've been able to define the correct font size by using \check@mathfonts\...
10
votes
4answers
18k views

Problem adding subscripts and superscripts [duplicate]

Possible Duplicate: Cursive text after _ I need to have some subscripted and superscripted text in my thesis document. But when I try to do it the way as H_{2O} or S^{2}. I get an error at that ...
9
votes
2answers
1k views

Prime on the product symbol

I want to have a primed product symbol, i.e. something like $\prod^\prime$ but it puts the prime on top of the product symbol instead of next to it (as a superscript, as it usually works). Does ...
4
votes
1answer
594 views

transpose and dot superscripts spacing

I would like that the transpose in the following has the same height in both examples, is there a possibility to make the transpose sign ignore the boxes above the charater? \documentclass{article} \...
23
votes
3answers
953 views

Superscripts appear in various weird places in fractions

This is a weird phenomenon. Consider the following code: \documentclass{article} \begin{document} $$Z^* \frac{Z^*}{Z^*}$$ \end{document} It produces the following picture: The asterisks appear ...
10
votes
1answer
1k views

Consistent vertical positioning of superscripts

This is somehow a follow-up question to this one. I've got the following math expression: \nabla_y u_0^{(i)}\nabla_y v^{(i)} However, no matte, whether I enclose the v in curly brackets or not (as ...
6
votes
2answers
11k views

Superscript and subscript together in text mode

I want to use super and subscript at the same time in text mode. I cannot use math mode because I created macros which only work in text mode. I found this question: Vertically aligning ...
6
votes
2answers
500 views

Matrix doesn't shrink when put in fraction.

This is my minimal example, the problem is the different size of the two x. I would expect the matrix to be shrunken too, but it isn't. Why is this and how is it corrected? \documentclass[a4paper,...
6
votes
2answers
444 views

Overset and mathbb collision

I have ran into really funny trouble trying to use \overset and \mathbb the same time. I need to do something like this: but with the T as mathbb, i.e. \mathbb{\overset{m}T}_{ij}. When I try it, this ...
5
votes
2answers
4k views

sub- and superscripting together in text mode

I want to use sub- and superscript together in text mode. I've found this macro to solve the problem \def\textsubsuperscript#1#2{\rlap{\textsubscript{#1}}\textsuperscript{#2}} But it doesn't works ...
5
votes
3answers
668 views

Simultaneous overset and superscript

When I type $\overset{\circ}{Z}^\lambda$ the lambda is placed slightly above and to the right of the circle. Is there a way to make it appear as a superscript on the Z? I tried $\overset{\circ}{Z^\...
5
votes
2answers
4k views

Position of superscript when superscriptd item has \hat over it

I am trying to typeset he following inline math for a camera-ready document: $\hat{\boldsymbol \Sigma}_{P}^{-1} \hat{\boldsymbol \Sigma}_{G}$ It appears that the superscript -1 is aligned ...
4
votes
2answers
414 views

How do I specify 8^(a - b) in math mode

$8^(a - b)$ produces only a superscripted (; the rest of the power is not superscripted. How can I superscript the whole (a-b) portion?
4
votes
3answers
238 views

When I add a “hat” to a character, I cannot get a gap before the superscript

I like how there is a gap between the subscript and the superscript when I write ${w_i}^T$. However, if I try to put a hat on the vector, like $\hat{w}_i^T$, this space goes away. Any ideas? I tried ...
3
votes
2answers
176 views

How to find the position of a word in a jumbled sentence?

I have an initial sentence: The quick brown fox jumps over the lazy dog. I have a new sentence (which is always a jumble of the original sentence): The lazy dog jumps over the quick brown fox. In ...