lettrine 包的句子對齊錯誤

lettrine 包的句子對齊錯誤

我想將兩個句子中的兩個起始詞相互對齊(第一行中的“ROM”與第二行中的“may”)

在此輸入影像描述

我怎麼能這麼做呢?這是工作代碼:

\usepackage{lettrine}
\begin{document}
\lettrine[lines=2]{\textbf{F}}{rom} they fine john he give of rich he. They age and draw  mrs like. Improving end distrusts may instantly was household applauded incommode. Why kept very ever home mrs. Considered sympathize ten uncommonly occasional assistance sufficient not. Letter of on become he tended active enable to. Vicinity relation sensible sociable surprise screened no up as.

\end{document} 

使用fix-cm套件後

\documentclass[a4paper,11pt]{report}
\usepackage{lettrine}
\usepackage{fix-cm}
\begin{document}
\lettrine[lines=2]{\textbf{F}}{rom} they fine john he give of rich he. They age and draw  mrs like. Improving end distrusts may instantly was household applauded incommode. Why kept very ever home mrs. Considered sympathize ten uncommonly occasional assistance sufficient not. Letter of on become he tended active enable to. Vicinity relation sensible sociable surprise screened no up as.
  \end{document} 

在此輸入影像描述

但仍有兩個字(ROM 和Improving)沒有對齊。

答案1

為了工作,lettrine需要一組完全可縮放的字體。由於歷史原因,預設的 Computer Modern 不是。

您可以透過加載使它們完全可擴展fix-cm

\RequirePackage{fix-cm} % should be here
\documentclass{article}

\usepackage{setspace}
\usepackage{lettrine}

\setlength{\DefaultNindent}{0pt} % read the doc about it
\onehalfspacing

\begin{document}

\lettrine[lines=2]{\textbf{F}}{rom} they fine john he give of rich he. They age and draw
mrs like. Improving end distrusts may instantly was household applauded incommode. Why kept
very ever home mrs. Considered sympathize ten uncommonly occasional assistance sufficient
not. Letter of on become he tended active enable to. Vicinity relation sensible sociable
surprise screened no up as.

\end{document}

在此輸入影像描述

或者,添加\usepackage{lmodern}.

答案2

我認為,您還應該使用提供的內容\LettrineFontHook來指定刪除資本的系列。也就是說,我的解決方案非常像艾格格的但有一點不同:

\documentclass[a4paper,11pt]{report}
\usepackage{lettrine}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\renewcommand\LettrineFontHook{\bfseries}
\setlength{\DefaultNindent}{0pt}
\begin{document}
  \lettrine[lines=2]{F}{rom} they fine john he give of rich he. They age and draw  mrs like. Improving end distrusts may instantly was household applauded incommode. Why kept very ever home mrs. Considered sympathize ten uncommonly occasional assistance sufficient not. Letter of on become he tended active enable to. Vicinity relation sensible sociable surprise screened no up as.
\end{document}

對齊的字母

相關內容