summaryrefslogtreecommitdiff
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
parentf8e28122b906902277cfad964b78f7c4cbb83c20 (diff)
epsdice 2.1 (19feb07)
git-svn-id: svn://tug.org/texlive/trunk@3984 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/tools/tpm-ctan-check2
-rw-r--r--Master/texmf-dist/doc/latex/epsdice/README69
-rw-r--r--Master/texmf-dist/doc/latex/epsdice/dice.eps15
-rw-r--r--Master/texmf-dist/doc/latex/epsdice/dice.pdfbin0 -> 4632 bytes
-rw-r--r--Master/texmf-dist/doc/latex/epsdice/epsdice.dvibin5884 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/epsdice/epsdice.pdfbin0 -> 72036 bytes
-rw-r--r--Master/texmf-dist/doc/latex/epsdice/epsdice.tex102
-rw-r--r--Master/texmf-dist/doc/latex/epsdice/readme23
-rw-r--r--Master/texmf-dist/source/latex/epsdice/epsdice.dtx402
-rw-r--r--Master/texmf-dist/source/latex/epsdice/epsdice.ins49
-rw-r--r--Master/texmf-dist/tex/latex/epsdice/diceface.eps79
-rw-r--r--Master/texmf-dist/tex/latex/epsdice/epsdice.cfg3
-rw-r--r--Master/texmf-dist/tex/latex/epsdice/epsdice.eps11
-rw-r--r--Master/texmf-dist/tex/latex/epsdice/epsdice.sty94
-rw-r--r--Master/texmf-dist/tpm/epsdice.tpm19
-rw-r--r--Master/texmf/lists/epsdice12
16 files changed, 616 insertions, 264 deletions
diff --git a/Build/tools/tpm-ctan-check b/Build/tools/tpm-ctan-check
index 4792595ec3a..2a3dc1ba5e6 100755
--- a/Build/tools/tpm-ctan-check
+++ b/Build/tools/tpm-ctan-check
@@ -32,7 +32,7 @@ my @WorkingTPM = qw(
draftwatermark dramatist dtxtut dvdcoll dvipsconfig dyntree
ebong ebsthesis eCards economic ednotes eemeir egameps egplot eijkhout
ellipsis elpres elsevier elsevier-bib emulateapj endfloat endheads
- engrec enumitem envbig epiolmec eplain
+ engrec enumitem envbig epiolmec eplain epsdice
epsf epslatex-fr eqlist eqparbox es-tex-faq
ESIEEcv esint esint-type1 eskd eskdx eso-pic etaremune
ethiop ethiop-t1 eulervm euro europecv eurosans everypage exam
diff --git a/Master/texmf-dist/doc/latex/epsdice/README b/Master/texmf-dist/doc/latex/epsdice/README
new file mode 100644
index 00000000000..781ae098d18
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/epsdice/README
@@ -0,0 +1,69 @@
+Package: EPSDICE
+Version: 2.1
+Date: 2007/02/15
+Author: Thomas Heim (thomas.heim@unibas.ch)
+Purpose: A scalable dice font
+License: LPPL
+
+Distributed files:
+
+ epsdice.ins -- docstrip installer file
+ epsdice.dtx -- source and sample doc
+ dice.pdf -- dice drawings in pdf format
+ README -- this file
+ epsdice.pdf -- documentation (from LaTeX -> dvips -> pstopdf)
+
+Generated files:
+
+ epsdice.sty -- the package
+ epsdice.cfg -- a config file
+ dice.eps -- dice drawings in eps format
+
+Test installation:
+
+With all distributed files in your present
+working directory, run epsdice.ins through LaTeX.
+To test the package, you can reproduce the documentation
+(epsdice.pdf) by running epsdice.dtx (twice) through pdfLaTeX
+or through LaTeX -> dvips -> pstopdf.
+
+If you decide to keep the package, move the files
+ epsdice.sty epsdice.cfg dice.eps dice.pdf
+to /tex/latex/epsdice in your local texmf tree
+according to the instructions in epsdice.dtx/ins.
+
+Changes from version 2.0:
+
+- clean up the documentation
+- minor bug fix in generated file dice.eps: removed spurious
+ comment line at beginning
+
+Changes from version 1.2:
+
+ (suggested by Christoph Zurnieden; Thanks!)
+
+- CHANGE TO USER INTERFACE:
+ \epsdice now recognises an OPTIONAL ARGUMENT [black] for
+ reversed colors (white dots on black background)
+- additional drawings (originally by Christoph Zurnieden)
+ in PostScript format
+
+Changes from version 1.1:
+
+- Introduced `@' in counter name (program encapsulation)
+- More detailed documentation of the PostScript code
+ is now included in the sample document
+- renamed files with drawings to `dice.eps' and `dice.pdf'
+- Now distributed as .ins and .dtx files (plus binary .pdf)
+- *** NO CHANGES TO USER INTERFACE ***
+
+Changes from version 1.0:
+
+ (suggested by Rolf Niepraschk; Thanks!)
+
+- Removed package option [dvips] for graphicx.
+- Changed bounding box specifications to viewport specification
+ to facilitate clipping in pdflatex.
+- Added epsdice.pdf (generated from epsdice.eps).
+- Replaced documentation by dicetest.tex.
+
diff --git a/Master/texmf-dist/doc/latex/epsdice/dice.eps b/Master/texmf-dist/doc/latex/epsdice/dice.eps
new file mode 100644
index 00000000000..c9ba87628cf
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/epsdice/dice.eps
@@ -0,0 +1,15 @@
+%!PS-Adobe-2.0 EPSF-1.2
+%%BoundingBox: 0 0 258 86
+/frame { /n exch def /xoffset n 1 sub 43 mul def gsave newpath
+xoffset yoffset translate 32 5 bw sub moveto 32 10 r -90 0 arc
+37 bw add 32 lineto 32 32 r 0 90 arc 10 37 bw add lineto
+10 32 r 90 180 arc 5 bw sub 10 lineto 10 10 r 180 270 arc closepath
+bw 0 eq { stroke } { fill } ifelse grestore } def
+/dot { /y exch def /x exch def /n exch def /xoffset n 1 sub 43
+mul def gsave newpath xoffset yoffset translate x 8 mul 5 add y 8 mul
+5 add 3.5 0 360 arc closepath bw setgray fill grestore } def
+2 setlinewidth 0 1 1 { /bw exch def /yoffset bw 43 mul def /r 5 bw
+add def 0 setgray 1 1 6 { frame } for 2 1 6 { dup 1 2 3 { dup dot }
+for } for 1 2 5 { 2 2 dot } for 4 1 6 { dup 1 3 dot 3 1 dot } for
+1 2 3 { 6 exch 2 dot } for } for
+%%EOF
diff --git a/Master/texmf-dist/doc/latex/epsdice/dice.pdf b/Master/texmf-dist/doc/latex/epsdice/dice.pdf
new file mode 100644
index 00000000000..8f758ae9ac3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/epsdice/dice.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/epsdice/epsdice.dvi b/Master/texmf-dist/doc/latex/epsdice/epsdice.dvi
deleted file mode 100644
index 3022ad31d84..00000000000
--- a/Master/texmf-dist/doc/latex/epsdice/epsdice.dvi
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/epsdice/epsdice.pdf b/Master/texmf-dist/doc/latex/epsdice/epsdice.pdf
new file mode 100644
index 00000000000..bb0f5bb6e8d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/epsdice/epsdice.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/epsdice/epsdice.tex b/Master/texmf-dist/doc/latex/epsdice/epsdice.tex
deleted file mode 100644
index a379bc86939..00000000000
--- a/Master/texmf-dist/doc/latex/epsdice/epsdice.tex
+++ /dev/null
@@ -1,102 +0,0 @@
-%
-% EPSDICE.TEX
-%
-% some notes on the package EPSDICE by Thomas Heim
-%
-% LICENSE: LPPL
-%
-% 2001/02/11 -- thomas.heim@unibas.ch
-%
-\documentclass[11pt]{article}
-\usepackage{epsdice}
-%\pagestyle{empty}
-%
-\title{Package `epsdice' --- a scalable dice font}
-\author{2001/02/11 -- Version 1.0 \\[.5ex] Thomas Heim \\[.5ex]
- (thomas.heim@unibas.ch)}
-\date{}
-\begin{document}
-\maketitle
-\section{Introduction}
-Dice fonts are already available in \textsc{metafont} format.
-\begin{quote}
-\verb+\begin{ShamelessPlug}+ \\[.5ex]
-I should know, I wrote one myself: \verb+dice3d.mf+ \\[.5ex]
-\verb+\end{ShamelessPlug}+
-\end{quote}
-For some applications it seems preferable, however, to have the fonts
-in scalable form. The package \verb+epsdice+ fills this gap.
-
-\texttt{epsdice.sty} provides a single command,
-\verb+\epsdice{#1}+. It takes one argument, an integer from 1 to 6.
-The value of a counter is allowed as an argument, too, so automatic
-representation of (generated or input) data is possible as well.
-Depending on the value of the argument, \verb+\epsdice+ includes the
-appropriately clipped region from the encapsulated PostScript file
-\verb+epsdice.eps+ that contains simple drawings of dice faces.
-The drawings scale with the current font because the height of
-the included graphics file is set in terms of `ex' units.
-%
-\section{Requirements and limitations}
-\verb+epsdice+ relies on the \verb+graphicx+ package with package
-option \verb+[dvips]+ to include the encapsulated PostScript file.
-It also uses the \verb+ithen+ package to validate the arguments
-(error checking).
-
-Although the PostScript file is rather small,
-including it too many times may not be desirable.
-%
-\section{Configuring this package}
-To install the package,
-simply move the following files somewhere in your ``local texmf tree'':
-\verb+epsdice.{sty, eps, cfg}+, as well as \verb+diceface.eps+.
-I suggest a new subdirectory
-\verb+/$LOCALTEXMF/tex/latex/epsdice/*+, where \verb+$LOCALTEXMF+ stands
-for your ``local texmf tree'' (what a surprise). Refresh your
-\TeX-system's file name database, and that's it, you're all set!
-The remainder of this section applies only if you want to change
-the default settings.
-
-The command \verb+\epsdice+ works by including an encapsulated postscript
-file, so this file must be found by \LaTeXe.
-The package comes with a configuration file \verb+epsdice.cfg+ containing
-the file name in the variable \verb+\dicefile+. By default, this variable
-points to the file \verb+epsdice.eps+ (without file name extension).
-If you don't like my drawings and would like to ``roll your own''
-(PostScript code, not dice), a look at the file \verb+diceface.eps+
-may help. It contains the same PostScript code as \verb+epsdice.eps+,
-with some comments about what's going on.
-If you intend to keep the \verb+.eps+ file with the dice drawings in a
-different place or if you want to use your own version
-you have to edit the configuration file \verb+epsdice.cfg+ accordingly,
-by adding the path to the file name, or by changing the file name in the
-variable \verb+\dicefile+.
-
-If a configuration file does not exist, the file \verb+epsdice.eps+
-is assumed to be located in the present working directory.
-%
-\section{Examples}
-This text shows dice faces in an 11pt environment:
-\epsdice{1} \epsdice{2} \epsdice{3} \epsdice{4} \epsdice{5} \epsdice{6}.
-The pictures fit into the surrounding text.
-
-{\Large
-Here is some large text. The dice pictures scale accordingly:%
-\footnote{\ldots as they do in footnotes, \epsdice{\value{footnote}},
-like this.} \epsdice{3}. See?} The package works with standard counters,
-too: Here's the result of \verb+\epsdice{\value{page}}+
-\epsdice{\value{page}}.
-%
-\section{Errors}
-Of course it doesn't make sense to ask for dice faces with arguments
-other than 1, 2, 3, 4, 5, or 6. The package generates error
-messages and simply prints the offending argument in the \TeX\ output.
-Uncomment the final lines in this documentation to see this feature
-in action.
-% This generates `benign' errors: \epsdice{99} and \epsdice{-3}.
-% The following is more serious, generating two different errors:
-% \epsdice{epsfoo}. Nevertheless, output continues with a fall-back
-% solution.
-%
-\end{document}
-
diff --git a/Master/texmf-dist/doc/latex/epsdice/readme b/Master/texmf-dist/doc/latex/epsdice/readme
deleted file mode 100644
index 56294286bcc..00000000000
--- a/Master/texmf-dist/doc/latex/epsdice/readme
+++ /dev/null
@@ -1,23 +0,0 @@
-Package: EPSDICE
-Version: 1.1
-Date: 2001/02/15
-Author: Thomas Heim (thomas.heim@unibas.ch)
-Purpose: A scalable dice font
-
-Test installation:
-
-With all files (epsdice.* and diceface.eps) in your present
-working directory, run dicetest.tex through LaTeX.
-If you decide to keep the package, move the files according
-to the instructions in dicetest.tex. Enjoy!
-
-Changes from version 1.0:
-
- (suggested by Rolf Niepraschk; Thanks!)
-
-- Removed package option [dvips] for graphicx.
-- Changed bounding box specifications to viewport specification
- to facilitate clipping in pdflatex.
-- Added epsdice.pdf (generated from epsdice.eps).
-- Replaced documentation by dicetest.tex.
-
diff --git a/Master/texmf-dist/source/latex/epsdice/epsdice.dtx b/Master/texmf-dist/source/latex/epsdice/epsdice.dtx
new file mode 100644
index 00000000000..e0060567d5c
--- /dev/null
+++ b/Master/texmf-dist/source/latex/epsdice/epsdice.dtx
@@ -0,0 +1,402 @@
+% \iffalse
+%
+% EPSDICE.DTX by Thomas Heim (thomas.heim@unibas.ch)
+%
+% LICENSE: LPPL
+%
+% a small package to include dice faces in .eps format
+%
+% provides the command \epsdice{#1}
+% taking one mandatory argument, an integer from 1 to 6
+% and one optional argument: 'black' (for black background, with white dots);
+% default is white background with black dots)
+%
+% HISTORY:
+% ========
+%
+% 2001/02/11 -- first release, for dvips only
+%
+% 2001/02/13 -- now works under pdfLaTeX, too
+% (with Rolf Niepraschk's help)
+%
+% 2001/09/04 -- "program encapsulated" by introducing "@" in counter name
+% -- distributed as .dtx and .ins files, plus binary .pdf file
+% -- some modifications in documentation
+% -- NO CHANGES IN USER INTERFACE (tah)
+%
+% 2007/02/11 -- added OPTIONAL argument [black] to user interface, for
+% reversed colors (extension suggested and drawings provided
+% by Christoph Zurnieden, czurnieden@gmx.de)
+%
+% 2007/02/15 -- removed spurious comment line from generated EPS file
+% (thanks to Christoph for spotting the bug)
+% \fi
+%<*sampledoc>
+\documentclass[11pt]{article}
+\usepackage{epsdice}
+%
+\title{Package `epsdice' --- a scalable dice font}
+\author{2007/02/15 -- Version 2.1 \\[.5ex] Thomas Heim \\[.5ex]
+ (thomas.heim@unibas.ch)}
+\date{}
+\begin{document}
+\maketitle
+\section{Introduction}
+Dice fonts are already available in \textsc{metafont} format.
+(I should know, I wrote one myself: \texttt{dice3d.mf}.)
+For some applications it seems preferable, however, to have the fonts
+in scalable form. The package \texttt{epsdice} fills this gap.
+
+\texttt{epsdice.sty} provides a single command,
+\verb+\epsdice{#1}+, taking one mandatory argument, an integer from 1 to 6,
+and recognising one optional argument, namely \verb+[black]+
+for a black die with white dots.\footnote{Thanks to Chrisoph Zurnieden for
+suggesting the extension with reversed colors, and for adjusting the drawings
+to this purpose.} The default behavior (i.e., with \emph{no} optional argument
+or with \emph{any optional argument other} than \verb+[black]+) results in
+a white die with black dots.
+
+The mandatory argument may also be the value of a counter. Thus
+automatic representation of (generated or input) data is possible as well.
+Of course, values outside the range 1--6 will not be represented as die faces.
+
+Depending on the value of the argument, \verb+\epsdice+ includes the
+appropriately clipped region from a file containing simple drawings
+of die faces. The drawings scale with the current font because the
+height of the included graphics file is set in terms of `ex' units.
+%
+\section{Requirements and limitations}
+\texttt{epsdice} relies on the \texttt{graphicx} package to include
+the drawings.
+It also uses the \texttt{ifthen} package to validate the arguments
+(error checking).
+
+The package has been tested with two widely used package drivers
+for \texttt{graphicx}: \verb+[dvips]+ and \verb+[pdftex]+. By
+default, the command \verb+\epsdice+ includes
+\texttt{epsdice.eps} under \LaTeXe, and \texttt{epsdice.pdf}
+under pdf\LaTeX, respectively\footnote{Many thanks to Rolf
+Niepraschk for his help with the latter!}
+(unless your \texttt{graphics.cfg} file specifies non-standard
+settings).
+
+Clipping is supported only in pdf\TeX\ versions
+$\ge 0.14$. You will also need an up-to-date version of
+\texttt{pdftex.def}: Clipping is not supported in versions
+\texttt{v0.03c} \texttt{[2000/09/04]} or earlier.
+If your pdf\TeX\ is up-to-date but
+you still receive error messages about clipping not being
+supported, get the latest \texttt{pdftex.def}
+here: \\[.5ex]
+\verb+http://www.tug.org/applications/pdftex/pdftex.def+
+\\[.5ex]
+I tested the package successfully with pdf\TeX\ 0.14e
+and \texttt{pdftex.def} v0.03f \texttt{[2000/11/10]}.
+%
+\section{Configuring this package}
+To finish the installation of the package,
+simply move the following files somewhere in your ``local texmf tree'':
+\begin{verbatim}
+ epsdice.sty, epsdice.cfg, dice.eps, dice.pdf
+\end{verbatim}
+e.g.\ to a new subdirectory
+\verb+/tex/latex/epsdice/+. Refresh the
+\TeX-system's file name database, and that's it, you're all set!
+The remainder of this section applies only if you want to change
+the default settings.
+
+The command \verb+\epsdice+ works by including an
+external file, so this file must be found by \LaTeXe. The package comes with
+a configuration file \texttt{epsdice.cfg} containing the file name in the
+variable \verb+\dicefile+. By default, this variable points to the file
+\verb+dice.{eps|pdf}+ (without file name extension). If you don't like my
+drawings and would like to ``roll your own'', a look at section~\ref{pscode}
+may give some hints.
+It contains the same PostScript code as \texttt{dice.eps},
+with some comments about what's going on. Conversion to \textsc{pdf}
+format has been accomplished with \texttt{epstopdf} (using
+GhostScript), see pdf\TeX's web page.
+
+If you intend to keep the external file with the dice drawings in a
+different place or if you want to use your own version you have to
+edit the configuration file \texttt{epsdice.cfg} accordingly,
+by adding the path to the file name, or by changing the file name in the
+variable \verb+\dicefile+.
+If a configuration file does not exist, the external file
+is assumed to be located in the present working directory.
+%
+\section{Examples}
+Die faces in an 11pt environment: The pictures fit into the surrounding
+text, as in \epsdice{1} \epsdice[black]{2} \epsdice[black]{3}
+\epsdice[red]{4} \epsdice[black]{5} \epsdice[white]{6}. The code used to set
+these die faces was:
+\begin{verbatim}
+\epsdice{1} \epsdice[black]{2} \epsdice[black]{3}
+\epsdice[red]{4} \epsdice[black]{5} \epsdice[white]{6}
+\end{verbatim}
+The only effective option to the command \verb+\epsdice+ is \verb+[black]+.
+Anything else results in the default behavior with white background.
+
+\medskip
+{\Large
+Here is some \verb+\Large+ text. The die pictures scale accordingly:%
+\footnote{\ldots as they do in footnotes, \epsdice{\value{footnote}},
+like this.} \epsdice{3} \epsdice[black]{5}. See?}
+
+\medskip
+Finally, note that the package works with
+standard counters, too: Here's the result of \verb+\epsdice{\value{section}}+
+\epsdice{\value{section}}.
+%
+\section{Drawing dice in PostScript}
+\label{pscode}
+Something as simple as a ``square with dots
+on it'' is rather straightforward to draw in PostScript. The first line
+\begin{flushleft}
+\verb+%!PS-Adobe-2.0 EPSF-1.2+
+\end{flushleft}
+is just a standard header. Next comes the bounding box: Each face measures
+$32\times 32$~pt, centered in a $43\times43$~pt box. For six faces in a row,
+this gives a bounding box of $258\times43$~pt. We have two rows of dice,
+the lower row containing the white dice with black dots, the upper one the
+black dice with white dots. So the total bounding box is $258\times86$~pt.
+The background color will be stored in the variable $bw=0$ or 1.
+\begin{verbatim}
+%%BoundingBox: 0 0 258 86
+\end{verbatim}
+The \verb+/frame+ macro defines a simple box with rounded corners. It takes
+one argument, the face index $n$, and calculates a corresponding $x$-offset:
+$x_{\mathrm{off}}=43 (n-1)$. The point $(x_{\mathrm{off}},y_{\mathrm{off}})$
+then becomes the origin of the coordinate system for this particular face.
+This macro uses the variable $bw$ to calculate the vertical offset
+$y_{\mathrm{off}}=43 bw$.
+The frame consists of straight lines separated by 5~pt from the outer margin,
+and of four quarter circles with radius $r$ ($r=5$~pt for black on white and
+$r=6$~pt for white on black) centered at $(10,10),\,(32,10),\,(10,32)$, and $(32,32)$.
+\begin{verbatim}
+/frame {
+ /n exch def % take n off the stack, store it
+ /xoffset n 1 sub 43 mul def % xoffset = 43*(n-1)
+ gsave % save the graphics state
+ newpath % start a new path
+ xoffset yoffset translate % move origin to (xoffset,yoffset)
+ 32 5 bw sub moveto % go to (32,5) or (32,4) in this system
+ 32 10 r -90 0 arc % SE quarter circle around (32,10)
+ 37 bw add 32 lineto % right line
+ 32 32 r 0 90 arc % NE quarter circle around (32,32)
+ 10 37 bw add lineto % top line
+ 10 32 r 90 180 arc % NW quarter circle around (10,32)
+ 5 bw add 10 lineto % left line
+ 10 10 r 180 270 arc % SW quarter circle around (10,10)
+ closepath % bottom line (closes the path)
+ bw 0 eq { stroke } % either paint (lower row, bw=0)
+ { fill } ifelse % or fill (upper row, bw=1) the path
+ grestore % restore graphics state
+} def
+\end{verbatim}
+The dot positions are labelled within a face by $(x,y)$-coordinates
+running from $(1,1)$
+for bottom left to $(3,3)$ for top right. The dot itself is
+a filled circle with radius $3.5$~pt. Change the dots' positions
+within the frame, or their radius, as you like. The \verb+/dot+ macro
+takes three arguments off the stack: (i) the face index, to determine
+the $x$-offset, (ii) the $x$-coordinate (1, 2, or 3) on the face, and
+(iii) the $y$-coordinate (1, 2, or 3) on the face.
+\begin{verbatim}
+/dot {
+ /y exch def % take y-coordinate off the stack
+ /x exch def % take x-coordinate off the stack
+ /n exch def % take face index n off the stack
+ /xoffset n 1 sub 43 mul def % xoffset = 43*(n-1)
+ gsave % save the graphics state
+ newpath % start a new path
+ xoffset yoffset translate % move origin to (xoffset,yoffset)
+ x 8 mul 5 add % the dot's x-position: 8*x+5
+ y 8 mul 5 add % the dot's y-position: 8*y+5
+ 3.5 0 360 arc % a circle with radius 3.5 pt
+ closepath % close the circle
+ bw setgray % set the appropriate color
+ fill % fill the circle
+ grestore % restore graphics state
+} def
+\end{verbatim}
+Now choose a linewidth (2~pt)
+\begin{verbatim}
+2 setlinewidth
+\end{verbatim}
+and loop over the background color (and hence the rows) from 0 to 1.
+The color counter is stored in $bw$ and used
+to determine $y_{\mathrm{off}}$ as well as the radius of the circles,
+$r=5+bw$~pt.
+\begin{verbatim}
+0 1 1 { % set up loop from 0 to 1
+ /bw exch def % store loop index in bw
+ /yoffset bw 43 mul def % yoffset = 43*bw
+ /r 5 bw add def % radius r = 5+bw
+ 0 setgray % set color to black for all frames
+\end{verbatim}
+All we have to do now is draw the six faces
+\begin{verbatim}
+ 1 1 6 { frame } for % call /frame macro for n=1..6
+\end{verbatim}
+and fill in the appropriate dots.
+The bottom left and top right dots appear on faces 2, 3, 4, 5, and 6.
+Thus there is an outer loop from 2 to 6 in steps of 1. For each of these
+face indices, we call the dot macro with $(x,y)$-argument equal to
+$(1,1)$ and $(3,3)$. This can be achieved with an inner loop running
+from 1 to 3 in steps of 2. Because the $x$- and $y$-coordinates coincide
+for these particular points, we obtain them by duplicating the inner
+loop index. The \verb+/dot+ macro gobbles not only the $x$- and
+$y$-coordinates but the face index as well. In order to draw \emph{two}
+dots on the same face, we thus have to duplicate the outer loop index, too.
+\begin{verbatim}
+ 2 1 6 { % start loop 2 to 6 in steps of 1
+ dup % duplicate index (two dots on each face)
+ 1 2 3 { % start loop 1 to 3 in steps of 2
+ dup % duplicate loop index -> 1 1 and 3 3
+ dot % call /dot macro, using three arguments
+ } for % inner loop (dot positions)
+ } for % outer loop (face index)
+\end{verbatim}
+The center dot appears on faces 1, 3, and 5. We get it in a simple loop
+from 1 to 5 in steps of 2, calling the \verb+/dot+ macro for each index
+together with the coordinate set $(2,2)$ corresponding to the center.
+\begin{verbatim}
+ 1 2 5 { 2 2 dot } for % (2,2) dot on 1, 3, 5
+\end{verbatim}
+The top left and the bottom right dots appear on faces 4, 5, and 6. Again,
+in order to draw \emph{two} dots on each face, we have to duplicate the
+loop index, i.e., the face index:
+\begin{verbatim}
+ 4 1 6 { % start loop 4 to 6 in steps of 1
+ dup % duplicate index (two dots on each face)
+ 1 3 dot % call /dot macro for (1,3) dot on this face
+ 3 1 dot % call /dot macro for (3,1) dot on this face
+ } for % loop over face index
+\end{verbatim}
+Finally, on face 6 we have two dots in positions $(1,2)$ and $(3,2)$. We can
+use a loop, but then we have to swap the loop index, i.e., the dot's
+$x$-coordinate, with the (constant) face index 6 inside the loop.
+\begin{verbatim}
+ 1 2 3 { % start loop 1 to 3 in steps of 2
+ 6 exch % swap loop index and constant face index
+ 2 % push constant y-coordinate on stack
+ dot % call /dot macro for (x,2) dot on face 6
+ } for % loop over x-coordinates 1 and 3
+\end{verbatim}
+And this closes the loop over background colors:
+\begin{verbatim}
+} for % loop over bw 0 and 1
+\end{verbatim}
+That's it!
+\begin{verbatim}
+%%EOF
+\end{verbatim}
+\section{Errors}
+Of course it doesn't make sense to ask for die faces with arguments
+other than 1, 2, 3, 4, 5, or 6. The package generates error
+messages and simply prints the offending argument in the \TeX\ output.
+%
+% This generates `benign' errors: \epsdice{99} and \epsdice{-3}.
+% The following is more serious, generating two different errors:
+% \epsdice{epsfoo}. Nevertheless, output continues with a fall-back
+% solution.
+\end{document}
+%
+%</sampledoc>
+%
+%<*package>
+%
+% I don't think the package code needs much of an explanation;
+% it's really very simple\ldots
+%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{epsdice}[2007/02/15 by Thomas Heim (v. 2.1)]
+\RequirePackage{graphicx}
+\RequirePackage{ifthen}
+\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}{%
+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}%
+\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}
+%
+%</package>
+%
+%<config>\def\dicefile{dice}
+%
+%<*epsfile>
+%
+% Here's the PostScript code for the drawings:
+%
+%<<PSFILE
+%!PS-Adobe-2.0 EPSF-1.2
+%%BoundingBox: 0 0 258 86
+/frame { /n exch def /xoffset n 1 sub 43 mul def gsave newpath
+xoffset yoffset translate 32 5 bw sub moveto 32 10 r -90 0 arc
+37 bw add 32 lineto 32 32 r 0 90 arc 10 37 bw add lineto
+10 32 r 90 180 arc 5 bw sub 10 lineto 10 10 r 180 270 arc closepath
+bw 0 eq { stroke } { fill } ifelse grestore } def
+/dot { /y exch def /x exch def /n exch def /xoffset n 1 sub 43
+mul def gsave newpath xoffset yoffset translate x 8 mul 5 add y 8 mul
+5 add 3.5 0 360 arc closepath bw setgray fill grestore } def
+2 setlinewidth 0 1 1 { /bw exch def /yoffset bw 43 mul def /r 5 bw
+add def 0 setgray 1 1 6 { frame } for 2 1 6 { dup 1 2 3 { dup dot }
+for } for 1 2 5 { 2 2 dot } for 4 1 6 { dup 1 3 dot 3 1 dot } for
+1 2 3 { 6 exch 2 dot } for } for
+%%EOF
+%PSFILE
+%
+%</epsfile>
+\endinput
+
+
diff --git a/Master/texmf-dist/source/latex/epsdice/epsdice.ins b/Master/texmf-dist/source/latex/epsdice/epsdice.ins
new file mode 100644
index 00000000000..44fab90890f
--- /dev/null
+++ b/Master/texmf-dist/source/latex/epsdice/epsdice.ins
@@ -0,0 +1,49 @@
+\def\batchfile{epsdice.ins}
+\input docstrip
+
+\preamble
+
+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)
+
+\endpreamble
+\keepsilent
+
+\generate{%
+ \file{epsdice.sty}{\from{epsdice.dtx}{package}}
+ \nopreamble\nopostamble\file{epsdice.cfg}{\from{epsdice.dtx}{config}}
+ \nopreamble\nopostamble\file{dice.eps}{\from{epsdice.dtx}{epsfile}}
+}
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space epsdice.sty}
+\Msg{* \space\space epsdice.cfg}
+\Msg{* \space\space dice.eps}
+\Msg{* \space\space dice.pdf}
+\Msg{*}
+\Msg{* and update the filename database}
+\Msg{* (if appropriate for your system)}
+\Msg{*}
+\Msg{* For usage instructions and examples,}
+\Msg{* run `epsdice.dtx' through LaTeX.}
+\Msg{*}
+\Msg{* Enjoy}
+\Msg{***********************************************************}
+\endbatchfile
diff --git a/Master/texmf-dist/tex/latex/epsdice/diceface.eps b/Master/texmf-dist/tex/latex/epsdice/diceface.eps
deleted file mode 100644
index ed34082f061..00000000000
--- a/Master/texmf-dist/tex/latex/epsdice/diceface.eps
+++ /dev/null
@@ -1,79 +0,0 @@
-%!PS-Adobe-2.0 EPSF-1.2
-%%BoundingBox: 0 0 258 43
-%
-% commented version of EPSDICE.EPS by Thomas A. Heim
-%
-% LICENSE: LPPL
-%
-% 2001/02/09 -- thomas.heim@unibas.ch
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% face measures 32x32 and fits within a 43x43 bounding box
-%
-% ==> if you change these dimensions, you will have to adjust
-% the bounding box of the clipped region in the .STY file!
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% the frame macro: a simple box with rounded corners
-%
-% takes one argument off the stack: n (x-offset is 43*(n - 1) )
-%
-/frame {
- 1 sub 43 mul % calculate 43*(n-1), given n on the stack
- /o exch def % store result in o
- gsave
- newpath
- o 0 translate % shift coordinate system by offset o in x
- 32 5 moveto %
- 32 10 5 -90 0 arc % the frame goes from 5 to 37 units both
- 37 32 lineto % in x and y, with rounded corners having
- 32 32 5 0 90 arc % radius 5 units, centered 5 units inward
- 10 37 lineto % in both directions
- 10 32 5 90 180 arc
- 5 10 lineto
- 10 10 5 180 270 arc
- closepath
- stroke
- grestore
-} def
-%
-% dot positions are designated by (x,y) labels from (1,1) to (3,3)
-%
-% change position and radius of filled circles as you like
-%
-% the dot macro: a filled circle
-%
-% takes three arguments off the stack:
-% n (x-offset 43*(n - 1) )
-% x-label: 1, 2, or 3
-% y-label: 1, 2, or 3
-/dot {
- /y exch def % store y-label of dot
- /x exch def % store x-label of dot
- 1 sub 43 mul % calculate 43*(n-1), given n on the stack
- /o exch def % store result in offset o
- gsave
- newpath
- o 0 translate % shift coordinate system by offset o in x
- x 8 mul 5 add % x-position of dot: 8*x+5 (-> 13,21,29)
- y 8 mul 5 add % y-position of dot: 8*y+5 (-> 13,21,29)
- 3.5 0 360 arc % I like big dots (radius 3.5 units)
- closepath
- fill
- grestore
-} def
-%
-2 setlinewidth % lines 2 units wide
-0 setgray % fill the dots in black
-%
-% now use the macros to draw the dice faces in loops
-%
-1 1 6 { frame } for % the six frames
-2 1 6 { dup 1 2 3 { dup dot } for } for % (1,1), (3,3) on 2, 3, 4, 5, 6
-1 2 5 { 2 2 dot } for % (2,2) dot on 1, 3, 5
-4 1 6 { dup 1 3 dot 3 1 dot } for % (1,3), (3,1) dots on 4, 5, 6
-1 2 3 { 6 exch 2 dot } for % (1,2), (3,2) dots only on 6
-%%EOF
-
diff --git a/Master/texmf-dist/tex/latex/epsdice/epsdice.cfg b/Master/texmf-dist/tex/latex/epsdice/epsdice.cfg
index 88570999419..c4f5e366989 100644
--- a/Master/texmf-dist/tex/latex/epsdice/epsdice.cfg
+++ b/Master/texmf-dist/tex/latex/epsdice/epsdice.cfg
@@ -1,2 +1 @@
-\def\dicefile{epsdice}
-
+\def\dicefile{dice}
diff --git a/Master/texmf-dist/tex/latex/epsdice/epsdice.eps b/Master/texmf-dist/tex/latex/epsdice/epsdice.eps
deleted file mode 100644
index 75f75eb2100..00000000000
--- a/Master/texmf-dist/tex/latex/epsdice/epsdice.eps
+++ /dev/null
@@ -1,11 +0,0 @@
-%!PS-Adobe-2.0 EPSF-1.2
-%%BoundingBox: 0 0 258 43
-/frame { 1 sub 43 mul /o exch def gsave newpath o 0 translate
-32 5 moveto 32 10 5 -90 0 arc 37 32 lineto 32 32 5 0 90 arc
-10 37 lineto 10 32 5 90 180 arc 5 10 lineto 10 10 5 180 270 arc
-closepath stroke grestore } def /dot { /y exch def /x exch def
-1 sub 43 mul /o exch def gsave newpath o 0 translate x 8 mul 5
-add y 8 mul 5 add 3.5 0 360 arc closepath fill grestore } def
-2 setlinewidth 0 setgray 1 1 6 { frame } for 2 1 6 { dup 1 2 3
-{ dup dot } for } for 1 2 5 { 2 2 dot } for 4 1 6 { dup 1 3 dot
-3 1 dot } for 1 2 3 { 6 exch 2 dot } for
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'.
diff --git a/Master/texmf-dist/tpm/epsdice.tpm b/Master/texmf-dist/tpm/epsdice.tpm
index b99bc6d4db2..d7f449ab2fb 100644
--- a/Master/texmf-dist/tpm/epsdice.tpm
+++ b/Master/texmf-dist/tpm/epsdice.tpm
@@ -3,7 +3,7 @@
<rdf:Description about="http://texlive.dante.de/texlive/Package/epsdice.zip">
<TPM:Name>epsdice</TPM:Name>
<TPM:Type>Package</TPM:Type>
- <TPM:Date>2006/01/09 00:49:07</TPM:Date>
+ <TPM:Date>1970/01/01 00:00:00</TPM:Date>
<TPM:Version>1.0</TPM:Version>
<TPM:Creator>rahtz</TPM:Creator>
<TPM:Title>A scalable dice &quot;font&quot;.</TPM:Title>
@@ -19,18 +19,21 @@ formats.
<TPM:Size>17021</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="6205">
-texmf-dist/tex/latex/epsdice/diceface.eps
+ <TPM:RunFiles size="4353">
texmf-dist/tex/latex/epsdice/epsdice.cfg
-texmf-dist/tex/latex/epsdice/epsdice.eps
texmf-dist/tex/latex/epsdice/epsdice.sty
texmf-dist/tpm/epsdice.tpm
</TPM:RunFiles>
- <TPM:DocFiles size="10816">
-texmf-dist/doc/latex/epsdice/epsdice.dvi
-texmf-dist/doc/latex/epsdice/epsdice.tex
-texmf-dist/doc/latex/epsdice/readme
+ <TPM:DocFiles size="79596">
+texmf-dist/doc/latex/epsdice/README
+texmf-dist/doc/latex/epsdice/dice.eps
+texmf-dist/doc/latex/epsdice/dice.pdf
+texmf-dist/doc/latex/epsdice/epsdice.pdf
</TPM:DocFiles>
+ <TPM:SourceFiles size="18159">
+texmf-dist/source/latex/epsdice/epsdice.dtx
+texmf-dist/source/latex/epsdice/epsdice.ins
+ </TPM:SourceFiles>
<TPM:Provides>Package/epsdice</TPM:Provides>
</rdf:Description>
</rdf:RDF>
diff --git a/Master/texmf/lists/epsdice b/Master/texmf/lists/epsdice
index 64a1c481404..0b421645f35 100644
--- a/Master/texmf/lists/epsdice
+++ b/Master/texmf/lists/epsdice
@@ -1,10 +1,10 @@
-texmf-dist/doc/latex/epsdice/epsdice.dvi
-texmf-dist/doc/latex/epsdice/epsdice.tex
-texmf-dist/doc/latex/epsdice/readme
-
-texmf-dist/tex/latex/epsdice/diceface.eps
+texmf-dist/doc/latex/epsdice/README
+texmf-dist/doc/latex/epsdice/dice.eps
+texmf-dist/doc/latex/epsdice/dice.pdf
+texmf-dist/doc/latex/epsdice/epsdice.pdf
+texmf-dist/source/latex/epsdice/epsdice.dtx
+texmf-dist/source/latex/epsdice/epsdice.ins
texmf-dist/tex/latex/epsdice/epsdice.cfg
-texmf-dist/tex/latex/epsdice/epsdice.eps
texmf-dist/tex/latex/epsdice/epsdice.sty
texmf-dist/tpm/epsdice.tpm