[XeTeX] epsdice package.

Jonathan Kew jfkthame at googlemail.com
Fri Jul 15 10:34:19 CEST 2011


On 15 Jul 2011, at 09:14, Ulrike Fischer wrote:

> Am Thu, 14 Jul 2011 18:57:48 -0400 schrieb Michael Joyner:
> 
>> I am trying to use the epsdice package from inside LyX, and when I switch to
>> using xelatex as the formatting engine, the package malfunctions.
>> 
>> Instead of drawing a single die, it draws all 12 possible combinations of
>> dice on two lines. :(
>> 
>> Is there a working dice or dominoes or "grouped dots" package for xelatex ?
> 
> epsdice uses one graphic which shows all dice faces and clips it as
> needed. As the log informs you clipping support is (yet) not
> implemented in the xetex driver of the graphicx package. 
> 
> You can clip with tikz, but it need a bit of fiddling with the
> values:
> 
> \documentclass{book}
> \usepackage{graphicx,tikz}
> 
> \begin{document}
> 
> a\begin{tikzpicture}[scale=0.22]
>    \clip (4pt,5pt) rectangle (45.5pt,46.5pt);
>    \node [transform shape,above right] {\includegraphics{dice}};
> \end{tikzpicture}b%
> 
> a\begin{tikzpicture}[scale=0.22]
>    \clip (4pt,52pt) rectangle (45.5pt,98.5pt);
>    \node [transform shape,above right] {\includegraphics{dice}};
> \end{tikzpicture}b%
> 
> \end{document}
> 
> But I would probably look for a normal font or pdf graphics of each
> face or draw the faces directly with tikz instead. 

Chances are you already have a font that provides these; they're encoded at Unicode values U+2680 DIE FACE-1 to U+2685 DIE FACE-6, so just check for these characters in various large-repertoire fonts and you'll probably find something usable.

Depending what you want "dice or dominoes or grouped dots" for, there are various other Unicode characters that might provide what you're after. How about the Braille patterns? :)

JK




More information about the XeTeX mailing list