From 2a4a5f695e45cb0addf21e35fe7d5089202afeca Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 5 May 2012 00:40:09 +0000 Subject: new latex package shadowtext (27apr12) git-svn-id: svn://tug.org/texlive/trunk@26201 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/shadowtext/shadowtext.sty | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/shadowtext/shadowtext.sty (limited to 'Master/texmf-dist/tex/latex/shadowtext') 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 -- cgit v1.2.3