
我想顯示多行居中方程式。每個方程式都有多個等式和不等式,因此不需要對齊。我想要的只是一次顯示一行,居中,並且它們之間沒有太多空間。是使用多個環境的唯一方法嗎\begin{equation}\end{equation}
?當然必須有一種更有效的方法,但我似乎無法在網路上找到任何方法來做到這一點。這是一個例子:
$$(a_1,\ldots,a_n)M\subset(a_1,\ldots,a_{n+m})M\subsetneq M,$$
$$(a_{n+1},\ldots,a_{n+m})\frac{M}{(a_1,\ldots,a_n)M}\simeq\frac{(a_1,\ldots,a_{n+m})M}{(a_1,\ldots,a_n)M}\subsetneq\frac{M}{(a_1,\ldots,a_n)M}.$$
答案1
amssymb
我希望你已經在使用了。為什麼不查看amsmath
手冊(texdoc amsldoc
從命令提示字元/行)。它提供了許多輸入數學的環境。對於這兩個方程,您可以使用gather*
(無數字)。
\documentclass[11pt,openany]{book}
\usepackage{amsmath,amssymb,showframe} %% showframe for demo only
\begin{document}
\begin{gather*}
(a_1,\ldots,a_n)M\subset(a_1,\ldots,a_{n+m})M\subsetneq M,\\
(a_{n+1},\ldots,a_{n+m})\frac{M}{(a_1,\ldots,a_n)M}\simeq
\frac{(a_1,\ldots,a_{n+m})M}{(a_1,\ldots,a_n)M}\subsetneq\frac{M}{(a_1,\ldots,a_n)M}.
\end{gather*}
\end{document}
如果您有很長的方程,那麼您甚至可能更喜歡multline
環境。如果您使用mathtools
套件,它將amsmath
與擴充巨集一起自行載入。