Latex Alignment Problem

  1. Hi guys, I want to write up some math and have the following code:

    \begin{align}
    L_{A}(s)&=V(A,0)-V(A,s) \\
    &=\int_{t=A}^{T(A)+A-\alpha S_{A}}e^{-r(t-A)}W_{t}dt - \int_{t=A}^{T(A)+A-\alpha (S_{A}+s)}e^{-r(t-A)}W_{t}dt \\
    &=\int^{T(A)+A-\alpha S_{A}}_{T(A)+A-\alpha(S_{A}+s)}e^{-r(t-A)W_{t}dt}
    \end{align}

    Now using Physics Forum's inbuilt Latex thingy the following appears:

    [tex]
    \begin{align*}
    L_{A}(s)&=V(A,0)-V(A,s) \\
    &=\int_{t=A}^{T(A)+A-\alpha S_{A}}e^{-r(t-A)}W_{t}dt - \int_{t=A}^{T(A)+A-\alpha (S_{A}+s)}e^{-r(t-A)}W_{t}dt \\
    &=\int^{T(A)+A-\alpha S_{A}}_{T(A)+A-\alpha(S_{A}+s)}e^{-r(t-A)W_{t}dt}
    \end{align*}
    [/tex]

    However, when I try to compile this using my own Latex compiler, I get the following error message:

    [​IMG]

    It says that the "align" doesn't work! Are there any computer experts who know what I am doing wrong??
     
  2. jcsd
  3. The "align" environment is provided by the AMS-LaTeX package and can be activated by including the line
    Code (Text):
    \usepackage{amsmath}
    somewhere in the preamble of your document. I believe the LaTeX functionality of Physics Forums enables AMS-LaTeX by default, which is why the "align" environment is working correctly on Physics Forums but is not working in your document.
     
Know someone interested in this topic? Share this thead via email, Google+, Twitter, or Facebook

Have something to add?