2

As you can see, it should spread out over several lines, but does not:

enter image description here

MWE, the output is the same with xelatex and pdflatex.

\documentclass{article}
%%Lettrine
\usepackage{lettrine}
% lettrine formatting
\setlength{\DefaultNindent}{0em}
\setcounter{DefaultLines}{3}
%\input Romantik.fd
\input Zallman.fd
\newcommand*\initialsfamily{\usefont{U}{Zallman}{xl}{n}}
\renewcommand{\LettrineFontHook}{\initialsfamily}
\begin{document}

\lettrine{T}{his is a test of the lettrine package, designed to show how it fails to insert line breaks.} What can be done about this?

\end{document}

I should add that my installation is a bit of a mess, which might have something to do with this.

3
  • 1
    That's the default behaviour, the second argument of lettrine is placed in a normal hbox. It is not meant for long text. Commented Jul 18, 2017 at 12:07
  • I would not normally use it for a long text, but I am being told it is a convention for fairy tales to have the entire first sentence in small caps, and I am typesetting a fairy tale. Commented Jul 18, 2017 at 12:13
  • It would certainly give a nice old-fashioned look, but this is by no means a universal rule for fairy tales looking at some sample images (especially this page; many examples aren't real scans of old fairy tales). So it seems to me you have a choice
    – Chris H
    Commented Jul 18, 2017 at 14:27

2 Answers 2

4

A simple empty second argument followed by \textsc works nicely

\lettrine{T}{}\textsc{his is a test of the lettrine package, designed to show how it fails to insert line breaks.} What can be done about this?

So all we need is a wrapper for this:

\documentclass{article}
%%Lettrine
\usepackage{lettrine}
% lettrine formatting
\setlength{\DefaultNindent}{0em}
\setcounter{DefaultLines}{3}
\input Zallman.fd
\newcommand*\initialsfamily{\usefont{U}{Zallman}{xl}{n}}
\renewcommand{\LettrineFontHook}{\initialsfamily}

%this is the new stuff
\let\oldlettrine\lettrine
\renewcommand{\lettrine}[2]{\oldlettrine{#1}{}\textsc{#2}}

\begin{document}

\lettrine{T}{his is a test of the lettrine package, designed to show how it fails to insert line breaks.} What can be done about this?

\end{document}

Now it works

0

Try with this code:

 \documentclass{book}
\usepackage{lettrine}

\makeatletter
\newcommand{\dropcap}[2]{\lettrine[lines=2,nindent=\z@,loversize=0.15]{\bf#1}{#2}}%
\makeatother

\begin{document}

\dropcap{I}{nternational} Test That is the theory put forth in "Amelia Earhart: The Lost Evidence," a two-hour documentary airing Sunday at 9 p.m. EDT on the History channel. It uncovers records, including this newly revealed photograph that shows what may be a healthy Earhart along with her navigator Fred Noonan, after they were last heard from.

\end{document}
4
  • Can't get that to work, I get ! Undefined control sequence.. Commented Jul 18, 2017 at 12:02
  • I have modified my answer, pl check it now...
    – MadyYuvi
    Commented Jul 18, 2017 at 12:05
  • 1
    Why not simply nindent=0pt? Also, you should use \bfseries, bf has been deprecated for more than 20 years.
    – Bernard
    Commented Jul 18, 2017 at 12:09
  • 1
    How does this answer the question? What is the purpose of \dropcap supposed to be?
    – cfr
    Commented Jul 18, 2017 at 14:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .