summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lettrine/lettrine.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lettrine/lettrine.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lettrine/lettrine.sty65
1 files changed, 34 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/lettrine/lettrine.sty b/Master/texmf-dist/tex/latex/lettrine/lettrine.sty
index 58ca5035c50..f7f7c6e3429 100644
--- a/Master/texmf-dist/tex/latex/lettrine/lettrine.sty
+++ b/Master/texmf-dist/tex/latex/lettrine/lettrine.sty
@@ -11,12 +11,13 @@
%%
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesFile{lettrine.sty}
- [2023-04-18 v2.40 (Daniel Flipo)]
+ [2023-07-02 v2.50 (Daniel Flipo)]
\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}
\DeclareRelease{v2.3}{2022-09-25}{lettrine-2022-09-25.sty}
-\DeclareCurrentRelease{}{2023-04-18}
+\DeclareRelease{v2.4}{2023-04-18}{lettrine-2023-04-18.sty}
+\DeclareCurrentRelease{}{2023-07-02}
\RequirePackage{xfp}
\newcounter{DefaultLines}
\setcounter{DefaultLines}{2}
@@ -32,10 +33,11 @@
\newdimen\DefaultSlope
\setlength{\DefaultSlope}{\z@}
\newdimen\DiscardVskip
-\setlength{\DiscardVskip}{0.2\p@}
+\setlength{\DiscardVskip}{1\p@}
\newif\ifLettrineImage
\newif\ifLettrineOnGrid
\newif\ifLettrineRealHeight
+\newsavebox{\L@lettrine}
\newsavebox{\L@lbox}
\newsavebox{\L@tbox}
\newcounter{L@lines}
@@ -49,6 +51,7 @@
\newdimen\L@slope
\newdimen\L@height
\newdimen\L@novskip
+\newdimen\L@ruleht
\newdimen\L@target@ht
\newdimen\L@target@dp
\newdimen\L@target@tht
@@ -212,6 +215,30 @@
\setlength{\LettrineWidth}{\wd\L@lbox}%
\setlength{\LettrineHeight}{\ht\L@lbox}%
\setlength{\LettrineDepth}{\dp\L@lbox}%
+ \sbox{\L@tbox}{{\LettrineTextFont{#3}}}%
+ \par
+ \setlength{\L@ruleht}{\LettrineHeight}%
+ \setlength{\L@lraise}{\L@raise\L@target@tht}%
+ \addtolength{\L@ruleht}{\L@lraise}%
+ \ifnum\value{L@lines}>\@ne
+ \@tempcnta=\value{L@lines}%
+ \advance\@tempcnta \m@ne
+ \addtolength{\L@ruleht}{-\@tempcnta\baselineskip}%
+ \addtolength{\L@lraise}{-\L@target@dp}%
+ \fi
+ \@tempdima=\L@ruleht
+ \advance\@tempdima \L@novskip
+ \@tempdimb=\baselineskip
+ \ifdim\@tempdima>\@tempdimb
+ \ifL@grid
+ \@tempcnta=\z@
+ \loop\ifdim\@tempdima>\@tempdimb
+ \advance\@tempcnta \@ne
+ \advance\@tempdima -\@tempdimb
+ \repeat
+ \vskip\@tempcnta\baselineskip
+ \fi
+ \fi
\begingroup
\def\IeC##1{##1}%
\@tempdima=\L@oversize pt\relax
@@ -219,34 +246,9 @@
{Targeted height = \the\L@target@tht\MessageBreak
(for loversize=0, accent excluded),\MessageBreak
Lettrine height = \the\LettrineHeight\space (#2)%
- \ifdim\@tempdima=\z@\else\space loversize=\L@oversize\fi;%
+ \ifdim\@tempdima>\z@\space loversize=\L@oversize\fi;%
\MessageBreak reported}%
\endgroup
- \sbox{\L@tbox}{{\LettrineTextFont{#3}}}%
- \setlength{\L@first}{\LettrineHeight}%
- \setlength{\L@lraise}{\L@raise\L@target@tht}%
- \addtolength{\L@first}{\L@lraise}%
- \ifnum\value{L@lines}=1
- \addtolength{\L@first}{-\ht\L@tbox}%
- \else
- \addtolength{\L@first}{-\L@target@tht}%
- \addtolength{\L@lraise}{-\L@target@dp}%
- \fi
- \par
- \ifdim\L@first>\L@novskip
- \ifL@grid
- \@tempdima=\baselineskip
- \@tempdimb=\@tempdima
- \advance\@tempdimb by \L@novskip
- \@tempcnta=1
- \loop\ifdim\L@first>\@tempdimb
- \advance\@tempcnta by 1
- \advance\L@first by -\@tempdima
- \repeat
- \L@first=\@tempcnta\baselineskip
- \fi
- \vskip\L@first
- \fi
\setlength{\L@Pindent}{\wd\L@lbox}%
\addtolength{\L@Pindent}{-\L@hang\wd\L@lbox}%
\settowidth{\L@first}{\L@ante}%
@@ -271,8 +273,9 @@
\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}}%
+ \llap{\mbox{\L@ante}\smash{\raisebox{\L@lraise}{\usebox{\L@lbox}}}%
+ \ifL@grid\else\rule{0pt}{\L@ruleht}\fi
+ \hskip \the\L@Findent}%
\unhcopy\L@tbox\relax
\ifnum\@listdepth>0 \Lreset@listparshape \fi
}