diff options
author | Karl Berry <karl@freefriends.org> | 2012-05-05 00:40:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-05-05 00:40:09 +0000 |
commit | 2a4a5f695e45cb0addf21e35fe7d5089202afeca (patch) | |
tree | 9724005d999d7699a87fa7786a29761da702e13f /Master/texmf-dist/tex/latex/shadowtext | |
parent | eec0646ed5dc50127d8b041759c9f48add56df9f (diff) |
new latex package shadowtext (27apr12)
git-svn-id: svn://tug.org/texlive/trunk@26201 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/shadowtext')
-rw-r--r-- | Master/texmf-dist/tex/latex/shadowtext/shadowtext.sty | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/shadowtext/shadowtext.sty b/Master/texmf-dist/tex/latex/shadowtext/shadowtext.sty new file mode 100644 index 00000000000..99a2683623a --- /dev/null +++ b/Master/texmf-dist/tex/latex/shadowtext/shadowtext.sty @@ -0,0 +1,50 @@ +\NeedsTeXFormat{LaTeX2e}[1996/12/01] +\ProvidesPackage{shadowtext} + [2012/04/26 v0.2 Shadow Text] + +\RequirePackage{color} + +\makeatletter + + + +\newlength\st@shadowoffsetx +\newlength\st@shadowoffsety + +\st@shadowoffsetx=1pt +\st@shadowoffsety=1pt + +\newcommand\shadowoffset[1]{\setlength\st@shadowoffsetx{#1}\setlength\st@shadowoffsety{#1}} +\newcommand\shadowoffsetx[1]{\setlength\st@shadowoffsetx{#1}} +\newcommand\shadowoffsety[1]{\setlength\st@shadowoffsety{#1}} +\newcommand\shadowcolor[1]{\definecolor{st@shadowcolor}{rgb}{#1}} + +\shadowcolor{0.66,0.66,0.66} + +\newlength\@sbw +\newlength\@sbh +\newlength\@picw +\newlength\@pich + +\newcommand\shadowtext[1]% +{% + \settowidth{\@sbw}{#1}% + \settoheight{\@sbh}{#1}% + \setlength{\@picw}{\@sbw}% + \setlength{\@pich}{\@sbh}% + \addtolength{\@picw}{\st@shadowoffsetx}% + \addtolength{\@pich}{\st@shadowoffsety}% + % + \edef\num@tw{\strip@pt\@sbw}% + \edef\num@th{\strip@pt\@sbh}% + \edef\num@pw{\strip@pt\@picw}% + \edef\num@ph{\strip@pt\@pich}% + \edef\num@offsetx{\strip@pt\st@shadowoffsetx}% + \edef\num@offsety{\strip@pt\st@shadowoffsety}% + \begin{picture}(\num@pw,\num@ph)(0,0) + \put(\num@offsetx,0){\makebox(\num@tw,\num@th)[tl]{\color{st@shadowcolor}\def\color##1{}\ignorespaces #1}} + \put(0,\num@offsety){\makebox(\num@tw,\num@th)[tl]{\ignorespaces #1}} + \end{picture}\ignorespaces% +} + +\makeatother
\ No newline at end of file |