内联枚举内显示的方程式

内联枚举内显示的方程式

我想要一个具有内联枚举环境的证明。证明中给出了一个方程。我无法按照显示的方式写出该方程(我收到错误)。

如何在保持内联枚举环境的同时显示方程式?下面是 MWE。(有人能帮我添加一下输出图片吗?)

\documentclass[10pt]{amsart}

\usepackage{amsmath, amssymb, amsfonts, amsthm}
\usepackage[inline]{enumitem}

\theoremstyle{plain} 
\newtheorem{theorem}{Theorem}

\renewcommand{\labelenumi}{\normalfont{\bfseries (\alph{enumi})}}

\begin{document}
\title{Title}
\author{Author}
\date{\today}
\maketitle

Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. 

\begin{theorem}
Here is a theorem.
\begin{enumerate}
\item First.
\item Second.
\end{enumerate}
\end{theorem}
\begin{proof}
\begin{enumerate*}
\item Here is some text. Here is an equation: $a = b$. 
\item How do I make that equation displayed?
\end{enumerate*}
\end{proof}


\end{document}

答案1

您可以使用 enumitem 选项来实现这一点resume:中断枚举,插入显示,然后恢复枚举。但是您确定要使用内联枚举吗?

笔记:\setlist您可以使用命令来设置列表参数的值enumitem

\documentclass[10pt]{amsart}

\usepackage{amsmath, amssymb, amsfonts, amsthm}
\usepackage[inline]{enumitem}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\setlist[enumerate, 1]{label=\normalfont\bfseries (\alph*)}

\begin{document}
\title{Title}
\author{Author}
\date{\today}
\maketitle

Here is some text. Here is some text. Here is some text. Here is some text. Here is some text.

\begin{theorem}
  Here is a theorem.
  \begin{enumerate}
    \item First.
    \item Second.
  \end{enumerate}
\end{theorem}
\begin{proof}
  \begin{enumerate*}
    \item Here is some text. Here is an equation:\end{enumerate*}
    \[ a = b. \]
    \begin{enumerate*}[resume]
      \item How do I make that equation displayed?
      \item This way, for instance. %
    \end{enumerate*}
    \end{proof}
    \bigskip
    \begin{proof}
      \begin{enumerate}[wide = 0pt]
        \item Here is some text. Here is an equation:
              \[ a = b. \]
        \item How do I make that equation displayed?
        \item This way, for instance.
      \end{enumerate} \vspace*{-\baselineskip}%
    \end{proof}

\end{document} 

在此处输入图片描述

答案2

问题似乎是由以下inline选项引起的:枚举项。解决此问题的一种方法是定义一个“假”方程环境,将一些文本置于一行的中心位置\displaystyle。这样做会产生: 在此处输入图片描述

完整代码如下:

\documentclass[10pt]{amsart}

\usepackage{amsmath, amssymb, amsfonts, amsthm}
\usepackage[inline]{enumitem}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}

\renewcommand{\labelenumi}{\normalfont{\bfseries (\alph{enumi})}}

\newenvironment{myequation}% fake "displaystyle" environment
   {\newline\vspace{\abovedisplayskip}\hbox to \textwidth\bgroup\hss$\displaystyle}
   {$\hss\egroup\vspace{\belowdisplayskip}}

\begin{document}
\title{Title}
\author{Author}
\date{\today}
\maketitle

Here is some text. Here is some text. Here is some text. Here is some text. Here is some text.

\begin{theorem}
Here is a theorem.
\begin{enumerate}
\item First.
\item Second.
\end{enumerate}
\end{theorem}
\begin{proof}
\begin{enumerate*}
\item Here is some text. Here is an equation:
\begin{myequation}
 a = b.
\end{myequation}
\item How do I make that equation displayed?
\end{enumerate*}
\end{proof}

\end{document}

如果您也希望有编号方程式,请告诉我,我会进行修改,以便出现myequation*没有方程式编号的变体和myequation有方程式编号的变体。

相关内容