Errors with \begin{aligned} and \end{aligned}

Viewed 611

I keep attempting to generate this simple equation:

[$$] \begin{aligned}

{_tV^n} &= {\text{ EPV future benefits } - \text{ EPV future net premiums, }} \\
{_tV^g} &= {\text{ EPV future benefits } + \text{ EPV future expenses } - \text{ EPV future gross premiums }}

\end{aligned} [/$$]

However I keep running into errors. For the record, I am attempting to implement this in Anki, but I do have the math package, amsmath, enabled. I don't understand why this is occurring as I had followed proper syntax for using \aligned, as best as I understood it at least.

This is some of the resulting output:

! Missing $ inserted.
<inserted text> 
                $
l.12 {_
       tV^n} &= {\text{ EPV future benefits } - \text{ EPV future net premiu...

! Extra }, or forgotten $.
1 Answers

You just need to lose the empty lines within the align environment (or replace these lines with $ \\). The error occurs because those lines are short one alignment character.

[$$] \begin{aligned}
{_tV^n} &= {\text{ EPV future benefits } - \text{ EPV future net premiums, }} \\
{_tV^g} &= {\text{ EPV future benefits } + \text{ EPV future expenses } - \text{ EPV future gross premiums }}
\end{aligned} [/$$]
Related