我目前正在尝试使用 enumitem 自定义枚举列表,并且取得了很大进展。我唯一没能做到的是更改标签的字体大小和字体本身。
这是我目前得到的
\documentclass[11pt, letter]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{enumitem}
\begin{document}
\small
\begin{enumerate}[leftmargin=0em, label=\arabic*, itemsep=0pt, parsep=0pt]
\item something
\item something else \newline
\end{enumerate}
\end{document}
我尝试添加一个\small
after label=
,但没有成功。有人能帮我吗?
提前感谢任何帮助! gerberli
答案1
您的代码将标签放入边距中,因为默认情况下,标签在(列表)左边缘右对齐)——我认为这不是您想要的。对于字体大小问题,您必须使用键font
。与其他两个代码进行比较:
\documentclass[11pt, letter]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[showframe]{geometry}
\usepackage{xcolor}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[leftmargin=0em, label=\arabic*, itemsep=0pt, parsep=0pt]
\item something
\item something else. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.
\end{enumerate}
\begin{enumerate}[wide=0em, label=\arabic*, itemsep=0pt, parsep=0pt, font=\small\bfseries\color{red}]
\item something
\item something else. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.
\end{enumerate}
Unless you want this:
\begin{enumerate}[wide=0em, leftmargin=*, label=\arabic*, itemsep=0pt, parsep=0pt, font=\small\bfseries\color{red}]
\item something
\item something else. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.
\end{enumerate}
\end{document}