在定理环境中枚举对齐

在定理环境中枚举对齐

我一直在尝试在定理环境内的枚举环境内获取对齐环境。这是我的 MWE:

\documentclass[12pt,a4paper,oneside]{report}
\usepackage[left=2.00cm,right=2.00cm,top=2.45cm,bottom=2.5cm]{geometry}
\usepackage{amsmath,amssymb,amscd,color,enumitem}
\usepackage{fancyhdr,framed,latexsym,multicol,pstricks,slashed,xcolor}
\usepackage[amsmath,framed,thmmarks]{ntheorem}
\pagestyle{fancy}

\newtheorem{Theorem}{Theorem}

\theoremclass{Theorem}
\theoremstyle{break}
\theoreminframepreskip{0pt}
\theoreminframepostskip{0pt}
\theoremframepreskip{1cm}
\theoremframepostskip{1cm}
\theoremstyle{break}
\def\theoremframecommand{%
\psshadowbox[fillstyle=solid,fillcolor=blue,linecolor=black]}
\newshadedtheorem{them}[Theorem]{Theorem}

\theoremstyle{change}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\ast}}
\theoremseparator{}
\newtheorem{exam}{Example}

\title{Calculus Notes}
\author{}
\date{\today}
\begin{document}
\maketitle

\chapter{Limits}

\begin{exam}
\item \begin{align*}
    \lim\limits_{x\to c}(x^3+4x^2-3) &= \lim\limits{x\to c}x^3+4\lim\limits_{x\to c}x^2-\lim\limits_{x\to c}3\\
    &=c^3+4c^2-3
        \end{align*}

\item \begin{align*}
    \lim\limits_{x\to c}\dfrac{x^4+x^2-1}{x^2+5} &=     \dfrac{\lim\limits_{x\to c}(x^4+x^2-1)}{\lim\limits_{x\to c}(x^2+5)}\\
    &=\dfrac{c^4+c^2-1}{c^2+5}
       \end{align*}
\end{exam}

\end{document}

编译正常,但在示例环境中没有编号。

答案1

我定义了一个eqenumerate环境,如果我理解得没错的话,它可以做你想做的事。当然,\item后面必须有一个显示方程的环境。你可能需要进行一点垂直调整。

顺便说一句,您不必加载color,也xcolor不必加载pstricks

\documentclass[12pt,a4paper,oneside]{report}
\usepackage[left=2.00cm,right=2.00cm,top=2.45cm,bottom=2.5cm]{geometry}
\usepackage{amsmath,amssymb,amscd,enumitem}
\usepackage{fancyhdr,framed,latexsym,multicol,pstricks,slashed}
\usepackage[amsmath,framed,thmmarks]{ntheorem}
\pagestyle{fancy}

\newtheorem{Theorem}{Theorem}

\theoremclass{Theorem}
\theoremstyle{break}
\theoreminframepreskip{0pt}
\theoreminframepostskip{0pt}
\theoremframepreskip{1cm}
\theoremframepostskip{1cm}
\theoremstyle{break}
\def\theoremframecommand{%
\psshadowbox[fillstyle=solid,fillcolor=blue,linecolor=black]}
\newshadedtheorem{them}[Theorem]{Theorem}

\theoremstyle{change}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\ast}}
\theoremseparator{}
\newtheorem{exam}{Example}

\title{Calculus Notes}
\author{}
\date{\today}

\usepackage{etoolbox}
\newlist{eqenumerate}{enumerate}{1}
\setlist[eqenumerate,1]{label =\arabic*. , wide=1em, before={\leavevmode\setlength\abovedisplayskip{0pt}\apptocmd{\item}{\mbox{}\vspace{-\baselineskip}}{}{}}}   %

\begin{document}
\maketitle

\chapter{Limits}

\begin{exam}
  \begin{eqenumerate}
    \item \begin{align*}
    \lim\limits_{x\to c}(x^3+4x^2-3) &= \lim\limits{x\to c}x^3+4\lim\limits_{x\to c}x^2-\lim\limits_{x\to c}3\\
    &=c^3+4c^2-3
    \end{align*}
    \item\vspace*{-1.75ex} \begin{align*}   \lim_{x\to c}\dfrac{x^4+x^2-1}{x^2+5} &=   \dfrac{\lim\limits_{x\to c}(x^4+x^2-1)}{\lim\limits_{x\to c}(x^2+5)} \\
    &=\dfrac{c^4+c^2-1}{c^2+5}
    \end{align*}
  \end{eqenumerate}
\end{exam}

\end{document}

在此处输入图片描述

相关内容