![边距中的 \item 命令的可选参数:这种行为正常吗?](https://linux22.com/image/310319/%E8%BE%B9%E8%B7%9D%E4%B8%AD%E7%9A%84%20%5Citem%20%E5%91%BD%E4%BB%A4%E7%9A%84%E5%8F%AF%E9%80%89%E5%8F%82%E6%95%B0%EF%BC%9A%E8%BF%99%E7%A7%8D%E8%A1%8C%E4%B8%BA%E6%AD%A3%E5%B8%B8%E5%90%97%EF%BC%9F.png)
下面的代码
\documentclass{article}
\begin{document}
\begin{itemize}
\item[A very long line that will be in the margin of my document]
This is a test
\end{itemize}
\end{document}
生产
但文件中没有警告log
(没有任何过满的框)。
- 是否有任何机制可以确保可选字段中的文本
item
被打印? - 在页边空白处写上某个项目的图例或介绍,这种做法是否可以接受?
答案1
这是因为列表的物理构造方式:标签框在列表左边距,具有命令的效果\llap{labelbox}
。
解决方案在于设置align=left
密钥enumitem
包中设置密钥并抑制标签缩进页左边距:
\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{enumitem}
\begin{document}
\mbox{}
\vskip1cm
\begin{itemize}[align = left]
\item[A very long line that will be in the margin of my document]
This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test.
\item A normal item.
\end{itemize}
\end{document}