I'm writing a report. I first did it on ShareLaTeX and it compiled successfully. Now, I'm redoing it on texmaker and it doesn't compile stating the following error: "invalid use of \intertext".
The part on the code in which I get the error is this one:
\begin{subequations}
\begin{align}\label{eq:twoa}
\begin{split}
J\dot{\omega}=rF_z \mu \left(\dfrac{v-\omega r}{v}\right)-T_b \\
m\dot{v}=-F_z \mu \left(\dfrac{v-\omega r}{v}\right)
\end{split}
\end{align}
\intertext{\noindent In (\ref{eq:twoa}) the state variables are $\omega$ and $v$. Since $\omega$, $v$, and $\lambda$ are linked by an algebraic relationship, it is possible to replace the state variable $\omega$ with the state variable $\lambda$. This can be simply obtained by plugging the following two relationships
\begin{align*}
\dot{\lambda}=-\dfrac{r}{v}\dot{\omega} + \dfrac{r\omega}{v^2}\dot{v}, \hspace{4mm} \omega=\dfrac{v}{r}(1-\lambda)
\end{align*}
into the first equation of (\ref{eq:twoa}), so obtaining:}
\begin{align}\label{eq:twob}
\begin{split}
\dot{\lambda}=-\dfrac{1}{v}\left(\dfrac{(1-\lambda)}{m}+\dfrac{r^2}{J}\right) F_z \mu(\lambda) + \dfrac{r}{vJ}T_b \\
m\dot{v}=-F_z\mu(\lambda)
\end{split}
\end{align}
\end{subequations}
And actually the output is this one in ShareLaTeX (what I need):

But I can't make it work in texmaker, I keep getting the "invalid use of \intertext" error message. What should I do to fix this on texmaker? Or how could I get the same output properly?



\intertextis meant to be placed inside analignenvironment. – Torbjørn T. Aug 03 '17 at 14:57\intertextdoes not make any sense out side ofalign(*),alignat(*)andgather(*). – daleif Aug 03 '17 at 14:59