8

I get an error when trying to produce the following symbol: Command \scriptsize invalid in math mode. I'm not sure how to get around it in this case after doing some searching...

MWE:

\documentclass[12pt]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{amsmath, amssymb}
\usepackage [english]{babel}
\usepackage [autostyle, english = american]{csquotes}
\begin{document}
\begin{align*}
A^{\hspace{0.35cm}1}_{\scriptsize\overbrace{40:50}:\overline{10}|}
\end{align*}
\end{document}

enter image description here
It would be even better if I could get the subscript written without any extra spaces (like 40:50).

lifecon does not have this symbol, to my knowledge.

If I do not customize the size on the subscript, I get the following:

enter image description here

whose numbers 40:50 are too big.

MWE:

\documentclass[12pt]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{amsmath, amssymb}
\usepackage [english]{babel}
\usepackage [autostyle, english = american]{csquotes}
\begin{document}
\begin{align*}
A^{\hspace{0.35cm}1}_{\overbrace{40{:}50}:\overline{10}|}
\end{align*}
\end{document}
Clarinetist
  • 1,550

3 Answers3

7

enter image description here

The code:

\documentclass[12pt]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage [english]{babel}
\usepackage [autostyle, english = american]{csquotes}

\def\annu#1{{% 
  \vbox{\hrule height .2pt 
    \kern 1pt 
    \hbox{$\scriptstyle {#1}\kern 1pt$}% 
  }\kern-.05pt 
  \vrule width .2pt 
}}

\begin{document}
\begin{align*}
A^{\mathclap{\phantom{\,\scriptstyle 40:50\,}1}}_{\overbrace{\scriptstyle 40:50}:\annu{10}}
\end{align*}
\end{document}

For the annuity I used the definition in the answer to Annuity notation in LaTeX.

Gonzalo Medina
  • 505,128
3

This?

enter image description here

\documentclass[12pt]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{amsmath, amssymb}
\usepackage [english]{babel}
\usepackage [autostyle, english = american]{csquotes}
\begin{document}
\[
A{\scriptstyle\overbrace{\scriptstyle 40{:}50}^1:\overline{10}|}
\]
\end{document}

Or replaceing both \scriptsyle by \scriptscriptstyle :

enter image description here

David Carlisle
  • 757,742
2

I had the same problem with the actuarial symbol and the subscript/superscript, sooo I made a package to make my life easier and help other.

Plus, I’ve add some shortcut to save time.

The project page and the CTAN.

All you need is the actuarialsymbol package.

At the beginning of the code you have to write

\usepackage{actuarialsymbol}

For the sub/superscript

\actsymb['subscripLeft']['superscriptL']{<middle>}{'subscriptR'}{'superscriptR'}

Example of output:

enter image description here

enter image description here

Example of shortcut for actuarial symbol : enter image description here