我正在写报告。我第一次写报告是在分享LaTeX并且编译成功。现在,我正在重做它纺织机械但它无法编译,并出现以下错误:“\intertext 使用无效”。
我收到错误的代码部分是这样的:
\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}
但我无法让它发挥作用纺织机械,我不断收到“\intertext 的使用无效”错误消息。我应该怎么做才能修复此问题纺织机械? 或者我怎样才能正确获得相同的输出?
答案1
这里其实根本不需要\intertext
,直接删除即可。另外,不要将其用于align
单行方程(对齐与方程)。
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{subequations}
\begin{equation}\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{equation}
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{equation*}
\dot{\lambda}=-\dfrac{r}{v}\dot{\omega} + \dfrac{r\omega}{v^2}\dot{v}, \hspace{4mm} \omega=\dfrac{v}{r}(1-\lambda)
\end{equation*}
into the first equation of (\ref{eq:twoa}), so obtaining:
\begin{equation}\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{equation}
\end{subequations}
\end{document}
关于 ShareLaTeX,我猜你会看到类似这样的内容:
注意到那个带有数字 1 的小红框了吗?这意味着你遇到了一个错误。虽然有错误的文档的输出有时是正确的,但那只是运气好而已,所以你应该始终确保没有任何错误。如果你点击那个带有红框的图标,你会看到错误的内容: