summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/lettrine
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-02-16 21:39:55 +0000
committerKarl Berry <karl@freefriends.org>2015-02-16 21:39:55 +0000
commite016928e2bd0e7163bde478d7ab2419f49468c3c (patch)
tree80ddab12be3f8e877312a15ce271710bd56b126f /Master/texmf-dist/source/latex/lettrine
parentba7aa8ebb398757e83aa09cbbafafb128b0b2fd7 (diff)
lettrine (16feb15)
git-svn-id: svn://tug.org/texlive/trunk@36295 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/lettrine')
-rw-r--r--Master/texmf-dist/source/latex/lettrine/lettrine.dtx86
-rw-r--r--Master/texmf-dist/source/latex/lettrine/lettrine.ins10
2 files changed, 80 insertions, 16 deletions
diff --git a/Master/texmf-dist/source/latex/lettrine/lettrine.dtx b/Master/texmf-dist/source/latex/lettrine/lettrine.dtx
index 3069a99aa9e..b7f99480c1c 100644
--- a/Master/texmf-dist/source/latex/lettrine/lettrine.dtx
+++ b/Master/texmf-dist/source/latex/lettrine/lettrine.dtx
@@ -1,17 +1,17 @@
%
-% \CheckSum{473}
+% \CheckSum{525}
%
% \iffalse meta-comment
%
-% Copyright (C) 1999-2014 Daniel Flipo.
+% Copyright (C) 1999-2015 Daniel Flipo.
%
-% This program can be redistributed and/or modified under the terms
-% of the LaTeX Project Public License either version 1.3 of this
+% This program can be distributed and/or modified under the terms
+% of the LaTeX Project Public License either version 1.3c of this
% license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
%
% This file has the LPPL maintenance status "maintained".
%
@@ -30,12 +30,12 @@
\ProvidesFile{lettrine.dtx}
%</dtx>
%<*!cfg>
- [2014/09/16 v1.70 (Daniel Flipo)]
+ [2015/02/16 v1.8 (Daniel Flipo)]
%</!cfg>
%
% Lettrine package for LaTeX version 2e
%
-% Copyright (C) 1999-2014 by Daniel Flipo
+% Copyright (C) 1999-2015 by Daniel Flipo
%
% Please report errors to: daniel.flipo at free.fr
%
@@ -97,7 +97,7 @@
% \item |lines=|\emph{$<$integer$>$} sets how many lines the
% dropped capital will occupy (default=2);
%
-% \changes{lettrine-1.66}{2014/09/16}{New counter to add lines for
+% \changes{lettrine-1.7}{2014/09/16}{New counter to add lines for
% dropped capitals with positive depth, like Q.}
%
% \item |depth=|\emph{$<$integer$>$} sets the number of lines to
@@ -145,6 +145,26 @@
% by Bill Jetzer. Redefining \verb+\LettrineFont+ as
% \verb+\LettrineFontEPS+ still works for compatibility
% but is deprecated.
+%
+% \changes{lettrine-1.8}{2015/02/06}{Added two keyval options:
+% `grid' (true/false) and `novskip' to override \cs{DiscardVskip}.}
+%
+% \item |grid=|\emph{$<$true$>$} (new to version 1.8) will force
+% the vertical skip added above the paragraph starting with
+% |\lettrine| to be rounded up to an integer number of
+% |\baselineskip|.
+% This option is meant for grid typesetting.
+% \item |novskip=|\emph{$<$dimen$>$} (new to version 1.8)
+% overrides |\DiscardVskip| (default=0.2pt). In some cases
+% (see options |lraise|, |loversize| or accentuated dropped
+% capitals,\dots) the top of the dropped capital will raise
+% above the top of following text (usually in small caps),
+% this will trigger a corresponding vertical skip above
+% the paragraph starting with |\lettrine|,
+% \emph{only if} this skip exceeds |\DiscardVskip|.
+% Consider enlarging |novskip| (or |\DiscardVskip|) to
+% prevent small vertical skips from being rounded up to
+% |\baselineskip| when using the `grid' option.
% \end{itemize}
%
% Example: |\lettrine[lines=4, lraise=0.1, nindent=0em, |%
@@ -180,6 +200,7 @@
% \item |\setlength{\DefaultFindent}{0pt}|,
% \item |\setlength{\DefaultNindent}{0.5em}|,
% \item |\setlength{\DefaultSlope}{0pt}|.
+% \item |\setlength{\DiscardVskip}{0.2pt}|.
% \end{itemize}
%
% Instead of giving optional parameters to the |\lettrine| command,
@@ -302,6 +323,10 @@
%
% \changes{lettrine-1.6}{2004/05/22}{Added newif \cs{ifLettrineImage}.}
%
+% \changes{lettrine-1.8}{2015/02/06}{Added newif \cs{ifLettrineOnGrid}
+% and new dimen \cs{DiscardVskip}, default (0.2pt) set for
+% compatibility with previous releases.}
+%
% \begin{macrocode}
\newcounter{DefaultLines}
\setcounter{DefaultLines}{2}
@@ -316,7 +341,10 @@
\setlength{\DefaultNindent}{0.5em}
\newdimen\DefaultSlope
\setlength{\DefaultSlope}{\z@}
+\newdimen\DiscardVskip
+\setlength{\DiscardVskip}{0.2\p@}
\newif\ifLettrineImage
+\newif\ifLettrineOnGrid
% \end{macrocode}
%
% Then let's define the necessary internal counters, lengths,
@@ -324,6 +352,8 @@
%
% \changes{lettrine-1.6}{2004/05/22}{Added newif \cs{ifL@image}.}
%
+% \changes{lettrine-1.6}{2015/02/06}{Added newif \cs{ifL@grid}.}
+%
% \begin{macrocode}
\newsavebox{\L@lbox}
\newsavebox{\L@tbox}
@@ -337,12 +367,14 @@
\newdimen\L@next
\newdimen\L@slope
\newdimen\L@height
+\newdimen\L@novskip
\newcommand*{\L@file}{}
\newcommand*{\L@hang}{}
\newcommand*{\L@oversize}{}
\newcommand*{\L@raise}{}
\newcommand*{\L@ante}{}
\newif\ifL@image
+\newif\ifL@grid
% \end{macrocode}
%
% Provide commands for the fonts used to typeset the two
@@ -466,6 +498,8 @@
\define@key{L}{nindent}{\setlength{\L@Nindent}{#1}}
\define@key{L}{slope}{\setlength{\L@slope}{#1}}
\define@key{L}{image}[true]{\csname L@image#1\endcsname}
+\define@key{L}{grid}[true]{\csname L@grid#1\endcsname}
+\define@key{L}{novskip}{\setlength{\L@novskip}{#1}}
% \end{macrocode}
%
% \changes{lettrine-1.5}{2003/08/18}{\cs{LettrineOptionsFor} and
@@ -509,7 +543,9 @@
\setlength{\L@Findent}{\DefaultFindent}%
\setlength{\L@Nindent}{\DefaultNindent}%
\setlength{\L@slope}{\DefaultSlope}%
+ \setlength{\L@novskip}{\DiscardVskip}%
\ifLettrineImage\L@imagetrue\else\L@imagefalse\fi
+ \ifLettrineOnGrid\L@gridtrue\else\L@gridfalse\fi
% \end{macrocode}
% \changes{lettrine-1.5}{2003/08/18}{Added reading of an optional
% config file \cs{DefaultOptionsFile}.}
@@ -599,6 +635,10 @@
% \cs{L@first} changed. Do not `vskip' small lengths ($<$0.2pt),
% they are just rounding errors.}
%
+% \changes{lettrine-1.8}{2015/02/06}{The 0.2pt limit for discarded
+% vskips is now customisable through \cs{DiscardVskip} and option
+% `novskip'.}
+%
% \changes{lettrine-1.2}{2002/03/13}{\cs{baselineskip} may be a
% rubber length, we convert it to a dimen.}
%
@@ -626,7 +666,29 @@
\addtolength{\L@lraise}{\@tempdima}%
\fi
\par
- \ifdim\L@first>0.2\p@\vskip\L@first\fi
+% \end{macrocode}
+% |\L@first| now holds the height of the needed |\vskip|; if too
+% small it will be discarded.
+% \begin{macrocode}
+ \ifdim\L@first>\L@novskip
+% \end{macrocode}
+% When the `grid' option is true, let's round up |\L@first| to the
+% next integer number of |\baselineskip|.
+% \begin{macrocode}
+ \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
+ \vskip\@tempcnta\baselineskip
+ \else
+ \vskip\L@first
+ \fi
+ \fi
% \end{macrocode}
% Again, we (mis)use the length |\L@first| to compute the width of
% the text eventually coming before the dropped capital. It is
@@ -739,9 +801,11 @@
%%\setlength{\DefaultFindent}{0pt}
%%\setlength{\DefaultNindent}{0.5em}
%%\setlength{\DefaultSlope}{0mm}
+%%\setlength{\DiscardVskip}{0.2pt}
%%
-%% This is a *flag* (value=true/false):
+%% Theses are *flags* (value=true/false):
%%\LettrineImagefalse
+%%\LettrineOnGridfalse
%%
%% In case you want to set parameters for some letters
%% in file `optfile.cfl'
diff --git a/Master/texmf-dist/source/latex/lettrine/lettrine.ins b/Master/texmf-dist/source/latex/lettrine/lettrine.ins
index ac7289deba3..fdb3abfaa19 100644
--- a/Master/texmf-dist/source/latex/lettrine/lettrine.ins
+++ b/Master/texmf-dist/source/latex/lettrine/lettrine.ins
@@ -1,13 +1,13 @@
%%
-%% Copyright (C) 1999-2014 Daniel Flipo.
+%% Copyright (C) 1999-2015 Daniel Flipo.
%%
-%% This program can be redistributed and/or modified under the terms
-%% of the LaTeX Project Public License either version 1.3 of this
+%% This program can be distributed and/or modified under the terms
+%% of the LaTeX Project Public License either version 1.3c of this
%% license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2003/12/01 or later.
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
%%
%% This file will generate fast loadable files and documentation
%% driver files from the doc files in this package when run through