![如何获取正确缩进的自定义枚举列表(带有清单样式的空白)?](https://linux22.com/image/262900/%E5%A6%82%E4%BD%95%E8%8E%B7%E5%8F%96%E6%AD%A3%E7%A1%AE%E7%BC%A9%E8%BF%9B%E7%9A%84%E8%87%AA%E5%AE%9A%E4%B9%89%E6%9E%9A%E4%B8%BE%E5%88%97%E8%A1%A8%EF%BC%88%E5%B8%A6%E6%9C%89%E6%B8%85%E5%8D%95%E6%A0%B7%E5%BC%8F%E7%9A%84%E7%A9%BA%E7%99%BD%EF%BC%89%EF%BC%9F.png)
我正在尝试制作一个如下所示的枚举清单:
Paragraph text here that says really cool stuff. Notice how the list after is
properly indented
___ 1. Thing 1
___ 2. Thing 2
___ 3. Thing 3
And the paragraph afterward, with good margins
这个(虽然很麻烦)已经很接近了,但由于某种原因,边缘变得混乱:
Paragraph text that says really cool stuff.
\begin{enumerate}
\item[\underline{\hspace{0.5in}} 1.]
\item[\underline{\hspace{0.5in}} 2.]
\item[\underline{\hspace{0.5in}} 3.]
\end{enumerate}
And the paragraph after.
输出如下所示:
Paragraph text here that says really cool stuff. Notice how the list after is
NOT PROPERLY INDENTED
___ 1. Thing 1
___ 2. Thing 2
___ 3. Thing 3
And the paragraph after.
我摆弄了一下enumitem
,但我也有同样的边距问题。你能告诉我我做错了什么吗?
答案1
我又尝试了enumitem
一下。尝试一下
\documentclass{article}
\usepackage[textwidth=3in]{geometry} % so shorter lines wrap
\usepackage{enumitem}
\begin{document}
Some text - a long line so that it wraps and we see the paragraph
indentation
\begin{enumerate}[itemindent=0.5in,
label=\underline{\hspace{0.5in}}\arabic{*}.]
\item Thing 1
\item Thing 2
\item Thing 3
\end{enumerate}
More text, indented as the start of a paragraph. Long enough to wrap.
\end{document}
这itemindent
是硬编码,有点丑陋,并且在某些情况下可能不够强大。
您可以将其包装enumerate
在您自己的环境中,以免剪切和粘贴项目选项。