enumitem 列表字体和大小

enumitem 列表字体和大小

如何为列表文本应用点大小、sffamily 字体和颜色,已经有列表标签选项,是否有任何方法可以使用 enumitem 包应用列表文本?请查看我的 MWE 文件:

\documentclass{book}
\usepackage{enumitem}
\usepackage{color}

\setlist[enumerate,1]{font={\rmfamily\bfseries\color{red}},labelsep=4.2pt,
leftmargin=*,itemsep=0pt,topsep=0pt,align=right,
parsep=0pt,partopsep=0pt,rightmargin=0pt,itemindent=0pt,}%widest=10.
}


\begin{document}

Emphasises that perception is an active experience of imposing order on
details by seeing them as parts of a larger whole.
\begin{enumerate}
\item[1.] The discipline of focuses on the relationship between observable behaviours and
environmental stimuli.
\item[2.] Emphasises that perception is an active experience of imposing order on
details by seeing them as parts of a larger whole.
\item[3.] Positive psychology was established in 1998 to focus specifically on people's virtues and
strengths (Peterson \& Seligman, 2004). Researchers in this field examine the traits that are associated
with life satisfaction and the predictors of healthy human functioning, then design interventions
to improve wellbeing.
\end{enumerate}

\end{document}

答案1

使用before此键是错误的 - 更改的字体大小将影响上一段的基线跳跃。正确的键是键first

\documentclass{book}
\usepackage{enumitem}
\usepackage{color}

\setlist[enumerate,1]{
                      before={\sffamily\itshape\color{blue}\footnotesize}
                      }


\begin{document}


Emphasises that perception is an active experience of imposing order on
details by seeing them as parts of a larger whole.

Emphasises that perception is an active experience of imposing order on
details by seeing them as parts of a larger whole.
\begin{enumerate}
\item[1.] The discipline of focuses on the relationship between observable behaviours and
environmental stimuli.
\end{enumerate}

\setlist[enumerate,1]{
                      first={\sffamily\itshape\color{green}\footnotesize}
                      }

Emphasises that perception is an active experience of imposing order on
details by seeing them as parts of a larger whole.

Emphasises that perception is an active experience of imposing order on
details by seeing them as parts of a larger whole.
\begin{enumerate}
\item[1.] The discipline of focuses on the relationship between observable behaviours and
environmental stimuli.
\end{enumerate}

\end{document}

在此处输入图片描述

相关内容