First, let me apologize for reviving the topic – I've found a couple of posts here mentioning the experimental poker package, but I still can't work it out.
Going through all the posts I came up with a MWE that should work:
\documentclass[11pt,a4paper]{report}
\usepackage[pdf]{pstricks}
\usepackage{auto-pst-pdf}
\usepackage{poker}
\setkeys{poker}{inline=symbol}
\begin{document}
\begin{cards}
\crdtenh
\end{cards}
\end{document}
However… well – it doesn't.
I've tried three ways of compiling the code:
-
xelatex
Though it works fine, I lose all the fonts, which is ok for the MWE, but totally useless in any application (e.g. a book or article). All the fonts get substituted and default to a single one. -
latex -> dvips -> ps2pdf
That fails at the last step (ps -> pdf) wih the following error:Dictionary stack: –dict:1198/1684(ro)(G)– –dict:0/20(G)–
–dict:176/200(L)– –dict:198/300(L)– –dict:85/200(L)– Current allocation mode is local Last OS error: No such file or directory
Current file position is 333209 GPL Ghostscript 9.18: Unrecoverable
error, exit code 1 -
pdflatex -shell-excape
This was said to be a silver bullet fixing my problems, but unfortunately no good. pdflatex fails with the following error:
! LaTeX Error: \begin{pspicture} on input line 12 ended by
\end{cards}.
I guess the commands get invoked incorrectly. I've checked the code in poker.sty and all should work fine. Well… again – should.
I think I'm missing something here – could anyone help me with the problem ?
EDIT (as suggested in a comment, I provide more info about the package and other topics I found)
"poker" is an experimental package that can be found here:
- doc: http://web.mit.edu/foley/games/Arcadia/sr/poker/poker-doc.pdf
- sty file: http://web.mit.edu/foley/games/Arcadia/sr/poker/poker.sty
Other topics I mentioned:
- getting whole package + using latex -> dvips -> ps2pdf: https://tex.stackexchange.com/a/207960/125651
- I was advised to search for "pstricks pdf export"; found this How to convert a LaTeX file with pstricks code to pdf? but didn't work either
- There's one topic here covering one of the cases I mentioned: ! LaTeX Error: \begin{pspicture} on input line 11 ended by \end{cards} though it's left without an answer.
UPDATE: as suggested I switched to using poker2, but this still doesn't work for a more complicated example found in the package's doc:
\begin{cards}
\crdpair{\crdKs}{\crdtenh}%
\crdflop{\crdsevd}{\crdsevc}{\crdQd}%
\crdKc\crdKd%
\end{cards}
The error remains the same:
! LaTeX Error: \begin{pspicture} on input line 12 ended by
\end{cards}.
To be honest I'm perfectly fine with the ability to render single cards – now I'm only wondering if there's anything I could do to make it only better and work it out with groups of cards.
Best Answer
Use the current
pst-poker.sty
if you want to useauto-pst-pdf
:The environment
cards
is not really needed.