Poker
Poker
Poker
This document illustrates the possible variations in displaying playing cards available in
the LATEX poker package.
q
7
q q
7
qq
r rrrrr
10
r rrrr
7q q
q q
10 r
r rrrrr
10
1
7
qq
q q
7q q
q q
r rrrr
10 r
r rrrrr
10
10
7
qq
r rrrrr
q q
7
qq
q q
10
10
r rrrrr
r rrrr
7q q
q q
10 r
7
qq
r rrrr
q q
7q q
q q
10 r
r rrrr
7q q
q q
10 r
10
The frame background can be varied separately, either with predefined colors as shown
here or by using a selfdefined color.
q
7
q q
7
qq
r rrrrr
r
rrr
7q q
q q
10 r
10
q q
7
qq
r rrrrr r
q
7q
q
q
10
10 A
r q
10 7 q
r
rrr
7q
10 r
It is also possible to place indices in all four corners or use peek indices.
r r
r r r r
r
r r
10
10
r r r r
10
10
Besides the jumbo indices a regular index can be used. All other options remain available.
q
7
r rrrrr
10
r
rrr
10 r
Card backs are also available in various styles and customizable in color.
qr
qr
3 Usage
To make the poker package available within a LATEX document you have to add
\usepackage{poker}
to the preamble. Then you can change the options used with the command
\setkeys{poker}{option=value[,option=value]}
anywhere within the document.
10
ten
9
nine
8
eig
7
sev
6
six
5
five
4
four
3
tre
2
two
Heart
h
Diamond Club
d
c
You can influence the display of the inline cards with the options inline and colorset.
Option
inline
colorset
Values
symbol
boxed
card *
2c *
4c
gs
bw
Description
uses simple symbols to depict cards
draws rounded boxes around the symbols
draws simplified cards with value and suit stacked vertically
suits in red and black colors
suits in black/red/blue/green colors
grayscaled suits
black/white and outlined suits
*: default
The code for floating cards is very similar to the inline cards, you just need to add the prefix
crd to each macro. Thus the code
\begin{cards}
\crdAs\crdtenh\crdsevd\crdsevc\crdQd
\end{cards}
gives us the output shown in fig. 1.
q q
7
qq
r rrrr
7q q
q q
10 r
r rrrrr
10
3.2.1 Options
Here we have a lot of options available to change the appearance of the cards. They are
explained in table 1.
Since the peek option modifies the corners setting which in turn resets peek, it is advisable to first declare the corners option and then use the peek option if necessary.
The same applies to the framebg and backcolor options modifying the colorset option.
There are several commands available for the advanced placement of cards.
\begin{cards}
\crdpair{\crdKs}{\crdtenh}%
\crdflop{\crdsevd}{\crdsevc}{\crdQd}%
\crdKc\crdKd%
\end{cards}
K
10
r
7 q7qQq
q q q
r rrrr
Kq
q q
Q 7 7
q q qq
5
K
qq
10
rrr
rK
r
Option
cpr
index
corners
peek
colorset
framebg
back
backcolor
shadow
Values
# (*7)
jumbo *
regular
2*
4
right
left
both
2c *
4c
gs
bw
beige *
blue
white
yellow
<user>
simple *
suits
spades
blue *
red
green
gold
<user>
blurred *
solid
none
Description
specifies the number of cards per row to be displayed
jumbo size indices
regular size indices
indices in upper left and lower right corners
indices in all four corners
add peek indices to right corners
add peek indices to left corners
add peek indices to all corners
suits in red and black colors
suits in black/red/blue/green colors
grayscaled suits
black/white and outlined suits
color choices for inner frame background
*: default
Table 1: Options for cards using the cards environment
A K
A
A rr
q
A r rq
rq
K
rA
r
A
A
q
rA
K
A A r
rAAr
A
q
rA
K
2r
8q
3
3
3q
4q
2q
10
10
rr
r
r
q
5q
10
10
9q
10
4
qq
rr
r
r
qq
4
K
qq
Kq
7
qq
2
q
A
7
J
Jr
Jq
10
rr
r
4r
q qqqqq
rr
q
q
rr
rr
rr
10
r
q qq
r rrrrr
r
2
q
q
q
q q
q qqq
r
r
r
6q
A
r
A
q
Aq
Kr
10
7r
r rr
r rrr
8q
q
q
q
8q
7q
Ar
r
r
r r
2q
10
9q
3q
r
rr
2r
10
9q
8r
4q
q
q q
5q
10 q
4q
q q
5q
6q
7q
6q
r
r
q qqqq
7q q
q q
Jq
rr
9r
10
4r
r
r
Jq
Kq
Kq
r
r r
4r
Aq
5r
r
r
r r
7r
6r
10 r
r rrrr
7r
Jr
Qr
10
Kr
Jr
Kr
Ar
10
10