CTAN Comprehensive TeX Archive Network

Directory graphics/mahjong




A 3 package for typesetting mahjong hands using MPSZ algebraic notation. This package provides an interface for 2e, so you can use it without any experience in 3.A display of all tiles used for Riichi Mahjong

This package focuses on Riichi (a.k.a. Japanese) Mahjong but can be used to typeset any style. However, flower tiles are currently missing.



Insert mahjong tiles as specified by <tiles>. For instance,

\mahjong{119p 19s 19m 1234567z}

produces an image of the "Thirteen Orphans" hand with a pair of 1 dots.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

Additional supported features are:

  • Red fives
  • Concealed tiles
  • Spaces
  • Blank tiles
  • Rotated tiles (90° counter-clockwise)
  • Stacked, rotated tiles
4 groups of mahjong tiles separated by spaces.
Group 1: A concealed tile, showing its red backside, 4 dots, 4 dots, concealed tile.
Group 2: 1 bamboo, 2 bamboo, 3 bamboo, rotated 90° counter-clockwise.
Group 3: 5 character, two red 5 character, rotated 90° counter-clockwise and stacked, 5 character.
Group 4: south wind, south wind, a tile with a question mark.

The size of the typeset hand can be changed. Either locally as an optional argument to \mahjong or as a package option.


You need a sufficiently recent version of which ships with the L3 programming layer. This applies to all version released after October 2019.

mahjong depends on stackengine, which is included in all major distributions.


A simple invocation of make is enough to produce a zip file in out/ which can be submitted to CTAN.




make install

to install the package to your local texmf directory. It should be available for use in your documents.


texdoc mahjong

to get an introduction to the package, including the extended flavor of MPSZ notation this package uses.


The mahjong tiles used in this package were created by @FluffyStuff. The original repository is FluffyStuff/riichi-mahjong-tiles, used under CC-BY.

Download the contents of this package in one zip archive (1.2M).

mahjong – Typeset Mahjong Tiles using MPSZ Notation

The mahjong package provides a and 3 interface for typesetting mahjong tiles using an extended version of MPSZ algebraic notation.

Features include spaces, rotated, blank, and concealed tiles, as well as red fives. The size of the mahjong tiles can be controlled using a package option and an optional argument of \mahjong.

It is primarily aimed at Riichi (aka. Japanese) Mahjong but can be used to typeset any style of mahjong.

Home pagehttps://github.com/Schmitzi/mahjong-tex
Version1.0.1 2021-04-16
LicensesCC BY 1.0
MIT License
Copyright2021 Daniel Schmitz
MaintainerDaniel Schmitz
TDS archivemahjong.tds.zip
Contained inTeX Live as mahjong
MiKTeX as mahjong
TopicsExperimental 3
Guest Book Sitemap Contact Contact Author