What packages and commands do I need to format the following equation into a LaTeX document (ignore the background, I just need the equation)
Asked
Active
Viewed 786 times
3 Answers
9
\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{actuarialangle}
\begin{document}
$s_{\actuarialangle{n}i}=\frac{(1+i)^{n}-1}{i}$
\end{document}
WinnieNotThePooh
- 3,008
- 1
- 7
- 14
-
The screenshot you posted doesn't correspond fully to the code above. For one, the code uses
s, but the screenshot showsS. In addition, the math mode in use the screenshot looks to be\displaystyle, whereas the code employs\textstyle. Please fix. – Mico Sep 21 '21 at 20:10
7
Something like this perhaps
\documentclass{article}
\begin{document}
[
s_{\smash{\overline{n}}\vrule,i}=\frac{(1+i)^n-1}{i}
]
\end{document}
David Carlisle
- 757,742
6
A modification of https://tex.stackexchange.com/a/140172/4427
\documentclass{article}
\NewDocumentCommand{\annuity}{mo}{%
\hbox{%
\vbox{
\offinterlineskip
\mathsurround=0pt
\ialign{##&\vrule##\cr
\noalign{\hrule}%
&height 1pt\cr
$\scriptstyle#1\hskip\scriptspace$&\cr
}%
}%
\IfValueT{#2}{$\scriptstyle,#2$}%
}%
}
\begin{document}
[
s_{\annuity{n}[i]}=\frac{(1+i)^n-1}{i}
]
[
s_{\annuity{n}}\quad s_{\annuity{p}}
]
\end{document}
egreg
- 1,121,712



