删除 flalign* 环境后的空格

删除 flalign* 环境后的空格

我正在努力摆脱文章文档中 flalign* 环境后的缩进。这是我所说的一个例子:

Lewis's approach also results in the following consequences:
{\setlength{\abovedisplayskip}{0pt}
{\setlength{\belowdisplayskip}{0pt}
\begin{flalign*}
    \textit{P(HEADS) } &= \textit{P(TAILS) } = \frac{1}{2} &\\
    \therefore P(H_1) &= \frac{1}{2} = P(T_1) + P(T_2) &\\
    \therefore P(T_1) &= P(T_2) = \frac{1}{4} &\\
    \therefore \frac{P(H_1)}{P(H_1) + P(T_1)} &= \frac{\frac{1}{2}}{\frac{1}{2}+\frac{1}{4}} = \frac{2}{3} &\\
    \therefore P_+(HEADS) &= \frac{2}{3} = P(HEADS) + \frac{1}{6} &\\
    \therefore P_+(TAILS) &= \frac{1}{3}
\end{flalign*}}}
In other words, after Sleeping Beauty learns that it is Monday, and therefore is no longer
subject to any of the uncertainties associated with the experiment, her credence that a fair
coin will land on HEADS in an upcoming toss is $\frac{2}{3}$, despite the objective chance of it landing 
HEADS being $\frac{1}{2}$. This is completely nonsensical.

在此处输入图片描述 我想删除 flalign* 环境之后文本前的缩进(“In”一词之前的小空格​​)。我尝试使用 \noindent。我的 .sty 文件中还有以下内容:

% No paragraph indenting
\setlength{\parindent}{0pt}

任何帮助将非常感激!

答案1

该空格是由于 之后的结束行造成的}}}

您可以添加%或删除它,但还有更好的方法。

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

\newenvironment{lewis}
 {%
  \setlength{\abovedisplayskip}{3pt}%
  \setlength{\belowdisplayskip}{3pt}%
  \begin{equation*}
  \begin{minipage}{\displaywidth}
  $\begin{aligned}
 }
 {%
  \end{aligned}$%
  \end{minipage}%
  \end{equation*}%
  \ignorespacesafterend
 }

\begin{document}

Lewis's approach also results in the following consequences:
\begin{lewis}
    P(\mathit{HEADS}) &= P(\mathit{TAILS})  = \frac{1}{2} \\
    \therefore P(H_1) &= \frac{1}{2} = P(T_1) + P(T_2) \\
    \therefore P(T_1) &= P(T_2) = \frac{1}{4} \\
    \therefore \frac{P(H_1)}{P(H_1) + P(T_1)} &=
      \frac{\frac{1}{2}}{\frac{1}{2}+\frac{1}{4}} = \frac{2}{3} \\
    \therefore P_+(\mathit{HEADS}) &= \frac{2}{3} = P(\mathit{HEADS}) + \frac{1}{6} \\
    \therefore P_+(\mathit{TAILS}) &= \frac{1}{3}
\end{lewis}
In other words, after Sleeping Beauty learns that it is Monday, and therefore is no longer
subject to any of the uncertainties associated with the experiment, her credence that a fair
coin will land on $\mathit{HEADS}$ in an upcoming toss is $\frac{2}{3}$, despite the objective 
chance of it landing $\mathit{HEADS}$ being $\frac{1}{2}$. This is completely nonsensical.

\end{document}

在此处输入图片描述

我稍微修改了一下代码,使其保持一致:\textit在数学环境中,你永远不需要括号以外的注释。如果你使用头部在公式中(斜体),在运行文本中也应该如此。

使用特定环境意味着如果您想修改它,例如在显示屏上方和下方添加标准间距(我看不出删除它的理由),您只需注释掉相关行并得​​到

在此处输入图片描述

无需在文件中追逐\abovedisplayskip

相关内容