考虑以下 MWnotE:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{mdframed} % noteboxes, boxes, etc.
\newmdenv{notebox}
\begin{document}
\section{Cats}
Here is an important theorem.
\begin{notebox}
Let $X$ be a graph with $k$ vertices. Then, the earth is flat.
\begin{proof}
It suffices to show that the following conditions hold:
\begin{itemize}
\item[Closure.]
\begin{equation*}
0/0 = 0
\end{equation*}
\end{itemize}
\end{proof}
\end{notebox}
\end{document}
它产生如下输出:
我该如何解决?
答案1
类似于koleygr
的想法,但是使用和的labelsep=0pt
自动调整以及通过的删除itemize标签。\leftmargin
leftmargin=*
enumitem
label={}
这也可以用\newlist
and来完成。\setlist
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{mdframed} % noteboxes, boxes, etc.
\usepackage{enumitem}
\newmdenv{notebox}
\begin{document}
\section{Cats}
Here is an important theorem.
\begin{notebox}
Let $X$ be a graph with $k$ vertices. Then, the earth is flat.
\begin{proof}
It suffices to show that the following conditions hold:
\begin{itemize}[label={},labelsep=0pt,leftmargin=*]
\item Closure.
\begin{equation*}
0/0 = 0
\end{equation*}
\item Foo
\end{itemize}
\end{proof}
\end{notebox}
\begin{notebox}[innerleftmargin=2cm]
Let $X$ be a graph with $k$ vertices. Then, the earth is flat.
\begin{proof}
It suffices to show that the following conditions hold:
\begin{itemize}[label={},labelsep=0pt,leftmargin=*]
\item Closure.
\begin{equation*}
0/0 = 0
\end{equation*}
\end{itemize}
\end{proof}
\end{notebox}
\end{document}
答案2
编辑:我甚至可以比@ChristianHupfer 做得更好,但不想清楚地表明我有多好:P ...所以,只是把这种不优雅但简单的方法作为“可行的解决方案”。
一种解决方案是使用enumitem
的leftmargin
选项,例如:
\documentclass{article}
\usepackage{enumitem}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{mdframed} % noteboxes, boxes, etc.
\newmdenv{notebox}
\begin{document}
\section{Cats}
Here is an important theorem.
\begin{notebox}
Let $X$ be a graph with $k$ vertices. Then, the earth is flat.
\begin{proof}
It suffices to show that the following conditions hold:
\begin{itemize}[leftmargin=40pt]
\item[Closure.]
\begin{equation*}
0/0 = 0
\end{equation*}
\end{itemize}
\end{proof}
\end{notebox}
\end{document}