summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/lettrine/lettrine-2015-08-31.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/lettrine/lettrine-2015-08-31.sty
Initial commit
Diffstat (limited to 'macros/latex/contrib/lettrine/lettrine-2015-08-31.sty')
-rw-r--r--macros/latex/contrib/lettrine/lettrine-2015-08-31.sty251
1 files changed, 251 insertions, 0 deletions
diff --git a/macros/latex/contrib/lettrine/lettrine-2015-08-31.sty b/macros/latex/contrib/lettrine/lettrine-2015-08-31.sty
new file mode 100644
index 0000000000..99d02b8105
--- /dev/null
+++ b/macros/latex/contrib/lettrine/lettrine-2015-08-31.sty
@@ -0,0 +1,251 @@
+%%
+%% This is file `lettrine.sty' v1.9.
+%%
+%% IMPORTANT NOTICE:
+%%
+%% For the copyright see the source file `lettrine.dtx'.
+%%
+%% This file 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.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% The Current Maintainer of this work is Daniel Flipo.
+%%
+%% Please report errors to: <daniel (dot) flipo (at) free (dot) fr>
+%%
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesFile{lettrine.sty}
+ [2015/08/31 v1.9 (Daniel Flipo)]
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\RequirePackage{keyval}
+\newcounter{DefaultLines}
+\setcounter{DefaultLines}{2}
+\newcounter{DefaultDepth}
+\newcommand*{\DefaultOptionsFile}{\relax}
+\newcommand*{\DefaultLoversize}{0}
+\newcommand*{\DefaultLraise}{0}
+\newcommand*{\DefaultLhang}{0}
+\newdimen\DefaultFindent
+\setlength{\DefaultFindent}{\z@}
+\newdimen\DefaultNindent
+\setlength{\DefaultNindent}{0.5em}
+\newdimen\DefaultSlope
+\setlength{\DefaultSlope}{\z@}
+\newdimen\DiscardVskip
+\setlength{\DiscardVskip}{0.2\p@}
+\newif\ifLettrineImage
+\newif\ifLettrineOnGrid
+\newif\ifLettrineRealHeight
+\newsavebox{\L@lbox}
+\newsavebox{\L@tbox}
+\newcounter{L@lines}
+\newcounter{L@depth}
+\newdimen\L@Pindent
+\newdimen\L@Findent
+\newdimen\L@Nindent
+\newdimen\L@lraise
+\newdimen\L@first
+\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
+\newif\ifL@realh
+\newcommand*{\LettrineTextFont}{\scshape}
+\def\Lettrine@height{%
+ \@tempdima=\baselineskip
+ \setlength{\L@height}{\value{L@lines}\@tempdima}%
+ \ifnum\value{L@lines}>1
+ \addtolength{\L@height}{-\@tempdima}%
+ \fi
+ \ifvoid\L@tbox
+ \sbox{\L@tbox}{\LettrineTextFont{\LettrineSecondString}}%
+ \fi
+ \addtolength{\L@height}{\ht\L@tbox}%
+ \addtolength{\L@height}{\L@oversize\L@height}%
+}
+\newcommand*{\LettrineFontHook}{}
+\newcommand*{\LettrineTestString}{ABCDEFGHIJKLMNOQPRSTUVWXYZ}
+\newcommand*{\LettrineSecondString}{x}
+\newcommand*{\LettrineFont}{%
+ \Lettrine@height
+ \sbox{\@tempboxa}{\LettrineFontHook\fontsize{\L@height}{\L@height}%
+ \selectfont \LettrineTestString}%
+ \@tempcntb=\ht\@tempboxa
+ \@tempcnta=\L@height
+ \multiply\@tempcnta by 100
+ \divide\@tempcntb by 100
+ \divide\@tempcnta by \@tempcntb
+ \advance\@tempcnta by -9999
+ \ifnum\@tempcnta>0
+ \def\@tempa{1.\the\@tempcnta}%
+ \else
+ \def\@tempa{1}%
+ \fi
+ \LettrineFontHook
+ \fontsize{\@tempa\L@height}{\@tempa\L@height}%
+ \selectfont
+}
+\newcommand*{\LettrineFontEPS}{%
+ \Lettrine@height\LettrineFontHook
+ \includegraphics[height=\L@height]%
+}
+\define@key{L}{lines}{\setcounter{L@lines}{#1}}
+\define@key{L}{depth}{\setcounter{L@depth}{#1}}
+\define@key{L}{lhang}{\renewcommand*{\L@hang}{#1}}
+\define@key{L}{loversize}{\renewcommand*{\L@oversize}{#1}}
+\define@key{L}{lraise}{\renewcommand*{\L@raise}{#1}}
+\define@key{L}{ante}{\renewcommand*{\L@ante}{#1}}
+\define@key{L}{findent}{\setlength{\L@Findent}{#1}}
+\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}{realheight}[true]{\csname L@realh#1\endcsname}
+\define@key{L}{novskip}{\setlength{\L@novskip}{#1}}
+\newcommand*{\LettrineOptionsFor}[2]{\@namedef{l@#1-keys}{#2}}
+\newdimen\LettrineWidth
+\newdimen\LettrineHeight
+\newdimen\LettrineDepth
+\def\lettrine{\@ifnextchar[\@lettrine{\@lettrine[]}}
+\def\@lettrine[#1]#2#3{%
+ \setcounter{L@lines}{\value{DefaultLines}}%
+ \setcounter{L@depth}{\value{DefaultDepth}}%
+ \renewcommand*{\L@hang}{\DefaultLhang}%
+ \renewcommand*{\L@oversize}{\DefaultLoversize}%
+ \renewcommand*{\L@raise}{\DefaultLraise}%
+ \renewcommand*{\L@ante}{}%
+ \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
+ \ifLettrineRealHeight\L@realhtrue\else\L@realhfalse\fi
+ \setkeys{L}{#1}%
+ \sbox{\L@tbox}{\LettrineTextFont{\LettrineSecondString}}%
+ \ifL@realh
+ \def\@tempa{#3}
+ \ifx\@tempa\@empty
+ \PackageWarning{lettrine.sty}%
+ {Empty second argument,\MessageBreak
+ ignoring option `realheight';}%
+ \else
+ \sbox{\L@tbox}{\LettrineTextFont{#3}}%
+ \fi
+ \fi
+ \if\DefaultOptionsFile\relax
+ \else
+ \begingroup
+ \InputIfFileExists{\DefaultOptionsFile}%
+ {}%
+ {\PackageWarning{lettrine.sty}%
+ {File \DefaultOptionsFile\space not found}%
+ }%
+ \def\color##1##{\l@color{##1}}%
+ \let\l@color\@gobbletwo
+ \def\textcolor##1##{\l@textcolor{##1}}%
+ \def\l@textcolor##1##2##3{##3}%
+ \expandafter\ifx\csname l@#2-keys\endcsname\relax
+ \gdef\l@LOKeys{}%
+ \else
+ \xdef\l@LOKeys{\csname l@#2-keys\endcsname}%
+ \fi
+ \endgroup
+ \def\KV@prefix{KV@L@}%
+ \let\@tempc\relax
+ \expandafter\KV@do\l@LOKeys,\relax,
+ \sbox{\L@lbox}{\LettrineFont #2}%
+ \setlength{\LettrineWidth}{\wd\L@lbox}%
+ \def\KV@prefix{KV@L@}%
+ \let\@tempc\relax
+ \expandafter\KV@do\l@LOKeys,\relax,
+ \setkeys{L}{#1}%
+ \fi
+ \ifL@image
+ \sbox{\L@lbox}{\LettrineFontEPS{#2}}%
+ \else
+ \sbox{\L@lbox}{\LettrineFont #2}%
+ \fi
+ \sbox{\L@tbox}{\LettrineTextFont{#3}}%
+ \@tempdima=\baselineskip
+ \ifnum\value{L@lines}=1
+ \setlength{\L@first}{\ht\L@lbox}%
+ \addtolength{\L@first}{-\ht\L@tbox}%
+ \setlength{\L@lraise}{\z@}%
+ \else
+ \setlength{\L@first}{-\value{L@lines}\@tempdima}%
+ \addtolength{\L@first}{\@tempdima}%
+ \sbox{\@tempboxa}{\LettrineTextFont x}%
+ \addtolength{\L@first}{-\ht\@tempboxa}%
+ \setlength{\L@lraise}{-\L@raise\L@first}%
+ \addtolength{\L@first}{\L@lraise}%
+ \addtolength{\L@first}{\ht\L@lbox}%
+ \addtolength{\L@lraise}{-\value{L@lines}\@tempdima}%
+ \addtolength{\L@lraise}{\@tempdima}%
+ \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
+ \vskip\@tempcnta\baselineskip
+ \else
+ \vskip\L@first
+ \fi
+ \fi
+ \setlength{\L@Pindent}{\wd\L@lbox}%
+ \addtolength{\L@Pindent}{-\L@hang\wd\L@lbox}%
+ \settowidth{\L@first}{\L@ante}%
+ \addtolength{\L@Pindent}{\L@first}%
+ \addtolength{\L@Pindent}{\L@Findent}%
+ \setlength{\L@first}{\linewidth}%
+ \addtolength{\L@first}{-\L@Pindent}%
+ \addtolength{\L@Nindent}{\L@Pindent}%
+ \setlength{\L@next}{\linewidth}%
+ \addtolength{\L@next}{-\L@Nindent}%
+ \addtolength{\L@Pindent}{\rightmargin}%
+ \addtolength{\L@Nindent}{\rightmargin}%
+ \setlength{\LettrineWidth}{\wd\L@lbox}%
+ \setlength{\LettrineHeight}{\ht\L@lbox}%
+ \setlength{\LettrineDepth}{\dp\L@lbox}%
+ \addtocounter{L@lines}{1}%
+ \addtocounter{L@lines}{\value{L@depth}}%
+ \def\L@parshape{\c@L@lines \the\L@Pindent \the\L@first}%
+ \@tempcnta=\tw@
+ \@whilenum \@tempcnta<\c@L@lines\do{%
+ \edef\L@parshape{\L@parshape \the\L@Nindent \the\L@next}%
+ \addtolength{\L@Nindent}{\L@slope}%
+ \addtolength{\L@next}{-\L@slope}%
+ \advance\@tempcnta\@ne}%
+ \edef\L@parshape{\L@parshape \rightmargin \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}%
+}
+\InputIfFileExists{lettrine.cfg}
+ {\typeout{Loading lettrine.cfg}}
+ {\typeout{lettrine.cfg not found, using default values}}
+\endinput
+%%
+%% End of file `lettrine.sty'.