1

Is it possible to define the text of the second levels in lists of itemize- and/or enumerate-environments to be set with \small without having to write that command for each instance?

And it is possible to implement that definition as a switch in the document perhaps, i.e. that at one point, the small can be switched back to normalsize?

I used enumitem for the MWE and as far as I can tell, it strictly relates to the label of an item instance:

enter image description here

Picture of MWE/Problem

enter image description here

MWE

% !TeX spellcheck = en_Us

\documentclass[
a4paper,
DIV=15,
fontsize=10pt,
]{scrartcl}

\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{
lmodern,
enumitem,
xcolor
}

\setitemize{noitemsep,nosep}%,labelindent=1em,leftmargin=1em}
\setlist[itemize,1]{label=\textcolor{black!60!white}{$ \bullet $}}
\setlist[itemize,2]{label=-,leftmargin=1.2em, font=\small}
\setlist[itemize,3]{label=\textbullet,leftmargin=1.2em}

\listfiles

\begin{document}

Here are some words to form some random text.
\begin{itemize}
    \item The quick brown fox jumps over the lazy dog.
    \item The following contents are written with \verb|\begin{itemize}\small|:
    \begin{itemize}\small
        \item It works, but it should automatically be typeset in \verb*|\small|, without having to define that command.
        \item Again the thing with the quick brown fox.
    \end{itemize}
    \item Another example without \verb|\small| after \verb|\begin{itemize}|in the \LaTeX{} code.
        \begin{itemize}
            \item This is not small.
            \item It is normal-sized.
        \end{itemize}
\end{itemize}
\end{document}
2
  • before=\small should work. Jun 5 at 12:50
  • @UlrikeFischer That works. If you post your comment as an answer, I could mark it as solved. :)
    – henry
    Jun 5 at 13:16

1 Answer 1

2

You can use the before key:

\setlist[itemize,2]{label=-,leftmargin=1.2em, before=\small}

You must log in to answer this question.

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