在首字下沉中使用 `\scalebox`

在首字下沉中使用 `\scalebox`

我用它lettrine来创建首字下沉。

\scalebox如果在第一个参数中使用-command\lettrine则会发生错误。这是一个最小的例子:

\documentclass{minimal}

\usepackage{lettrine}
\usepackage{graphicx}

\begin{document}
\lettrine{A}{} This is a simple test. This is a simple test. This is a 
simple test. This is a simple test. This is a simple test. This is a 
simple test. This is a simple test. This is a simple test. This is a 
simple test. This is a simple test.

A\scalebox{.5}{A}

\lettrine{A\scalebox{.5}{A}}{} This is a simple test. This is a simple 
test. This is a simple test. This is a simple test. This is a simple 
test. This is a simple test. This is a simple test. This is a simple 
test. This is a simple test. This is a simple test.
\end{document}

以前使用 TeXLive 2017 时没有问题。现在使用 TeXLive 2018 时出现错误。

我使用lettrine2018-08-28 v2.21

答案1

只需保护\scalebox

\documentclass{minimal}

\usepackage{lettrine}
\usepackage{graphicx}

\begin{document}

\lettrine[nindent=0.33em]{A}{} This is a simple test. This is a simple test. This is a
simple test. This is a simple test. This is a simple test. This is a
simple test. This is a simple test. This is a simple test. This is a
simple test. This is a simple test.

A\scalebox{.5}{A}\medskip

\lettrine[nindent=0.33em]{A\protect\scalebox{.5}{A}}{This} is a simple test. This is a simple
test. This is a simple test. This is a simple test. This is a simple
test. This is a simple test. This is a simple test. This is a simple
test. This is a simple test. This is a simple test.

\end{document} 

在此处输入图片描述

相关内容