我怎样才能使 lettrine 与文本齐平对齐?

我怎样才能使 lettrine 与文本齐平对齐?

我用它lettrine来创建首字下沉。然而,这总是会产生排版问题。

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{erewhon}
\usepackage{lipsum}
\usepackage{lettrine}
\usepackage{GoudyIn}

\usepackage[x11names]{xcolor} 
\renewcommand{\LettrineFontHook}{\color{VioletRed4}\GoudyInfamily{}}
\LettrineTextFont{\itshape}
\setcounter{DefaultLines}{3}%

\begin{document}

\lettrine{I}{n} former days -- that is to say, once upon a time, there lived in the Land of Gramblamble, Seven Families. They lived by the side of the great Lake Pipple-popple (one of the Seven Families, indeed, lived in the Lake), and on the outskirts of the City of Tosh, which, excepting when it was quite dark, they could see plainly. The names of all these places you have probably heard of, and you have only not to look in your Geography books to find out all about them.

\end{document}

(代码来自如何在 LaTeX 中创建以书法首字母作为章节的文档?

问题

小型大写字母N与其下方的文本不对齐(ofPipple)。我希望它与文本齐平,如下图所示:

期望结果

第二个示例是使用此代码制作的,该代码使用了某个名为 的包yfonts

\documentclass{article}

\usepackage{yfonts,color}

\begin{document}

\yinipar{\color{red}L}orem ipsum [...]

\end{document}

这里,oremperdietametcursus与首字下沉完美对齐。首字下沉和其余文本之间没有“河流”( 上也没有小型大写字母orem,但我不在乎)。

我怎样才能使它lettrine更像第二幅图,没有河流并且所有文本都正确对齐?

不起作用的事情:

\lettrine{I}{}n     % n is still not flush
\lettrine{I}{} n    % still not flush

答案1

您可能希望将 Nindent 设置为 0pt,并将 Findent 设置为大于零的值:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{erewhon}
\usepackage{lipsum}
\usepackage{lettrine}
\usepackage{GoudyIn}

\usepackage[x11names]{xcolor}
\renewcommand{\LettrineFontHook}{\color{VioletRed4}\GoudyInfamily{}}
\LettrineTextFont{\itshape}
\setcounter{DefaultLines}{3}
\setlength{\DefaultNindent}{0pt}
\setlength{\DefaultFindent}{1pt}

\begin{document}

\lettrine{I}{n} former days -- that is to say, once upon
a time, there lived in the Land of Gramblamble, Seven Families. They
lived by the side of the great Lake Pipple-popple (one of the Seven
Families, indeed, lived in the Lake), and on the outskirts of the City
of Tosh, which, excepting when it was quite dark, they could see plainly.
The names of all these places you have probably heard of, and you have
only not to look in your Geography books to find out all about them.

\end{document}

在此处输入图片描述

相关内容