72

Books often have a special letter (often spanning two lines) at the beginning of chapters. How can I create this in LaTeX?

5 Answers 5

52

The LaTeX Companion suggests looking at the lettrine package. However the usage seems to be a bit complicated and you need suitable fonts.

If you also accept fraktur letters, then the yfonts package has a very easy solution:

\documentclass{article}

\usepackage{yfonts,color}

\begin{document}

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

\end{document}

This results in yinipar example. The Companion suggests setting the paragraph with \fraklines to get better spacing. See what you like better.

2
  • 2
    Now one just needs to redefine \chapter to gobble up the space until the next paragraph and re-insert the space into the token stream, followed by \yinipar. Any takers? Aug 1, 2010 at 19:20
  • 2
    This answer will not work anymore. Due to licensing issues, you have to download the files manually here: ctan.org/pkg/yinit-as.
    – M.R.
    Dec 31, 2017 at 7:49
58

I found the lettrine package easy to use while also having customization options. The documentation is available at ctan. Using XeLaTeX, all fonts are available. The usual syntax is:

\usepackage{lettrine}
...
\lettrine[lines=2]{S}{tart} of the chapter

You can use color as well:

\lettrine[lines=4]{\color{BrickRed}S}{tart} of the chapter

I found that the package doesn't work well with verse. Sample: enter image description here

5
  • whats the name of the font you used for that example? Aug 5, 2012 at 12:37
  • @jstr I don't remember. It looks like it might be Adobe Caslon.
    – ipavlic
    Aug 5, 2012 at 18:02
  • thanks for your answer, i guess its another one the S has another kind of serif :-) Aug 5, 2012 at 18:30
  • The font is Minion Pro
    – Polizi8
    Mar 29, 2021 at 13:32
  • But the title of the question was asking for a calligraphic letter, which this doesn't quite do.
    – Teepeemm
    Sep 4, 2021 at 22:07
28

This is probably wrong in so many ways, but it was fun to do :-)

\documentclass{minimal}
\font\Cal=cmsy10 at 25pt
\textwidth=.5\textwidth
\def\pstart#1{\noindent\smash{\lower3ex\hbox{\llap{\Cal#1}}\hskip-.2em}
  \parshape=3 1.5em \dimexpr\hsize-1.5em 2em \dimexpr\hsize-2em 0pt \hsize}
  % \parshape x (=number of lines) y (=amount of indent) i (=textwidth) [yi, yi,...]
\begin{document}
\pstart Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus leo felis, ultrices a pretium non, porttitor eget ante. Nunc varius mattis consequat. Praesent interdum, libero quis pulvinar sollicitudin, risus est mollis nulla, ac dignissim eros nibh eget eros. Quisque molestie, turpis quis eleifend gravida, velit elit adipiscing libero, at accumsan ipsum libero a risus. Nunc fermentum pulvinar pellentesque.

\pstart Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aliquam imperdiet ultrices vehicula. Quisque tellus dui, ullamcorper non accumsan vel, tincidunt in nisi. Praesent sit amet risus at lorem egestas vulputate eget vitae sem. Suspendisse lobortis convallis nulla non suscipit. Proin at felis sapien. Vivamus eleifend, diam in hendrerit vestibulum, risus est rutrum tortor, in tincidunt tellus mauris eu ante.

\pstart Donec in leo nunc. Donec facilisis consectetur venenatis. Nam aliquet ipsum quis massa sagittis hendrerit. Fusce mattis nibh et dolor consequat ac pretium nisi ultrices. Vivamus pellentesque adipiscing gravida. Aliquam pellentesque urna eu eros egestas adipiscing. Sed vestibulum pharetra mauris ut eleifend. Praesent et urna a dui eleifend consequat non in odio. Fusce vestibulum dolor at mauris tristique facilisis rhoncus et augue.
\end{document}

enter image description here

5
  • 3
    It's cool to see the effect without needing a package.
    – Gambhiro
    Nov 12, 2011 at 15:59
  • @morbusg great job, can you explain me the order \font\Cal=cmsy10 at 25pt?
    – juanuni
    May 25, 2015 at 4:55
  • @juanuni It's a font loading primitive, loading the 10-point Computer Modern symbols font at 25pt. But the example really ought to use LaTeX font loading system; I'll try and remember to update it.
    – morbusg
    May 31, 2015 at 12:58
  • Thanks a lot, I have a response about that, but is too long for write here. Regards.
    – juanuni
    May 31, 2015 at 13:41
  • In my multicol document it changes the width of the page layout
    – G M
    Jun 29 at 16:34
17

I want to add that the cfr-initials package offers support for the initials set of fonts, and works well with lettrine. The documentation includes a sample of each of the 23 ornamental fonts in the initials set. Here is a demo with one of them:

\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}

enter image description here

5
  • (+1) ;) Perhaps you could add that the documentation includes examples using it with lettrine? Also, you have lost a back tick for lettrine.
    – cfr
    Jul 22, 2015 at 23:40
  • @cfr: Done! Sorry for having forgotten to mention it. I had just taken a look at it to find one that would suit (to my taste) the beginning of Edward Lear's Seven families…, and hesitated with William Morris's font.
    – Bernard
    Jul 22, 2015 at 23:48
  • 1
    I'm glad somebody finds it useful. I had some doubts as it seemed too trivial to be worth CTAN's space.
    – cfr
    Jul 22, 2015 at 23:52
  • What should I do if I want to keep the body font lmodern?
    – user79095
    Feb 14, 2016 at 4:16
  • 2
    @user170039: Simply replace \usepackage{erewhon} (a font extending Adobe Utopia) with usepackage{lmodern}.
    – Bernard
    Feb 14, 2016 at 12:30
11

I agree with the suggestion to use the lettrine package and the yfonts (actually the s-yfonts) package. In fact, I used both together when I typeset The Wizard of Oz as a gift for my wife:

%% The s-yfonts package is nearly the same as the yfonts package found
%% on CTAN.  The main difference is that s-yfonts allows free scaling
%% to any size.
\usepackage{s-yfonts}
%% Use the Schwabacher black-letter family for titling
\newcommand{\titlefont}{\swabfamily}

\usepackage{lettrine}
\renewcommand{\LettrineFontHook}{\titlefont}

The lettrine package has an awkward interface, so I built a pair of macros that were easier to use in my opinion:

\def\LettrineWord#1#2 {\lettrine{#1}{#2} }

\newcommand*{\Lettrine}[2][]{
  \def\tmp##1##2 {\lettrine[#1]{##1}{##2} }
  \tmp#2
}

Here's how to use the \Lettrine macro:

\Lettrine{While} the Woodman was making a ladder from wood which he
found in the forest Dorothy lay down and slept, for she was tired by
the long walk.  The Lion also curled himself up to sleep and Toto lay
beside him.

It seems I didn't end up using the \LettrineWord macro, but I recall my original plan was to add it to the definition of the \chapter macro in order to make the first word of a chapter automatically have a drop cap. I think I decided against it because I needed to change one of the chapters to use a different font:

%% I much prefer the Fraktur `D'.  I really should have a virtual font
%% to do this automatically.

\lettrine{\frakfamily 
D}{orothy} lived in the midst of the great
Kansas prairies, with Uncle Henry, who was a farmer, and Aunt Em, who
was the farmer's wife.  Their house was small, for the lumber to build
...

I've been asked privately what the s-yfonts package might be. As it turns out, it must have been my own modification since I can't find any information about it online myself. The vanilla yfonts package includes commands such as:

\DeclareFontFamily{LYG}{ygoth}{}
\DeclareFontShape{LYG}{ygoth}{m}{n}{%
<10><10.95><12><14.4><17.28><20.74><24.88>ygoth}{}

From what I recall, that limits the possible font sizes to those specified. Since I wanted to play around with different sizes I needed fonts that freely scaled. Therefore, my s-yfonts modification rewrote the lines to look like:

\DeclareFontFamily{LYG}{ygoth}{}
\DeclareFontShape{LYG}{ygoth}{m}{n}{<-> ygoth}{}

It also added:

\usefont{LYG}{\gothdefault}{m}{n}

to select the Gothic font at the end of the style file. Details of these commands may be found in the font selection guide.

1
  • 1
    In the Lettrine macro, I removed the last space from {\lettrine[#1]{##1}{##2}}. Otherwise, I was getting an extra space after the first word. But I definitely like your macro over the original macro.
    – Teepeemm
    Sep 4, 2021 at 22:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.