4

How to apply point size, sffamily font and color for list text, already have option for List label, is there any way proper way for applying list text using enumitem package? Please find my MWE file:

\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

1 Answer 1

5

Using the before key for this is wrong - the changed font size will affect the baselineskip of previous paragraph. The correct key is the first key:

\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}

enter image description here

2
  • What if I want to change the stretch (i.e. \setstretch{1}) within enumerate but want the spacing above the list to remain the same as before? I can't figure out how to do it, since first=\setstretch{1} affects that.
    – user21820
    Apr 7, 2022 at 21:42
  • @cfr, your answer (+1) solve my problem how to reduce font size in the second level of itemize list. Sinceat the same time I like to have smaller stretch in list I solve this by before={\small\linespread{0.88}\selectfont} . So far this to me work fine.
    – Zarko
    Apr 28 at 13:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .