summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/shipunov/drcaps.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-02-19 17:05:28 +0000
committerKarl Berry <karl@freefriends.org>2008-02-19 17:05:28 +0000
commitcf4d2164c6ed64dccbe7d8abdd8b0c95f8509a1c (patch)
treeadbb0d174b4ab3c017b085367d946ad7ba3b417b /Master/texmf-dist/tex/latex/shipunov/drcaps.sty
parentf95f16133feaac8dd66077e38d247937f819c815 (diff)
new latex collection shipunov (18feb08)
git-svn-id: svn://tug.org/texlive/trunk@6680 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/shipunov/drcaps.sty')
-rw-r--r--Master/texmf-dist/tex/latex/shipunov/drcaps.sty33
1 files changed, 33 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/shipunov/drcaps.sty b/Master/texmf-dist/tex/latex/shipunov/drcaps.sty
new file mode 100644
index 00000000000..0c010a19674
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/shipunov/drcaps.sty
@@ -0,0 +1,33 @@
+% Author: Alexey B. Shipunov (plantago@herba.msu.ru)
+
+\ProvidesPackage{drcaps}%
+ [2008/02/05 v0.2 Various drop caps]
+
+\newcount\Cap@
+\newdimen\Cap@D
+
+% Change this command
+\def\formatCap{\normalfont\Huge\bfseries}
+
+% Hanging initial
+\def\RCap#1{\vskip1ex\noindent%
+ {\formatCap#1\hskip.03em}%
+\ignorespaces}
+
+% Margin initial
+\def\HCap#1{\noindent\raisebox{-.75\baselineskip}[0pt][0pt]%
+ {\llap{\formatCap#1\hskip.1em}}%
+\ignorespaces}
+
+% "Normal" initial
+\def\DCap#1{\noindent\setbox0\hbox{\formatCap#1}%
+ \Cap@D\ht0
+ \advance\Cap@D by -1.6ex
+ \raisebox{-\Cap@D}[0pt][0pt]
+ {\makebox[0pt][r]{\copy0\hskip.2\wd0}}%
+ \Cap@\number\ht0
+ \divide\Cap@ by \baselineskip
+ \advance\Cap@ by 1
+\hangindent1.2\wd0 \hangafter-\Cap@ \ignorespaces}
+
+\endinput