The LaTeX Poker Package - MITweb.mit.edu/foley/Games/Arcadia/sr/poker/poker-doc.pdf · An...

8
An experimental L A T E X Poker Package Olaf Encke <[email protected]> This document illustrates the possible variations in displaying playing cards available in the L A T E X 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 . They can also be displayed as simple symbols AK Q J10or as boxed symbols A K 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 col- ors, a four color set A K Q J 10 as often used in online poker can be chosen. When colors are not desired, i.e. for printing purposes, the possible alternatives are a grayscale ver- sion AK Q J10or complete black/white A K Q J 10 with outlined red symbols. 2 Floating Poker cards The big floating cards oer a lot of options for design. The default design looks like this. A A 10 10 7 7 7 7 Q Q The most basic variation is the size. A A 10 10 7 7 7 7 Q Q 1

Transcript of The LaTeX Poker Package - MITweb.mit.edu/foley/Games/Arcadia/sr/poker/poker-doc.pdf · An...

Page 1: The LaTeX Poker Package - MITweb.mit.edu/foley/Games/Arcadia/sr/poker/poker-doc.pdf · An experimental LATEX Poker Package Olaf Encke  This document illustrates

An experimental LATEX Poker Package

Olaf Encke<[email protected]>

This document illustrates the possible variations in displaying playing cards available inthe 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♣

Kr

Qq

J♠

10♣ . They can also be displayed as simple symbolsA♣KrQq J♠ 10♣ or as boxed

symbols�

�A ♣�

�K r�

�Q q�

�J ♠�

�10 ♣ . A card back is available, too.It is also possible to variate the used colorset. In additionto the standard red/black col-

ors, a four color setA♣ 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 alternatives are a grayscale ver-sion A♣KrQq J♠ 10♣ or complete black/white

�A ♣�

�K ♥�

�Q ♦�

�J ♠�

�10 ♣ with outlinedred symbols.

2 Floating Poker cards

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

A♠

♠A

10r

r10

r

r

r

r

r

r

r

r

r

r

7q

q7

q

q

q

q

q

q

q

7♣

♣7

Qq

qQ

q

q

The most basic variation is thesize.

A♠

♠A

10r

r10

r

r

r

r

r

r

r

r

r

r

7q

q7

q

q

q

q

q

q

q

7♣

♣7

Qq

qQ

q

q

1

Page 2: The LaTeX Poker Package - MITweb.mit.edu/foley/Games/Arcadia/sr/poker/poker-doc.pdf · An experimental LATEX Poker Package Olaf Encke  This document illustrates

As with the inline cards we can choose thecolorset.

A♠

♠A

10r

r10

r

r

r

r

r

r

r

r

r

r

7q

q7

q

q

q

q

q

q

q

7♣

♣7

Qq

qQ

q

q

A♠

♠A

10r

r10

r

r

r

r

r

r

r

r

r

r

7q

q7

q

q

q

q

q

q

q

7♣

♣7

Qq

qQ

q

q

A♠

♠A

10r

r10

r

r

r

r

r

r

r

r

r

r

7q

q7

q

q

q

q

q

q

q

7♣

♣7

Qq

qQ

q

q

A♠

♠A

10♥

♥10

7♦

♦7

7♣

♣7

Q♦

Q

The frame background can be varied separately, either with predefined colors as shownhere or by using a selfdefined color.

A♠

♠A

10r

r10

r

r

r

r

r

r

r

r

r

r

7q

q7

q

q

q

q

q

q

q

7♣

♣7

Qq

qQ

q

q

It is also possible to place indices in allfour corners or usepeek indices.

A♠

♠A

10r

r10

10r

r10

r

r

r

r

r

r

r

r

r

r

7q

q7

7q

7q

q

q

q

q

q

q

q

7♣

7♣

7♣

7♣

Qq

Qq

q

q

2

Page 3: The LaTeX Poker Package - MITweb.mit.edu/foley/Games/Arcadia/sr/poker/poker-doc.pdf · An experimental LATEX Poker Package Olaf Encke  This document illustrates

Besides thejumbo indices a regular index can be used. All other options remain avail-able.

A♠

♠A

10r

r10

10r

r10

r

r

r

r

r

r

r

r

r

r

7♦

7

7♦

7♦

7♣

7♣

7♣

7♣

Qq

Qq

q

q

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

A♠

♠A

10r

r10

r

r

r

r

r

r

r

r

r

r

7♦

♦7

7♣

♣7

Qq

qQ

q

q

Card backs are also available in various styles and customizable in color.

♠q♣r

♠q♣r

♠♦♣♥

♠♦♣♥

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠

3

Page 4: The LaTeX Poker Package - MITweb.mit.edu/foley/Games/Arcadia/sr/poker/poker-doc.pdf · An experimental LATEX Poker Package Olaf Encke  This document illustrates

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 thecommand

\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 cardsA♠ 10r

7q

7♣

Qq .

They are coded by their value and suit. Use this table to select the value

Ace King Queen Jack 10 9 8 7 6 5 4 3 2A K Q J ten nine eig sev six five four tre two

and the next to select the letter for the suit:

Spade Heart Diamond Clubs h d c

You can influence the display of the inline cards with the optionsinline andcolorset.

Option Values Descriptioninline symbol uses simple symbols to depict cards

boxed draws rounded boxes around the symbolscard * draws simplified cards with value and suit stacked vertically

colorset 2c * suits in red and black colors4c suits in black/red/blue/green colorsgs grayscaled suitsbw 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}

4

Page 5: The LaTeX Poker Package - MITweb.mit.edu/foley/Games/Arcadia/sr/poker/poker-doc.pdf · An experimental LATEX Poker Package Olaf Encke  This document illustrates

The code for floating cards is very similar to the inline cards, you just need to add the prefixcrd to each macro. Thus the code

\begin{cards}

\crdAs\crdtenh\crdsevd\crdsevc\crdQd

\end{cards}

gives us the output shown in fig. 1.

A♠

♠A

10r

r10

r

r

r

r

r

r

r

r

r

r

7q

q7

q

q

q

q

q

q

q

7♣

♣7

Qq

qQ

q

q

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 areexplained in table 1.

Since thepeek option modifies thecorners setting which in turn resetspeek, it is advis-able to first declare thecorners option and then use thepeek option if necessary.

The same applies to theframebg andbackcolor options modifying thecolorset 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♠

♠K

10r

r10

r

r

r

r

r

r

r

r

r

r

7q

q7

q

q

q

q

q

q

q

7♣

♣7

Qq

qQ

q

q

K♣

♣K

Kq

qK

q

q

Figure 2: card pair, flop and two cards

5

Page 6: The LaTeX Poker Package - MITweb.mit.edu/foley/Games/Arcadia/sr/poker/poker-doc.pdf · An experimental LATEX Poker Package Olaf Encke  This document illustrates

Option Values Descriptioncpr # (*7) specifies the number of cards per row to be displayedindex jumbo * jumbo size indices

regular regular size indicescorners 2 * indices in upper left and lower right corners

4 indices in all four cornerspeek right add peek indices to right corners

left add peek indices to left cornersboth add peek indices to all corners

colorset 2c * suits in red and black colors4c suits in black/red/blue/green colorsgs grayscaled suitsbw black/white and outlined suits

framebg beige * color choices for inner frame backgroundblue

white

yellow

<user> user defined colorback simple * diamond/squares styled card back

suits suits in ellipse on net backgroundspades spades filled background

backcolor blue * color choices of main background elementsred

green

gold

<user> user defined colorshadow blurred * gradient shadow

solid solid black shadownone no shadow

*: default

Table 1: Options for cards using thecards environment

A♠

♠A

Ar

rA

r

Aq

q

A

q

A♣

♣A

Kr

rK

r

r

A♠

♠A♠

Ar

rA

r

Aq

qA

q

A♣

♣A

Kr

rK

r

r

Figure 3: Advanced display variations for floating cards

6

Page 7: The LaTeX Poker Package - MITweb.mit.edu/foley/Games/Arcadia/sr/poker/poker-doc.pdf · An experimental LATEX Poker Package Olaf Encke  This document illustrates

A♠

♠A

A♠

A♠

K♠

♠K

K♠

K♠

Q♠

♠Q

Q♠

Q♠

J♠

♠J

J♠

J♠

10♠

♠10

10♠

10♠

9♠

♠9

9♠

9♠

8♠

♠8

8♠

8♠

7♠

♠7

7♠

7♠

6♠

♠6

6♠

6♠

5♠

♠5

5♠

5♠

4♠

♠4

4♠

4♠

3♠

♠3

3♠

3♠

2♠

♠2

2♠

2♠

Ar

rA

Ar

Ar

r

Kr

rK

Kr

Kr

r

r

Qr

rQ

Qr

Qr

r

r

Jr

rJ

Jr

Jr

r

r

10r

r10

10r

10r

r

r

r

r

r

r

r

r

r

r

9r

r9

9r

9r

r

r

r

r

r

r

r

r

r

8r

r8

8r

8r

r

r

r

r

r

r

r

r

7r

r7

7r

7r

r

r

r

r

r

r

r

6r

r6

6r

6r

r

r

r

r

r

r

5r

r5

5r

5r

r

r

r

r

r

4r

r4

4r

4r

r

r

r

r

3r

r3

3r

3r

r

r

r

2r

r2

2r

2r

r

r

Aq

qA

Aq

Aq

q

Kq

qK

Kq

Kq

q

q

Qq

qQ

Qq

Qq

q

q

Jq

qJ

Jq

Jq

q

q

10q

q10

10q

10q

q

q

q

q

q

q

q

q

q

q

9q

q9

9q

9q

q

q

q

q

q

q

q

q

q

8q

q8

8q

8q

q

q

q

q

q

q

q

q

7q

q7

7q

7q

q

q

q

q

q

q

q

6q

q6

6q

6q

q

q

q

q

q

q

5q

q5

5q

5q

q

q

q

q

q

4q

q4

4q

4q

q

q

q

q

3q

q3

3q

3q

q

q

q

2q

q2

2q

2q

q

q

A♣

♣A

A♣

A♣

K♣

♣K

K♣

K♣

Q♣

♣Q

Q♣

Q♣

J♣

♣J

J♣

J♣

10♣

♣10

10♣

10♣

9♣

♣9

9♣

9♣

8♣

♣8

8♣

8♣

7♣

♣7

7♣

7♣

6♣

♣6

6♣

6♣

5♣

♣5

5♣

5♣

4♣

♣4

4♣

4♣

3♣

♣3

3♣

3♣

2♣

♣2

2♣

2♣

7

Page 8: The LaTeX Poker Package - MITweb.mit.edu/foley/Games/Arcadia/sr/poker/poker-doc.pdf · An experimental LATEX Poker Package Olaf Encke  This document illustrates

J♠♠J

J♠

J♠

♠♠

8