You are on page 1of 8

An experimental LATEX Poker Package

Olaf Encke <olaf.encke@gmx.de>

This document illustrates the possible variations in displaying playing cards available in
the LATEX poker package.

1 Inline Poker symbols


There are several possible styles for inline cards. The default way is as small cards, i.e.
A K Q J 10
as simple symbols A Kr Qq J 10 or as boxed
r q 
. They

 also


 can
 be
displayed

symbols A K r Q q J 10 . A card back is available, too.
It is also possible to variate the used colorset. In addition to the standard red/black colors, a four color set A Kr Qq J 10 as often used in online poker can be chosen. When colors
are not desired, i.e. for printing purposes, the possible
are a grayscale ver


 alternatives
 


sion A Kr Qq J 10 or complete black/white A K Q J 10 with outlined
red symbols.

2 Floating Poker cards


The big floating cards offer a lot of options for design. The default design looks like this.

q
7

q q

Qq

7
qq

r rrrrr

10

r rrrr

qq

7q q
q q

10 r

The most basic variation is the size.

Qq

r rrrrr

10
1

7
qq

q q

7q q
q q

r rrrr

10 r

qq

As with the inline cards we can choose the colorset.

r rrrrr

10

10

7
qq

r rrrrr

q q

Qq

qq

7
qq

q q

Qq

qq

10

10

r rrrrr
r rrrr

Qq

7q q
q q

10 r

7
qq

r rrrr

q q

7q q
q q

10 r

r rrrr

qq

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

Qq

7
qq

r rrrrr

r
rrr

qq

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.

The shadow of the cards can be shown blurred, solid or deactivated.

q
7

Qq

r rrrrr
10

r
rrr

qq

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.

3.1 Inline cards


To print inline cards you just need to call the macro associated with the card you want.
\As\tenh\sevd\sevc\Qd
creates the cards A 10r 7q 7 Qq .
They are coded by their value and suit. Use this table to select the value
Ace
A

King Queen Jack


K
Q
J

10
ten

9
nine

8
eig

7
sev

6
six

5
five

4
four

3
tre

2
two

and the next to select the letter for the suit:


Spade
s

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

3.2 Floating cards


To insert floating cards you begin with an environment in which the cards are placed.
\begin{cards}
\end{cards}

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

Qq

7
qq

r rrrr

qq

7q q
q q

10 r

r rrrrr

10

Figure 1: floating cards (default)

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.

3.2.2 Advanced constructs

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

Figure 2: card pair, flop and two cards

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

user defined color


diamond/squares styled card back
suits in ellipse on net background
spades filled background
color choices of main background elements

user defined color


gradient shadow
solid black shadow
no shadow

*: 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

Figure 3: Advanced display variations for floating cards

2r

8q

3
3

3q

4q

2q

10

10

rr

r
r

qq

q
5q

10

10

9q

qq

10

4
qq

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

qq

q q

5q

10 q

4q

q q

5q

6q

7q

6q

r
r

q qqqq

7q q
q q

Jq

rr

9r

10

Qq

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

You might also like