texlive[73660] Master/texmf-dist: lettrine (31jan25)
commits+karl at tug.org
commits+karl at tug.org
Fri Jan 31 23:08:28 CET 2025
Revision: 73660
https://tug.org/svn/texlive?view=revision&revision=73660
Author: karl
Date: 2025-01-31 23:08:28 +0100 (Fri, 31 Jan 2025)
Log Message:
-----------
lettrine (31jan25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/lettrine/README.md
trunk/Master/texmf-dist/doc/latex/lettrine/lettrine-demo-arabic.pdf
trunk/Master/texmf-dist/doc/latex/lettrine/lettrine-demo-arabic.tex
trunk/Master/texmf-dist/doc/latex/lettrine/lettrine-demo-de.pdf
trunk/Master/texmf-dist/doc/latex/lettrine/lettrine-demo-fr.pdf
trunk/Master/texmf-dist/doc/latex/lettrine/lettrine-demo-lua.pdf
trunk/Master/texmf-dist/doc/latex/lettrine/lettrine.pdf
trunk/Master/texmf-dist/source/latex/lettrine/lettrine.dtx
trunk/Master/texmf-dist/tex/latex/lettrine/lettrine.cfg
trunk/Master/texmf-dist/tex/latex/lettrine/lettrine.sty
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/latex/lettrine/lettrine-xetex-bidi.def
Modified: trunk/Master/texmf-dist/doc/latex/lettrine/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lettrine/README.md 2025-01-31 22:08:12 UTC (rev 73659)
+++ trunk/Master/texmf-dist/doc/latex/lettrine/README.md 2025-01-31 22:08:28 UTC (rev 73660)
@@ -50,5 +50,5 @@
See the included manual lettrine.pdf, section "Change History".
--
-Copyright 1999--2024 Daniel Flipo
+Copyright 1999--2025 Daniel Flipo
E-mail: daniel (dot) flipo (at) free (dot) fr
Modified: trunk/Master/texmf-dist/doc/latex/lettrine/lettrine-demo-arabic.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/lettrine/lettrine-demo-arabic.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lettrine/lettrine-demo-arabic.tex 2025-01-31 22:08:12 UTC (rev 73659)
+++ trunk/Master/texmf-dist/doc/latex/lettrine/lettrine-demo-arabic.tex 2025-01-31 22:08:28 UTC (rev 73660)
@@ -3,9 +3,7 @@
%%%
%%% This file can be compiled either with LuaLaTeX or XeLaTeX.
%%% The syntax for loading babel slightly differs between Lua- and Xe-LaTeX.
-%%% Compiling this file with XeLaTeX works within this directory which holds
-%%% a specific version of "lettrine-xetex-bidi.def", or requires to
-%%% remove the official file "lettrine-xetex-bidi.def" (v0.8).
+%%% Compiling this file with XeLaTeX works with bidi version 40.1 or above.
\documentclass{article}
\usepackage{iftex}
Modified: trunk/Master/texmf-dist/doc/latex/lettrine/lettrine-demo-de.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/lettrine/lettrine-demo-fr.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/lettrine/lettrine-demo-lua.pdf
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/doc/latex/lettrine/lettrine-xetex-bidi.def
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lettrine/lettrine-xetex-bidi.def 2025-01-31 22:08:12 UTC (rev 73659)
+++ trunk/Master/texmf-dist/doc/latex/lettrine/lettrine-xetex-bidi.def 2025-01-31 22:08:28 UTC (rev 73660)
@@ -1,12 +0,0 @@
-%%
-%% This is file `lettrine-xetex-bidi.def', by Daniel Flipo,
-%% as a replacement for Vafa Khalighi's original (outdated) file.
-%%
-\ProvidesFile{lettrine-xetex-bidi.def}%
- [2024/01/20 v1.0 bidi adaptations for lettrine package for XeTeX engine]
-\IfPackageAtLeastTF{lettrine}{2024-01-20}{}%
-{\PackageWarning{bidi}{Please upgrade your lettrine package\MessageBreak
- to version 2.60 or higher}}
-\endinput
-%%
-%% End of file `lettrine-xetex-bidi.def'.
Modified: trunk/Master/texmf-dist/doc/latex/lettrine/lettrine.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/lettrine/lettrine.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/lettrine/lettrine.dtx 2025-01-31 22:08:12 UTC (rev 73659)
+++ trunk/Master/texmf-dist/source/latex/lettrine/lettrine.dtx 2025-01-31 22:08:28 UTC (rev 73660)
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright © 1999-2024 Daniel Flipo.
+% Copyright © 1999-2025 Daniel Flipo.
%
% This program can be distributed and/or modified under the terms
% of the LaTeX Project Public License either version 1.3c of this
@@ -107,7 +107,7 @@
\ProvidesFile{lettrine.dtx}
%</dtx>
%<*sty|dtx>
- [2024-11-14 v2.70 (Daniel Flipo)]
+ [2025-01-30 v2.80 (Daniel Flipo)]
%</sty|dtx>
% \fi
%
@@ -208,6 +208,17 @@
% paragraph starting with |\lettrine| to be rounded up to an integer
% number of |\baselineskip|. This option is meant for grid
% typesetting.
+%
+% \changes{v2.80}{2025/01/30}{New keyval option:
+% `nextpage’ (true/false), default is false.}
+%
+% \item \lopt{nextpage[=true]}; if a paragraph starting with a dropped
+% cap begins too low on a page to fit in, a warning is issued; this
+% flag controls whether the whole paragraph should be moved to the
+% top of next page or not. This option is not recommended, there are
+% often better fixes for such situations: reducing the dropped cap’s
+% height, shortening some previous paragraph, enlarging the page…
+%
% \item \lopt{novskip=}\meta{dimen} overrides |\DiscardVskip|
% (default=1pt). In some cases (see options \lopt{lraise},
% \lopt{loversize} or accentuated dropped capitals,…) the top of
@@ -313,6 +324,7 @@
% \item |\setlength{\DiscardVskip}{1pt}|,
% \item |\LettrineImagefalse|,
% \item |\LettrineOnGridfalse|,
+% \item |\LettrineMoveAtEOPfalse|,
% \item |\LettrineRealHeightfalse|.
% \end{itemize}
%
@@ -462,12 +474,18 @@
% \vspace{.5\baselineskip}
% \textbf{Known issues:}
% \begin{itemize}
-% \item Nothing is done to prevent page-breaking in a paragraph
-% starting with a dropped capital; when it happens to hang
-% into the footer, page-breaking has to be done manually.
+% \item Starting with version~2.80, the \pkg{lettrine} package
+% issues a warning in case a paragraph starting with a dropped
+% capital occurs at the end of some page thus requiring manual
+% page-breaking; it’s up to the user to figure out how to best
+% fix the issue (enlarging the page, shortening some previous
+% paragraph…). A new option \lopt{nextpage} has also been added,
+% when set to \lopt{true}, the whole paragraph is moved to the top
+% of next page… leaving a blank at the end of the previous page.
% \item |\lettrine| works within `quote’ `quotation’, `abstract’
-% environments but does not work within `center’ environments
-% except with option \texttt{[lines=1]}.
+% environments but does not work within `verse’ environments.
+% It doesn’t work either in `center’ environments except with
+% option \texttt{[lines=1]}.
% \item |\lettrine| does not work within lists.
% \item If |\lettrine| is used inside any environment, it is
% \emph{mandatory} to end the paragraph starting with the dropped
@@ -580,6 +598,7 @@
\newif\ifLettrineImage
\newif\ifLettrineOnGrid
\newif\ifLettrineRealHeight
+\newif\ifLettrineMoveAtEOP
% \end{macrocode}
%
% Then let’s define the necessary internal counters, lengths,
@@ -604,7 +623,6 @@
\newdimen\L at slope
\newdimen\L at height
\newdimen\L at novskip
-\newdimen\L at ruleht
\newdimen\L at target@ht
\newdimen\L at target@dp
\newdimen\L at target@tht
@@ -611,6 +629,8 @@
\newdimen\LettrineWidth
\newdimen\LettrineHeight
\newdimen\LettrineDepth
+\newdimen\L at finalht
+\newdimen\L at finaldp
\newcommand*{\L at file}{}
\newcommand*{\L at hang}{}
\newcommand*{\L at oversize}{}
@@ -618,6 +638,7 @@
\newcommand*{\L at ante}{}
\newif\ifL at image
\newif\ifL at grid
+\newif\ifL at nextpage
\newif\ifL at realh
\let\ifL at RTL\iffalse
\newcommand*{\L at viewport}{}
@@ -674,6 +695,7 @@
novskip.code = \setlength{\DiscardVskip}{#1} ,
image.if = LettrineImage ,
grid.if = LettrineOnGrid ,
+ nextpage.if = LettrineMoveAtEOP ,
realheight.if = LettrineRealHeight ,
refstring.default:n = \L at initial ,
refstring.store = \LettrineTestString ,
@@ -700,6 +722,7 @@
image.if = L at image ,
viewport.store = \L at viewport ,
grid.if = L at grid ,
+ nextpage.if = L at nextpage ,
realheight.if = L at realh ,
refstring.default:n = \L at initial ,
refstring.store = \L at refstring
@@ -803,14 +826,15 @@
% \draw[dashed] (1.5,2.3) -- (9,2.3);
% \draw[dashed] (1.5,1.2) -- (9,1.2);
% \draw[dashed] (0,0.1) -- (9,0.1);
-% \draw[<->] (0,0.1) -- (0,3.9);
-% \node[left] at (0,2.1) {tht};
+% \draw[<->] (-0.3,0.1) -- (-0.3,3.9);
+% \node[left] at (-0.3,2.1) {tht};
% \draw[<->] (1.3,0.1) -- (1.3,3.4);
-% \node[left] at (1.3,1.8) {dp};
+% \node[left] at (1.3,1.8) {finaldp};
% \draw[<->] (1,3.4) -- (1,3.9);
-% \node[left] at (1,3.7) {ht};
+% \node[left] at (1,3.7) {finalht};
% \end{tikzpicture}
-% \caption{Initial’s targeted dimensions ($\mbox{\cs{lines}}=4$)}
+% \caption{Initial’s targeted dimensions
+% ($\mbox{\cs{lines}}=4$, $\mbox{\cs{lraise}}=0$)}
% \label{fig:target}
% \end{figure}
%
@@ -850,7 +874,7 @@
\addtolength{\L at target@dp}{-\@tempdima}%
\else
\addtolength{\L at target@ht}{\L at target@dp}%
- \setlength{\L at target@dp}{0pt}%
+ \setlength{\L at target@dp}{\z@}%
\fi
\setlength{\L at target@tht}{\L at target@ht}%
\addtolength{\L at target@tht}{\L at target@dp}%
@@ -976,6 +1000,7 @@
\setlength{\L at novskip}{\DiscardVskip}%
\ifLettrineImage\L at imagetrue\else\L at imagefalse\fi
\ifLettrineOnGrid\L at gridtrue\else\L at gridfalse\fi
+ \ifLettrineMoveAtEOP\L at nextpagetrue\else\L at nextpagefalse\fi
\ifLettrineRealHeight\L at realhtrue\else\L at realhfalse\fi
% \end{macrocode}
%
@@ -1043,9 +1068,10 @@
\sbox{\L at tbox}{{\LettrineTextFont{#3}}}%
% \end{macrocode}
%
-% Start a new paragraph and compute in |\L at ruleht| the height of
-% the top part of the dropped capital which raises above the
-% paragraph’s first baseline.
+% Start a new paragraph and compute in |\L at finalht| the height of
+% the top part of the dropped capital which finally raises above
+% the paragraph’s first baseline and in |\L at finaldp| the final
+% depth of the dropped capital.
%
% \changes{v0.9}{1998/02/23}{Calculations of length
% \cs{L at first} changed. Do not `vskip’ small lengths ($<$0.2pt),
@@ -1055,29 +1081,30 @@
% vskips is now customisable through \cs{DiscardVskip} and option
% `novskip’.}
%
-% \changes{v1.2}{2002/03/13}{\cs{baselineskip} may be a
-% rubber length, we convert it to a dimen.}
-%
% The basis for |\L at raise| (and |\L at oversize|, see
% |\LettrineFont|) is |\L at target@tht|.
%
% \begin{macrocode}
\par
- \setlength{\L at ruleht}{\LettrineHeight}%
+ \setlength{\L at finalht}{\LettrineHeight}%
\setlength{\L at lraise}{\L at raise\L at target@tht}%
- \addtolength{\L at ruleht}{\L at lraise}%
+ \addtolength{\L at finalht}{\L at lraise}%
\ifnum\value{L at lines}>\@ne
\@tempcnta=\value{L at lines}%
\advance\@tempcnta \m at ne
- \addtolength{\L at ruleht}{-\@tempcnta\baselineskip}%
- \addtolength{\L at lraise}{-\L at target@dp}%
- \fi
+ \@tempdima=\@tempcnta\baselineskip
+ \addtolength{\L at finalht}{-\@tempdima}%
+ \setlength{\L at finaldp}{\@tempdima}%
+ \addtolength{\L at finaldp}{-\L at lraise}%
+ \addtolength{\L at finaldp}{\LettrineDepth}%
+ \addtolength{\L at lraise}{-\@tempdima}%
+ \fi
% \end{macrocode}
-% When |\L at ruleht| is larger than |\baselineskip - \L at novskip| and
+% When |\L at finalht| is larger than |\baselineskip - \L at novskip| and
% the \lopt{grid} option is \lopt{true}, let’s skip an integer number
% of |\baselineskip| (and smash the dropped cap, see below).
% \begin{macrocode}
- \@tempdima=\L at ruleht
+ \@tempdima=\L at finalht
\advance\@tempdima \L at novskip
\@tempdimb=\baselineskip
\ifdim\@tempdima>\@tempdimb
@@ -1182,6 +1209,34 @@
\else
\edef\L at parshape{\L at parshape \@totalleftmargin \the\linewidth}%
\fi
+% \end{macrocode}
+%
+% \changes{v2.80}{2025/01/30}{Move the paragraph to next page if the
+% dropped cap doesn’t fit in the current one.}
+%
+% Compute the remaining vertical space left on the current page
+% using TeX lengths |\pagetotal| and |\pagegoal|; always warn if
+% the remaining space is less than the depth of the dropped cap’
+% depth |\L at finaldp|.
+% Move the whole paragraph to next page if \lopt{nextpage=true}
+% (default is false).
+% \begin{macrocode}
+ \@tempdima=\pagegoal
+ \advance\@tempdima by -\pagetotal
+ \advance\@tempdima by -\baselineskip
+ \ifdim\@tempdima < \L at finaldp
+ \@tempdimb=\L at finaldp
+ \advance\@tempdimb by -\@tempdima
+ \PackageWarning{lettrine}{%
+ *** ATTENTION REQUIRED ***\MessageBreak
+ The dropped cap #2 doesn't fit on page \thepage.%
+ \MessageBreak Missing vertical space: \the\@tempdimb.
+ \MessageBreak
+ \ifL at nextpage The whole paragraph will be moved to
+ next page.\MessageBreak \fi
+ Reported}%
+ \ifL at nextpage \newpage \fi
+ \fi
\noindent
\parshape=\L at parshape\relax
% \end{macrocode}
@@ -1203,7 +1258,7 @@
% the rest of paragraph around it.
% \begin{macrocode}
\llap{\smash{\mbox{\L at ante}\raisebox{\L at lraise}{\usebox{\L at lbox}}}%
- \ifL at grid\else\rule{0pt}{\L at ruleht}\fi
+ \ifL at grid\else\rule{0pt}{\L at finalht}\fi
\hskip \the\L at Findent}%
\unhcopy\L at tbox\relax
% \end{macrocode}
@@ -1277,6 +1332,7 @@
%%\LettrineImagefalse
%%\LettrineOnGridfalse
%%\LettrineRealHeightfalse
+%%\LettrineMoveAtEOPfalse
%%
%% This is a *command*, define it as \relax if you dont want the second
%% mandatory argument of \lettrine[]{}{} to be typset in small caps.
Modified: trunk/Master/texmf-dist/tex/latex/lettrine/lettrine.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lettrine/lettrine.cfg 2025-01-31 22:08:12 UTC (rev 73659)
+++ trunk/Master/texmf-dist/tex/latex/lettrine/lettrine.cfg 2025-01-31 22:08:28 UTC (rev 73660)
@@ -26,6 +26,7 @@
%%\LettrineImagefalse
%%\LettrineOnGridfalse
%%\LettrineRealHeightfalse
+%%\LettrineMoveAtEOPfalse
%%
%% This is a *command*, define it as \relax if you dont want the second
%% mandatory argument of \lettrine[]{}{} to be typset in small caps.
Modified: trunk/Master/texmf-dist/tex/latex/lettrine/lettrine.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lettrine/lettrine.sty 2025-01-31 22:08:12 UTC (rev 73659)
+++ trunk/Master/texmf-dist/tex/latex/lettrine/lettrine.sty 2025-01-31 22:08:28 UTC (rev 73660)
@@ -11,7 +11,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesFile{lettrine.sty}
- [2024-11-14 v2.70 (Daniel Flipo)]
+ [2025-01-30 v2.80 (Daniel Flipo)]
\DeclareRelease{v1.6}{1999-03-03}{lettrine-2006-03-17.sty}
\DeclareRelease{v1.9}{2012-07-20}{lettrine-2015-08-31.sty}
@@ -38,6 +38,7 @@
\newif\ifLettrineImage
\newif\ifLettrineOnGrid
\newif\ifLettrineRealHeight
+\newif\ifLettrineMoveAtEOP
\newsavebox{\L at lettrine}
\newsavebox{\L at lbox}
\newsavebox{\L at tbox}
@@ -52,7 +53,6 @@
\newdimen\L at slope
\newdimen\L at height
\newdimen\L at novskip
-\newdimen\L at ruleht
\newdimen\L at target@ht
\newdimen\L at target@dp
\newdimen\L at target@tht
@@ -59,6 +59,8 @@
\newdimen\LettrineWidth
\newdimen\LettrineHeight
\newdimen\LettrineDepth
+\newdimen\L at finalht
+\newdimen\L at finaldp
\newcommand*{\L at file}{}
\newcommand*{\L at hang}{}
\newcommand*{\L at oversize}{}
@@ -66,6 +68,7 @@
\newcommand*{\L at ante}{}
\newif\ifL at image
\newif\ifL at grid
+\newif\ifL at nextpage
\newif\ifL at realh
\let\ifL at RTL\iffalse
\newcommand*{\L at viewport}{}
@@ -86,6 +89,7 @@
novskip.code = \setlength{\DiscardVskip}{#1} ,
image.if = LettrineImage ,
grid.if = LettrineOnGrid ,
+ nextpage.if = LettrineMoveAtEOP ,
realheight.if = LettrineRealHeight ,
refstring.default:n = \L at initial ,
refstring.store = \LettrineTestString ,
@@ -107,6 +111,7 @@
image.if = L at image ,
viewport.store = \L at viewport ,
grid.if = L at grid ,
+ nextpage.if = L at nextpage ,
realheight.if = L at realh ,
refstring.default:n = \L at initial ,
refstring.store = \L at refstring
@@ -146,7 +151,7 @@
\addtolength{\L at target@dp}{-\@tempdima}%
\else
\addtolength{\L at target@ht}{\L at target@dp}%
- \setlength{\L at target@dp}{0pt}%
+ \setlength{\L at target@dp}{\z@}%
\fi
\setlength{\L at target@tht}{\L at target@ht}%
\addtolength{\L at target@tht}{\L at target@dp}%
@@ -208,6 +213,7 @@
\setlength{\L at novskip}{\DiscardVskip}%
\ifLettrineImage\L at imagetrue\else\L at imagefalse\fi
\ifLettrineOnGrid\L at gridtrue\else\L at gridfalse\fi
+ \ifLettrineMoveAtEOP\L at nextpagetrue\else\L at nextpagefalse\fi
\ifLettrineRealHeight\L at realhtrue\else\L at realhfalse\fi
\SetKeys[LettrineLocal]{#1}%
\sbox{\L at tbox}{\LettrineTextFont{\LettrineSecondString}}%
@@ -231,16 +237,20 @@
\setlength{\LettrineDepth}{\dp\L at lbox}%
\sbox{\L at tbox}{{\LettrineTextFont{#3}}}%
\par
- \setlength{\L at ruleht}{\LettrineHeight}%
+ \setlength{\L at finalht}{\LettrineHeight}%
\setlength{\L at lraise}{\L at raise\L at target@tht}%
- \addtolength{\L at ruleht}{\L at lraise}%
+ \addtolength{\L at finalht}{\L at lraise}%
\ifnum\value{L at lines}>\@ne
\@tempcnta=\value{L at lines}%
\advance\@tempcnta \m at ne
- \addtolength{\L at ruleht}{-\@tempcnta\baselineskip}%
- \addtolength{\L at lraise}{-\L at target@dp}%
- \fi
- \@tempdima=\L at ruleht
+ \@tempdima=\@tempcnta\baselineskip
+ \addtolength{\L at finalht}{-\@tempdima}%
+ \setlength{\L at finaldp}{\@tempdima}%
+ \addtolength{\L at finaldp}{-\L at lraise}%
+ \addtolength{\L at finaldp}{\LettrineDepth}%
+ \addtolength{\L at lraise}{-\@tempdima}%
+ \fi
+ \@tempdima=\L at finalht
\advance\@tempdima \L at novskip
\@tempdimb=\baselineskip
\ifdim\@tempdima>\@tempdimb
@@ -297,10 +307,26 @@
\else
\edef\L at parshape{\L at parshape \@totalleftmargin \the\linewidth}%
\fi
+ \@tempdima=\pagegoal
+ \advance\@tempdima by -\pagetotal
+ \advance\@tempdima by -\baselineskip
+ \ifdim\@tempdima < \L at finaldp
+ \@tempdimb=\L at finaldp
+ \advance\@tempdimb by -\@tempdima
+ \PackageWarning{lettrine}{%
+ *** ATTENTION REQUIRED ***\MessageBreak
+ The dropped cap #2 doesn't fit on page \thepage.%
+ \MessageBreak Missing vertical space: \the\@tempdimb.
+ \MessageBreak
+ \ifL at nextpage The whole paragraph will be moved to
+ next page.\MessageBreak \fi
+ Reported}%
+ \ifL at nextpage \newpage \fi
+ \fi
\noindent
\parshape=\L at parshape\relax
\llap{\smash{\mbox{\L at ante}\raisebox{\L at lraise}{\usebox{\L at lbox}}}%
- \ifL at grid\else\rule{0pt}{\L at ruleht}\fi
+ \ifL at grid\else\rule{0pt}{\L at finalht}\fi
\hskip \the\L at Findent}%
\unhcopy\L at tbox\relax
\ifnum\@listdepth>0 \Lreset at listparshape \fi
More information about the tex-live-commits
mailing list.