summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/epsdice/epsdice.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-02-22 19:56:52 +0000
committerKarl Berry <karl@freefriends.org>2007-02-22 19:56:52 +0000
commite9a4f1887ce6787440123006b1a85ef9496a17bb (patch)
tree799890a6bf51f1a54a6ff86540220b92af3807c9 /Master/texmf-dist/tex/latex/epsdice/epsdice.sty
parentf8e28122b906902277cfad964b78f7c4cbb83c20 (diff)
epsdice 2.1 (19feb07)
git-svn-id: svn://tug.org/texlive/trunk@3984 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/epsdice/epsdice.sty')
-rw-r--r--Master/texmf-dist/tex/latex/epsdice/epsdice.sty94
1 files changed, 62 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/epsdice/epsdice.sty b/Master/texmf-dist/tex/latex/epsdice/epsdice.sty
index 444264952a7..0540f7b408b 100644
--- a/Master/texmf-dist/tex/latex/epsdice/epsdice.sty
+++ b/Master/texmf-dist/tex/latex/epsdice/epsdice.sty
@@ -1,31 +1,43 @@
-%
-% EPSDICE.STY by Thomas Heim
-%
-% LICENSE: LPPL
-%
-% a small package to include dice faces in .eps format
-%
-% provides the command \epsdice{#1}
-% taking one argument, an integer from 1 to 6
-%
-% See the file dicetest.tex for further info!
-%
-% Version 1.1 now works with pdfLaTeX as well
-%
-% 2001/02/15 -- thomas.heim@unibas.ch
-%
+%%
+%% This is file `epsdice.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% epsdice.dtx (with options: `package')
+%%
+%% This is a generated file; it is part of the `epsdice' package.
+%%
+%% Copyright (c) 2007 Thomas A. Heim
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License (LPPL) distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt; either
+%% version 1 of the License, or any later version.
+%%
+%% This file is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+%%
+%% Bug reports ON UNMODIFIED VERSIONS of this package, or
+%% suggestions for improvement and additional features
+%% should be directed to the author (thomas.heim@unibas.ch)
+%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{epsdice}[2001/02/15 Version 1.1 (TAH)]
+\ProvidesPackage{epsdice}[2007/02/15 by Thomas Heim (v. 2.1)]
\RequirePackage{graphicx}
\RequirePackage{ifthen}
-\InputIfFileExists{epsdice.cfg}{}{\def\dicefile{epsdice}}
-%
-\newcounter{face}
-\newcommand*\epsdice[1]{%
-\setcounter{face}{\number #1}%
-\ifthenelse{\value{face}>6}{\theface\setcounter{face}{0}}{}%
-\ifthenelse{\value{face}<0}{\theface\setcounter{face}{0}}{}%
-\ifcase\value{face}%
+\InputIfFileExists{epsdice.cfg}{}{\def\dicefile{dice}}
+\newcounter{eps@face}
+\newcommand*\epsdice[2][white]{%
+\setcounter{eps@face}{\number #2}%
+\ifthenelse{\value{eps@face}>6}{\theeps@face\setcounter{eps@face}{0}}{}%
+\ifthenelse{\value{eps@face}<0}{\theeps@face\setcounter{eps@face}{0}}{}%
+\ifthenelse {\equal{#1}{black}} {\addtocounter{eps@face}{6}} {}%
+\eps@dice{\value{eps@face}}}
+\newcommand*\eps@dice[1]{%
+\setcounter{eps@face}{\number #1}%
+\ifcase\value{eps@face}%
\PackageError{EPSDICE}{%
Argument is not a number, or its value\MessageBreak
lies outside the allowed range for dice}{%
@@ -35,22 +47,40 @@ Make sure the argument is either 1, 2, 3, 4, 5, or 6.\MessageBreak
\or
\includegraphics[height=1.75ex,viewport= 3 4 38 39,%
clip=true]{\dicefile}%
-\or
+\or
\includegraphics[height=1.75ex,viewport= 46 4 81 39,%
clip=true]{\dicefile}%
-\or
+\or
\includegraphics[height=1.75ex,viewport= 89 4 124 39,%
clip=true]{\dicefile}%
-\or
+\or
\includegraphics[height=1.75ex,viewport= 132 4 167 39,%
clip=true]{\dicefile}%
-\or
+\or
\includegraphics[height=1.75ex,viewport= 175 4 210 39,%
clip=true]{\dicefile}%
-\or
+\or
\includegraphics[height=1.75ex,viewport= 218 4 253 39,%
clip=true]{\dicefile}%
+\or
+ \includegraphics[height=1.75ex,viewport= 3 47 38 82,%
+ clip=true]{\dicefile}%
+\or
+ \includegraphics[height=1.75ex,viewport= 46 47 81 82,%
+ clip=true]{\dicefile}%
+\or
+ \includegraphics[height=1.75ex,viewport= 89 47 124 82,%
+ clip=true]{\dicefile}%
+\or
+ \includegraphics[height=1.75ex,viewport= 132 47 167 82,%
+ clip=true]{\dicefile}%
+\or
+ \includegraphics[height=1.75ex,viewport= 175 47 210 82,%
+ clip=true]{\dicefile}%
+\or
+ \includegraphics[height=1.75ex,viewport= 218 47 253 82,%
+ clip=true]{\dicefile}%
\fi}
-%
\endinput
-
+%%
+%% End of file `epsdice.sty'.