繁体   English   中英

删除等式 LaTex 中的缩进

[英]Remove indent in equation LaTex

我有一个相当简单的问题。 我的方程式中有一个不需要的缩进。

\documentclass[11 pt, a4paper, fleqn]{article}
\usepackage{float}
\usepackage{amssymb}
\usepackage{amsmath}
\setlength{\mathindent}{0cm}
\begin{document}
\noindent Through rigorous analytical calculations found in \textbf{Appendix A} a state space representation was found:

\begin{multline}
X= \begin{pmatrix}\dot{x_1} \\ \dot{x_2} \\ \dot{x_3} \end{pmatrix} =
\begin{pmatrix}0 & 1 & 0\\ 0 & 0 & 1 \\ -1000 & -300 & -30\end{pmatrix}
\begin{pmatrix}x_1 \\ x_2 \\ x_3 \end{pmatrix}+\begin{pmatrix} 0 \\ 0 \\ 160 \end{pmatrix}u \\
\noindent Y=\begin{pmatrix}1 & 0 & 0 \end{pmatrix} \begin{pmatrix}
x_1 \\ x_2 \\ x_3 \end{pmatrix}
\end{multline}
\end{document}

这给了我这个结果:在此处输入图像描述

我想将第二行放在左边距。 我试过使用\[ \begin{aligned} \end{aligned} \]并且在我开始我的文档之前我有命令\setlength{\mathindent}{0cm}但缩进仍然存在。 这让我很生气。

谢谢,麻烦您了!

编辑:可编译

您可以使用

\begin{align}
X &= \begin{pmatrix}\dot{x_1} \\ \dot{x_2} \\ \dot{x_3} \end{pmatrix} =
\begin{pmatrix}0 & 1 & 0\\ 0 & 0 & 1 \\ -1000 & -300 & -30\end{pmatrix}
\begin{pmatrix}x_1 \\ x_2 \\ x_3 \end{pmatrix}+\begin{pmatrix} 0 \\ 0 \\ 160 \end{pmatrix}u \\
Y &=\begin{pmatrix}1 & 0 & 0 \end{pmatrix} \begin{pmatrix}
x_1 \\ x_2 \\ x_3 \end{pmatrix}
\end{align}

如果您不想要行号,请使用 align* 。

我希望这行得通!

multiline环境特别适用于对于一行来说太长的单个方程。 第一行向左对齐,第二行向右对齐。

如果您想对齐多个不同的方程式,我会使用类似于@HelloWorld 在他们的答案中显示的align环境。

但是,为了完整起见,您也可以使用multiline执行此操作:

\documentclass[11 pt, a4paper, fleqn]{article}
\usepackage{float}
\usepackage{amssymb}
\usepackage{amsmath}
\setlength{\mathindent}{0cm}
\begin{document}
\noindent Through rigorous analytical calculations found in \textbf{Appendix A} a state space representation was found:

\begin{multline}
X= \begin{pmatrix}\dot{x_1} \\ \dot{x_2} \\ \dot{x_3} \end{pmatrix} =
\begin{pmatrix}0 & 1 & 0\\ 0 & 0 & 1 \\ -1000 & -300 & -30\end{pmatrix}
\begin{pmatrix}x_1 \\ x_2 \\ x_3 \end{pmatrix}+\begin{pmatrix} 0 \\ 0 \\ 160 \end{pmatrix}u \\
Y=\begin{pmatrix}1 & 0 & 0 \end{pmatrix} \begin{pmatrix}
x_1 \\ x_2 \\ x_3 \end{pmatrix}\hfill
\end{multline}
\end{document}

在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM