Debian Codegraph @

texmf-dist/doc/latex/mahjong/README.md

raw
1 # mahjong-tex
2
3 [![CTAN](https://img.shields.io/ctan/v/mahjong)](https://ctan.org/pkg/mahjong)
4
5 A LaTeX 3 package for typesetting mahjong hands using MPSZ algebraic notation.
6 This package provides an interface for LaTeX 2e, so you can use it without any experience in LaTeX 3.
7
8 ![A display of all tiles used for Riichi Mahjong](doc/all_tiles.png)
9
10 This package focuses on Riichi (a.k.a. Japanese) Mahjong but can be used to typeset any style.
11 However, flower tiles are currently missing.
12
13 ## Usage
14 ```
15 \usepackage{mahjong}
16 \mahjong{<tiles>}
17 ```
18 Insert mahjong tiles as specified by `<tiles>`. For instance,
19 ```
20 \mahjong{119p 19s 19m 1234567z}
21 ```
22 produces an image of the "Thirteen Orphans" hand with a pair of 1 dots.
23
24 ![A row of mahjong tiles: 1 dots, 1 dots, 9 dots, 1 bamboo, 9 bamboo, 1 character, 9 character, east wind, south wind, west wind, north wind, white dragon, green dragon, and red dragon](doc/13orphans.png)
25
26 Additional supported features are:
27
28 * Red fives
29 * Concealed tiles
30 * Spaces
31 * Blank tiles
32 * Rotated tiles (90° counter-clockwise)
33 * Stacked, rotated tiles
34
35 ```
36 \mahjong{X44Xp-123's-50"5m-33?z}
37 ```
38 ![4 groups of mahjong tiles separated by spaces.
39 Group 1: A concealed tile, showing its red backside, 4 dots, 4 dots, concealed tile.
40 Group 2: 1 bamboo, 2 bamboo, 3 bamboo, rotated 90° counter-clockwise.
41 Group 3: 5 character, two red 5 character, rotated 90° counter-clockwise and stacked, 5 character.
42 Group 4: south wind, south wind, a tile with a question mark.](doc/expansions.png)
43
44 The size of the typeset hand can be changed.
45 Either locally as an optional argument to `\mahjong` or as a package option.
46
47 ## Prerequisites
48 You need a sufficiently recent version of LaTeX which ships with the L3 programming layer.
49 This applies to all version released after October 2019.
50
51 mahjong depends on stackengine, which is included in all major TeX distributions.
52
53 ## Building
54 A simple invocation of make is enough to produce a zip file in `out/` which can be submitted to CTAN.
55 ```
56 make
57 ```
58
59 ## Installation
60 Run
61 ```
62 make install
63 ```
64
65 to install the package to your local texmf directory.
66 It should be available for use in your documents.
67
68 Run
69 ```
70 texdoc mahjong
71 ```
72 to get an introduction to the package, including the extended flavor of MPSZ notation this package uses.
73
74 ## Attribution
75 The mahjong tiles used in this package were created by [@FluffyStuff](https://github.com/FluffyStuff).
76 The original repository is [FluffyStuff/riichi-mahjong-tiles](https://github.com/FluffyStuff/riichi-mahjong-tiles), used under CC-BY.