ntheorem 中的 Easylist

ntheorem 中的 Easylist

我想在 ntheorem 环境中使用 easylist。但它不会缩进嵌套列表。

裁剪后的 PDF: 裁剪的 PDF 最小示例:

\documentclass[a4paper]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{ntheorem}
\usepackage[ampersand]{easylist}

% ntheorem config
\theoremstyle{break}
\theoremheaderfont{\normalfont\bfseries\large}
\theorembodyfont{\normalfont}
\theoremseparator{\medskip}
\theorempostskip{\topsep\medskip}
\newtheorem{exercise}{Excercise}


\begin{document}

Outside theorem

\begin{easylist}[itemize]
& Main item~:
&& Sub item.
&&& Another sub item.
\end{easylist}


\begin{exercise}

Inside theorem

\begin{easylist}[itemize]
& Main item~:
&& Sub item.
&&& Another sub item.
\end{easylist}

\end{exercise}

\end{document}

答案1

一个解决方法是将其包含easylistminipage定理/练习中:

示例输出

\documentclass[a4paper]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{ntheorem}
\usepackage[ampersand]{easylist}

% ntheorem config
\theoremstyle{break}
\theoremheaderfont{\normalfont\bfseries\large}
\theorembodyfont{\normalfont}
\theoremseparator{\medskip}
\theorempostskip{\topsep\medskip}
\newtheorem{exercise}{Excercise}


\begin{document}

Outside theorem

\begin{easylist}[itemize]
& Main item~:
&& Sub item.
&&& Another sub item.
\end{easylist}


\begin{exercise}

Inside theorem

\noindent
\begin{minipage}[t]{1.0\linewidth}
  \begin{easylist}[itemize]
    & Main item~:
    && Sub item.
    &&& Another sub item.
  \end{easylist}
\end{minipage}
\end{exercise}

\end{document}

相关内容