Math & ScienceDouble Superscript Error (Actuarial Symbol)

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
clarinetist
Posts: 11
Joined: Sun Nov 18, 2012 8:20 pm

Double Superscript Error (Actuarial Symbol)

Post by clarinetist »

Code: Select all

\documentclass[12pt]{book}
\usepackage{amsmath}
\usepackage{hyperref}
\begin{document}
\subsection{Term Insurance (\texorpdfstring{$A^{(m)}^{1}_{x:\overline{n}|}$}{})}
\end{document}
It comes out exactly as I would like it:
Capture.PNG
Capture.PNG (4.98 KiB) Viewed 6353 times
The only problem is that I get a double superscript error. I have the lifecon package (which isn't on CTAN), but it does not have this symbol in it.

Help is appreciated. Thank you!

Note that I have the symbol in \texorpdfstring so that the symbol shows up in the Table of Contents. Also, I have tried adding \text in order to add space, but that hasn't worked.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Double Superscript Error (Actuarial Symbol)

Post by Johannes_B »

Note the different input methods and the differences in the output.

Code: Select all

\documentclass[12pt]{book}
\usepackage{amsmath}
\usepackage{hyperref}
\begin{document}
\subsection{Term Insurance (\texorpdfstring{$A^{(m)}{}^{1} _{x:\overline{n}|}$}{})}
$A^{(m)}{}^{1}_{x:\overline{n}|}$ % as suggested by the error message
$A^{(m)^1}_{x:\overline{n}|}$
$A^{(m) 1}_{x:\overline{n}|}$

\end{document}
Best regards
Johannes

PS: Good MWE
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
clarinetist
Posts: 11
Joined: Sun Nov 18, 2012 8:20 pm

Re: Double Superscript Error (Actuarial Symbol)

Post by clarinetist »

Perfect, thank you! :D
Post Reply