如何在 flalign* 环境中删除不必要的空间

如何在 flalign* 环境中删除不必要的空间

这是我第一次使用 TeX,我非常困惑为什么会发生这种情况。当我flalign*在环境中使用环境时enumerate,它会在项目编号 2 后留下换行符,而我真的很想让方程式与编号 2 在同一行开始,就像编号 1 一样。

\documentclass{article}
\date{}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{tikz}
\addtolength{\oddsidemargin}{-.875in}
\addtolength{\evensidemargin}{-.875in}
\addtolength{\textwidth}{1.75in}
\addtolength{\topmargin}{-.875in}
\addtolength{\textheight}{1.75in}


\begin{document}
\textbf{Question 3.6.}
\begin{enumerate}
\item $\mathcal{P}(\emptyset)=\{\emptyset\}$
\item\begin{flalign*}
\mathcal{P}\Big(\mathcal{P}\big(\mathcal{P}(\emptyset)\big)\Big)&=\mathcal{P}\Big(\mathcal{P}\big(\{\emptyset\}\big)\Big)&\\
\mathcal{P}\big(\{\emptyset\}\big)&=\big\{\emptyset ,\{\emptyset\}\big\}\\
\mathcal{P}\Big(\mathcal{P}\big(\mathcal{P}(\emptyset)\big)\Big)&=\mathcal{P}\big(\big\{\emptyset ,\{\emptyset\}\big\}\big)\\
&=\Big\{\emptyset , \{\emptyset\},\big\{\{\emptyset\}\big\}, \big\{\emptyset ,\{\emptyset\}\big\}\Big\}
\end{flalign*}
\end{enumerate}
\end{document}

在此处输入图片描述

任何帮助将不胜感激。

答案1

以下是一些偷懒的方法:

\documentclass{article}
\date{}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{tikz}
\addtolength{\oddsidemargin}{-.875in}
\addtolength{\evensidemargin}{-.875in}
\addtolength{\textwidth}{1.75in}
\addtolength{\topmargin}{-.875in}
\addtolength{\textheight}{1.75in}


\begin{document}
\textbf{Question 3.6.}
\begin{enumerate}
\setlength\abovedisplayskip{0pt}           %% new
\item $\mathcal{P}(\emptyset)=\{\emptyset\}$
\item \begin{minipage}[t]{\linewidth}      %% new
\vspace{-\baselineskip}
 \begin{flalign*}
\mathcal{P}\Big(\mathcal{P}\big(\mathcal{P}(\emptyset)\big)\Big)&=\mathcal{P}\Big(\mathcal{P}\big(\{\emptyset\}\big)\Big)&\\
\mathcal{P}\big(\{\emptyset\}\big)&=\big\{\emptyset ,\{\emptyset\}\big\}\\
\mathcal{P}\Big(\mathcal{P}\big(\mathcal{P}(\emptyset)\big)\Big)&=\mathcal{P}\big(\big\{\emptyset ,\{\emptyset\}\big\}\big)\\
&=\Big\{\emptyset , \{\emptyset\},\big\{\{\emptyset\}\big\}, \big\{\emptyset ,\{\emptyset\}\big\}\Big\}
\end{flalign*}
\end{minipage}                            %% new
\end{enumerate}
\end{document}

在此处输入图片描述

答案2

您使用的工具是错误的:您需要的是aligned

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}


\begin{document}
\textbf{Question 3.6.}
\begin{enumerate}
\item $\mathcal{P}(\emptyset)=\{\emptyset\}$
\item $\!\begin{aligned}[t]
  \mathcal{P}\Bigl(\mathcal{P}\bigl(\mathcal{P}(\emptyset)\bigr)\Bigr)&=
    \mathcal{P}\Bigl(\mathcal{P}\bigl(\{\emptyset\}\bigr)\Bigr)&\\
  \mathcal{P}\bigl(\{\emptyset\}\bigr)&=
    \bigl\{\emptyset ,\{\emptyset\}\bigr\}\\
  \mathcal{P}\Bigl(\mathcal{P}\bigl(\mathcal{P}(\emptyset)\bigr)\Bigr)&=
    \mathcal{P}\bigl(\bigl\{\emptyset ,\{\emptyset\}\bigr\}\bigr)\\
  &=\Big\{\emptyset , \{\emptyset\},\bigl\{\{\emptyset\}\bigr\}, 
    \bigl\{\emptyset ,\{\emptyset\}\bigr\}\Big\}
\end{aligned}$
\end{enumerate}
\end{document}

之前\!\begin{aligned}[t]讨论过为什么在“aligned”环境的开头有一个\,空格?

在此处输入图片描述

请注意\big\Big是错误的,您应该使用\bigl\Bigl作为打开的栅栏,并使用\bigr\Bigr作为关闭的栅栏。

相关内容