[Tex/LaTex] Help with Options in MIT Poker Package

package-optionspackages

I'm trying to write a paper for university and it involves using poker cards in latex. I'm using the Poker MIT Package:

http://web.mit.edu/foley/games/Arcadia/sr/poker/poker.sty

provides the poker.sty file required, and the page

http://web.mit.edu/foley/games/Arcadia/sr/poker/poker-doc.pdf

gives some help for people like me who aren't great with latex. In this second document, on page 4, the author writes: "Then you can change the options used with the command

\setkeys{poker}{option=value[,option=value]}

anywhere within the document." I have no idea how to use this and have tried fiddling about with it hoping it would work but with zero success. Available options are listed just below this on page 4, and I'd very much like to change from the default.

Could someone who's not a total noob please provide me with a sample implementation of the above to change the options? I really need the inline option set to symbol.

Thanks in advance!

Best Answer

The package 'documentation' is really short, in my point of view, but looking into poker.sty the solution is very obvious

\define@choicekey*{poker}{inline}[\val\nr]{symbol,boxed,card}[symbol]{%
% omitted here by C.H. 
}

The relevant key is inline and is a choice - key, having only the allowed values symbol, boxed, card.

Use inline=symbol -- the initial default is card (set at the end of the package.)

It's possible to use \setkeys{poker}{...} at any place in the document, to change the decks/style etc.

Please be aware that the poker package relies on PostScript, so use latex, not pdflatex to compile this document.

Since the compilation fails for boxed style, I don't provide code for this.

\documentclass{article}

\usepackage{poker}

\setkeys{poker}{inline=symbol}

\begin{document}
\As\tenh\sevd\sevc\Qd

\setkeys{poker}{inline=card}
\As\tenh\sevd\sevc\Qd

\end{document}

enter image description here

Related Question