9

Consider the MWE from an earlier question:

\documentclass{article}
\usepackage{lettrine}
%\usepackage{fontspec}
%\defaultfontfeatures{Ligatures={Historical}}
%\setmainfont[Ligatures={Common,Rare}]{Hoefler Text}
%% unfortunately, I do not own these fonts

\newcommand\prelude[2][8em]{\makebox[#1][c]{\itshape\scriptsize#2.}}

\newenvironment{prayer}[4][]{%
  \lettrine[ante=\prelude{#2},#1]{#3}{#4}
}{%
  \unskip
  \qquad
  \textit{Amen.}%
}

% optional smart handling of words; works either way
\iftrue
\makeatletter
\def\prayer{\@ifnextchar[{\@prayer}{\@prayer[]}}
\def\@prayer[#1]#2#3#4 {\lettrine[ante=\prelude{#2},#1]{#3}{#4} }
\def\endprayer{\unskip\qquad\textit{Amen.}}
\makeatother
\fi

\def\mytext{O Lord, we join our unfeigned thanks for all thy
  mercies; for our being, our reason, and all other endowments and
  faculties of soul and body; for our health, friends, food, and
  raiment, and all the other comforts and conveniences of life.  Above
  all we adore thy mercy in sending thy only Son into the world to
  redeem us from sin and eternal death, and in giving us the knowledge
  and sense of our duty towards thee.  We bless thee for thy patience
  with us, notwithstanding our many and great provocations; for all
  the directions, assistances, and comforts of thy Holy Spirit; for
  thy continual care and watchful providence over us through the whole
  course of our lives; and particularly for the mercies and benefits
  of the past day: Besecching thee to continue these thy blessings to
  us; and to give is grace to show our thankfulness in a sincere
  obedience to his laws through whose merits and intercession we
  received them all, thy Son our Saviour Jesus Christ.}

\begin{document}
\begin{prayer}[loversize=0.1]{The Thanksgiving}
  TO our prayers, \mytext
\end{prayer}

\lettrine[ante={\prelude{The Thanksgiving}},loversize=0.1]%
{T}{O} our prayers, \mytext\qquad\textit{Amen.}
\end{document}

I have this strange behavior:

output

It is as if I had introduced lhang=1 as an optional argument, but I've done no such thing. What could be causing this?

2
  • \endprayer is missing a \par. Dec 30, 2013 at 9:20
  • @UlrikeFischer I totally did not expect that to fix it, but it did. Thanks!! Can you write up an answer and maybe speculate on why this is this case? Dec 30, 2013 at 9:26

1 Answer 1

10

Lettrine works on paragraphs: It changes the parshape. Your environment is missing a \par at the end, so the groups ends before the paragraph and the settings of lettrine are lost for the whole paragraph. Add a \par to your definition of \endprayer.

You must log in to answer this question.

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