diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:54:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:54:57 +0000 |
commit | 595e9170a6c848f85334940ce295c14ba999bc0d (patch) | |
tree | 871e46148d55d10ab9a1f7a89218aee103fe2742 /Master/texmf-dist/tex/latex/epsdice/epsdice.sty | |
parent | 04eac48071c101df0012fc2f6c2d6c396e1f268c (diff) |
epsdice
git-svn-id: svn://tug.org/texlive/trunk@869 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.sty | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/epsdice/epsdice.sty b/Master/texmf-dist/tex/latex/epsdice/epsdice.sty new file mode 100644 index 00000000000..444264952a7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/epsdice/epsdice.sty @@ -0,0 +1,56 @@ +% +% 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 +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{epsdice}[2001/02/15 Version 1.1 (TAH)] +\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}% + \PackageError{EPSDICE}{% +Argument is not a number, or its value\MessageBreak +lies outside the allowed range for dice}{% +Make sure the argument is either 1, 2, 3, 4, 5, or 6.\MessageBreak +-- Just go on and I'll write whatever you typed;\MessageBreak + the output may not make much sense, though}% +\or + \includegraphics[height=1.75ex,viewport= 3 4 38 39,% + clip=true]{\dicefile}% +\or + \includegraphics[height=1.75ex,viewport= 46 4 81 39,% + clip=true]{\dicefile}% +\or + \includegraphics[height=1.75ex,viewport= 89 4 124 39,% + clip=true]{\dicefile}% +\or + \includegraphics[height=1.75ex,viewport= 132 4 167 39,% + clip=true]{\dicefile}% +\or + \includegraphics[height=1.75ex,viewport= 175 4 210 39,% + clip=true]{\dicefile}% +\or + \includegraphics[height=1.75ex,viewport= 218 4 253 39,% + clip=true]{\dicefile}% +\fi} +% +\endinput + |