更新答案

更新答案

有些文章的第一段的第一个单词或字母占据了两行或三行的空间。例如,它可能看起来像下面的图片(忽略规则)。有没有办法在 LaTeX 中做到这一点?谢谢!我没有找到任何类似的问题。如果这是重复的,请告诉我。

在此处输入图片描述

答案1

更新答案

下面演示的方法现在可以作为包使用,cfr 首字母来自 CTAN,包含在 TeX Live 中。该软件包提供 23 个.sty文件。每个文件都提供支持由以下语言提供的 23 种字体之一的 LaTeX 命令:首字母

[其中两种字体看起来完全相同或几乎完全相同。这不是我的错!]

然后您可以使用首字母莱特林cfr-initials通过加载相关包并使用和文档中说明的命令lettrine

以下示例演示了所有 23 种字体。显然,您不应该尝试在实际文档中将它们全部组合在一起!

23 个带有 <code>initials</code> 和 <code>cfr-initials</code> 的字母

演示代码

\documentclass[british,a4paper,12pt]{article}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lettrine}
\usepackage{microtype}
\usepackage[headheight=12pt,vscale=.95]{geometry}
\usepackage{parskip}
\usepackage{Acorn, AnnSton, ArtNouv, ArtNouvc, Carrickc, Eichenla, Eileen, EileenBl, Elzevier, GotIn, GoudyIn, Kinigcap, Konanur, Kramer, MorrisIn, Nouveaud, Romantik, Rothdn, Royal, Sanremo, Starburst, Typocaps, Zallman}
\makeatletter
\newcommand\lettrinetest[1]{% text is from the kantlipsum package
  \setcounter{DefaultLines}{3}%
  \renewcommand{\rmdefault}{fnc}%
  \gdef\fontlist{#1}%
  \@for \xx:=\fontlist \do {%
        %       \lettrinetest{\xx}
        \renewcommand\LettrineFontHook{\xx}%
        \lettrine{A}{s} any dedicated reader can clearly see, the Ideal of practical reason is a representation of, as far as I know, the things in themselves; as I have shown elsewhere, the phenomena should only be
        used as a canon for our understanding.}}
\makeatother
\pagestyle{empty}
\begin{document}

\lettrinetest{%
  \Royal,
  \Romantik,
  \ArtNouvfamily,
  \EileenBlfamily,
  \Zallmanfamily,
  \Sanremofamily,
  \Konanurfamily,
  \Starburstfamily,
  \Typocapsfamily,
  \ArtNouvcfamily,
  \Kinigcapfamily,
  \Kramerfamily
}
\clearpage
\lettrinetest{%
  \Acornfamily,
  \AnnStonfamily,
  \Elzevier,
  \Rothdnfamily,
  \Eichenlafamily,
  \MorrisInfamily,
  \Carrickcfamily,
  \Nouveaudfamily,
  \GoudyInfamily,
  \Eileenfamily,
  \GotInfamily
}
\end{document}

原始答案

.sty标准 TeX 发行版附带一组适用于字母的装饰性字体。除非您编写它们,否则它们没有文件,并且.fd文件不是根据标准架构命名的。

但是,如果您提供自己的.sty文件或等效代码,它们很容易用于此目的。

以下仅列举了 23 种可能性中的两种initials

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{fouriernc}
\usepackage{lettrine}
\input Typocaps.fd

\DeclareRobustCommand{\Typocapsfamily}{%
  \fontencoding{U}%
  \fontseries{xl}%
  \fontshape{n}%
  \fontfamily{Typocaps}%
  \selectfont}

\input Kramer.fd

\DeclareRobustCommand{\Kramerfamily}{%
  \fontencoding{U}%
  \fontseries{xl}%
  \fontshape{n}%
  \fontfamily{Kramer}%
  \selectfont}

\setcounter{DefaultLines}{3}

\begin{document}
  \renewcommand\LettrineFontHook{\Kramerfamily}
  \lettrine{A}{s} any dedicated reader can clearly see, the Ideal of practical reason is a representation of, as far as I know, the things in themselves; as I have shown elsewhere, the phenomena should only be
  used as a canon for our understanding.
  The paralogisms of practical reason are what first give rise to the architectonic of practical reason. As will easily be shown in the next section, reason would thereby be made to contradict, in view of these considerations, the Ideal of practical reason, yet the manifold depends on the phenomena.
  Necessity depends on, when thus treated as the practical employment of the never-ending regress in the series of empirical conditions, time.
  Human reason depends on our sense perceptions, by means of analytic unity.
  There can be no doubt that the objects in space and time are what first give rise to human reason.

  \renewcommand\LettrineFontHook{\Typocapsfamily}
  \lettrine{A}{s} any dedicated reader can clearly see, the Ideal of practical reason is a representation of, as far as I know, the things in themselves; as I have shown elsewhere, the phenomena should only be
  used as a canon for our understanding.
  The paralogisms of practical reason are what first give rise to the architectonic of practical reason. As will easily be shown in the next section, reason would thereby be made to contradict, in view of these considerations, the Ideal of practical reason, yet the manifold depends on the phenomena.
  Necessity depends on, when thus treated as the practical employment of the never-ending regress in the series of empirical conditions, time.
  Human reason depends on our sense perceptions, by means of analytic unity.
  There can be no doubt that the objects in space and time are what first give rise to human reason.
\end{document}

莱特林斯

相关内容