I want to display playing cards in my document, but none of the poker packages I've tried are working (\usepackage{poker} nor \usepackage{pst-poker}). I am, in fact, able to compile (using XeLaTeX) and get an output (in both cases), but the output is not correct: In both cases, the cards never have a box around them. So they're not displayed correctly.

The documents explaining these packages are pretty poor, so I'm not sure how to proceed.

Here is my MWE (for the case when I use the poker package):









Again, I do get output, but not the the correct one. The correct one is displayed immediately under Section 3.1 in http://web.mit.edu/foley/games/Arcadia/sr/poker/poker-doc.pdf Indeed, these cards have a box around them. And my problem is that I do not have any box around my cards, nor can I get it so.

1 Answer 1


\setkeys{poker}{inline=symbol} is not the style used under 3.1 in the pdf. That uses \setkeys{poker}{inline=card} if I'm not mistaken.

(Or actually, \setkeys{poker}{inline=card,colorset=4c}, since all four colors are used there.)

Since the frames use pstricks, you'll either need to compile with LaTeX > dvips > ps2pdf (the last with -dALLOWPSTRANSPARENCY), or if you use xelatex, you might need to use xelatex -output-driver="xdvipdfmx -i dvipdfmx-unsafe.cfg -q -E" to allow for Ghostscript transparency (see here) (or as egreg suggests, xelatex-safe with TeXLive 2022), depending on how your xdvipdfmx is configured.


With colorset=4c:

colorful cards

  • 1
    In TeX Live 2022 there's also xelatex-unsafe for doing the same job.
    – egreg
    Apr 29 at 23:09
  • @egreg Good to know, thanks.
    – frabjous
    Apr 29 at 23:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.