2

What packages and commands do I need to format the following equation into a LaTeX document (ignore the background, I just need the equation)

1
9

The easiest way, I think) enter image description here

 \documentclass{article}
 \usepackage{amsmath,amssymb}
 \usepackage{actuarialangle}


 \begin{document}

 $s_{\actuarialangle{n}i}=\frac{(1+i)^{n}-1}{i}$

 \end{document}
1
  • The screenshot you posted doesn't correspond fully to the code above. For one, the code uses s, but the screenshot shows S. In addition, the math mode in use the screenshot looks to be \displaystyle, whereas the code employs \textstyle. Please fix.
    – Mico
    Sep 21 at 20:10
7

Something like this perhaps

enter image description here

\documentclass{article}

\begin{document}

\[
s_{\smash{\overline{n}}\vrule\,i}=\frac{(1+i)^n-1}{i}
\]

\end{document}
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}

enter image description here

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.