MWE/问题的图片

MWE/问题的图片

是否可以定义要设置的逐项列举和/或枚举环境列表中的第二级文本,而\small不必为每个实例编写该命令?

也许可以将该定义作为文档中的开关来实现,也就是说,在某一时刻,可以small切换回normalsize

我用了枚举项对于 MWE 来说,据我所知,它与项目实例的标签严格相关:

在此处输入图片描述

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}

答案1

您可以使用以下before密钥:

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

相关内容