summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/mahjong/LICENSE21
-rw-r--r--Master/texmf-dist/doc/latex/mahjong/README.md76
-rw-r--r--Master/texmf-dist/doc/latex/mahjong/mahjong-code.pdfbin0 -> 611151 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mahjong/mahjong-code.tex2
-rw-r--r--Master/texmf-dist/doc/latex/mahjong/mahjong.pdfbin0 -> 511487 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mahjong/mahjong.tex2
-rw-r--r--Master/texmf-dist/source/latex/mahjong/Makefile115
-rw-r--r--Master/texmf-dist/source/latex/mahjong/mahjong.dtx405
-rw-r--r--Master/texmf-dist/source/latex/mahjong/mahjong.ins63
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/mahjong.sty204
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-0m.pdfbin0 -> 4657 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-0p.pdfbin0 -> 4432 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-0s.pdfbin0 -> 4974 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-1m.pdfbin0 -> 3997 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-1p.pdfbin0 -> 4465 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-1s.pdfbin0 -> 16962 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-1z.pdfbin0 -> 3463 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-2m.pdfbin0 -> 4050 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-2p.pdfbin0 -> 3860 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-2s.pdfbin0 -> 3391 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-2z.pdfbin0 -> 3499 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-3m.pdfbin0 -> 4168 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-3p.pdfbin0 -> 3725 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-3s.pdfbin0 -> 3996 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-3z.pdfbin0 -> 3170 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-4m.pdfbin0 -> 4327 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-4p.pdfbin0 -> 3897 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-4s.pdfbin0 -> 4298 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-4z.pdfbin0 -> 3129 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-5m.pdfbin0 -> 4584 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-5p.pdfbin0 -> 4363 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-5s.pdfbin0 -> 4925 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-5z.pdfbin0 -> 2281 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-6m.pdfbin0 -> 4373 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-6p.pdfbin0 -> 4778 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-6s.pdfbin0 -> 5312 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-6z.pdfbin0 -> 4206 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-7m.pdfbin0 -> 4096 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-7p.pdfbin0 -> 5363 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-7s.pdfbin0 -> 5114 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-7z.pdfbin0 -> 2994 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-8m.pdfbin0 -> 4047 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-8p.pdfbin0 -> 5209 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-8s.pdfbin0 -> 4968 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-9m.pdfbin0 -> 4248 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-9p.pdfbin0 -> 5812 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-9s.pdfbin0 -> 5908 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-Back.pdf72
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-Blank.pdf72
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-Front.pdfbin0 -> 1244 bytes
-rw-r--r--Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-Space.pdfbin0 -> 2281 bytes
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check3
-rw-r--r--Master/tlpkg/tlpsrc/collection-games.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/mahjong.tlpsrc0
54 files changed, 1035 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/mahjong/LICENSE b/Master/texmf-dist/doc/latex/mahjong/LICENSE
new file mode 100644
index 00000000000..73b877f67b6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mahjong/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021 Daniel Schmitz
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/Master/texmf-dist/doc/latex/mahjong/README.md b/Master/texmf-dist/doc/latex/mahjong/README.md
new file mode 100644
index 00000000000..ead057bbfe1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mahjong/README.md
@@ -0,0 +1,76 @@
+# mahjong-tex
+
+[![CTAN](https://img.shields.io/ctan/v/mahjong)](https://ctan.org/pkg/mahjong)
+
+A LaTeX 3 package for typesetting mahjong hands using MPSZ algebraic notation.
+This package provides an interface for LaTeX 2e, so you can use it without any experience in LaTeX 3.
+
+![A display of all tiles used for Riichi Mahjong](doc/all_tiles.png)
+
+This package focuses on Riichi (a.k.a. Japanese) Mahjong but can be used to typeset any style.
+However, flower tiles are currently missing.
+
+## Usage
+```
+\usepackage{mahjong}
+\mahjong{<tiles>}
+```
+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](doc/13orphans.png)
+
+Additional supported features are:
+
+* Red fives
+* Concealed tiles
+* Spaces
+* Blank tiles
+* Rotated tiles (90° counter-clockwise)
+* Stacked, rotated tiles
+
+```
+\mahjong{X44Xp-123's-50"5m-33?z}
+```
+![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.](doc/expansions.png)
+
+The size of the typeset hand can be changed.
+Either locally as an optional argument to `\mahjong` or as a package option.
+
+## Prerequisites
+You need a sufficiently recent version of LaTeX 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 TeX distributions.
+
+## Building
+A simple invocation of make is enough to produce a zip file in `out/` which can be submitted to CTAN.
+```
+make
+```
+
+## Installation
+Run
+```
+make install
+```
+
+to install the package to your local texmf directory.
+It should be available for use in your documents.
+
+Run
+```
+texdoc mahjong
+```
+to get an introduction to the package, including the extended flavor of MPSZ notation this package uses.
+
+## Attribution
+The mahjong tiles used in this package were created by [@FluffyStuff](https://github.com/FluffyStuff).
+The original repository is [FluffyStuff/riichi-mahjong-tiles](https://github.com/FluffyStuff/riichi-mahjong-tiles), used under CC-BY. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/mahjong/mahjong-code.pdf b/Master/texmf-dist/doc/latex/mahjong/mahjong-code.pdf
new file mode 100644
index 00000000000..10401366896
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mahjong/mahjong-code.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mahjong/mahjong-code.tex b/Master/texmf-dist/doc/latex/mahjong/mahjong-code.tex
new file mode 100644
index 00000000000..3f35b00e9fc
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mahjong/mahjong-code.tex
@@ -0,0 +1,2 @@
+\AtBeginDocument{\AlsoImplementation}
+\input{mahjong.dtx} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/mahjong/mahjong.pdf b/Master/texmf-dist/doc/latex/mahjong/mahjong.pdf
new file mode 100644
index 00000000000..f3bc3d44a8b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mahjong/mahjong.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mahjong/mahjong.tex b/Master/texmf-dist/doc/latex/mahjong/mahjong.tex
new file mode 100644
index 00000000000..dee23862376
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mahjong/mahjong.tex
@@ -0,0 +1,2 @@
+\AtBeginDocument{\OnlyDescription}
+\input{mahjong.dtx} \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/mahjong/Makefile b/Master/texmf-dist/source/latex/mahjong/Makefile
new file mode 100644
index 00000000000..6d40e37f250
--- /dev/null
+++ b/Master/texmf-dist/source/latex/mahjong/Makefile
@@ -0,0 +1,115 @@
+## Makefile for mahjong package
+# Directories
+BUILD=build
+TEXBUILD=$(BUILD)/tex
+OUT=out
+TEXMF_HOME:= $(shell kpsewhich -var-value TEXMFHOME)
+# TDS directories
+TDS=$(BUILD)/tds
+TDSDOC=$(TDS)/doc/latex/mahjong
+TDSSRC=$(TDS)/source/latex/mahjong
+TDSTEX=$(TDS)/tex/latex/mahjong
+# CTAN directories
+CTAN=$(BUILD)/ctan
+CTAN_MAHJONG=$(CTAN)/mahjong
+# Compilers
+LATEX=latex -output-directory $(TEXBUILD)
+LATEXMK=latexmk -lualatex -outdir=$(TEXBUILD) -auxdir=$(TEXBUILD) -interaction=nonstopmode -use-make
+ZIP=zip -r
+dir_guard=@mkdir -p $(@D)
+
+.PHONY: all clean install
+
+all: $(OUT)/mahjong-ctan.zip
+
+clean:
+ rm -rf $(BUILD)
+ rm -rf $(OUT)
+ rm -f mahjong.sty
+
+install: all
+ unzip $(CTAN)/mahjong.tds.zip -d $(TEXMF_HOME)
+
+
+# Extract package from DTX source
+$(TEXBUILD)/mahjong.sty: mahjong.ins mahjong.dtx
+ $(dir_guard)
+ $(LATEX) $<
+
+# Compile documentation
+$(TEXBUILD)/%.pdf: %.tex $(TEXBUILD)/mahjong.sty tiles
+ $(LATEXMK) $<
+ $(LATEXMK) $<
+
+%.gls: %.glo
+ makeindex -s gglo.ist -o $@ $<
+
+# Move everything to TDS staging area where it belongs
+$(TDSDOC)/%.pdf: $(TEXBUILD)/%.pdf
+ $(dir_guard)
+ cp $< $@
+
+$(TDSDOC)/%.tex: %.tex
+ $(dir_guard)
+ cp $< $@
+
+$(TDSDOC)/README.md: README.md
+ $(dir_guard)
+ cp $< $@
+
+$(TDSDOC)/LICENSE: LICENSE
+ $(dir_guard)
+ cp $< $@
+
+$(TDSSRC)/mahjong.dtx: mahjong.dtx
+ $(dir_guard)
+ cp $< $@
+
+$(TDSSRC)/mahjong.ins: mahjong.ins
+ $(dir_guard)
+ cp $< $@
+
+$(TDSSRC)/Makefile: Makefile
+ $(dir_guard)
+ cp $< $@
+
+$(TDSTEX)/%.sty: $(TEXBUILD)/%.sty
+ $(dir_guard)
+ cp $< $@
+
+$(TDSTEX)/tiles: tiles
+ cp -r $< $@
+
+# Create TDS zip and moved it to CTAN staging area
+$(CTAN)/mahjong.tds.zip: $(TDSDOC)/mahjong.pdf $(TDSDOC)/mahjong-code.pdf
+$(CTAN)/mahjong.tds.zip: $(TDSDOC)/mahjong.tex $(TDSDOC)/mahjong-code.tex
+$(CTAN)/mahjong.tds.zip: $(TDSDOC)/README.md $(TDSDOC)/LICENSE
+$(CTAN)/mahjong.tds.zip: $(TDSSRC)/mahjong.ins $(TDSSRC)/mahjong.dtx $(TDSSRC)/Makefile
+$(CTAN)/mahjong.tds.zip: $(TDSTEX)/mahjong.sty $(TDSTEX)/tiles
+ $(dir_guard)
+ cd $(TDS) && $(ZIP) $(@F) *
+ mv $(TDS)/$(@F) $@
+
+# Move everything to CTAN staging area
+$(CTAN_MAHJONG)/%.pdf: $(TDSDOC)/%.pdf
+ $(dir_guard)
+ cp $< $@
+
+$(CTAN_MAHJONG)/%.tex: $(TDSDOC)/%.tex
+ $(dir_guard)
+ cp $< $@
+
+$(CTAN_MAHJONG)/%: %
+ $(dir_guard)
+ cp -r $< $@
+
+# Create final zip archive for upload to CTAN
+$(OUT)/mahjong-ctan.zip: $(CTAN_MAHJONG)/mahjong.tex $(CTAN_MAHJONG)/mahjong.pdf
+$(OUT)/mahjong-ctan.zip: $(CTAN_MAHJONG)/mahjong-code.tex $(CTAN_MAHJONG)/mahjong-code.pdf
+$(OUT)/mahjong-ctan.zip: $(CTAN_MAHJONG)/README.md $(CTAN_MAHJONG)/LICENSE
+$(OUT)/mahjong-ctan.zip: $(CTAN_MAHJONG)/mahjong.dtx $(CTAN_MAHJONG)/mahjong.ins
+$(OUT)/mahjong-ctan.zip: $(CTAN_MAHJONG)/Makefile
+$(OUT)/mahjong-ctan.zip: $(CTAN_MAHJONG)/tiles $(CTAN)/mahjong.tds.zip
+ $(dir_guard)
+ cd $(CTAN) && $(ZIP) $(@F) ./*
+ mv $(CTAN)/$(@F) $@ \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/mahjong/mahjong.dtx b/Master/texmf-dist/source/latex/mahjong/mahjong.dtx
new file mode 100644
index 00000000000..a357df33733
--- /dev/null
+++ b/Master/texmf-dist/source/latex/mahjong/mahjong.dtx
@@ -0,0 +1,405 @@
+% \iffalse meta-comment
+%
+% Copyright (c) 2021 Daniel Schmitz
+%
+% Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
+% associated documentation files (the "Software"), to deal in the Software without restriction,
+% including without limitation the rights to use, copy, modify, merge, publish, distribute,
+% sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+% furnished to do so, subject to the following conditions:
+%
+% The above copyright notice and this permission notice shall be included in all copies or substantial
+% portions of the Software.
+%
+% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
+% NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+% DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
+% OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+%
+% \fi
+
+% \iffalse
+
+%<*driver>
+\documentclass[full]{l3doc}
+\usepackage[height=1.5\baselineskip]{mahjong}
+\usepackage{tabularx}
+\usepackage{array}
+\usepackage{booktabs}
+\usepackage{multicol}
+\usepackage{cleveref}
+\usepackage{gensymb}
+\renewcommand{\arraystretch}{1.8}
+\parskip 6pt
+\parindent 0pt
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+\DocInput{mahjong.dtx} \end{document}
+%</driver>
+% \fi
+
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+
+% \changes{v0.5}{2021/04/07}{First working version, minimal error handling}
+% \changes{v0.9}{2021/04/11}{Fully functional}
+% \changes{v1.0}{2021/04/14}{First complete release}
+% \changes{v1.0.1}{2021/04/16}{Added package prefix to filenames}
+%
+% \GetFileInfo{mahjong.sty}
+% \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ }
+% \DoNotIndex{\advance,\begingroup,\catcode,\closein}
+% \DoNotIndex{\closeout,\day,\def,\edef,\else,\empty,\endgroup}
+
+% \title{The \textsf{mahjong} package\thanks{This document corresponds to \textsf{mahjong}~\fileversion, dated~\filedate}}
+% \author{Daniel Schmitz \\ \texttt{schmytzi@gmail.com}}
+%
+% \maketitle
+% \tableofcontents
+% \begin{abstract}
+% The \textsf{mahjong} package provides a \LaTeXe{} and \LaTeX~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.
+% However, flower tiles and jokers are currently missing.
+% \end{abstract}
+%
+% \begin{documentation}
+% \section{Introduction}
+% Mahjong is a tile-based game originating from China which is popular in East and South-East Asia and has since spread throughout the world.
+% The \textsf{mahjong} package provides an interface for typesetting mahjong tiles and hands using MPSZ algebraic notation.
+% This documentation assumes familiarity with the game in general but none of its many styles.
+% Nonetheless, some basic terms will be defined because of differing vocabulary among players.
+%
+% \newcommand{\rmahjong}[1]{\raisebox{-.4\height}{\mahjong{#1}}}
+% \section{Mahjong Tiles}
+% \subsection{Suited Tiles}
+% The suited tiles are referred to as follows:
+%
+% \begin{tabular}{@{} l l @{}}
+% \toprule
+% \textbf{Suit} & \textbf{Tiles} \\
+% \midrule
+% Bamboo & \rmahjong{1234506789s} \\
+% Dots & \rmahjong{1234506789p} \\
+% Character & \rmahjong{1234506789m} \\
+% \bottomrule
+% \end{tabular}
+%
+% Suited tiles are referred to using the pattern \meta{value} \meta{suit}.
+% For instance, \mahjong{4s} is called \textit{4~Bamboo}.
+%
+% \subsection{Honor Tiles}
+% This documentation refers to the seven honor tiles as follows:
+%
+% \begin{tabular}{@{}c c c c@{}}
+% \toprule
+% \multicolumn{4}{c}{\bfseries Winds} \\
+% \mahjong{1z} & \mahjong{2z} & \mahjong{3z} & \mahjong{4z} \\
+% East Wind (E) & South Wind (S) & West Wind (W) & North Wind (N) \\
+% \midrule
+% \multicolumn{4}{c}{\bfseries Dragons} \\
+% \mahjong{5z} & \mahjong{6z} & \mahjong{7z} & \\
+% White Dragon & Green Dragon & Red Dragon & \\
+% \bottomrule
+% \end{tabular}
+%
+% \section{MPSZ Algebraic Notation}
+% \subsection{Standard Notation}
+% \begin{table}
+% \centering
+% \caption[MPSZ reference]{MPSZ notation reference. Each tile is identified by its column's number and its row's letter.}
+% \label{tab:mpszref}
+% \begin{tabular}{ccccccccccc}
+% & \textbf{0} & \textbf{1} & \textbf{2} & \textbf{3} & \textbf{4} & \textbf{5} & \textbf{6} & \textbf{7} & \textbf{8} & \textbf{9} \\
+% \textbf{s} & \raisebox{-.75\baselineskip}{\rmahjong{0s}} & \rmahjong{1s} & \rmahjong{2s} & \rmahjong{3s} & \rmahjong{4s} & \rmahjong{5s} & \rmahjong{6s} & \rmahjong{7s} & \rmahjong{8s} & \rmahjong{9s} \\
+% \textbf{p} & \rmahjong{0p} & \rmahjong{1p} & \rmahjong{2p} & \rmahjong{3p} & \rmahjong{4p} & \rmahjong{5p} & \rmahjong{6p} & \rmahjong{7p} & \rmahjong{8p} & \rmahjong{9p} \\
+% \textbf{m} & \rmahjong{0m} & \rmahjong{1m} & \rmahjong{2m} & \rmahjong{3m} & \rmahjong{4m} & \rmahjong{5m} & \rmahjong{6m} & \rmahjong{7m} & \rmahjong{8m} & \rmahjong{9m} \\
+% \textbf{z} & & \rmahjong{1z} & \rmahjong{2z} & \rmahjong{3z} & \rmahjong{4z} & \rmahjong{5z} & \rmahjong{6z} & \rmahjong{7z} & &
+% \end{tabular}
+% \end{table}
+%
+% % \DeleteShortVerb{\"}
+% MPSZ notation assigns each tile an identifier consisting of a digit and a letter (\cref{tab:mpszref}).
+% For suited tiles, the digit corresponds to the tile's value and the letter to its suit, Bamboo (|s|), Dots (|p|) or Character (|m|).
+% For instance, |2m| identifies \mahjong{2m} (2~Character).
+% The only exception ot this rule are red fives, whose numeric value is 0.
+% Red 5 Bamboo, for example, has identifier |0s|.
+% Honor tiles are assigned the "suit" |z|, with |1z| -- |4z| corresponding to E, S, W and N, and |5z| -- |7z| to the white, green and red dragon, respectively.
+%
+% Collections of tiles, such as melds or hands, are represented by concatenating the identifiers of the tiles they comprise.
+% For instance, |3s4s5s| corresponds to \mahjong{3s4s5s}.
+% Groups of tiles sharing the same suit can be abbreviated by omitting all but the last suit identifier.
+% The above example can also be expressed as |345s|.
+% Spaces are ignored and the notation is case-insensitive.
+%
+% \subsection{Extensions}
+% \paragraph{Spaces.} Spaces can be inserted using |-|:
+% |444s-567s| produces \mahjong{444s-567s}.
+%
+% \paragraph{Concealed Tiles.} \mahjong{X} Concealed (or face-down) tiles are represented by |X|.
+% They don't need a suit identifier and don't act as one.
+% |123s X 456s| and |123 X 456s| are therefore equivalent.
+%
+% \paragraph{Blank Tiles.} \mahjong{?} Blank or unknown tiles are represented by |?|.
+% Just like concealed tiles, they don't change the current suit.
+% |123s ? 456s| and |123 ? 456s| are equivalent, for instance.
+%
+% \paragraph{Rotation.} Inserting an apostrophe (|'|) rotates the \textit{preceeding} tile counter-clockwise.
+% For instance, |6'66m| is rendered as \mahjong{6'66m}.
+% This can only be done once per tile, i.e. it is not possible to rotate them 180\degree{} or 270\degree{}.
+% When you want to rotate the last tile of a group, it doesn't matter whether the apostrophe appears before or after the suit, so |77'm| and |77m'| are equivalent.
+%
+%
+% \paragraph{Rotation and Stacking.} Quotes (|"|) cause the \textit{preceeding} tile to be rendered as two rotated and stacked tiles.
+% For instance, |77"7z| produces \mahjong{77"7z}.
+%
+% \section{Typesetting Mahjong Tiles in Your Document}
+% \DescribeMacro{\mahjong}
+% The main interface is |\mahjong| \oarg{height} \marg{hand}.
+% \meta{hand} refers to a tile sequence in MPSZ notation as discussed above and \meta{height} specifies the height of the rendered mahjong tiles.
+% If \meta{height} is not specified, the default height is used.
+%
+% \DescribeMacro{\mahjong_typeset_hand:n} \DescribeMacro{\mahjong_typeset_hand:x}
+% The \LaTeX~3 interface for rendering mahjong tiles are |\mahjong_typeset_hand:n| and its variants.
+% This macro accepts the hand to be rendered in MPSZ notation.
+% The height can be specified by setting |\l_mahjong_tile_height| \DescribeMacro{\l_mahjong_tile_height} and the default height is saved in |\g_mahjong_default_height|. \DescribeMacro{\g_mahjong_default_height}
+%
+% The default height can be set using the package's |height| parameter.
+% For instance, |\usepackage[height=2\baselineskip]{mahjong}| sets the default size of mahjong tiles to double the value of |\baselineskip| in the context they are rendered in.
+% The parameter defaults to |\baselineskip|.
+%
+% \section{Acknowledgments}
+% The mahjong tiles used in this package were created by GitHub user \href{https://github.com/FluffyStuff}{FluffyStuff}.
+% The original repository is \href{https://github.com/FluffyStuff/riichi-mahjong-tiles}{FluffyStuff/riichi-mahjong-tiles}, used under CC-BY Version 4.0.
+% \end{documentation}
+% \begin{implementation}
+%
+% \begin{macrocode}
+%<*pkg>
+%<@@=mahjong>
+\NeedsTeXFormat{LaTeX2e}[2019/10/01]
+\RequirePackage{expl3}
+\ProvidesExplPackage{mahjong}{2021/04/16}{1.0.1}{Typeset Mahjong Hands}
+\RequirePackage{xparse}
+\RequirePackage{l3keys2e}
+\RequirePackage{graphicx}
+\RequirePackage{stackengine}
+% \end{macrocode}
+
+% \begin{macrocode}
+\msg_new:nnnn {mahjong} {invalid_token}
+{Token ~ #1 ~ is ~ not ~ valid ~ in ~ MPSZ ~ notation}
+{Valid ~ tokens ~ are ~ digits ~ 0-9, ~ m, ~ p, ~ s, ~ z, ~ x, ~ -, ~ ?, ~ ', ~ and ~ " }
+\msg_new:nnnn {mahjong} {unknown_tile}
+{I~don't~know~tile~#1.}
+{Please~check~the~documentation~for~recognized~tiles.}
+\msg_new:nnnn {mahjong} {unknown_orientation}
+{Orientation ~ #1 ~ is ~ unknown}
+{This ~ should ~ not ~ happen.~ Please ~ create ~ a ~ bug ~ report.}
+
+\keys_define:nn {mahjong} {
+ height .dim_gset:N = \g_mahjong_default_height
+}
+
+% Identifiers for all suits
+\cs_new:Npn \c_@@_suits_tl {mpsz}
+% Allowed tokens
+\cs_new:Npn \c_@@_allowed_tokens_tl {0123456789mpsz-?x'"}
+
+% Variables have to be declared globally
+\tl_new:N \l_@@_suit_tl
+\tl_new:N \l_@@_tiles_tl
+\tl_new:N \l_@@_reversed_tl
+\tl_new:N \l_@@_hand_tl
+\tl_new:N \l_@@_current_suit_tl
+\tl_new:N \l_@@_current_group_tl
+\tl_new:N \l_@@_current_char
+
+
+\dim_set:Nn \g_mahjong_default_height {\baselineskip}
+\dim_new:N \l_mahjong_tile_height
+
+\int_new:N \l_@@_tile_orientation_int
+\seq_new:N \l_@@_tile_maps_seq
+\str_new:N \l_@@_file_path_str
+
+
+\ProcessKeysPackageOptions{mahjong}
+% \end{macrocode}
+
+% \begin{macro}[aux]{\@@_make_tile:nn, \@@_make_tile:VV, \@@_make_tile:xV, \@@_make_tile:nV}
+% Inserts a mahjong tile into the input stream.
+% This functions only handles that use the front background and have a forground,
+% i.e. regular and blank tiles.
+% \begin{macrocode}
+\cs_set:Npn \@@_make_tile:nn #1#2 {
+ \file_if_exist:nTF {#1} {
+ \int_case:nnF {#2} {
+ {0} {
+ \stackinset{c}{0pt}{c}{0pt}{
+ \includegraphics[
+ angle=0,
+ height=.85\l_mahjong_tile_height]
+ {#1}
+ }{
+ \includegraphics[
+ angle=0,
+ height=\l_mahjong_tile_height]
+ {tiles/mahjong-Front.pdf}
+ }
+ } {1} {
+ \stackinset{c}{0pt}{c}{0pt}{
+ \includegraphics[
+ angle=90,
+ width=.85\l_mahjong_tile_height]
+ {#1}
+ }{
+ \includegraphics[
+ angle=90,
+ width=\l_mahjong_tile_height]
+ {tiles/mahjong-Front.pdf}
+ }
+ } {2} {
+ % Stack 2 rotated tiles on top of each other.
+ \stackon [0pt] {
+ \@@_make_tile:nn {#1} {1}
+ } {
+ \@@_make_tile:nn {#1} {1}
+ }
+ }
+ } {
+ \msg_fatal:nnx {mahjong} {unknown_orientation} {#2}
+ }
+ } {
+ \msg_error:nnx {mahjong} {unknown_tile} {#1}
+ }
+}
+
+\cs_generate_variant:Nn \@@_make_tile:nn {VV, xV, nV}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\mahjong_typeset_hand:n, \mahjong_typeset_hand:x}
+% Parseses and typesets a mahjong hand in MPSZ notation.
+% Set |\l_mahjong_tile_height| to control the tiles' size.
+% \begin{macrocode}
+% Parses a full hand
+\cs_set:Npn \mahjong_typeset_hand:n #1 {
+ \tl_set:Nx \l_@@_hand_tl {\text_lowercase:n {#1}}
+ % MPSZ notation is easier to parse right-to-left, so reverse string
+ % There is no string reversal function but we can reverse token lists
+ % Token lists and strings are freely convertible between each other
+ \tl_set:Nx \l_@@_reversed_tl {\tl_reverse:V \l_@@_hand_tl}
+ \tl_map_variable:NNn \l_@@_reversed_tl \l_@@_current_char {
+ % Check if we recognize the current token
+ \exp_args:NVV \tl_if_in:nnF \c_@@_allowed_tokens_tl \l_@@_current_char {
+ \msg_error:nnx {mahjong} {invalid_token} {\l_@@_current_char}
+ }
+ \exp_args:NVV \tl_if_in:nnTF \c_@@_suits_tl \l_@@_current_char {
+ % If we've found a suit identifier, change the current suit
+ \tl_set:NV \l_@@_current_suit_tl \l_@@_current_char
+ } {
+ \str_case:VnF \l_@@_current_char {
+ {'} {
+ % An apostrophe indicates that the next tile is rotated
+ \int_set:Nn \l_@@_tile_orientation_int {1}
+ }
+ {"} {
+ % Quotes mean the next tile is actually 2 rotated tiles stacked on top of each other
+ \int_set:Nn \l_@@_tile_orientation_int {2}
+ }
+ } {
+ % Default case: We've got a complete tile identifier
+ % Turn it into a property list
+ \prop_clear:N \l_tmpa_prop
+ \prop_put:NnV \l_tmpa_prop {suit} \l_@@_current_suit_tl
+ \prop_put:NnV \l_tmpa_prop {face} \l_@@_current_char
+ \prop_put:NnV \l_tmpa_prop {orientation} \l_@@_tile_orientation_int
+ % Add it to the beginning of the sequence (we are parsing in reverse)
+ \seq_put_left:NV \l_@@_tile_maps_seq \l_tmpa_prop
+ \int_set:Nn \l_@@_tile_orientation_int {0}
+ }
+ }
+ }
+ % Typesetting begins here. Sequence is in correct order
+ \seq_map_variable:NNn \l_@@_tile_maps_seq \l_tmpa_prop {
+ \prop_get:NnN \l_tmpa_prop {face} \l_tmpa_tl
+ \prop_get:NnN \l_tmpa_prop {orientation} \l_tmpa_int
+ \str_case:VnF \l_tmpa_tl {
+ {-} {
+ % If the current face is a dash, insert a space
+ \includegraphics[height=\l_mahjong_tile_height]{tiles/mahjong-Space.pdf}
+ } {x} {
+ % Insert a flipped tile
+ \int_case:nn {\l_tmpa_int} {
+ {0} { % Upright
+ \includegraphics[
+ angle=0,
+ height=\l_mahjong_tile_height]
+ {tiles/mahjong-Back.pdf}
+ } {1} { % Rotated
+ \includegraphics[
+ angle=90,
+ width=\l_mahjong_tile_height]
+ {tiles/mahjong-Back.pdf}
+ } {2} { % Rotated and stacked
+ \stackon [0pt] {
+ \includegraphics[
+ angle=90,
+ width=\l_mahjong_tile_height]
+ {tiles/mahjong-Back.pdf}
+ } {
+ \includegraphics[angle=90,
+ width=\l_mahjong_tile_height]
+ {tiles/mahjong-Back.pdf}
+ }
+ }
+ }
+ } {?} { % Blank tile
+ \@@_make_tile:nV {tiles/mahjong-Blank.pdf} \l_tmpa_int
+ }
+ } { % Any other tile identified by a code.
+ \@@_make_tile:xV {tiles/mahjong-\l_tmpa_tl\prop_item:Nn \l_tmpa_prop {suit}.pdf} \l_tmpa_int
+ }
+ }
+ % Clear the list for the next invocation
+ \seq_clear:N \l_@@_tile_maps_seq
+}
+
+% Have TeX automatically expand the argument for us
+\cs_generate_variant:Nn \@@_typeset_hand:n {x}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mahjong}
+% This is the only \LaTeXe{} macro in this package.
+% It typesets a mahjong hand.
+% \begin{macrocode}
+\NewDocumentCommand{\mahjong}{O{\g_mahjong_default_height} m}{
+ \dim_set:Nn \l_mahjong_tile_height {#1}
+ \mahjong_typeset_hand:n {#2}
+}
+%</pkg>
+% \end{macrocode}
+% \end{macro}
+%
+% \end{implementation}
+%
+% \PrintChanges
+\endinput
diff --git a/Master/texmf-dist/source/latex/mahjong/mahjong.ins b/Master/texmf-dist/source/latex/mahjong/mahjong.ins
new file mode 100644
index 00000000000..4b622adb2a8
--- /dev/null
+++ b/Master/texmf-dist/source/latex/mahjong/mahjong.ins
@@ -0,0 +1,63 @@
+%% Copyright (c) 2021 Daniel Schmitz
+%%
+%% Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
+%% associated documentation files (the "Software"), to deal in the Software without restriction,
+%% including without limitation the rights to use, copy, modify, merge, publish, distribute,
+%% sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+%% furnished to do so, subject to the following conditions:
+%%
+%% The above copyright notice and this permission notice shall be included in all copies or substantial
+%% portions of the Software.
+%%
+%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
+%% NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+%% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+%% DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
+%% OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+\input l3docstrip.tex
+\keepsilent
+\usedir{tex/latex/mahjong}
+
+\preamble
+Copyright (c) 2021 Daniel Schmitz
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
+associated documentation files (the "Software"), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge, publish, distribute,
+sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
+NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
+OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+\endpreamble
+
+\askforoverwritefalse
+\generate{\file{mahjong.sty}{\from{mahjong.dtx}{pkg}}}
+
+\obeyspaces
+\Msg{****************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the *}
+\Msg{* following file and directory into a directory *}
+\Msg{* searched by TeX: *}
+\Msg{* *}
+\Msg{* mahjong.sty *}
+\Msg{* tiles/ *}
+\Msg{* *}
+\Msg{* To produce the documentation run the file *}
+\Msg{* mahjong.dtx through LaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{****************************************************}
+
+\endbatchfile \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/mahjong/mahjong.sty b/Master/texmf-dist/tex/latex/mahjong/mahjong.sty
new file mode 100644
index 00000000000..b0b58e439ec
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/mahjong.sty
@@ -0,0 +1,204 @@
+%%
+%% This is file `mahjong.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% mahjong.dtx (with options: `pkg')
+%% Copyright (c) 2021 Daniel Schmitz
+%%
+%% Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
+%% associated documentation files (the "Software"), to deal in the Software without restriction,
+%% including without limitation the rights to use, copy, modify, merge, publish, distribute,
+%% sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+%% furnished to do so, subject to the following conditions:
+%%
+%% The above copyright notice and this permission notice shall be included in all copies or substantial
+%% portions of the Software.
+%%
+%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
+%% NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+%% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+%% DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
+%% OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+
+
+\NeedsTeXFormat{LaTeX2e}[2019/10/01]
+\RequirePackage{expl3}
+\ProvidesExplPackage{mahjong}{2021/04/16}{1.0.1}{Typeset Mahjong Hands}
+\RequirePackage{xparse}
+\RequirePackage{l3keys2e}
+\RequirePackage{graphicx}
+\RequirePackage{stackengine}
+
+\msg_new:nnnn {mahjong} {invalid_token}
+{Token ~ #1 ~ is ~ not ~ valid ~ in ~ MPSZ ~ notation}
+{Valid ~ tokens ~ are ~ digits ~ 0-9, ~ m, ~ p, ~ s, ~ z, ~ x, ~ -, ~ ?, ~ ', ~ and ~ " }
+\msg_new:nnnn {mahjong} {unknown_tile}
+{I~don't~know~tile~#1.}
+{Please~check~the~documentation~for~recognized~tiles.}
+\msg_new:nnnn {mahjong} {unknown_orientation}
+{Orientation ~ #1 ~ is ~ unknown}
+{This ~ should ~ not ~ happen.~ Please ~ create ~ a ~ bug ~ report.}
+
+\keys_define:nn {mahjong} {
+ height .dim_gset:N = \g_mahjong_default_height
+}
+
+\cs_new:Npn \c__mahjong_suits_tl {mpsz}
+\cs_new:Npn \c__mahjong_allowed_tokens_tl {0123456789mpsz-?x'"}
+
+\tl_new:N \l__mahjong_suit_tl
+\tl_new:N \l__mahjong_tiles_tl
+\tl_new:N \l__mahjong_reversed_tl
+\tl_new:N \l__mahjong_hand_tl
+\tl_new:N \l__mahjong_current_suit_tl
+\tl_new:N \l__mahjong_current_group_tl
+\tl_new:N \l__mahjong_current_char
+
+\dim_set:Nn \g_mahjong_default_height {\baselineskip}
+\dim_new:N \l_mahjong_tile_height
+
+\int_new:N \l__mahjong_tile_orientation_int
+\seq_new:N \l__mahjong_tile_maps_seq
+\str_new:N \l__mahjong_file_path_str
+
+\ProcessKeysPackageOptions{mahjong}
+
+\cs_set:Npn \__mahjong_make_tile:nn #1#2 {
+ \file_if_exist:nTF {#1} {
+ \int_case:nnF {#2} {
+ {0} {
+ \stackinset{c}{0pt}{c}{0pt}{
+ \includegraphics[
+ angle=0,
+ height=.85\l_mahjong_tile_height]
+ {#1}
+ }{
+ \includegraphics[
+ angle=0,
+ height=\l_mahjong_tile_height]
+ {tiles/mahjong-Front.pdf}
+ }
+ } {1} {
+ \stackinset{c}{0pt}{c}{0pt}{
+ \includegraphics[
+ angle=90,
+ width=.85\l_mahjong_tile_height]
+ {#1}
+ }{
+ \includegraphics[
+ angle=90,
+ width=\l_mahjong_tile_height]
+ {tiles/mahjong-Front.pdf}
+ }
+ } {2} {
+ % Stack 2 rotated tiles on top of each other.
+ \stackon [0pt] {
+ \__mahjong_make_tile:nn {#1} {1}
+ } {
+ \__mahjong_make_tile:nn {#1} {1}
+ }
+ }
+ } {
+ \msg_fatal:nnx {mahjong} {unknown_orientation} {#2}
+ }
+ } {
+ \msg_error:nnx {mahjong} {unknown_tile} {#1}
+ }
+}
+
+\cs_generate_variant:Nn \__mahjong_make_tile:nn {VV, xV, nV}
+\cs_set:Npn \mahjong_typeset_hand:n #1 {
+ \tl_set:Nx \l__mahjong_hand_tl {\text_lowercase:n {#1}}
+ % MPSZ notation is easier to parse right-to-left, so reverse string
+ % There is no string reversal function but we can reverse token lists
+ % Token lists and strings are freely convertible between each other
+ \tl_set:Nx \l__mahjong_reversed_tl {\tl_reverse:V \l__mahjong_hand_tl}
+ \tl_map_variable:NNn \l__mahjong_reversed_tl \l__mahjong_current_char {
+ % Check if we recognize the current token
+ \exp_args:NVV \tl_if_in:nnF \c__mahjong_allowed_tokens_tl \l__mahjong_current_char {
+ \msg_error:nnx {mahjong} {invalid_token} {\l__mahjong_current_char}
+ }
+ \exp_args:NVV \tl_if_in:nnTF \c__mahjong_suits_tl \l__mahjong_current_char {
+ % If we've found a suit identifier, change the current suit
+ \tl_set:NV \l__mahjong_current_suit_tl \l__mahjong_current_char
+ } {
+ \str_case:VnF \l__mahjong_current_char {
+ {'} {
+ % An apostrophe indicates that the next tile is rotated
+ \int_set:Nn \l__mahjong_tile_orientation_int {1}
+ }
+ {"} {
+ % Quotes mean the next tile is actually 2 rotated tiles stacked on top of each other
+ \int_set:Nn \l__mahjong_tile_orientation_int {2}
+ }
+ } {
+ % Default case: We've got a complete tile identifier
+ % Turn it into a property list
+ \prop_clear:N \l_tmpa_prop
+ \prop_put:NnV \l_tmpa_prop {suit} \l__mahjong_current_suit_tl
+ \prop_put:NnV \l_tmpa_prop {face} \l__mahjong_current_char
+ \prop_put:NnV \l_tmpa_prop {orientation} \l__mahjong_tile_orientation_int
+ % Add it to the beginning of the sequence (we are parsing in reverse)
+ \seq_put_left:NV \l__mahjong_tile_maps_seq \l_tmpa_prop
+ \int_set:Nn \l__mahjong_tile_orientation_int {0}
+ }
+ }
+ }
+ % Typesetting begins here. Sequence is in correct order
+ \seq_map_variable:NNn \l__mahjong_tile_maps_seq \l_tmpa_prop {
+ \prop_get:NnN \l_tmpa_prop {face} \l_tmpa_tl
+ \prop_get:NnN \l_tmpa_prop {orientation} \l_tmpa_int
+ \str_case:VnF \l_tmpa_tl {
+ {-} {
+ % If the current face is a dash, insert a space
+ \includegraphics[height=\l_mahjong_tile_height]{tiles/mahjong-Space.pdf}
+ } {x} {
+ % Insert a flipped tile
+ \int_case:nn {\l_tmpa_int} {
+ {0} { % Upright
+ \includegraphics[
+ angle=0,
+ height=\l_mahjong_tile_height]
+ {tiles/mahjong-Back.pdf}
+ } {1} { % Rotated
+ \includegraphics[
+ angle=90,
+ width=\l_mahjong_tile_height]
+ {tiles/mahjong-Back.pdf}
+ } {2} { % Rotated and stacked
+ \stackon [0pt] {
+ \includegraphics[
+ angle=90,
+ width=\l_mahjong_tile_height]
+ {tiles/mahjong-Back.pdf}
+ } {
+ \includegraphics[angle=90,
+ width=\l_mahjong_tile_height]
+ {tiles/mahjong-Back.pdf}
+ }
+ }
+ }
+ } {?} { % Blank tile
+ \__mahjong_make_tile:nV {tiles/mahjong-Blank.pdf} \l_tmpa_int
+ }
+ } { % Any other tile identified by a code.
+ \__mahjong_make_tile:xV {tiles/mahjong-\l_tmpa_tl\prop_item:Nn \l_tmpa_prop {suit}.pdf} \l_tmpa_int
+ }
+ }
+ % Clear the list for the next invocation
+ \seq_clear:N \l__mahjong_tile_maps_seq
+}
+
+\cs_generate_variant:Nn \__mahjong_typeset_hand:n {x}
+\NewDocumentCommand{\mahjong}{O{\g_mahjong_default_height} m}{
+ \dim_set:Nn \l_mahjong_tile_height {#1}
+ \mahjong_typeset_hand:n {#2}
+}
+\endinput
+%%
+%% End of file `mahjong.sty'.
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-0m.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-0m.pdf
new file mode 100644
index 00000000000..847242a5726
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-0m.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-0p.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-0p.pdf
new file mode 100644
index 00000000000..4bbf1d0a870
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-0p.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-0s.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-0s.pdf
new file mode 100644
index 00000000000..a543f3d0a02
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-0s.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-1m.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-1m.pdf
new file mode 100644
index 00000000000..83ab34999af
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-1m.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-1p.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-1p.pdf
new file mode 100644
index 00000000000..7b5034abd0a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-1p.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-1s.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-1s.pdf
new file mode 100644
index 00000000000..b963ece881e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-1s.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-1z.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-1z.pdf
new file mode 100644
index 00000000000..35743a24ae4
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-1z.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-2m.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-2m.pdf
new file mode 100644
index 00000000000..a252424bc17
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-2m.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-2p.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-2p.pdf
new file mode 100644
index 00000000000..8aba2ebcb10
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-2p.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-2s.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-2s.pdf
new file mode 100644
index 00000000000..d27c4077931
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-2s.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-2z.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-2z.pdf
new file mode 100644
index 00000000000..5dd1b046494
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-2z.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-3m.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-3m.pdf
new file mode 100644
index 00000000000..abc870258de
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-3m.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-3p.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-3p.pdf
new file mode 100644
index 00000000000..11f8fce3df7
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-3p.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-3s.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-3s.pdf
new file mode 100644
index 00000000000..4156f417259
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-3s.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-3z.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-3z.pdf
new file mode 100644
index 00000000000..59dabc8fe3b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-3z.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-4m.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-4m.pdf
new file mode 100644
index 00000000000..7cfa8bee4ca
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-4m.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-4p.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-4p.pdf
new file mode 100644
index 00000000000..b8c8f611cee
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-4p.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-4s.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-4s.pdf
new file mode 100644
index 00000000000..33621ef290b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-4s.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-4z.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-4z.pdf
new file mode 100644
index 00000000000..91e8614d7f9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-4z.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-5m.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-5m.pdf
new file mode 100644
index 00000000000..7e781c266a3
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-5m.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-5p.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-5p.pdf
new file mode 100644
index 00000000000..6a4d090ff42
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-5p.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-5s.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-5s.pdf
new file mode 100644
index 00000000000..fd729c9a896
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-5s.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-5z.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-5z.pdf
new file mode 100644
index 00000000000..53a731f4490
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-5z.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-6m.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-6m.pdf
new file mode 100644
index 00000000000..8341644d59c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-6m.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-6p.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-6p.pdf
new file mode 100644
index 00000000000..28832f6c176
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-6p.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-6s.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-6s.pdf
new file mode 100644
index 00000000000..92b96149e8f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-6s.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-6z.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-6z.pdf
new file mode 100644
index 00000000000..df836b96f0b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-6z.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-7m.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-7m.pdf
new file mode 100644
index 00000000000..91f0f11274f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-7m.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-7p.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-7p.pdf
new file mode 100644
index 00000000000..97e28ec00a1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-7p.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-7s.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-7s.pdf
new file mode 100644
index 00000000000..dc9e03da54e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-7s.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-7z.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-7z.pdf
new file mode 100644
index 00000000000..0402a4bda6c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-7z.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-8m.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-8m.pdf
new file mode 100644
index 00000000000..5cacf6a975c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-8m.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-8p.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-8p.pdf
new file mode 100644
index 00000000000..51d2a2dfe09
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-8p.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-8s.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-8s.pdf
new file mode 100644
index 00000000000..a9531d2c502
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-8s.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-9m.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-9m.pdf
new file mode 100644
index 00000000000..711c0c7f328
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-9m.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-9p.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-9p.pdf
new file mode 100644
index 00000000000..fd0a9aca8c7
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-9p.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-9s.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-9s.pdf
new file mode 100644
index 00000000000..fafdd63c884
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-9s.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-Back.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-Back.pdf
new file mode 100644
index 00000000000..b134215024d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-Back.pdf
@@ -0,0 +1,72 @@
+%PDF-1.4
+%쏢
+%%Invocation: path/gs -P- -dSAFER -dCompatibilityLevel=1.4 -q -P- -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=? -sOutputFile=? -P- -dSAFER -dCompatibilityLevel=1.4 ?
+5 0 obj
+<</Length 6 0 R/Filter /FlateDecode>>
+stream
+x]KB! E]E7`gD@?|b !}! s CYN[q\&81ः$Jщꑡ%%*;w'5Rγ D # 3ו$ʥnލנ.ԇU  V<endstream
+endobj
+6 0 obj
+146
+endobj
+4 0 obj
+<</Type/Page/MediaBox [0 0 225 300]
+/Parent 3 0 R
+/Resources<</ProcSet[/PDF]
+>>
+/Contents 5 0 R
+>>
+endobj
+3 0 obj
+<< /Type /Pages /Kids [
+4 0 R
+] /Count 1
+>>
+endobj
+1 0 obj
+<</Type /Catalog /Pages 3 0 R
+/Metadata 7 0 R
+>>
+endobj
+7 0 obj
+<</Type/Metadata
+/Subtype/XML/Length 1195>>stream
+<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
+<?adobe-xap-filters esc="CRLF"?>
+<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
+<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
+<rdf:Description rdf:about="" xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 9.53.3'/>
+<rdf:Description rdf:about="" xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2021-04-05T20:21:28+02:00</xmp:ModifyDate>
+<xmp:CreateDate>2021-04-05T20:21:28+02:00</xmp:CreateDate>
+<xmp:CreatorTool>GPL Ghostscript 9533 (ps2write)</xmp:CreatorTool></rdf:Description>
+<rdf:Description rdf:about="" xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='uuid:499c5954-ce58-11f6-0000-8cdb42dd55f4'/>
+<rdf:Description rdf:about="" xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
+</rdf:RDF>
+</x:xmpmeta>
+
+
+<?xpacket end='w'?>
+endstream
+endobj
+2 0 obj
+<</Producer(GPL Ghostscript 9.53.3)
+/CreationDate(D:20210405202128+02'00')
+/ModDate(D:20210405202128+02'00')
+/Creator(GPL Ghostscript 9533 \(ps2write\))>>endobj
+xref
+0 8
+0000000000 65535 f
+0000000590 00000 n
+0000001925 00000 n
+0000000531 00000 n
+0000000417 00000 n
+0000000182 00000 n
+0000000398 00000 n
+0000000654 00000 n
+trailer
+<< /Size 8 /Root 1 0 R /Info 2 0 R
+/ID [<FD45E84558D170C61AC891B6AF2FDB1D><FD45E84558D170C61AC891B6AF2FDB1D>]
+>>
+startxref
+2094
+%%EOF
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-Blank.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-Blank.pdf
new file mode 100644
index 00000000000..c0bea0b96b0
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-Blank.pdf
@@ -0,0 +1,72 @@
+%PDF-1.4
+%쏢
+%%Invocation: path/gs -P- -dSAFER -dCompatibilityLevel=1.4 -q -P- -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=? -sOutputFile=? -P- -dSAFER -dCompatibilityLevel=1.4 ?
+5 0 obj
+<</Length 6 0 R/Filter /FlateDecode>>
+stream
+xmSq[1 *@0(#5h`Yв5N"(.]^Lxvm@s˥N{/Ň<p)WZҵI7KUSƺ]aTd":(wބR$Mzv()"r39"{"ŵe2,X&12 "Sd<Ml^Dm Qcv&{\8#Ħ1^0IrRD;gJLdg:/lX1/R$Ó5IüST\$N-bY:Kxr^U}h}4MzZx]EzAM,CAG>0@qY&3Ed>Wg8R sE1txCcD3Mħ4 Nl`G8~urҶ㟘~ήendstream
+endobj
+6 0 obj
+442
+endobj
+4 0 obj
+<</Type/Page/MediaBox [0 0 225 300]
+/Parent 3 0 R
+/Resources<</ProcSet[/PDF]
+>>
+/Contents 5 0 R
+>>
+endobj
+3 0 obj
+<< /Type /Pages /Kids [
+4 0 R
+] /Count 1
+>>
+endobj
+1 0 obj
+<</Type /Catalog /Pages 3 0 R
+/Metadata 7 0 R
+>>
+endobj
+7 0 obj
+<</Type/Metadata
+/Subtype/XML/Length 1195>>stream
+<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
+<?adobe-xap-filters esc="CRLF"?>
+<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
+<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
+<rdf:Description rdf:about="" xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 9.53.3'/>
+<rdf:Description rdf:about="" xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2021-04-05T20:21:28+02:00</xmp:ModifyDate>
+<xmp:CreateDate>2021-04-05T20:21:28+02:00</xmp:CreateDate>
+<xmp:CreatorTool>GPL Ghostscript 9533 (ps2write)</xmp:CreatorTool></rdf:Description>
+<rdf:Description rdf:about="" xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='uuid:499c5954-ce58-11f6-0000-3fd31d066f7a'/>
+<rdf:Description rdf:about="" xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
+</rdf:RDF>
+</x:xmpmeta>
+
+
+<?xpacket end='w'?>
+endstream
+endobj
+2 0 obj
+<</Producer(GPL Ghostscript 9.53.3)
+/CreationDate(D:20210405202128+02'00')
+/ModDate(D:20210405202128+02'00')
+/Creator(GPL Ghostscript 9533 \(ps2write\))>>endobj
+xref
+0 8
+0000000000 65535 f
+0000000886 00000 n
+0000002221 00000 n
+0000000827 00000 n
+0000000713 00000 n
+0000000182 00000 n
+0000000694 00000 n
+0000000950 00000 n
+trailer
+<< /Size 8 /Root 1 0 R /Info 2 0 R
+/ID [<A14E4ACDE358009ED2B5C0F368B47857><A14E4ACDE358009ED2B5C0F368B47857>]
+>>
+startxref
+2390
+%%EOF
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-Front.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-Front.pdf
new file mode 100644
index 00000000000..2d5e1ca0c3b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-Front.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-Space.pdf b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-Space.pdf
new file mode 100644
index 00000000000..53bfe4dc594
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mahjong/tiles/mahjong-Space.pdf
Binary files differ
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index b3fc9623cad..7f5e64571cc 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -487,7 +487,8 @@ my @TLP_working = qw(
luasseq luatex85 luatexbase luatexja luatexko luatextra
luatodonotes luavlna luaxml
lwarp lxfonts ly1 lyluatex
- m-tx macros2e macroswap mafr magaz magicnum magra mailing mailmerge
+ m-tx macros2e macroswap mafr magaz magicnum magra
+ mahjong mailing mailmerge
make4ht makebarcode makebase makebox
makecell makecirc makecmds makecookbook
makedtx makeglos makeplot maker makerobust
diff --git a/Master/tlpkg/tlpsrc/collection-games.tlpsrc b/Master/tlpkg/tlpsrc/collection-games.tlpsrc
index 1b2f938251f..91c1aaa5d92 100644
--- a/Master/tlpkg/tlpsrc/collection-games.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-games.tlpsrc
@@ -22,6 +22,7 @@ depend horoscop
depend jigsaw
depend labyrinth
depend logicpuzzle
+depend mahjong
depend musikui
depend nimsticks
depend onedown
diff --git a/Master/tlpkg/tlpsrc/mahjong.tlpsrc b/Master/tlpkg/tlpsrc/mahjong.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/mahjong.tlpsrc