summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lettrine/lettrine.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-04-07 21:26:50 +0000
committerKarl Berry <karl@freefriends.org>2019-04-07 21:26:50 +0000
commit9f894d878ee6b02384487d4872ceefb7a6375613 (patch)
tree89145b10eebb8bb47a5f010bf8f3cd1fb762c046 /Master/texmf-dist/tex/latex/lettrine/lettrine.sty
parent76c0426a1e37e49709be7252e3679ebc5fa20746 (diff)
lettrine (7apr19)
git-svn-id: svn://tug.org/texlive/trunk@50847 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lettrine/lettrine.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lettrine/lettrine.sty30
1 files changed, 23 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/lettrine/lettrine.sty b/Master/texmf-dist/tex/latex/lettrine/lettrine.sty
index d9060306c3f..8913693ec97 100644
--- a/Master/texmf-dist/tex/latex/lettrine/lettrine.sty
+++ b/Master/texmf-dist/tex/latex/lettrine/lettrine.sty
@@ -27,12 +27,12 @@
%%
\NeedsTeXFormat{LaTeX2e}[2018-04-01]
\ProvidesFile{lettrine.sty}
- [2018-08-28 v2.21 (Daniel Flipo)]
+ [2019-04-06 v2.22 (Daniel Flipo)]
\ifdefined\DeclareRelease
\DeclareRelease{v1.6}{1999-03-03}{lettrine-2006-03-17.sty}
\DeclareRelease{v1.9}{2012-07-20}{lettrine-2015-08-31.sty}
\DeclareRelease{v2.0}{2018-07-21}{lettrine-2018-08-18.sty}
- \DeclareCurrentRelease{}{2018-08-18}
+ \DeclareCurrentRelease{}{2019-03-30}
\else
\PackageWarning{lettrine}{Your LaTeX kernel is too old to provide
access\MessageBreak to former versions of the lettrine package.%
@@ -117,8 +117,14 @@
\fontsize{\L@height}{\L@height}\selectfont
\Lettrine@RefString}%
\@tempcnta=\ht\@tempboxa
- \@tempcntb=\L@height
- \MFPdiv{\the\@tempcntb}{\the\@tempcnta}\L@factor
+ \ifnum\@tempcnta=0
+ \PackageWarning{lettrine}{Unable to compute \protect\fontsize!%
+ \MessageBreak \protect\LettrineTestString\space empty? reported}
+ \def\L@factor{1}%
+ \else
+ \@tempcntb=\L@height
+ \MFPdiv{\the\@tempcntb}{\the\@tempcnta}\L@factor
+ \fi
}
\newcommand*{\LettrineFont}{%
\LettrineFontHook
@@ -259,8 +265,8 @@
\addtolength{\L@Nindent}{\L@Pindent}%
\setlength{\L@next}{\linewidth}%
\addtolength{\L@next}{-\L@Nindent}%
- \addtolength{\L@Pindent}{\rightmargin}%
- \addtolength{\L@Nindent}{\rightmargin}%
+ \addtolength{\L@Pindent}{\@totalleftmargin}%
+ \addtolength{\L@Nindent}{\@totalleftmargin}%
\addtocounter{L@lines}{1}%
\addtocounter{L@lines}{\value{L@depth}}%
\def\L@parshape{\c@L@lines \the\L@Pindent \the\L@first}%
@@ -270,12 +276,22 @@
\addtolength{\L@Nindent}{\L@slope}%
\addtolength{\L@next}{-\L@slope}%
\advance\@tempcnta\@ne}%
- \edef\L@parshape{\L@parshape \rightmargin \the\linewidth}%
+ \edef\L@parshape{\L@parshape \@totalleftmargin \the\linewidth}%
\noindent
\parshape=\L@parshape\relax
\smash{\llap{\mbox{\L@ante}\raisebox{\L@lraise}{\usebox{\L@lbox}}%
\hskip \the\L@Findent}}%
\usebox{\L@tbox}%
+ \ifnum\@listdepth>0 \Lreset@listparshape \fi
+}
+\newtoks\Llist@everypar
+\def\Lreset@listparshape{%
+ \let\Lnew@everypar\everypar
+ \Llist@everypar=\expandafter{\the\everypar}%
+ \Lnew@everypar={\the\Llist@everypar
+ \parshape=\@ne \@totalleftmargin \linewidth \relax
+ \let\everypar\Llist@everypar
+ }%
}
\InputIfFileExists{lettrine.cfg}
{\typeout{Loading lettrine.cfg}}