From 075c259b1e6088c32010f6f9495effaf7c3c7232 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 21 May 2012 00:00:58 +0000 Subject: shadowtext (18may12) git-svn-id: svn://tug.org/texlive/trunk@26522 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/shadowtext/README | 25 +++++++- .../texmf-dist/doc/latex/shadowtext/shadowtext.pdf | Bin 141841 -> 142989 bytes .../texmf-dist/doc/latex/shadowtext/shadowtext.tex | 53 +++++++++++++--- .../texmf-dist/tex/latex/shadowtext/shadowtext.sty | 70 +++++++++++++++------ 4 files changed, 118 insertions(+), 30 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/shadowtext/README b/Master/texmf-dist/doc/latex/shadowtext/README index df41739f75d..afeb7642ac1 100644 --- a/Master/texmf-dist/doc/latex/shadowtext/README +++ b/Master/texmf-dist/doc/latex/shadowtext/README @@ -9,9 +9,13 @@ shadowtext is the original work of Yori Zwols COPYRIGHT 2010-2012 by Yori Zwols . -This program can be redistributed and/or modified under the terms -of the LaTeX Project Public License Distributed from CTAN -archives in directory macros/latex/base/lppl.txt. +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either version 1.3 +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 2005/12/01 or later. 2 - Introduction @@ -27,3 +31,18 @@ customizable. ------------- Documentation is available in the form of the file shadowtext.tex. + + +4 - Version History + --------------- + +v0.3: - Fixed some errors in the documentation + - Colors specified in \shadowcolor should now be specified using + color names, not RGB values. The command for specifying colors + using RGB values has been renamed to \shadowrgb. + (I apologize for the backwards incompatibility). + - The base line of the text is now correct. + +v0.2: - First public release + + diff --git a/Master/texmf-dist/doc/latex/shadowtext/shadowtext.pdf b/Master/texmf-dist/doc/latex/shadowtext/shadowtext.pdf index 7d0dc038265..b3dee44f098 100644 Binary files a/Master/texmf-dist/doc/latex/shadowtext/shadowtext.pdf and b/Master/texmf-dist/doc/latex/shadowtext/shadowtext.pdf differ diff --git a/Master/texmf-dist/doc/latex/shadowtext/shadowtext.tex b/Master/texmf-dist/doc/latex/shadowtext/shadowtext.tex index 6ea702768fb..641d025f23e 100644 --- a/Master/texmf-dist/doc/latex/shadowtext/shadowtext.tex +++ b/Master/texmf-dist/doc/latex/shadowtext/shadowtext.tex @@ -1,10 +1,28 @@ +%% This is file `shadowtext.tex', +%% Copyright 2012 Yori Zwols +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% 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 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Y. Zwols. +% +% + \documentclass{article} +\usepackage{xcolor} \usepackage{shadowtext} \usepackage{multicol} \begin{document} -\title{The shadowbox package} +\title{\bf The shadowtext package \\ \bigskip \normalfont\small Version 0.3} \author{Y. Zwols (yz2198@columbia.edu)} \maketitle @@ -66,21 +84,40 @@ the horizontal and vertical offset. For example: \end{minipage} \section{Changing the color of the shadow} -The color of the shadow may be change by using the {\tt setshadowcolor} command.\footnote{Internally, the +The color of the shadow may be changed by using the {\tt shadowcolor} and {\tt shadowrgb} commands.\footnote{Internally, the package uses the {\tt $\backslash$color} command from the color package to set its color} -For example, the following code adds a blue shadow: +The {\tt shadowcolor} command takes as an argument the name of a color, whereas {\tt shadowrgb} takes a comma-separated list of red, green, blue +values. For example, the following code adds a blueish shadow using {\tt $\backslash$shadowcolor}: \begin{minipage}{\textwidth} \begin{multicols*}{2} {\footnotesize \begin{verbatim} \shadowoffset{2pt} -\setshadowcolor{0.66, 0.66, 1} +\shadowcolor{blue!40!white} \shadowtext{This is a shadow text} \end{verbatim}} \shadowoffset{2pt} -\shadowcolor{0.66, 0.66, 1} +\shadowcolor{blue!40!white} +\shadowtext{This is a shadow text}\\ +\phantom{} +\end{multicols*} +\end{minipage} + +The following code produces a red shadow using {\tt $\backslash$shadowrgb}: + +\begin{minipage}{\textwidth} +\begin{multicols*}{2} +{\footnotesize +\begin{verbatim} +\shadowoffset{2pt} +\shadowrgb{1.0, 0.5, 0.5} +\shadowtext{This is a shadow text} +\end{verbatim}} + +\shadowoffset{2pt} +\shadowrgb{1.0, 0.5, 0.5} \shadowtext{This is a shadow text}\\ \phantom{} \end{multicols*} @@ -96,6 +133,7 @@ The following code illustrates how to use shadowtext in more interesting setting {\footnotesize \begin{verbatim} \definecolor{navy}{rgb}{0,0,0.5} +\shadowrgb{0.8, 0.8, 1} \shadowoffset{1pt} \shadowtext{ \color{navy} @@ -104,10 +142,11 @@ The following code illustrates how to use shadowtext in more interesting setting \end{verbatim}} \color{navy} -\shadowcolor{0.8, 0.8, 1} +\shadowrgb{0.8, 0.8, 1} \shadowoffset{2pt} \shadowtext{\fontsize{16}{16}\selectfont \textbf{Large!}}\\ \phantom{}\\ +\phantom{}\\ \phantom{} \end{multicols*} \end{minipage} @@ -206,4 +245,4 @@ The following code illustrates how to use shadowtext in more interesting setting \end{minipage} -\end{document} \ No newline at end of file +\end{document} diff --git a/Master/texmf-dist/tex/latex/shadowtext/shadowtext.sty b/Master/texmf-dist/tex/latex/shadowtext/shadowtext.sty index 99a2683623a..a6be4932350 100644 --- a/Master/texmf-dist/tex/latex/shadowtext/shadowtext.sty +++ b/Master/texmf-dist/tex/latex/shadowtext/shadowtext.sty @@ -1,6 +1,31 @@ +%% This is file `shadowtext.sty', +%% Copyright 2012 Yori Zwols +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% 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 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Y. Zwols. +% +% +% Version history +% v0.3: - Fixed some errors in the documentation +% - Colors specified in \shadowcolor should now be specified using +% color names, not RGB values. The command for specifying colors +% using RGB values has been renamed to \shadowrgb. +% (I apologize for the backwards incompatibility). +% - The base line of the text is now correct. +% + \NeedsTeXFormat{LaTeX2e}[1996/12/01] \ProvidesPackage{shadowtext} - [2012/04/26 v0.2 Shadow Text] + [2012/05/07 v0.3 Shadow Text] \RequirePackage{color} @@ -17,34 +42,39 @@ \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}} +\newcommand\shadowcolor[1]{\def\st@shadowcolor{#1}} +\newcommand\shadowrgb[1]{\definecolor{st@shadowcolorrgb}{rgb}{#1}\shadowcolor{st@shadowcolorrgb}} -\shadowcolor{0.66,0.66,0.66} +\shadowrgb{0.66,0.66,0.66} -\newlength\@sbw -\newlength\@sbh -\newlength\@picw -\newlength\@pich +\newlength\st@temp@width +\newlength\st@temp@height +\newlength\st@pic@width +\newlength\st@pic@height \newcommand\shadowtext[1]% {% - \settowidth{\@sbw}{#1}% - \settoheight{\@sbh}{#1}% - \setlength{\@picw}{\@sbw}% - \setlength{\@pich}{\@sbh}% - \addtolength{\@picw}{\st@shadowoffsetx}% - \addtolength{\@pich}{\st@shadowoffsety}% + \begingroup% + \settowidth{\st@temp@width}{#1}% + \settoheight{\st@temp@height}{#1}% + \setlength{\st@pic@width}{\st@temp@width}% + \setlength{\st@pic@height}{\st@temp@height}% + \addtolength{\st@pic@width}{\st@shadowoffsetx}% + \addtolength{\st@pic@height}{\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@tw{\strip@pt\st@temp@width}% + \edef\num@th{\strip@pt\st@temp@height}% + \edef\num@pw{\strip@pt\st@pic@width}% + \edef\num@ph{\strip@pt\st@pic@height}% \edef\num@offsetx{\strip@pt\st@shadowoffsetx}% \edef\num@offsety{\strip@pt\st@shadowoffsety}% + \raisebox{-\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(\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% + \end{picture}}% + \endgroup% + \ignorespaces% } -\makeatother \ No newline at end of file +\makeatother -- cgit v1.2.3