1

I am working on a document in which I would like to incorporate a secondary lettrine outside of the one which is mainly used.

Consider the code

\documentclass{book}
\usepackage{fontspec}
\usepackage{xcolor} % für farbigen Text
\usepackage{lettrine}
\usepackage{lipsum}
\usepackage[sfdefault]{cabin}

\newcommand{\SecondaryLettrine}[5][]{%
  \begingroup
  \renewcommand{\LettrineFontHook}{\normalfont#2}%
  \lettrine[#1]{#4}{\normalfont#3#5}%
  \endgroup
}

\newcommand{\LettrineA}[2]{%
  \SecondaryLettrine[lines=3,lhang=0,findent=.15em]
    {\normalfont}
    {\scshape}
    {\color{black}#1}
    {#2}%
}

\begin{document}
\Large
\thispagestyle{empty}
\setmainfont{cabin} 

\noindent This is a non-indented leadoff sentence.
\vskip 10pt
\LettrineA{H}{ow} may I put the drop cap entirely to the right of the left-hand margin of the page?---lhang=0 in the preamble seems to have no effect. \lipsum[12]
\end{document}

which produces

enter image description here

I don't know why the newly defined lettrine is not starting where a non-indented paragraph would start. Alos, lhang=0 in the preamble seems to have no effect.

QUESTION: How may I correct this so that the defined lettrine starts where a non-indented paragraph would start? I compile the code with lualatex.

Thank you.

1 Answer 1

2

\lettrine needs to be used just before the start of the paragraph, and its settings need to be in scope for the whole paragrah, so the paragraph shape is in force at the end. Your example had \lettrine after the first line and in a group that ended before letterine was used at all. Safest would be to remove the grouping but I left it in but delayed the end of group here as I didn't know the intention of the group.

enter image description here

\documentclass{book}
\usepackage{fontspec}
\usepackage{xcolor} % für farbigen Text
\usepackage{lettrine}
\usepackage{lipsum}
\usepackage[sfdefault]{cabin}

\newcommand{\SecondaryLettrine}[5][]{%
  \begingroup
  \renewcommand{\LettrineFontHook}{\normalfont#2}%
  \lettrine[#1]{#4}{\normalfont#3#5}%
  \def\par{\endgraf\endgroup}%
}

\newcommand{\LettrineA}[2]{%
  \SecondaryLettrine[lines=3,lhang=0,findent=.15em]
    {\normalfont}
    {\scshape}
    {\color{black}#1}
    {#2}%
}

\begin{document}
\Large
\thispagestyle{empty}
\setmainfont{cabin} 

\noindent This is a non-indented leadoff sentence.

\vskip 10pt
\LettrineA{H}{ow} may I put the drop cap entirely to the right of the left-hand margin of the page?---lhang=0 in the preamble seems to have no effect. \lipsum[12]
\end{document}
1
  • actually it was a the start of the paragraph implicitly as you used the primitive \vskip rather than the latex command \vspace but having an explicit paragraph break before the lettrine is a lot clearer. May 12 at 23:29

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.