考虑一下代码
\documentclass[10pt,openany]{book}
\usepackage{enumitem,xcolor}
\usepackage[showframe,margin=.5in,paperwidth=4in,paperheight=6in]{geometry}
\textheight=4.95in \textwidth 3.00in
\usepackage[sfdefault]{cabin}
\usepackage{mathptmx} % replaces obsolete times package.
\usepackage{xparse}
\definecolor{granite}{RGB}{103,103,103}
\newlist{advice}{enumerate}{1}
\setlist[advice]{
label=\formatadvicenumber{\textbf{\color{granite}\arabic*}},
ref=\arabic*,
leftmargin=1.25em,
labelsep=.55em,
itemsep=1.00em,
wide=0pt, % Prevents numbers from entering the left-hand margin.
resume,
}
\NewDocumentCommand{\formatadvicenumber}{m}{%
\raisebox{\dimexpr1.35\ht\strutbox-\height}[0pt][0pt]{\LARGE #1}%
}
\usepackage{scalefnt}
\newcommand{\longemdash}{{\fontfamily{cmss}\selectfont---}}
\newcommand{\funnyquoteEN}[2]{%
\par{\parindent=0pt #1\par}\nopagebreak
\vspace*{-7pt}\hspace*{\fill}\longemdash\fontfamily{qtm}\selectfont\textit{\textbf{#2}}%
}
\newcommand{\funnyquote}[2]{%
\par\scalefont{1.0}{#1}\\[-10.5pt]\hspace*{\fill}\longemdash{\fontfamily{qtm}\selectfont\textit{\textbf{#2}}}%
}
\setlength\itemsep{4em}
\begin{document}
\thispagestyle{empty}
\begin{advice}
\item \funnyquote{A quote}{Author}
\item \funnyquote{A quote}{Author}
\item
\funnyquoteEN{
\begin{enumerate}
\item Item 1
\item Item 2
\end{enumerate}}{Author}
\item \funnyquote{A quote}{Author}
\end{advice}
\end{document}
产生
问题:为什么第四项(引文部分)没有显示舱字体和以前一样吗?
评论:
在代码中,我定义了两个引用命令:\fancyquote
这里生成第 1、第 2 和第 4 项;\funnyquoteEN
处理enumerate
引用内的环境---在 MWE 显示中生成第三项。
并且,我将这两者都包含在“\advice”枚举中,该枚举在一般枚举中产生大而奇特的项目编号。