texlive[57507] Master: penrose (23jan21)

commits+karl at tug.org commits+karl at tug.org
Sat Jan 23 23:20:01 CET 2021


Revision: 57507
          http://tug.org/svn/texlive?view=revision&revision=57507
Author:   karl
Date:     2021-01-23 23:20:01 +0100 (Sat, 23 Jan 2021)
Log Message:
-----------
penrose (23jan21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/penrose/penrose.pdf
    trunk/Master/texmf-dist/doc/latex/penrose/penrose.tex
    trunk/Master/texmf-dist/doc/latex/penrose/penrose_code.pdf
    trunk/Master/texmf-dist/source/latex/penrose/penrose_code.dtx
    trunk/Master/texmf-dist/tex/latex/penrose/tikzlibrarypenrose.code.tex
    trunk/Master/tlpkg/libexec/ctan2tds

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/penrose/README
    trunk/Master/texmf-dist/source/latex/penrose/penrose_code.ins

Removed Paths:
-------------
    trunk/Master/texmf-dist/source/latex/penrose/penrose.ins

Added: trunk/Master/texmf-dist/doc/latex/penrose/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/penrose/README	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/penrose/README	2021-01-23 22:20:01 UTC (rev 57507)
@@ -0,0 +1,8 @@
+----------------------------------------------------------------
+penrose --- TikZ library for producing Penrose tilings
+E-mail: loopspace at mathforge.org
+Released under the LaTeX Project Public License v1.3c or later
+See http://www.latex-project.org/lppl.txt
+----------------------------------------------------------------
+
+This package is for the creation of Penrose tilings using either kite-and-dart or rhombuses, and either by manual placement or automatic generation.


Property changes on: trunk/Master/texmf-dist/doc/latex/penrose/README
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/penrose/penrose.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/penrose/penrose.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/penrose/penrose.tex	2021-01-23 22:18:57 UTC (rev 57506)
+++ trunk/Master/texmf-dist/doc/latex/penrose/penrose.tex	2021-01-23 22:20:01 UTC (rev 57507)
@@ -1,4 +1,4 @@
-\immediate\write18{tex penrose_code.dtx}
+%\immediate\write18{tex penrose_code.dtx}
 \documentclass{ltxdoc}
 \usepackage[T1]{fontenc}
 \usepackage{trace}
@@ -12,8 +12,15 @@
  
 \usepackage{listings}
 \lstloadlanguages{[LaTeX]TeX}
-\lstset{breakatwhitespace=true,breaklines=true,language=TeX}
- 
+\lstset{
+  breakatwhitespace=true,
+  breaklines=true,
+  language=[LaTeX]TeX,
+  basicstyle=\small\ttfamily,
+  keepspaces=true,
+  columns=fullflexible
+}
+
 \usepackage{fancyvrb}
 
 \newenvironment{example}
@@ -23,7 +30,6 @@
    \begin{center}
    \setlength{\parindent}{0pt}
    \fbox{\begin{minipage}{.9\linewidth}
-     \lstset{breakatwhitespace=true,breaklines=true,language=TeX,basicstyle=\small}
      \lstinputlisting[]{example.out}
    \end{minipage}}
 
@@ -41,7 +47,6 @@
    \begin{center}
    \setlength{\parindent}{0pt}
    \fbox{\begin{minipage}{.9\linewidth}
-     \lstset{breakatwhitespace=true,breaklines=true,language=TeX,basicstyle=\small}
      \lstinputlisting[]{example.out}
    \end{minipage}}
 \end{center}
@@ -73,18 +78,21 @@
 \makeatother
 
 \providecommand*{\url}{\texttt}
+\GetFileInfo{tikzlibrarypenrose.code.tex}
 
 \title{The \textsf{Penrose} Package: Documentation}
 \author{Andrew Stacey\texorpdfstring{\\ \url{loopspace at mathforge.org}}{}}
-\date{1.0~from 2018/07/10}
+ \date{\fileversion~from \filedate}
 
 \begin{document}
 \maketitle
 
+\tableofcontents
+  
 \section{Introduction}
 
 The \textsf{Penrose} package is a TikZ library for drawing Penrose tiles.
-It currently supports the kite/dart, rhombus, and pentagon tile sets.
+It currently supports natively the kite/dart, rhombus, and pentagon tile sets, but has provision for defining new tiles.
 There are two main methods for their placement: one that automatically generates a tiling, and one that allows for ``by hand'' placement.
 Furthermore, the tiles themselves can be deformed and will still (hopefully!) fit together in the correct fashion.
 
@@ -148,7 +156,7 @@
 
 TikZ \Verb+pic+s can be named, using the \Verb+name=<name>+ key.
 When a Penrose tile has been named then it can be used for positioning other tiles.
-Each edge is assigned a label from \Verb+a b c A B C+ and a new tile can be aligned with an old one along a matching edge (\Verb+a+ matches with \Verb+A+ and so on).
+Each edge is assigned a label from \Verb+a b c d e A B C D E+ and a new tile can be aligned with an old one along a matching edge (\Verb+a+ matches with \Verb+A+ and so on).
 
 The edge labels are as follows.
 For the \Verb+pentagon 5+, for example, the edges are all the same and the numbers are used to distinguish between them.
@@ -273,7 +281,7 @@
 There is a way to specify a Penrose tiling using \emph{Lindenmayer systems}.
 In brief, this takes a golden triangle or gnomon (or one of the reverse ones) and repeatedly decomposes it into smaller triangles and gnomon.
 Once a desired level has been reached, the resulting triangles and gnomon are glued together in pairs to create either darts and kites or rhombuses (of both types).
-This library contains an implementation of this both for each of the tilings.
+This library contains an implementation of this for each of the tilings.
 
 The user command is:
 %
@@ -351,41 +359,44 @@
 
 Internally, the \Verb+penrose+ library uses the \Verb+spath3+ package for storing and manipulating the paths.
 
-To create a new edge path, use the key \Verb+save Penrose path=<edge>+ where \Verb+<edge>+ is one of \Verb+a+, \Verb+b+, \Verb+c+, or \Verb+d+.
+To create a new edge path, use the key \Verb+save Penrose path=<edge>+ where \Verb+<edge>+ is a symbol used in the edge description of a tile.
 There are no constraints on the size of the path as all paths are scaled and transformed to fit the tiles.
 Once the edge paths have been specified, they are welded together into the tiles using the following command:
 %
 \begin{verbatim}
-\MakePenroseTile{<name>}
+\BakePenroseTile{<name>}
 \end{verbatim}
 %
 Here, \Verb+<name>+ is one of the names of the tiles.
 This has global effect, as does the definition of the edge paths.
-Internally, the tile paths are stored as \Verb+spath+ objects (from the \Verb+spath3+ package) so the commands of that package can be used to, for example, make a copy of a tile.
-The internal name for a tile path is \Verb+Penrosepathtile<name>+ (no spaces) so can be cloned via:
+Paths, both sides and tiles, can be cloned via:
 %
 \begin{verbatim}
-\CloneSPath{Penrosepathtile<name>}{My Amazing Penrose Tile}
+\tikzset{clone Penrose side path={target}{source}
+\tikzset{clone Penrose tile path={target}{source}
 \end{verbatim}
 %
 and restored with the same command (but names switched).
 
+The initial version of this package used \Verb!\MakePenroseTile! for this command.
+That command is still available for backwards compatibility.
+
 \begin{example}
 \begin{tikzpicture}
 \pic[draw,dart,name=dart];
 \pic[draw,kite,align with=dart along c];
 \pic[draw,kite,align with=dart along C];
-\CloneSPath{Penrosepathtilekite}{Original kite}
-\CloneSPath{Penrosepathtiledart}{Original dart}
+\tikzset{clone Penrose tile path={original kite}{kite}}
+\tikzset{clone Penrose tile path={original dart}{dart}}
 \path[save Penrose path=a] (0,0) to[out=-30,in=100] (1,0);
 \path[save Penrose path=c] (0,0) to[out=-40,in=140] (1,0);
-\MakePenroseTile{kite}
-\MakePenroseTile{dart}
+\BakePenroseTile{kite}
+\BakePenroseTile{dart}
 \pic[xshift=2cm,draw,dart,name=dart];
 \pic[draw,kite,align with=dart along c];
 \pic[draw,kite,align with=dart along C];
-\CloneSPath{Original kite}{Penrosepathtilekite}
-\CloneSPath{Original dart}{Penrosepathtiledart}
+\tikzset{clone Penrose tile path={kite}{original kite}}
+\tikzset{clone Penrose tile path={dart}{original dart}}
 \pic[xshift=4cm,draw,dart,name=dart];
 \pic[draw,kite,align with=dart along c];
 \pic[draw,kite,align with=dart along C];
@@ -394,6 +405,58 @@
 
 With deformed tiles, there is no guarantee that the inner arcs will match up perfectly.
 
+\section{Defining New Tiles}
+
+This package includes the capability to define new tiles.
+The command to do this is:
+%
+\begin{verbatim}
+\DefineTile{<name>}{<sides>}{<coordinates>}
+\end{verbatim}
+%
+For example,
+%
+\begin{verbatim}
+\DefineTile {square}{a A a A}
+{
+  {0,0}
+  {1,0}
+  {1,1}
+  {0,1}
+}
+\end{verbatim}
+%
+The \Verb!<sides>! is a list of sides for matching rules.
+Each letter used matches against its opposite case (so it is possible to create a side that matches against itself by using a symbol that \TeX\ regards as having the same upper as lower case; not all symbols work, I've used \Verb+!+ successfully).
+These are also used in path replacing, both a letter and its opposite case are replaced by the corresponding path (but in opposite directions) when the tile is ``baked''.
+The coordinates are passed to the \Verb!fp! module of \LaTeX3 so can involve complicated expressions.
+Note that the trigonometric functions for angles in degrees are \Verb!cosd!, \Verb!sind!, and \Verb!tand!.
+
+Note that the tile must be baked via the command \Verb!\BakePenroseTile! before it can be used.
+
+The new tile can be used with all the same features as the pre-defined Penrose tiles, except for the Lindenmayer systems. 
+
+\begin{example}
+\DefineTile {square}{a A a A}
+{
+  {0,0}
+  {1,0}
+  {1,1}
+  {0,1}
+}
+
+\begin{tikzpicture}
+\path[save Penrose path=a] (0,0) to[out=45,in=135] (1,0);
+\BakePenroseTile{square}
+\pic[square,name=A,fill=green];
+\pic[square,align with=A along a1 using 2,name=B,fill=red];
+\pic[square,align with=A along A1 using 2,fill=red];
+\pic[square,align with=A along A2 using 1,fill=red];
+\pic[square,align with=B along a1 using 2,fill=green];
+\pic[square,align with=B along a2 using 1,fill=green];
+\end{tikzpicture}
+\end{example}
+
 \section{More Examples}
 
 Let's set some aesthetically pleasing shapes.
@@ -403,14 +466,14 @@
 \path[save Penrose path=a] (0,0) to[out=-30,in=100] (1,0);
 \path[save Penrose path=b] (0,0) to[out=0,in=140] (1,0);
 \path[save Penrose path=c] (0,0) to[out=-40,in=140] (1,0);
-\MakePenroseTile{thin rhombus}
-\MakePenroseTile{thick rhombus}
-\MakePenroseTile{golden triangle}
-\MakePenroseTile{reverse golden triangle}
-\MakePenroseTile{golden gnomon}
-\MakePenroseTile{reverse golden gnomon}
-\MakePenroseTile{kite}
-\MakePenroseTile{dart}
+\BakePenroseTile{thin rhombus}
+\BakePenroseTile{thick rhombus}
+\BakePenroseTile{golden triangle}
+\BakePenroseTile{reverse golden triangle}
+\BakePenroseTile{golden gnomon}
+\BakePenroseTile{reverse golden gnomon}
+\BakePenroseTile{kite}
+\BakePenroseTile{dart}
 \end{tikzpicture}
 \end{justexample}
 
@@ -418,14 +481,14 @@
 \path[save Penrose path=a] (0,0) to[out=-30,in=100] (1,0);
 \path[save Penrose path=b] (0,0) to[out=0,in=140] (1,0);
 \path[save Penrose path=c] (0,0) to[out=-40,in=140] (1,0);
-\MakePenroseTile{thin rhombus}
-\MakePenroseTile{thick rhombus}
-\MakePenroseTile{golden triangle}
-\MakePenroseTile{reverse golden triangle}
-\MakePenroseTile{golden gnomon}
-\MakePenroseTile{reverse golden gnomon}
-\MakePenroseTile{kite}
-\MakePenroseTile{dart}
+\BakePenroseTile{thin rhombus}
+\BakePenroseTile{thick rhombus}
+\BakePenroseTile{golden triangle}
+\BakePenroseTile{reverse golden triangle}
+\BakePenroseTile{golden gnomon}
+\BakePenroseTile{reverse golden gnomon}
+\BakePenroseTile{kite}
+\BakePenroseTile{dart}
 \end{tikzpicture}
 
 
@@ -676,14 +739,14 @@
 \path[save Penrose path=a] (0,0) -- (1,0);
 \path[save Penrose path=b] (0,0) -- (1,0);
 \path[save Penrose path=c] (0,0) -- (1,0);
-\MakePenroseTile{thin rhombus}
-\MakePenroseTile{thick rhombus}
-\MakePenroseTile{golden triangle}
-\MakePenroseTile{reverse golden triangle}
-\MakePenroseTile{golden gnomon}
-\MakePenroseTile{reverse golden gnomon}
-\MakePenroseTile{kite}
-\MakePenroseTile{dart}
+\BakePenroseTile{thin rhombus}
+\BakePenroseTile{thick rhombus}
+\BakePenroseTile{golden triangle}
+\BakePenroseTile{reverse golden triangle}
+\BakePenroseTile{golden gnomon}
+\BakePenroseTile{reverse golden gnomon}
+\BakePenroseTile{kite}
+\BakePenroseTile{dart}
 \end{tikzpicture}
 
 \newpage

Modified: trunk/Master/texmf-dist/doc/latex/penrose/penrose_code.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/source/latex/penrose/penrose.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/penrose/penrose.ins	2021-01-23 22:18:57 UTC (rev 57506)
+++ trunk/Master/texmf-dist/source/latex/penrose/penrose.ins	2021-01-23 22:20:01 UTC (rev 57507)
@@ -1,77 +0,0 @@
-%%
-%% This is file `penrose.ins',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% penrose.dtx  (with options: `install')
-%% ----------------------------------------------------------------
-%% penrose --- TikZ library for producing Penrose tilings
-%% E-mail: loopspace at mathforge.org
-%% Released under the LaTeX Project Public License v1.3c or later
-%% See http://www.latex-project.org/lppl.txt
-%% ----------------------------------------------------------------
-%% 
-\input docstrip.tex
-\keepsilent
-\askforoverwritefalse
-\preamble
-----------------------------------------------------------------
-penrose --- TikZ library for producing Penrose tilings
-E-mail: loopspace at mathforge.org
-Released under the LaTeX Project Public License v1.3c or later
-See http://www.latex-project.org/lppl.txt
-----------------------------------------------------------------
-
-\endpreamble
-\postamble
-
-Copyright (C) 2014-2016 by Andrew Stacey <loopspace at mathforge.org>
-
-This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License (LPPL), either
-version 1.3c of this license or (at your option) any later
-version.  The latest version of this license is in the file:
-
-http://www.latex-project.org/lppl.txt
-
-This work is "maintained" (as per LPPL maintenance status) by
-Andrew Stacey.
-
-This work consists of the files  penrose.dtx
-                                 penrose_doc.tex
-and the derived files            penrose.ins
-                                 penrose_code.pdf
-                                 tikzlibrarypenrose.code.tex
-                                 penrose.pdf
-                                 README
-
-\endpostamble
-\usedir{tex/latex/penrose}
-\generate{
-  \file{tikzlibrarypenrose.code.tex}{\from{\jobname.dtx}{library}}
-}
-\endbatchfile
-%% 
-%% Copyright (C) 2014-2016 by Andrew Stacey <loopspace at mathforge.org>
-%% 
-%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License (LPPL), either
-%% version 1.3c of this license or (at your option) any later
-%% version.  The latest version of this license is in the file:
-%% 
-%% http://www.latex-project.org/lppl.txt
-%% 
-%% This work is "maintained" (as per LPPL maintenance status) by
-%% Andrew Stacey.
-%% 
-%% This work consists of the files  penrose.dtx
-%%                                  penrose_doc.tex
-%% and the derived files            penrose.ins
-%%                                  penrose_code.pdf
-%%                                  tikzlibrarypenrose.code.tex
-%%                                  penrose.pdf
-%%                                  README
-%% 
-%%
-%% End of file `penrose.ins'.

Modified: trunk/Master/texmf-dist/source/latex/penrose/penrose_code.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/penrose/penrose_code.dtx	2021-01-23 22:18:57 UTC (rev 57506)
+++ trunk/Master/texmf-dist/source/latex/penrose/penrose_code.dtx	2021-01-23 22:20:01 UTC (rev 57507)
@@ -34,7 +34,7 @@
 \endpreamble
 \postamble
 
-Copyright (C) 2014-2018 by Andrew Stacey <loopspace at mathforge.org>
+Copyright (C) 2014-2019 by Andrew Stacey <loopspace at mathforge.org>
 
 This work may be distributed and/or modified under the
 conditions of the LaTeX Project Public License (LPPL), either
@@ -46,18 +46,18 @@
 This work is "maintained" (as per LPPL maintenance status) by
 Andrew Stacey.
 
-This work consists of the files  penrose3.dtx
+This work consists of the files  penrose_code.dtx
                                  penrose.tex
 and the derived files            penrose.ins
-                                 penrose3.pdf
+                                 penrose_code.pdf
                                  penrose.pdf
                                  tikzlibrarypenrose.code.tex
-                                 README
+                                 README.txt
 
 \endpostamble
 \usedir{tex/latex/penrose}
 \generate{
-  \file{tikzlibrarypenrose.code.tex}{\from{\jobname.dtx}{library}}
+  \file{tikzlibrarypenrose.code.tex}{\from{\jobname.dtx}{package}}
 }
 %</install>
 %<install>\endbatchfile
@@ -78,11 +78,11 @@
 \fi
 %</internal>
 %<*driver>
-\documentclass[full]{l3doc}
+\documentclass{l3doc}
 \usepackage[T1]{fontenc}
 \usepackage{lmodern}
 \usepackage{tikz}
-\usepackage{trace}
+%\usepackage{trace}
 \usetikzlibrary{penrose}
 %\traceoff
 %\usepackage[numbered]{hypdoc}
@@ -139,6 +139,8 @@
 %
 %
 % \changes{1.0}{2014/05/07}{Converted to DTX file}
+% \changes{1.2}{2019/02/23}{Added general tile creation code}
+% \changes{1.4}{2021/01/22}{Adapted to latest version of spath3}
 %
 % \DoNotIndex
 %   {
@@ -149,14 +151,19 @@
 %     \endcsname,
 %   }%
 %
+%
 % \providecommand*{\url}{\texttt}
+% \GetFileInfo{tikzlibrarypenrose.code.tex}
 % \title{The \textsf{Penrose} package}
 % \author{Andrew Stacey\texorpdfstring{\\ \url{loopspace at mathforge.org}}{}}
-% \date{1.0 from 2018/07/10}
+% \date{\fileversion~from \filedate}
 %
 %
 % \maketitle
 %
+% \tableofcontents
+%
+% \begin{documentation}
 % 
 % \section{Introduction}
 %
@@ -163,25 +170,31 @@
 % This is a TikZ library for drawing Penrose tiles (kite/dart, rhombus, and pentagon versions).
 % It provides two methods of drawing: one in which an automatic pattern is built, and one where the tiles can be placed ``by hand''.
 % The tiles can be shaped and (hopefully!) still fit together.
-% For user documentation, see the \Verb+penrose.pdf+ file.
+% For full user documentation, see the \Verb+penrose.pdf+ file.
 %
-% \StopEventually{}
 %
-% \section{Implementation}
+% \end{documentation}
 %
-% \iffalse
-%<*library>
-% \fi
-% \subsection{Initialisation}
+% \begin{implementation}
 %
+% \section{Implementation}
 %
 %    \begin{macrocode}
+%<*package>
+%    \end{macrocode}
+%    \begin{macrocode}
 %<@@=penrose>
 %    \end{macrocode}
+%
+% \subsection{Initialisation}
+%
+%
 % We use the \Verb+spath3+ library for manipulating the paths that will make up the tiles.
 %
 %    \begin{macrocode}
+\ProvidesExplFile {tikzlibrarypenrose.code.tex} {2021/01/22} {1.4} {TikZ pics for Penrose and other tiles}
 \RequirePackage{spath3}
+\usetikzlibrary{spath3}
 %    \end{macrocode}
 % Now we move in to the realm of \LaTeX3.
 %    \begin{macrocode}
@@ -189,50 +202,75 @@
 %    \end{macrocode}
 %
 % Start with some basic paths (lines) for the sides of the tiles so that we know that we have well-defined tiles at the outset.
+% These are globally defined as we will frequently want to define them in one tikzpicture and use them in another.
 %
 %    \begin{macrocode}
-\MakeSPath{Penrose path a}
-      {
-        \pgfsyssoftpath at movetotoken{0pt}{0pt}
-        \pgfsyssoftpath at linetotoken{1pt}{0pt}
-      }
-\SPathPrepare{Penrose path a}
-\CloneSPath {Penrose path a}{Penrose path b}
-\CloneSPath {Penrose path a}{Penrose path c}
-\CloneSPath {Penrose path a}{Penrose path d}
-\CloneSPath {Penrose path a}{Penrose path A}
-\CloneSPath {Penrose path a}{Penrose path B}
-\CloneSPath {Penrose path a}{Penrose path C}
-\CloneSPath {Penrose path a}{Penrose path D}
+\tl_new:N \g_@@_side_a_tl
+\tl_new:N \g_@@_side_b_tl
+\tl_new:N \g_@@_side_c_tl
+\tl_new:N \g_@@_side_d_tl
+\tl_new:N \g_@@_side_e_tl
+\tl_new:N \g_@@_side_A_tl
+\tl_new:N \g_@@_side_B_tl
+\tl_new:N \g_@@_side_C_tl
+\tl_new:N \g_@@_side_D_tl
+\tl_new:N \g_@@_side_E_tl
+\tl_gset:Nn \g_@@_side_a_tl
+{
+  \pgfsyssoftpath at movetotoken{0pt}{0pt}
+  \pgfsyssoftpath at linetotoken{1pt}{0pt}
+}
+\tl_gset_eq:NN \g_@@_side_b_tl \g_@@_side_a_tl
+\tl_gset_eq:NN \g_@@_side_c_tl \g_@@_side_a_tl
+\tl_gset_eq:NN \g_@@_side_d_tl \g_@@_side_a_tl
+\tl_gset_eq:NN \g_@@_side_e_tl \g_@@_side_a_tl
+\tl_gset_eq:NN \g_@@_side_A_tl \g_@@_side_a_tl
+\tl_gset_eq:NN \g_@@_side_B_tl \g_@@_side_a_tl
+\tl_gset_eq:NN \g_@@_side_C_tl \g_@@_side_a_tl
+\tl_gset_eq:NN \g_@@_side_D_tl \g_@@_side_a_tl
+\tl_gset_eq:NN \g_@@_side_E_tl \g_@@_side_a_tl
 %    \end{macrocode}
 %
-% \begin{variable}{\l__penrose_tmpa_fp, \l__penrose_tmpb_fp, \l__penrose_tmpc_fp, \l__penrose_tmpa_tl, \l__penrose_tmpb_tl, \l__penrose_tmpc_tl}
+% \begin{variable}{\l_@@_tmpa_fp, \l_@@_tmpb_fp, \l_@@_tmpc_fp, \l_@@_tmpa_tl, \l_@@_tmpb_tl, \l_@@_tmpc_tl, \l_@@_tmpd_tl, \l_@@_tmpa_int, \l_@@_tmpb_int, \l_@@_xa_dim, \l_@@_ya_dim, \l_@@_xb_dim, \l_@@_yb_dim, \l_@@_tmpa_prop}
 % We need a few temporary variables to hold intermediate calculations.
 %
 %    \begin{macrocode}
-\fp_new:N \l__penrose_tmpa_fp
-\fp_new:N \l__penrose_tmpb_fp
-\fp_new:N \l__penrose_tmpc_fp
-\tl_new:N \l__penrose_tmpa_tl
-\tl_new:N \l__penrose_tmpb_tl
-\tl_new:N \l__penrose_tmpc_tl
+\fp_new:N \l_@@_tmpa_fp
+\fp_new:N \l_@@_tmpb_fp
+\fp_new:N \l_@@_tmpc_fp
+\str_new:N \l_@@_tmpa_str
+\str_new:N \l_@@_tmpb_str
+\tl_new:N \l_@@_tmpa_tl
+\tl_new:N \l_@@_tmpb_tl
+\tl_new:N \l_@@_tmpc_tl
+\tl_new:N \l_@@_tmpd_tl
+\tl_new:N \l_@@_tmp_tile_path_tl
+\tl_new:N \g_@@_smuggle_tl
+\int_new:N \l_@@_tmpa_int
+\int_new:N \l_@@_tmpb_int
+\dim_new:N \l_@@_xa_dim
+\dim_new:N \l_@@_ya_dim
+\dim_new:N \l_@@_xb_dim
+\dim_new:N \l_@@_yb_dim
+\prop_new:N \l_@@_tmpa_prop
 %    \end{macrocode}
 % \end{variable}
 %
 % \subsection{Creating the Tiles}
 %
-% \begin{macro}[internal]{\penrose_normalise_path:n}
+% \begin{macro}[internal]{\@@_normalise_path:Nn}
 % When defining the path for a side, we normalise so that it starts at the origin and ends at \Verb+(1pt,0pt)+.
 %    \begin{macrocode}
-\cs_new_nopar:Npn \penrose_normalise_path:n #1
+\cs_new_nopar:Npn \@@_normalise_path:Nn #1#2
 {
 %    \end{macrocode}
 % Get the initial point of the path and convert to floating point.
 %    \begin{macrocode}
-  \spath_get:nnN {#1} {initial point} \l__penrose_tmpa_tl
-  \fp_set:Nn \l__penrose_tmpa_fp {\tl_head:N \l__penrose_tmpa_tl}
-  \tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
-  \fp_set:Nn \l__penrose_tmpb_fp {\tl_head:N \l__penrose_tmpa_tl}
+  \group_begin:
+  \spath_initialpoint:Nn \l_@@_tmpa_tl {#2}
+  \fp_set:Nn \l_@@_tmpa_fp {\tl_head:N \l_@@_tmpa_tl}
+  \tl_set:Nx \l_@@_tmpa_tl {\tl_tail:N \l_@@_tmpa_tl}
+  \fp_set:Nn \l_@@_tmpb_fp {\tl_head:N \l_@@_tmpa_tl}
 %    \end{macrocode}
 % Get the final point of the path, and compute the difference of the final and initial points.
 %
@@ -245,71 +283,80 @@
 % \]
 %
 %    \begin{macrocode}
-  \spath_get:nnN {#1} {final point} \l__penrose_tmpa_tl
-  \fp_set:Nn \l__penrose_tmpa_fp
-  {\tl_head:N \l__penrose_tmpa_tl - \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
-  \fp_set:Nn \l__penrose_tmpb_fp
-  {\tl_head:N \l__penrose_tmpa_tl - \l__penrose_tmpb_fp}
+  \spath_finalpoint:Nn \l_@@_tmpa_tl {#2}
+  \fp_set:Nn \l_@@_tmpa_fp
+  {\tl_head:N \l_@@_tmpa_tl - \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpa_tl {\tl_tail:N \l_@@_tmpa_tl}
+  \fp_set:Nn \l_@@_tmpb_fp
+  {\tl_head:N \l_@@_tmpa_tl - \l_@@_tmpb_fp}
 %    \end{macrocode}
 % Now compute the square of the length of the path for scaling.
 %    \begin{macrocode}
-  \fp_set:Nn \l__penrose_tmpc_fp
-  {\l__penrose_tmpa_fp^2 + \l__penrose_tmpb_fp^2}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_tmpa_fp/\l__penrose_tmpc_fp}
-  \fp_set:Nn \l__penrose_tmpb_fp {\l__penrose_tmpb_fp/\l__penrose_tmpc_fp}
-  \fp_set:Nn \l__penrose_tmpc_fp {-\l__penrose_tmpb_fp}
+  \fp_set:Nn \l_@@_tmpc_fp
+  {\l_@@_tmpa_fp^2 + \l_@@_tmpb_fp^2}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_tmpa_fp/\l_@@_tmpc_fp}
+  \fp_set:Nn \l_@@_tmpb_fp {\l_@@_tmpb_fp/\l_@@_tmpc_fp}
+  \fp_set:Nn \l_@@_tmpc_fp {-\l_@@_tmpb_fp}
 %    \end{macrocode}
 % Now construct the matrix.
 %    \begin{macrocode}
-  \tl_set:Nx \l__penrose_tmpb_tl
+  \tl_set:Nx \l_@@_tmpb_tl
   {
-    {\fp_use:N \l__penrose_tmpa_fp}
-    {\fp_use:N \l__penrose_tmpb_fp}
-    {\fp_use:N \l__penrose_tmpc_fp}
-    {\fp_use:N \l__penrose_tmpa_fp}
+    {\fp_use:N \l_@@_tmpa_fp}
+    {\fp_use:N \l_@@_tmpc_fp} % swapped
+    {\fp_use:N \l_@@_tmpb_fp} % swapped
+    {\fp_use:N \l_@@_tmpa_fp}
   }
 %    \end{macrocode}
 % Get the initial point back again for the translation part.
 %    \begin{macrocode}
-  \spath_get:nnN {#1} {initial point} \l__penrose_tmpa_tl
+  \spath_initialpoint:Nn \l_@@_tmpa_tl {#2}
 %    \end{macrocode}
 % But we need to premultiply by the matrix because of how the transformations are applied.
 %    \begin{macrocode}
-  \fp_set:Nn \l__penrose_tmpa_fp
+  \fp_set:Nn \l_@@_tmpa_fp
   {
-    (-1) * \l__penrose_tmpa_fp * \tl_head:N \l__penrose_tmpa_tl
-    + (-1) * \l__penrose_tmpb_fp * \tl_tail:N \l__penrose_tmpa_tl
+    (-1) * \l_@@_tmpa_fp * \tl_head:N \l_@@_tmpa_tl
+    + (-1) * \l_@@_tmpb_fp * \tl_tail:N \l_@@_tmpa_tl
   }
-  \fp_set:Nn \l__penrose_tmpb_fp
+  \fp_set:Nn \l_@@_tmpb_fp
   {
-    (-1) * \l__penrose_tmpa_fp * \tl_tail:N \l__penrose_tmpa_tl
-    +  \l__penrose_tmpb_fp * \tl_head:N \l__penrose_tmpa_tl
+    (-1) * \l_@@_tmpa_fp * \tl_tail:N \l_@@_tmpa_tl
+    +  \l_@@_tmpb_fp * \tl_head:N \l_@@_tmpa_tl
   }
 %    \end{macrocode}
 % Finally, we apply the transformation to the path.
 %    \begin{macrocode}
-  \tl_put_right:Nx \l__penrose_tmpb_tl {
-    {\fp_to_dim:N \l__penrose_tmpa_fp}
-    {\fp_to_dim:N \l__penrose_tmpb_fp}
+  \tl_put_right:Nx \l_@@_tmpb_tl {
+    {\fp_to_dim:N \l_@@_tmpa_fp}
+    {\fp_to_dim:N \l_@@_tmpb_fp}
   }
-  \spath_transform:nV {#1} \l__penrose_tmpb_tl
+  \spath_transform:NnV \l_@@_tmpa_tl {#2} \l_@@_tmpb_tl
+  \tl_gset_eq:NN \g_@@_smuggle_tl \l_@@_tmpa_tl
+  \group_end:
+  \tl_set_eq:NN #1 \g_@@_smuggle_tl
+  \tl_gclear:N \g_@@_smuggle_tl
 }
+\cs_generate_variant:Nn \@@_normalise_path:Nn {NV, cn, cV}
+\cs_new_protected_nopar:Npn \@@_normalise_path:N #1
+{
+  \@@_normalise_path:NV #1#1
+}
+\cs_generate_variant:Nn \@@_normalise_path:N {c}
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}[internal]{\SetPenrosePath}
+% \begin{function}{\SetPenrosePath}
 % This sets the path corresponding to a particular side to the current path, and normalises it.
 %    \begin{macrocode}
 \NewDocumentCommand \SetPenrosePath { m }
 {
-  \pgfsyssoftpath at getcurrentpath\l__penrose_tmpa_tl
-  \spath_clear_new:n {Penrose path #1}
-  \spath_put:nnV {Penrose path #1} {path} \l__penrose_tmpa_tl
-  \penrose_normalise_path:n {Penrose path #1}
+  \pgfsyssoftpath at getcurrentpath\l_@@_tmpa_tl
+  \@@_normalise_path:N \l_@@_tmpa_tl
+  \tl_gset_eq:cN {g_@@_side_#1_tl} \l_@@_tmpa_tl
 }
 %    \end{macrocode}
-% \end{macro}
+% \end{function}
 %
 % \begin{macro}[internal]{\tikz_scan_point:n}
 % This is a wrapper around \Verb+\tikz at scan@one at point+ to make it easier to use with \LaTeX3 variables.
@@ -322,32 +369,32 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}[internal]{\penrose_make_tile:nnn}
+% \begin{macro}[internal]{\@@_make_tile:nnn}
 % This builds the tile path from its pieces.
 % The arguments are the name of the tile, the descriptions of the sides, and a token list of the coordinates.
 %    \begin{macrocode}
-\cs_new_nopar:Npn \penrose_make_tile:nnn #1#2#3
+\cs_new_nopar:Npn \@@_make_tile:nnn #1#2#3
 {
 %    \end{macrocode}
 % Get the first coordinate and initialise the path with a move to this point.
 %    \begin{macrocode}
-  \tl_set:Nn \l__penrose_tmpa_tl {#3}
-  \tl_set:Nx \l__penrose_tmpb_tl {\tl_head:N \l__penrose_tmpa_tl}
-  \tl_set:Nn \l__penrose_tmpa_tl {\pgfsyssoftpath at movetotoken}
-  \tikz_scan_point:V \l__penrose_tmpb_tl
-  \tl_put_right:Nx \l__penrose_tmpa_tl
+  \group_begin:
+  \tl_set:Nn \l_@@_tmpa_tl {#3}
+  \tl_set:Nx \l_@@_tmpb_tl {\tl_head:N \l_@@_tmpa_tl}
+  \tl_set:Nn \l_@@_tmpa_tl {\pgfsyssoftpath at movetotoken}
+  \tikz_scan_point:V \l_@@_tmpb_tl
+  \tl_put_right:Nx \l_@@_tmpa_tl
   {
     {\dim_use:N \pgf at x}{\dim_use:N \pgf at y}
   }
-  \spath_clear_new:n {Penrose path tile #1}
-  \spath_put:nnV {Penrose path tile #1} {path} \l__penrose_tmpa_tl
+  \tl_set_eq:NN \l_@@_tmp_tile_path_tl \l_@@_tmpa_tl
 %    \end{macrocode}
 % Now we have our path initialised, we can start appending the side paths according to the specification in the second argument.
 %
 % We append the initial coordinate to the end of the list to make a closed cycle.
 %    \begin{macrocode}
-  \tl_set:Nn \l__penrose_tmpa_tl {#3}
-  \tl_put_right:Nx \l__penrose_tmpa_tl {{\tl_head:N \l__penrose_tmpa_tl}}
+  \tl_set:Nn \l_@@_tmpa_tl {#3}
+  \tl_put_right:Nx \l_@@_tmpa_tl {{\tl_head:N \l_@@_tmpa_tl}}
 %    \end{macrocode}
 % Now we walk through the description of the sides, adding the specified paths to our tile path.
 %    \begin{macrocode}
@@ -355,38 +402,39 @@
 %    \end{macrocode}
 % Clone the path for this side.
 %    \begin{macrocode}
-    \spath_clone:nn {Penrose path ##1} {Penrose path tmpa}
+    \tl_set:Nx \l_@@_tmpc_tl {\tl_head:n {##1}}
+    \tl_set_eq:Nc \l_@@_tmpd_tl {g_@@_side_ \tl_use:N \l_@@_tmpc_tl _tl}
 %    \end{macrocode}
 % Strip off the next coordinate, and convert it to a point.
 %    \begin{macrocode}
-    \tl_set:Nx \l__penrose_tmpb_tl {\tl_head:N \l__penrose_tmpa_tl}
-    \tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
-    \tikz_scan_point:V \l__penrose_tmpb_tl
+    \tl_set:Nx \l_@@_tmpb_tl {\tl_head:N \l_@@_tmpa_tl}
+    \tl_set:Nx \l_@@_tmpa_tl {\tl_tail:N \l_@@_tmpa_tl}
+    \tikz_scan_point:V \l_@@_tmpb_tl
 %    \end{macrocode}
 % Store the resulting coordinate.
 %    \begin{macrocode}
-    \fp_set:Nn \l__penrose_tmpa_fp { \pgf at x }
-    \fp_set:Nn \l__penrose_tmpb_fp { \pgf at y }
+    \fp_set:Nn \l_@@_tmpa_fp { \pgf at x }
+    \fp_set:Nn \l_@@_tmpb_fp { \pgf at y }
 %    \end{macrocode}
 % Now get the next coordinate.
 %    \begin{macrocode}
-    \tl_set:Nx \l__penrose_tmpb_tl {\tl_head:N \l__penrose_tmpa_tl}
-    \tikz_scan_point:V \l__penrose_tmpb_tl
+    \tl_set:Nx \l_@@_tmpb_tl {\tl_head:N \l_@@_tmpa_tl}
+    \tikz_scan_point:V \l_@@_tmpb_tl
 %    \end{macrocode}
 % We want the difference between the two coordinates.
 %    \begin{macrocode}
-    \fp_set:Nn \l__penrose_tmpa_fp {\pgf at x - \l__penrose_tmpa_fp}
-    \fp_set:Nn \l__penrose_tmpb_fp {\pgf at y - \l__penrose_tmpb_fp}
+    \fp_set:Nn \l_@@_tmpa_fp {\pgf at x - \l_@@_tmpa_fp}
+    \fp_set:Nn \l_@@_tmpb_fp {\pgf at y - \l_@@_tmpb_fp}
 %    \end{macrocode}
 % This is converted into a transformation matrix.
 %    \begin{macrocode}
-    \fp_set:Nn \l__penrose_tmpc_fp {-\l__penrose_tmpb_fp}
-    \tl_set:Nx \l__penrose_tmpb_tl
+    \fp_set:Nn \l_@@_tmpc_fp {-\l_@@_tmpb_fp}
+    \tl_set:Nx \l_@@_tmpb_tl
     {
-      {\fp_use:N \l__penrose_tmpa_fp}
-      {\fp_use:N \l__penrose_tmpc_fp}
-      {\fp_use:N \l__penrose_tmpb_fp}
-      {\fp_use:N \l__penrose_tmpa_fp}
+      {\fp_use:N \l_@@_tmpa_fp}
+      {\fp_use:N \l_@@_tmpb_fp} % not swapped
+      {\fp_use:N \l_@@_tmpc_fp} % not swapped
+      {\fp_use:N \l_@@_tmpa_fp}
       {0}
       {0}
     }
@@ -393,28 +441,33 @@
 %    \end{macrocode}
 % The transformation is applied to the cloned path.
 %    \begin{macrocode}
-    \spath_transform:nV {Penrose path tmpa} \l__penrose_tmpb_tl
+    \spath_transform:NV \l_@@_tmpd_tl \l_@@_tmpb_tl
 %    \end{macrocode}
 % And this is welded to the tile path.
 %    \begin{macrocode}
-    \spath_weld:nn {Penrose path tile #1} {Penrose path tmpa}
+    \spath_weld:NV \l_@@_tmp_tile_path_tl \l_@@_tmpd_tl
   }
 %    \end{macrocode}
 % At the end we close the path.
 %    \begin{macrocode}
-  \spath_close_path:n {Penrose path tile #1}
+  \spath_close:N \l_@@_tmp_tile_path_tl
+  \tl_gset_eq:NN \g_@@_smuggle_tl \l_@@_tmp_tile_path_tl
+  \group_end:
+  \tl_gclear_new:c {g_@@_tile_#1_tl}
+  \tl_gset_eq:cN {g_@@_tile_#1_tl} \g_@@_smuggle_tl
+  \tl_gclear:N \g_@@_smuggle_tl
 }
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}[internal]{\penrose_make_tile:nn}
+% \begin{macro}[internal]{\@@_make_tile:nn}
 % A wrapper around the above which allows us to specify the second two arguments as two items in a token list.
 %    \begin{macrocode}
-\cs_new_nopar:Npn \penrose_make_tile:nn #1#2
+\cs_new_nopar:Npn \@@_make_tile:nn #1#2
 {
-  \penrose_make_tile:nnn {#1} #2
+  \@@_make_tile:nnn {#1} #2
 }
-\cs_generate_variant:Nn \penrose_make_tile:nn {nV}
+\cs_generate_variant:Nn \@@_make_tile:nn {nV}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -422,21 +475,28 @@
 %
 % The tile specifications are contained in a \Verb+prop+.
 %    \begin{macrocode}
-\prop_new:N \g__penrose_tiles_prop
+\prop_new:N \g_@@_tiles_prop
 %    \end{macrocode}
 %
-% \begin{macro}[internal]{\tl_add_coordinate:Nnn}
+% \begin{macro}[internal]{\@@_add_coordinate:Nnn, \@@_add_coordinate:w}
 % Process a coordinate through \Verb+fp+ and adds it to a token list.
 %    \begin{macrocode}
-\cs_new_nopar:Npn \tl_add_coordinate:Nnn #1#2#3 {
-  \fp_set:Nn \l__penrose_tmpa_fp{#2}
-  \fp_set:Nn \l__penrose_tmpb_fp{#3}
+\cs_new_nopar:Npn \@@_add_coordinate:Nnn #1#2#3 {
+  \fp_set:Nn \l_@@_tmpa_fp{#2}
+  \fp_set:Nn \l_@@_tmpb_fp{#3}
   \tl_put_right:Nx #1
   {
-    {(\fp_use:N \l__penrose_tmpa_fp, \fp_use:N \l__penrose_tmpb_fp)}
+    {(\fp_use:N \l_@@_tmpa_fp, \fp_use:N \l_@@_tmpb_fp)}
   }
 }
 %    \end{macrocode}
+% Wrapper around the add coordinate command to split at a comma.
+%    \begin{macrocode}
+\cs_new_nopar:Npn \@@_add_coordinate:w #1#2,#3 \q_stop
+{
+  \@@_add_coordinate:Nnn \l_@@_tmpa_tl {#2}{#3}
+}
+%    \end{macrocode}
 % \end{macro}
 %
 % Now we specify the tiles.
@@ -446,182 +506,186 @@
 % \begin{itemize}
 % \item Thin Rhombus.
 %    \begin{macrocode}
-\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(18)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
+\tl_clear:N \l_@@_tmpa_tl
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {0}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(18)}{sind(18)}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {2*cosd(18)}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(18)}{-sind(18)}
 
-\prop_gput:Nnx \g__penrose_tiles_prop {thin~ rhombus}
-{{a A B b} {\tl_use:N \l__penrose_tmpa_tl}}
+\prop_gput:Nnx \g_@@_tiles_prop {thin~ rhombus}
+{{a A B b} {\tl_use:N \l_@@_tmpa_tl}}
 %    \end{macrocode}
 %
 % \item Thick Rhombus.
 %    \begin{macrocode}
-\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(36)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{-sind(36)}
+\tl_clear:N \l_@@_tmpa_tl
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {0}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(36)}{sind(36)}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {2*cosd(36)}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(36)}{-sind(36)}
 
-\prop_gput:Nnx \g__penrose_tiles_prop {thick~ rhombus}
-{{B a A b} {\tl_use:N \l__penrose_tmpa_tl}}
+\prop_gput:Nnx \g_@@_tiles_prop {thick~ rhombus}
+{{B a A b} {\tl_use:N \l_@@_tmpa_tl}}
 %    \end{macrocode}
 %
 % \item Dart.
 %    \begin{macrocode}
-\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\tl_clear:N \l_@@_tmpa_tl
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {0}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl
 {2*sind(18)*cosd(108)}{2*sind(18)*sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*sind(18)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {2*sind(18)}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl
 {2*sind(18)*cosd(108)}{-2*sind(18)*sind(108)}
 
-\prop_gput:Nnx \g__penrose_tiles_prop {dart}
-{{c a A C} {\tl_use:N \l__penrose_tmpa_tl}}
+\prop_gput:Nnx \g_@@_tiles_prop {dart}
+{{c a A C} {\tl_use:N \l_@@_tmpa_tl}}
 %    \end{macrocode}
 %
 % \item Kite.
 %    \begin{macrocode}
-\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{-sind(36)}
+\tl_clear:N \l_@@_tmpa_tl
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {0}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(36)}{sind(36)}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {1}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(36)}{-sind(36)}
 
-\prop_gput:Nnx \g__penrose_tiles_prop {kite}
-{{a c C A} {\tl_use:N \l__penrose_tmpa_tl}}
+\prop_gput:Nnx \g_@@_tiles_prop {kite}
+{{a c C A} {\tl_use:N \l_@@_tmpa_tl}}
 %    \end{macrocode}
 %
 % \item Golden Triangle.
 %    \begin{macrocode}
-\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
+\tl_clear:N \l_@@_tmpa_tl
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {0}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(18)}{sind(18)}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(18)}{-sind(18)}
 
-\prop_gput:Nnx \g__penrose_tiles_prop {golden~ triangle}
-{{a c b} {\tl_use:N \l__penrose_tmpa_tl}}
+\prop_gput:Nnx \g_@@_tiles_prop {golden~ triangle}
+{{a c b} {\tl_use:N \l_@@_tmpa_tl}}
 %    \end{macrocode}
 %
 % \item Reverse Golden Triangle.
 %    \begin{macrocode}
-\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
+\tl_clear:N \l_@@_tmpa_tl
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {0}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(18)}{sind(18)}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(18)}{-sind(18)}
 
-\prop_gput:Nnx \g__penrose_tiles_prop {reverse~ golden~ triangle}
-{{B C A} {\tl_use:N \l__penrose_tmpa_tl}}
+\prop_gput:Nnx \g_@@_tiles_prop {reverse~ golden~ triangle}
+{{B C A} {\tl_use:N \l_@@_tmpa_tl}}
 %    \end{macrocode}
 %
 % \item Golden Gnomon
 %    \begin{macrocode}
-\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(36)}{0}
+\tl_clear:N \l_@@_tmpa_tl
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {0}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(36)}{sind(36)}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {2*cosd(36)}{0}
 
-\prop_gput:Nnx \g__penrose_tiles_prop {golden~ gnomon}
-{{C b A} {\tl_use:N \l__penrose_tmpa_tl}}
+\prop_gput:Nnx \g_@@_tiles_prop {golden~ gnomon}
+{{C b A} {\tl_use:N \l_@@_tmpa_tl}}
 %    \end{macrocode}
 %
 % \item Reverse Golden Gnomon
 %    \begin{macrocode}
-\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(36)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{-sind(36)}
-\prop_gput:Nnx \g__penrose_tiles_prop {reverse~ golden~ gnomon}
-{{a B c} {\tl_use:N \l__penrose_tmpa_tl}}
+\tl_clear:N \l_@@_tmpa_tl
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {0}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {2*cosd(36)}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(36)}{-sind(36)}
+\prop_gput:Nnx \g_@@_tiles_prop {reverse~ golden~ gnomon}
+{{a B c} {\tl_use:N \l_@@_tmpa_tl}}
 %    \end{macrocode}
 %
 % \item Primary Pentagon (pentagon 5)
 %    \begin{macrocode}
-\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\tl_clear:N \l_@@_tmpa_tl
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {0}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(108)}{sind(108)}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl
 {1+cosd(72)+cosd(144)}{sind(72)+sind(144)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1+cosd(72)}{sind(72)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
-\prop_gput:Nnx \g__penrose_tiles_prop {pentagon~ 5}
-{{a a a a a} {\tl_use:N \l__penrose_tmpa_tl}}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {1+cosd(72)}{sind(72)}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {1}{0}
+\prop_gput:Nnx \g_@@_tiles_prop {pentagon~ 5}
+{{a a a a a} {\tl_use:N \l_@@_tmpa_tl}}
 %    \end{macrocode}
 %
 % \item Secondary Pentagon (pentagon 3)
 %    \begin{macrocode}
-\prop_gput:Nnx \g__penrose_tiles_prop {pentagon~ 3}
-{{A b a a b} {\tl_use:N \l__penrose_tmpa_tl}}
+\prop_gput:Nnx \g_@@_tiles_prop {pentagon~ 3}
+{{A b a a b} {\tl_use:N \l_@@_tmpa_tl}}
 %    \end{macrocode}
 %
 % \item Tertiary Pentagon (pentagon 2)
 %    \begin{macrocode}
-\prop_gput:Nnx \g__penrose_tiles_prop {pentagon~ 2}
-{{d A c c A} {\tl_use:N \l__penrose_tmpa_tl}}
+\prop_gput:Nnx \g_@@_tiles_prop {pentagon~ 2}
+{{d A e c A} {\tl_use:N \l_@@_tmpa_tl}}
 %    \end{macrocode}
 %
 % \item Pentagram
 %    \begin{macrocode}
-\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1-cosd(36)}{-sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\tl_clear:N \l_@@_tmpa_tl
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {1}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {1-cosd(36)}{-sind(36)}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl
 {1-cosd(36)-cosd(108)}{-sind(36)-sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{-sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(108)}{-sind(108)}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl
 {-1+3*cosd(108)+cosd(36)}{-sind(36)-sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl
 {-1+2*cosd(108)+cosd(36)}{-sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {-1+2*cosd(108)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(108)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\prop_gput:Nnx \g__penrose_tiles_prop {pentagram}
-{{C C C C C C C C C C} {\tl_use:N \l__penrose_tmpa_tl}}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {-1+2*cosd(108)}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {2*cosd(108)}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(108)}{sind(108)}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {0}{0}
+\prop_gput:Nnx \g_@@_tiles_prop {pentagram}
+{{C E C E C E C E C E} {\tl_use:N \l_@@_tmpa_tl}}
 %    \end{macrocode}
 %
 % \item Boat
 %    \begin{macrocode}
-\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {-1+2*cosd(108)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(108)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1-cosd(36)}{-sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\tl_clear:N \l_@@_tmpa_tl
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {-1+2*cosd(108)}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {2*cosd(108)}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(108)}{sind(108)}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {0}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {1}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {1-cosd(36)}{-sind(36)}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl
 {-1+2*cosd(108)+cosd(36)}{-sind(36)}
-\prop_gput:Nnx \g__penrose_tiles_prop {boat}
-{{C C C C B D B} {\tl_use:N \l__penrose_tmpa_tl}}
+\prop_gput:Nnx \g_@@_tiles_prop {boat}
+{{C E C E B D B} {\tl_use:N \l_@@_tmpa_tl}}
 %    \end{macrocode}
 %
 % \item Diamond.
 %    \begin{macrocode}
-\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(18)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
-\prop_gput:Nnx \g__penrose_tiles_prop {diamond}
-{{D B B D} {\tl_use:N \l__penrose_tmpa_tl}}
+\tl_clear:N \l_@@_tmpa_tl
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {0}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(18)}{sind(18)}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {2*cosd(18)}{0}
+\@@_add_coordinate:Nnn \l_@@_tmpa_tl {cosd(18)}{-sind(18)}
+\prop_gput:Nnx \g_@@_tiles_prop {diamond}
+{{D B B D} {\tl_use:N \l_@@_tmpa_tl}}
 %    \end{macrocode}
 %
 % \end{itemize}
 %
-% \begin{macro}[internal]{\MakePenroseTile}
+% \begin{function}{\BakePenroseTile}
 % This is the user wrapper around the tile creation macros.
 %    \begin{macrocode}
-\NewDocumentCommand \MakePenroseTile {m}
+\NewDocumentCommand \BakePenroseTile {m}
 {
-  \prop_get:NnN \g__penrose_tiles_prop {#1} \l__penrose_tmpa_tl
-  \penrose_make_tile:nV {#1} \l__penrose_tmpa_tl
+  \prop_get:NnN \g_@@_tiles_prop {#1} \l_@@_tmpa_tl
+  \@@_make_tile:nV {#1} \l_@@_tmpa_tl
 }
 %    \end{macrocode}
-% \end{macro}
+% For backwards compatibility.
+%    \begin{macrocode}
+\cs_set_eq:NN \MakePenroseTile \BakePenroseTile
+%    \end{macrocode}
+% \end{function}
 %
-% \begin{macro}[internal]{\UsePenroseTile}
+% \begin{function}{\UsePenroseTile}
 % This is the command that actually places a tile on the page.
 % The first argument is optional and is for styling.
 %    \begin{macrocode}
@@ -631,36 +695,36 @@
 % We need to transform the tile to correspond to the current transformation matrix.
 % To ensure that we only transform the current tile, we clone it first.
 %    \begin{macrocode}
-  \spath_clone:nn {Penrose path tile #2} {Penrose path tmpa}
+  \tl_set_eq:Nc \l_@@_tmp_tile_path_tl {g_@@_tile_#2_tl}
 %    \end{macrocode}
 % The transformation matrix returned by PGF appears to be transposed from what it should be.
 % (This needs a little more investigation, it might be that I've implemented the multiplication incorrectly here.)
 %    \begin{macrocode}
-  \pgfgettransform \l__penrose_tmpa_tl
-  \tl_clear:N \l__penrose_tmpb_tl
-  \tl_set:Nx \l__penrose_tmpb_tl {{\tl_head:N \l__penrose_tmpa_tl}}
-  \tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
-  \tl_put_right:Nx \l__penrose_tmpb_tl
-  {
-    {\tl_item:Nn \l__penrose_tmpa_tl {2}}
-  }
-  \tl_put_right:Nx \l__penrose_tmpb_tl
-  {
-    {\tl_item:Nn \l__penrose_tmpa_tl {1}}
-  }
-  \tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
-  \tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
-  \tl_put_right:NV \l__penrose_tmpb_tl \l__penrose_tmpa_tl
+  \pgfgettransform \l_@@_tmpa_tl
+%  \tl_clear:N \l_@@_tmpb_tl
+%  \tl_set:Nx \l_@@_tmpb_tl {{\tl_head:N \l_@@_tmpa_tl}}
+%  \tl_set:Nx \l_@@_tmpa_tl {\tl_tail:N \l_@@_tmpa_tl}
+%  \tl_put_right:Nx \l_@@_tmpb_tl
+%  {
+%    {\tl_item:Nn \l_@@_tmpa_tl {1}}
+%  }
+%  \tl_put_right:Nx \l_@@_tmpb_tl
+%  {
+%    {\tl_item:Nn \l_@@_tmpa_tl {2}}
+%  }
+%  \tl_set:Nx \l_@@_tmpa_tl {\tl_tail:N \l_@@_tmpa_tl}
+%  \tl_set:Nx \l_@@_tmpa_tl {\tl_tail:N \l_@@_tmpa_tl}
+%  \tl_put_right:NV \l_@@_tmpb_tl \l_@@_tmpa_tl
 %    \end{macrocode}
 % Apply the transformation, protocol the path, and render it.
 %    \begin{macrocode}
-  \spath_transform:nV {Penrose path tmpa} \l__penrose_tmpb_tl
-  \spath_protocol_path:n {Penrose path tmpa}
-  \spath_tikz_path:nn {#1}{Penrose path tmpa}
+  \spath_transform:NV \l_@@_tmp_tile_path_tl \l_@@_tmpa_tl
+  \spath_tikz_path:nV {#1} \l_@@_tmp_tile_path_tl
 }
 %    \end{macrocode}
-% \end{macro}
+% \end{function}
 %
+% \begin{macro}{save Penrose path}
 % This is a style for a user to take a path and make it into the path for one of the sides.
 % It needs to store both that side and the reverse.
 %    \begin{macrocode}
@@ -670,61 +734,396 @@
 %    \end{macrocode}
 % Get the current path.
 %    \begin{macrocode}
-      \pgfsyssoftpath at getcurrentpath\l__penrose_tmpa_tl
+      \pgfsyssoftpath at getcurrentpath\l_@@_tmpa_tl
 %    \end{macrocode}
-% Clear the receiving path, and store the current path in it.
+% Normalise the path and save.
 %    \begin{macrocode}
-      \spath_clear_new:n {Penrose path #1}
-      \spath_put:nnV {Penrose path #1} {path} \l__penrose_tmpa_tl
+      \@@_normalise_path:N \l_@@_tmpa_tl
+      \tl_gclear_new:c {g_@@_side_#1_tl}
+      \tl_gset_eq:cN {g_@@_side_#1_tl} \l_@@_tmpa_tl
 %    \end{macrocode}
-% Normalise the path.
-%    \begin{macrocode}
-      \penrose_normalise_path:n {Penrose path #1}
-%    \end{macrocode}
 % Now create the reverse path.
 % The name is the upper case version.
 %    \begin{macrocode}
-      \tex_uppercase:D {\tl_set:Nx \l__penrose_tmpa_tl {#1}}
+      \tl_set:Nx \l_@@_tmpb_tl {\str_uppercase:n {#1}}
 %    \end{macrocode}
-% Clone the path.
+% Reverse the path, and relocate to the interval \([0,1]\).
 %    \begin{macrocode}
-      \spath_clone:nn {Penrose path #1}
-      {Penrose path \tl_use:N \l__penrose_tmpa_tl }
-%    \end{macrocode}
-% Reverse it.
-%    \begin{macrocode}
-      \spath_reverse:n {Penrose path \tl_use:N \l__penrose_tmpa_tl}
-%    \end{macrocode}
-% Swap the start and end.
-%    \begin{macrocode}
-      \spath_transform:nnnnnnn {Penrose path \tl_use:N \l__penrose_tmpa_tl}
-      {-1} {0} {0} {-1} {1} {0}
+      \spath_reverse:N \l_@@_tmpa_tl
+      \spath_transform:Nnnnnnn \l_@@_tmpa_tl {-1} {0} {0} {-1} {1} {0}
+      \tl_gclear_new:c {g_@@_side_ \tl_use:N \l_@@_tmpb_tl _tl}
+      \tl_gset_eq:cN {g_@@_side_ \tl_use:N \l_@@_tmpb_tl _tl} \l_@@_tmpa_tl
     }
   },
+  clone~ Penrose~ side~ path/.style~ 2~ args={
+    spath/set~ name=Penrose~side,
+    spath/clone~ global={#1}{#2}
+  },
+  spath/prefix/Penrose~side/.style={
+    spath/set~ prefix=g_@@_side_,
+  },
+  spath/suffix/Penrose~side/.style={
+    spath/set~ suffix=_tl,
+  },
+  clone~ Penrose~ tile~ path/.style~ 2~ args={
+    spath/set~ name=Penrose~tile,
+    spath/clone~ global={#1}{#2}
+  },
+  spath/prefix/Penrose~tile/.style={
+    spath/set~ prefix=g_@@_tile_,
+  },
+  spath/suffix/Penrose~tile/.style={
+    spath/set~ suffix=_tl,
+  },
   expand~ key/.code={
     \exp_args:NV \pgfkeysalso #1
   }
 }
 %    \end{macrocode}
+% \end{macro}
 %
 % Create the basic tile shapes.
 %    \begin{macrocode}
-\MakePenroseTile {thin~ rhombus}
-\MakePenroseTile {thick~ rhombus} 
-\MakePenroseTile {dart}
-\MakePenroseTile {kite}
-\MakePenroseTile {golden~ triangle}
-\MakePenroseTile {reverse~ golden~ triangle}
-\MakePenroseTile {golden~ gnomon}
-\MakePenroseTile {reverse~ golden~ gnomon}
-\MakePenroseTile {pentagon~ 5}
-\MakePenroseTile {pentagon~ 3}
-\MakePenroseTile {pentagon~ 2}
-\MakePenroseTile {pentagram}
-\MakePenroseTile {boat}
-\MakePenroseTile {diamond}
+\BakePenroseTile {thin~ rhombus}
+\BakePenroseTile {thick~ rhombus} 
+\BakePenroseTile {dart}
+\BakePenroseTile {kite}
+\BakePenroseTile {golden~ triangle}
+\BakePenroseTile {reverse~ golden~ triangle}
+\BakePenroseTile {golden~ gnomon}
+\BakePenroseTile {reverse~ golden~ gnomon}
+\BakePenroseTile {pentagon~ 5}
+\BakePenroseTile {pentagon~ 3}
+\BakePenroseTile {pentagon~ 2}
+\BakePenroseTile {pentagram}
+\BakePenroseTile {boat}
+\BakePenroseTile {diamond}
 %    \end{macrocode}
 %
+%
+% \subsection{User-Definable Tiles}
+%
+% The commands in this section are for enabling a user to define their own tile.
+%
+%
+% \begin{macro}[internal]{\@@_transform_side:nn}
+% Apply a transformation to make a given side lie on the x-axis.
+% First argument is the tile, second is the side.
+%    \begin{macrocode}
+\cs_new_nopar:Npn \@@_transform_side:nn #1#2
+{
+%    \end{macrocode}
+% Get our tile data.
+%    \begin{macrocode}
+  \prop_get:NnN \g_@@_tiles_prop {#1} \l_@@_tmpa_tl
+%    \end{macrocode}
+% Start with the edge list.
+%
+% Initialise the counter.
+%    \begin{macrocode}
+  \int_zero:N \l_@@_tmpb_int
+  \int_incr:N \l_@@_tmpb_int
+%    \end{macrocode}
+% Get the path type list.
+%
+%    \begin{macrocode}
+  \tl_set:Nx \l_@@_tmpc_tl {\tl_head:N \l_@@_tmpa_tl}
+%    \end{macrocode}
+%
+% Iterate through the path type list, looking for the requested path.
+%    \begin{macrocode}
+  \tl_map_inline:Nn \l_@@_tmpc_tl {
+    \str_if_eq:nnT {##1} {#2} {
+      \tl_map_break:
+    }
+    \int_incr:N \l_@@_tmpb_int
+  }
+%    \end{macrocode}
+% Get the coordinate list.
+%    \begin{macrocode}
+  \tl_set:Nx \l_@@_tmpc_tl {\tl_tail:N \l_@@_tmpa_tl}
+%    \end{macrocode}
+% Strip off the outer braces.
+%    \begin{macrocode}
+  \tl_set:Nx \l_@@_tmpc_tl {\tl_item:Nn \l_@@_tmpc_tl {1}}
+%    \end{macrocode}
+% Add the first coordinate at the end.
+%    \begin{macrocode}
+  \tl_put_right:Nx \l_@@_tmpc_tl
+  {{\tl_item:Nn \l_@@_tmpc_tl {1}}}
+%    \end{macrocode}
+% Get the coordinates for this edge.
+%    \begin{macrocode}
+  \tl_set:Nx \l_@@_tmpa_tl
+  {\tl_item:Nn \l_@@_tmpc_tl {\int_use:N \l_@@_tmpb_int}}
+  \tl_set:Nx \l_@@_tmpb_tl
+  {\tl_item:Nn \l_@@_tmpc_tl {\int_use:N \l_@@_tmpb_int + 1}}
+%    \end{macrocode}
+% Translate second to origin.
+%    \begin{macrocode}
+  \tikz_scan_point:V \l_@@_tmpb_tl
+  \dim_set_eq:Nc \l_@@_xa_dim {pgf at x}
+  \dim_set_eq:Nc \l_@@_ya_dim {pgf at y}
+%    \end{macrocode}
+% Rotate and scale first to unit x-vector.
+%    \begin{macrocode}
+  \tikz_scan_point:V \l_@@_tmpa_tl
+  \dim_set_eq:Nc \l_@@_xb_dim {pgf at x}
+  \dim_set_eq:Nc \l_@@_yb_dim {pgf at y}
+
+  \dim_sub:Nn \l_@@_xb_dim {\l_@@_xa_dim }
+  \dim_sub:Nn \l_@@_yb_dim {\l_@@_ya_dim }
+%    \end{macrocode}
+% And normalise the vector along it.
+%    \begin{macrocode}
+  \pgfpointnormalised{\pgfpoint{\l_@@_xb_dim}{\l_@@_yb_dim}}
+  \dim_set_eq:Nc \l_@@_xb_dim {pgf at x}
+  \dim_set_eq:Nc \l_@@_yb_dim {pgf at y}
+%    \end{macrocode}
+% Now rotate so that the \(x\)--axis lies along the edge.
+%    \begin{macrocode}
+    \pgftransformtriangle%
+    {\pgfpoint{0pt}{0pt}}%
+    {\pgfpoint{\l_@@_xb_dim}{-\l_@@_yb_dim}}
+    {\pgfpoint{\l_@@_yb_dim}{\l_@@_xb_dim}}
+
+  \pgftransformshift{\pgfpoint{-\l_@@_xa_dim}{-\l_@@_ya_dim}}
+
+}
+%    \end{macrocode}
+% \end{macro}
+%
+%    \begin{macrocode}
+\cs_generate_variant:Nn \tl_if_eq:nnT {nVT}
+\cs_generate_variant:Nn \@@_transform_side:nn {nx,nV}
+%    \end{macrocode}
+%
+% \begin{macro}[internal]{\TransformAlongSide}
+% Make this available outside the \LaTeX3 environment.
+%    \begin{macrocode}
+\DeclareDocumentCommand \TransformAlongSide {m m}
+{
+  \@@_transform_side:nx {#1}{#2}
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\@@_coordinates_at_vertices:n}
+% This places TikZ coordinates at the vertices of the tile.
+%    \begin{macrocode}
+\cs_new_nopar:Npn \@@_coordinates_at_vertices:n #1
+{
+%    \end{macrocode}
+% Get our tile data
+%    \begin{macrocode}
+  \prop_get:NnN \g_@@_tiles_prop {#1} \l_@@_tmpa_tl
+%    \end{macrocode}
+% Start with the edge list
+%    \begin{macrocode}
+  \tl_set:Nx \l_@@_tmpb_tl {\tl_head:N \l_@@_tmpa_tl}
+%    \end{macrocode}
+% Get the coordinate list
+%    \begin{macrocode}
+  \tl_set:Nx \l_@@_tmpc_tl {\tl_tail:N \l_@@_tmpa_tl}
+%    \end{macrocode}
+% Strip off the outer braces
+%    \begin{macrocode}
+  \tl_set:Nx \l_@@_tmpc_tl
+  {\tl_item:Nn \l_@@_tmpc_tl {1}}
+%    \end{macrocode}
+% Add the first coordinate at the end
+%    \begin{macrocode}
+  \tl_put_right:Nx \l_@@_tmpc_tl
+  {{\tl_item:Nn \l_@@_tmpc_tl {1}}}
+%    \end{macrocode}
+% Get the first coordinate
+%    \begin{macrocode}
+  \tl_set:Nx \l_@@_tmpa_tl {\tl_head:N \l_@@_tmpc_tl}
+  \tl_set:Nx \l_@@_tmpc_tl {\tl_tail:N \l_@@_tmpc_tl}
+%    \end{macrocode}
+% Iterate through the path type list, looking for the requested path
+%    \begin{macrocode}
+  \tl_map_inline:Nn \l_@@_tmpb_tl {
+    \tl_set:Nx \l_@@_tmpd_tl {
+      \exp_not:N \coordinate
+      (-edge~ ##1~ start)~ at \tl_use:N \l_@@_tmpa_tl;
+    }
+    \tl_use:N \l_@@_tmpd_tl
+    \tl_set:Nx \l_@@_tmpa_tl {\tl_head:N \l_@@_tmpc_tl}
+    \tl_set:Nx \l_@@_tmpc_tl {\tl_tail:N \l_@@_tmpc_tl}
+    \tl_set:Nx \l_@@_tmpd_tl {
+      \exp_not:N \coordinate
+      (-edge~ ##1~ end)~ at \tl_use:N \l_@@_tmpa_tl;
+    }
+    \tl_use:N \l_@@_tmpd_tl
+  }
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\CoordinatesAtVertices}
+% User-accessible wrapper around the above.
+%    \begin{macrocode}
+\DeclareDocumentCommand \CoordinatesAtVertices {m}
+{
+  \@@_coordinates_at_vertices:n {#1}
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{function}{\DefineTile}
+% This is the user function for defining a tile.
+%    \begin{macrocode}
+\DeclareDocumentCommand \DefineTile { m m m }
+{
+%    \end{macrocode}
+% Clear the temporary variable.
+%    \begin{macrocode}  
+  \tl_clear:N \l_@@_tmpa_tl
+%    \end{macrocode}
+% The 3rd parameter is a list of coordinates at vertices, iterate through them and add them to the list.
+%    \begin{macrocode}  
+  \tl_map_inline:nn {#3} {
+    \@@_add_coordinate:w \l_@@_tmpa_tl ##1 \q_stop
+  }
+%    \end{macrocode}
+% Now we make a list of the edge types (from the 2nd parameter), using a prop to keep track of whether an edge is repeated.
+%    \begin{macrocode}
+  \prop_clear:N \l_@@_tmpa_prop
+  \tl_map_inline:nn {#2} {
+    \prop_if_in:NnTF \l_@@_tmpa_prop {##1}
+    {
+      \prop_put:Nnn \l_@@_tmpa_prop {##1} {1}
+    }
+    {
+      \prop_put:Nnn \l_@@_tmpa_prop {##1} {0}
+    }
+  }
+%    \end{macrocode}
+% Having established their multiplicity, we now create the edges with their names, appending numbers to their names if used more than once.
+%    \begin{macrocode}
+  \tl_clear:N \l_@@_tmpb_tl
+  \tl_map_inline:nn {#2}
+  {
+    \tl_clear:N \l_@@_tmpc_tl
+    \tl_put_right:Nn \l_@@_tmpc_tl {##1}
+    \int_compare:nF {\prop_item:Nn \l_@@_tmpa_prop {##1} == 0} {
+      \tl_put_right:Nx \l_@@_tmpc_tl
+      {\prop_item:Nn \l_@@_tmpa_prop {##1}}
+      \prop_put:Nnx \l_@@_tmpa_prop {##1}
+      {\int_eval:n {\prop_item:Nn \l_@@_tmpa_prop {##1} + 1}}
+    }
+    \tl_put_right:Nx \l_@@_tmpb_tl {{ \l_@@_tmpc_tl }}
+  }
+%    \end{macrocode}
+% Finally, we can create our tile and add it to the global tile prop.
+%    \begin{macrocode}
+  \prop_gput:Nnx \g_@@_tiles_prop {#1}
+  {{\tl_use:N \l_@@_tmpb_tl} {\tl_use:N \l_@@_tmpa_tl}}
+%    \end{macrocode}
+% Having created the tile, we make a TikZ pic to place it on the page.
+%    \begin{macrocode}
+  \tikzset{
+    #1/.pic={
+      \begin{scope}
+%    \end{macrocode}
+% Were we given a tile to align ourselves against?
+%    \begin{macrocode}
+      \pgfkeysgetvalue{/tikz/Penrose/alignment~ location}{\prloc}
+      \ifx\prloc\pgfutil at empty
+      \else
+%    \end{macrocode}
+% Yes, we were.
+% So we adjust our position accordingly.
+% The first job is to transform so that we're along the edge of the receiving tile.
+%    \begin{macrocode}
+    \begingroup
+%    \end{macrocode}
+% We get the locations of the start and end of the receiving tile.
+% As \Verb+pic+ sets the node prefix, we have to temporarily suspend that (hence working in a group).
+%    \begin{macrocode}
+      \tikzset{name~ prefix~ ..}%
+      \tikz at scan@one at point\pgfutil at firstofone%
+    (\prloc-edge~ \pgfkeysvalueof{/tikz/Penrose/alignment~ edge}~ start)%
+    \global\pgf at xa=\pgf at x
+    \global\pgf at ya=\pgf at y
+    \tikz at scan@one at point\pgfutil at firstofone%
+    (\prloc-edge~ \pgfkeysvalueof{/tikz/Penrose/alignment~ edge}~ end)%
+    \global\pgf at xb=\pgf at x
+    \global\pgf at yb=\pgf at y
+      \endgroup
+%    \end{macrocode}
+% We store the initial points in \Verb+\pgf at xa+ and \Verb+\pgf at ya+ but we want \Verb+\pgf at xb+ and \Verb+\pgf at yb+ to be a vector along the edge.
+%    \begin{macrocode}
+    \advance\pgf at xb by -\pgf at xa
+    \advance\pgf at yb by -\pgf at ya
+%    \end{macrocode}
+% We shift to the start of the edge.
+%    \begin{macrocode}
+    \pgftransformshift{\pgfpoint{\pgf at xa}{\pgf at ya}}%
+%    \end{macrocode}
+% And normalise the vector along it.
+%    \begin{macrocode}
+    \pgfpointnormalised{\pgfpoint{\pgf at xb}{\pgf at yb}}
+    \pgf at xb=\pgf at x
+    \pgf at yb=\pgf at y
+%    \end{macrocode}
+% Now rotate so that the \(x\)--axis lies along the edge.
+%    \begin{macrocode}
+    \pgftransformtriangle%
+    {\pgfpoint{0pt}{0pt}}%
+    {\pgfpoint{\pgf at xb}{\pgf at yb}}%
+    {\pgfpoint{-\pgf at yb}{\pgf at xb}}
+%    \end{macrocode}
+% The next job is to shift and rotate the current tile so that the correct edge ends up against the receiving tile.
+%    \begin{macrocode}
+    \str_set:Nx \l_@@_tmpa_str
+    {\pgfkeysvalueof{/tikz/Penrose/alignment~ edge}}
+    \str_set:Nx \l_@@_tmpa_str {\str_head:N \l_@@_tmpa_str}
+    \str_put_right:Nx \l_@@_tmpa_str
+    {\pgfkeysvalueof{/tikz/Penrose/alignment~ new~ edge}}
+    \str_set:Nx \l_@@_tmpb_str {\str_lowercase:f { \l_@@_tmpa_str}}
+    \str_if_eq:NNT \l_@@_tmpa_str \l_@@_tmpb_str
+    {
+      \str_set:Nx \l_@@_tmpb_str
+      {\str_uppercase:f { \l_@@_tmpa_str}}
+    }
+
+    \@@_transform_side:nV {#1} \l_@@_tmpb_str
+    \fi
+%    \end{macrocode}
+% Now that the transformation is finalised, we can render the tile.
+% We clip against the tile path so that the tiles don't ``bleed''.
+% If we didn't do this, drawing the tile would result in overlaps which can look a bit ugly.
+% On the other hand, tight clipping can lead to ``gaps'' between the tiles so we make this optional by enclosing it in a style.
+%    \begin{macrocode}
+    \UsePenroseTile[
+      every~ Penrose~ tile~ clip/.try,
+      every~ #1~ clip/.try
+    ]{#1}
+    \UsePenroseTile[
+      every~ Penrose~ tile/.try,
+      every~ #1/.try,
+      pic~ actions
+    ]{#1}
+% Lastly, we put coordinates at each vertex, labelled by which edge they are.
+%    \begin{macrocode}
+    \@@_coordinates_at_vertices:n {#1}
+    \end{scope}
+    },
+%    \end{macrocode}
+% This is a shortcut for installing the \Verb+pic+ type.
+%    \begin{macrocode}
+  #1/.style={
+    every~ Penrose~ pic/.try,
+    pic~ type=#1,
+    },
+  }
+}
+%    \end{macrocode}
+% \end{function}
+%
+%
 % \subsection{Lindenmayer System}
 % 
 % This is an implementation of the Lindenmayer System description of Penrose tilings as a way of generating tilings from a specific starting seed.
@@ -735,32 +1134,32 @@
 %
 % These are the rules for generating rhombus tilings.
 %    \begin{macrocode}
-\prop_new:N \g__penrose_rhombus_lms_rule_prop
-\prop_put:Nnn \g__penrose_rhombus_lms_rule_prop {T} {[f*sT][f>g]}
-\prop_put:Nnn \g__penrose_rhombus_lms_rule_prop {t} {[f_st][f>G]}
-\prop_put:Nnn \g__penrose_rhombus_lms_rule_prop {G} {[f+sG][sf>g][sf*sT]}
-\prop_put:Nnn \g__penrose_rhombus_lms_rule_prop {g} {[f-sg][sf>G][sf_st]}
+\prop_new:N \g_@@_rhombus_lms_rule_prop
+\prop_gput:Nnn \g_@@_rhombus_lms_rule_prop {T} {[f*sT][f>g]}
+\prop_gput:Nnn \g_@@_rhombus_lms_rule_prop {t} {[f_st][f>G]}
+\prop_gput:Nnn \g_@@_rhombus_lms_rule_prop {G} {[f+sG][sf>g][sf*sT]}
+\prop_gput:Nnn \g_@@_rhombus_lms_rule_prop {g} {[f-sg][sf>G][sf_st]}
 %    \end{macrocode}
 %
 % These are the rules for generating kite and dart tilings.
 %    \begin{macrocode}
-\prop_new:N \g__penrose_kite_lms_rule_prop
-\prop_put:Nnn \g__penrose_kite_lms_rule_prop {T} {[f*sT][f>st][+sg]}
-\prop_put:Nnn \g__penrose_kite_lms_rule_prop {t} {[f_st][f>sT][-sG]}
-\prop_put:Nnn \g__penrose_kite_lms_rule_prop {G} {[f*+sG][sT]}
-\prop_put:Nnn \g__penrose_kite_lms_rule_prop {g} {[f-_sg][st]}
+\prop_new:N \g_@@_kite_lms_rule_prop
+\prop_gput:Nnn \g_@@_kite_lms_rule_prop {T} {[f*sT][f>st][+sg]}
+\prop_gput:Nnn \g_@@_kite_lms_rule_prop {t} {[f_st][f>sT][-sG]}
+\prop_gput:Nnn \g_@@_kite_lms_rule_prop {G} {[f*+sG][sT]}
+\prop_gput:Nnn \g_@@_kite_lms_rule_prop {g} {[f-_sg][st]}
 %    \end{macrocode}
 %
 % These are the rules for generating pentagon tilings.
 %    \begin{macrocode}
-\prop_new:N \g__penrose_pentagon_lms_rule_prop
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {P}
+\prop_new:N \g_@@_pentagon_lms_rule_prop
+\prop_gput:Nnn \g_@@_pentagon_lms_rule_prop {P}
 {[s>P][1sF+Q][1+sF+Q][1*sF+Q][1-sF+Q][1_sF+Q]} % pentagon 5
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {Q}
+\prop_gput:Nnn \g_@@_pentagon_lms_rule_prop {Q}
 {[s>P][1+sFR][1*sF*R][1-sF+Q][1_sF+Q][1sF+Q][->fsD]} % pentagon 3
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {R}
+\prop_gput:Nnn \g_@@_pentagon_lms_rule_prop {R}
 {[s>P][1-sF+Q][1+sF*R][1*sFR][1_sF*R][1sFR][_>fsD][>fsD]} % pentagon 2
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {G}
+\prop_gput:Nnn \g_@@_pentagon_lms_rule_prop {G}
 {
   [s>G]
   [se[>d+R][e1B]]
@@ -769,7 +1168,7 @@
   [*se[>d+R][e1B]]
   [_se[>d+R][e1B]]
 } % pentagram
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {B}
+\prop_gput:Nnn \g_@@_pentagon_lms_rule_prop {B}
 {
   [s>G]
   [se[>d+R][e1B]]
@@ -776,96 +1175,96 @@
   [+se[>d+R][e1B]]
   [-se[>d+R][e1B]]
 } % boat
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {D}
+\prop_gput:Nnn \g_@@_pentagon_lms_rule_prop {D}
 {[s>d+R][s>eG][se1B]} % diamond
 %    \end{macrocode}
 %
 % Each of the standard tilings can also be drawn using triangles using the same rules.
 %    \begin{macrocode}
-\prop_set_eq:NN \g__penrose_rtriangle_lms_rule_prop
-\g__penrose_rhombus_lms_rule_prop
-\prop_set_eq:NN \g__penrose_ktriangle_lms_rule_prop
-\g__penrose_kite_lms_rule_prop
+\prop_gset_eq:NN \g_@@_rtriangle_lms_rule_prop
+\g_@@_rhombus_lms_rule_prop
+\prop_gset_eq:NN \g_@@_ktriangle_lms_rule_prop
+\g_@@_kite_lms_rule_prop
 %    \end{macrocode}
 %
 % These hold the various actions.
 %    \begin{macrocode}
-\prop_new:N \g__penrose_default_lms_action_prop
-\prop_new:N \g__penrose_rhombus_lms_action_prop
-\prop_new:N \g__penrose_kite_lms_action_prop
-\prop_new:N \g__penrose_rtriangle_lms_action_prop
-\prop_new:N \g__penrose_ktriangle_lms_action_prop
-\prop_new:N \g__penrose_pentagon_lms_action_prop
+\prop_new:N \g_@@_default_lms_action_prop
+\prop_new:N \g_@@_rhombus_lms_action_prop
+\prop_new:N \g_@@_kite_lms_action_prop
+\prop_new:N \g_@@_rtriangle_lms_action_prop
+\prop_new:N \g_@@_ktriangle_lms_action_prop
+\prop_new:N \g_@@_pentagon_lms_action_prop
 %    \end{macrocode}
 %
 % We need some parameters.
 %    \begin{macrocode}
-\dim_new:N \l__penrose_step_dim
-\dim_set:Nn \l__penrose_step_dim {1cm}
+\dim_new:N \l_@@_step_dim
+\dim_set:Nn \l_@@_step_dim {1cm}
 %    \end{macrocode}
 %
 % These are the defaults, which will be used in all the rule sets.
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_default_lms_action_prop {[} {\group_begin:}
-\prop_put:Nnn \g__penrose_default_lms_action_prop {]} {\group_end:}
-\prop_put:Nnn \g__penrose_default_lms_action_prop {f}
-{\pgftransformxshift{\l__penrose_step_dim}}
-\prop_put:Nnn \g__penrose_default_lms_action_prop {s} {
-  \fp_set:Nn \l__penrose_tmpa_fp { 2 * sind(18) * \l__penrose_step_dim }
-  \dim_set:Nn \l__penrose_step_dim {\fp_to_dim:N \l__penrose_tmpa_fp}
+\prop_gput:Nnn \g_@@_default_lms_action_prop {[} {\group_begin:}
+\prop_gput:Nnn \g_@@_default_lms_action_prop {]} {\group_end:}
+\prop_gput:Nnn \g_@@_default_lms_action_prop {f}
+{\pgftransformxshift{\l_@@_step_dim}}
+\prop_gput:Nnn \g_@@_default_lms_action_prop {s} {
+  \fp_set:Nn \l_@@_tmpa_fp { 2 * sind(18) * \l_@@_step_dim }
+  \dim_set:Nn \l_@@_step_dim {\fp_to_dim:N \l_@@_tmpa_fp}
 }
 %    \end{macrocode}
 %
 % The rhombus rules need a variety of turns.
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {+}
+\prop_gput:Nnn \g_@@_rhombus_lms_action_prop {+}
 {\pgftransformrotate{144}}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {*}
+\prop_gput:Nnn \g_@@_rhombus_lms_action_prop {*}
 {\pgftransformrotate{108}}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {-}
+\prop_gput:Nnn \g_@@_rhombus_lms_action_prop {-}
 {\pgftransformrotate{216}}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {_}
+\prop_gput:Nnn \g_@@_rhombus_lms_action_prop {_}
 {\pgftransformrotate{252}}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {>}
+\prop_gput:Nnn \g_@@_rhombus_lms_action_prop {>}
 {\pgftransformrotate{180}}
 %    \end{macrocode}
 %
 % Up to now, the actions for the rhombus and its triangle replacement are the same.
 %    \begin{macrocode}
-\prop_set_eq:NN \g__penrose_rtriangle_lms_action_prop
-\g__penrose_rhombus_lms_action_prop
+\prop_gset_eq:NN \g_@@_rtriangle_lms_action_prop
+\g_@@_rhombus_lms_action_prop
 %    \end{macrocode}
 %
 % Now we do the actions that actually draw something.
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {T} {
+\prop_gput:Nnn \g_@@_rhombus_lms_action_prop {T} {
   \group_begin:
 %    \end{macrocode}
 % As we go through, we keep track of how many tiles we've drawn.
 %    \begin{macrocode}
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g_@@_tile_int
 %    \end{macrocode}
 % Set up the position, size, and angle correctly.
 %    \begin{macrocode}
   \pgftransformrotate{198}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*2*cosd(18)}
-  \pgftransformxshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim*2*cosd(18)}
+  \pgftransformxshift{-\fp_to_dim:N \l_@@_tmpa_fp}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
 %    \end{macrocode}
 % Now we draw the thin rhombus, applying every style we can possibly imagine.
 % The \Verb+Penrose tile+ style gets the current tile and total tile numbers passed to it.
 %    \begin{macrocode}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ thin~ rhombus/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{thin~rhombus}
   \group_end:
 }
@@ -873,21 +1272,21 @@
 %
 % Same for the thick rhombus.
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {G} {
+\prop_gput:Nnn \g_@@_rhombus_lms_action_prop {G} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)/(2*cosd(36))}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \int_gincr:N \g_@@_tile_int
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)/(2*cosd(36))}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ thick~ rhombus/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{thick~rhombus}
   \group_end:
 }
@@ -895,36 +1294,36 @@
 %
 % Now we do the same for the kite and dart tiling.
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {+} {\pgftransformrotate{36}}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {*} {\pgftransformrotate{108}}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {-} {\pgftransformrotate{-36}}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {_}
+\prop_gput:Nnn \g_@@_kite_lms_action_prop {+} {\pgftransformrotate{36}}
+\prop_gput:Nnn \g_@@_kite_lms_action_prop {*} {\pgftransformrotate{108}}
+\prop_gput:Nnn \g_@@_kite_lms_action_prop {-} {\pgftransformrotate{-36}}
+\prop_gput:Nnn \g_@@_kite_lms_action_prop {_}
 {\pgftransformrotate{-108}}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {>} {\pgftransformrotate{180}}
+\prop_gput:Nnn \g_@@_kite_lms_action_prop {>} {\pgftransformrotate{180}}
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\prop_set_eq:NN \g__penrose_ktriangle_lms_action_prop
-\g__penrose_kite_lms_action_prop
+\prop_gset_eq:NN \g_@@_ktriangle_lms_action_prop
+\g_@@_kite_lms_action_prop
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {T} {
+\prop_gput:Nnn \g_@@_kite_lms_action_prop {T} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g_@@_tile_int
   \pgftransformrotate{36}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ kite/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{kite}
   \group_end:
 }
@@ -931,23 +1330,23 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {g} {
+\prop_gput:Nnn \g_@@_kite_lms_action_prop {g} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g_@@_tile_int
   \pgftransformrotate{144}
-  \pgftransformxshift{-\l__penrose_step_dim * 2 * sin(18)}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \pgftransformxshift{-\l_@@_step_dim * 2 * sin(18)}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ dart/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{dart}
   \group_end:
 }
@@ -955,22 +1354,22 @@
 %
 % Now we set up the actions for the triangle variations.
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_rtriangle_lms_action_prop {T} {
+\prop_gput:Nnn \g_@@_rtriangle_lms_action_prop {T} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g_@@_tile_int
   \pgftransformrotate{18}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ reverse~ golden~ triangle/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{reverse~ golden~ triangle}
   \group_end:
 }
@@ -977,27 +1376,27 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_rtriangle_lms_action_prop {t} {
+\prop_gput:Nnn \g_@@_rtriangle_lms_action_prop {t} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g_@@_tile_int
   \pgftransformrotate{-18}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ golden~ triangle/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{golden~ triangle}
   \group_end:
 }
@@ -1004,23 +1403,23 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_rtriangle_lms_action_prop {G} {
+\prop_gput:Nnn \g_@@_rtriangle_lms_action_prop {G} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g_@@_tile_int
   \pgftransformrotate{180}
-  \pgftransformxshift{-\l__penrose_step_dim}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)/(2*cosd(36))}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \pgftransformxshift{-\l_@@_step_dim}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)/(2*cosd(36))}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ reverse~ golden~ gnomon/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{reverse~ golden~ gnomon}
   \group_end:
 }
@@ -1027,23 +1426,23 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_rtriangle_lms_action_prop {g} {
+\prop_gput:Nnn \g_@@_rtriangle_lms_action_prop {g} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g_@@_tile_int
   \pgftransformrotate{180}
-  \pgftransformxshift{-\l__penrose_step_dim}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)/(2*cosd(36))}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \pgftransformxshift{-\l_@@_step_dim}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)/(2*cosd(36))}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ golden~ gnomon/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{golden~ gnomon}
   \group_end:
 }
@@ -1050,22 +1449,22 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_ktriangle_lms_action_prop {T} {
+\prop_gput:Nnn \g_@@_ktriangle_lms_action_prop {T} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g_@@_tile_int
   \pgftransformrotate{18}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ reverse~ golden~ triangle/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{reverse~ golden~ triangle}
   \group_end:
 }
@@ -1072,22 +1471,22 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_ktriangle_lms_action_prop {t} {
+\prop_gput:Nnn \g_@@_ktriangle_lms_action_prop {t} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g_@@_tile_int
   \pgftransformrotate{-18}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ golden~ triangle/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{golden~ triangle}
   \group_end:
 }
@@ -1094,23 +1493,23 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_ktriangle_lms_action_prop {G} {
+\prop_gput:Nnn \g_@@_ktriangle_lms_action_prop {G} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g_@@_tile_int
   \pgftransformrotate{180}
-  \pgftransformxshift{-\l__penrose_step_dim}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)/(2*cosd(36))}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \pgftransformxshift{-\l_@@_step_dim}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)/(2*cosd(36))}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ reverse~ golden~ gnomon/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{reverse~ golden~ gnomon}
   \group_end:
 }
@@ -1117,23 +1516,23 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_ktriangle_lms_action_prop {g} {
+\prop_gput:Nnn \g_@@_ktriangle_lms_action_prop {g} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g_@@_tile_int
   \pgftransformrotate{180}
-  \pgftransformxshift{-\l__penrose_step_dim}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)/(2*cosd(36))}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \pgftransformxshift{-\l_@@_step_dim}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)/(2*cosd(36))}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ golden~ gnomon/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{golden~ gnomon}
   \group_end:
 }
@@ -1143,87 +1542,87 @@
 %
 % The rules need a variety of turns.
 %    \begin{macrocode}
-\int_new:N \l__penrose_pentagon_parity_int
-\seq_new:N \l__penrose_pentagon_parity_seq
-\seq_set_from_clist:Nn \l__penrose_pentagon_parity_seq {odd,even}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {1} {
-  \int_set:Nn \l__penrose_pentagon_parity_int
-  {3 -  \l__penrose_pentagon_parity_int}
+\int_new:N \l_@@_pentagon_parity_int
+\seq_new:N \l_@@_pentagon_parity_seq
+\seq_set_from_clist:Nn \l_@@_pentagon_parity_seq {odd,even}
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {1} {
+  \int_set:Nn \l_@@_pentagon_parity_int
+  {3 -  \l_@@_pentagon_parity_int}
   }
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {+}
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {+}
 {\pgftransformrotate{72}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {*}
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {*}
 {\pgftransformrotate{144}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {-}
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {-}
 {\pgftransformrotate{288}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {_}
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {_}
 {\pgftransformrotate{216}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {>}
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {>}
 {\pgftransformrotate{180}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {|}
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {|}
 {\pgftransformxscale{-1}}
 %    \end{macrocode}
 % The scale factor is different.
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {s} {
-  \fp_set:Nn \l__penrose_tmpa_fp
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {s} {
+  \fp_set:Nn \l_@@_tmpa_fp
   {
-    1/(2 + 2 * cosd(72) ) * \l__penrose_step_dim
+    1/(2 + 2 * cosd(72) ) * \l_@@_step_dim
   }
-  \dim_set:Nn \l__penrose_step_dim {\fp_to_dim:N \l__penrose_tmpa_fp}
+  \dim_set:Nn \l_@@_step_dim {\fp_to_dim:N \l_@@_tmpa_fp}
 }
 %    \end{macrocode}
 % And we tend to work better vertically.
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {f} {
-  \fp_set:Nn \l__penrose_tmpa_fp {  tand(54)/2 * \l__penrose_step_dim }
-  \pgftransformyshift{\fp_to_dim:N \l__penrose_tmpa_fp}
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {f} {
+  \fp_set:Nn \l_@@_tmpa_fp {  tand(54)/2 * \l_@@_step_dim }
+  \pgftransformyshift{\fp_to_dim:N \l_@@_tmpa_fp}
 }
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {F} {
-  \fp_set:Nn \l__penrose_tmpa_fp {  tand(54) * \l__penrose_step_dim }
-  \pgftransformyshift{\fp_to_dim:N \l__penrose_tmpa_fp}
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {F} {
+  \fp_set:Nn \l_@@_tmpa_fp {  tand(54) * \l_@@_step_dim }
+  \pgftransformyshift{\fp_to_dim:N \l_@@_tmpa_fp}
 }
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {d} {
-  \fp_set:Nn \l__penrose_tmpa_fp
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {d} {
+  \fp_set:Nn \l_@@_tmpa_fp
   {
-    (tand(54)/2 - tand(72)/2 + sind(36) ) * \l__penrose_step_dim
+    (tand(54)/2 - tand(72)/2 + sind(36) ) * \l_@@_step_dim
   }
-  \pgftransformyshift{\fp_to_dim:N \l__penrose_tmpa_fp}
+  \pgftransformyshift{\fp_to_dim:N \l_@@_tmpa_fp}
 }
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {e} {
-  \fp_set:Nn \l__penrose_tmpa_fp
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {e} {
+  \fp_set:Nn \l_@@_tmpa_fp
   {
-    tand(54) * cosd(36) * \l__penrose_step_dim
+    tand(54) * cosd(36) * \l_@@_step_dim
   }
-  \pgftransformyshift{\fp_to_dim:N \l__penrose_tmpa_fp}
+  \pgftransformyshift{\fp_to_dim:N \l_@@_tmpa_fp}
 }
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {P} {
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {P} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/2}
-  \pgftransformxshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*tand(54)/2}
-  \pgftransformyshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \int_gincr:N \g_@@_tile_int
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/2}
+  \pgftransformxshift{-\fp_to_dim:N \l_@@_tmpa_fp}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim*tand(54)/2}
+  \pgftransformyshift{-\fp_to_dim:N \l_@@_tmpa_fp}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ pentagon/.try,
     every~
-    \seq_item:Nn \l__penrose_pentagon_parity_seq
-    {\l__penrose_pentagon_parity_int}
+    \seq_item:Nn \l_@@_pentagon_parity_seq
+    {\l_@@_pentagon_parity_int}
     \space pentagon/.try,
     every~ pentagon~ 5/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{pentagon~5}
   \group_end:
 }
@@ -1230,30 +1629,30 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {Q} {
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {Q} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/2}
-  \pgftransformxshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*tand(54)/2}
-  \pgftransformyshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \int_gincr:N \g_@@_tile_int
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/2}
+  \pgftransformxshift{-\fp_to_dim:N \l_@@_tmpa_fp}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim*tand(54)/2}
+  \pgftransformyshift{-\fp_to_dim:N \l_@@_tmpa_fp}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ pentagon/.try,
     every~
-    \seq_item:Nn \l__penrose_pentagon_parity_seq
-    {\l__penrose_pentagon_parity_int}
+    \seq_item:Nn \l_@@_pentagon_parity_seq
+    {\l_@@_pentagon_parity_int}
     \space pentagon/.try,
     every~ pentagon~ 3/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{pentagon~3}
   \group_end:
 }
@@ -1260,30 +1659,30 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {R} {
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {R} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/2}
-  \pgftransformxshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*tand(54)/2}
-  \pgftransformyshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \int_gincr:N \g_@@_tile_int
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/2}
+  \pgftransformxshift{-\fp_to_dim:N \l_@@_tmpa_fp}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim*tand(54)/2}
+  \pgftransformyshift{-\fp_to_dim:N \l_@@_tmpa_fp}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ pentagon/.try,
     every~
-    \seq_item:Nn \l__penrose_pentagon_parity_seq
-    {\l__penrose_pentagon_parity_int}
+    \seq_item:Nn \l_@@_pentagon_parity_seq
+    {\l_@@_pentagon_parity_int}
     \space pentagon/.try,
     every~ pentagon~ 2/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{pentagon~2}
   \group_end:
 }
@@ -1290,26 +1689,26 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {G} {
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {G} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g_@@_tile_int
 %  \pgftransformrotate{198}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*cosd(72)}
-  \pgftransformxshift{\fp_to_dim:N \l__penrose_tmpa_fp}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*tand(54)*cosd(72)}
-  \pgftransformyshift{\fp_to_dim:N \l__penrose_tmpa_fp}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim*cosd(72)}
+  \pgftransformxshift{\fp_to_dim:N \l_@@_tmpa_fp}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim*tand(54)*cosd(72)}
+  \pgftransformyshift{\fp_to_dim:N \l_@@_tmpa_fp}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ pentagram/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{pentagram}
   \group_end:
 }
@@ -1316,26 +1715,26 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {B} {
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {B} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g_@@_tile_int
 %  \pgftransformrotate{198}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*cosd(72)}
-  \pgftransformxshift{\fp_to_dim:N \l__penrose_tmpa_fp}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*tand(54)*cosd(72)}
-  \pgftransformyshift{\fp_to_dim:N \l__penrose_tmpa_fp}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim*cosd(72)}
+  \pgftransformxshift{\fp_to_dim:N \l_@@_tmpa_fp}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim*tand(54)*cosd(72)}
+  \pgftransformyshift{\fp_to_dim:N \l_@@_tmpa_fp}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ boat/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{boat}
   \group_end:
 }
@@ -1342,40 +1741,40 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {D} {
+\prop_gput:Nnn \g_@@_pentagon_lms_action_prop {D} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g_@@_tile_int
   \pgftransformrotate{90}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*cosd(18)}
-  \pgftransformxshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
-  \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
-  \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
-  \tl_set:Nx \l__penrose_tmpc_tl
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim*cosd(18)}
+  \pgftransformxshift{-\fp_to_dim:N \l_@@_tmpa_fp}
+  \fp_set:Nn \l_@@_tmpa_fp {\l_@@_step_dim/(1cm)}
+  \pgftransformscale{\fp_use:N \l_@@_tmpa_fp}
+  \tl_set:Nx \l_@@_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g_@@_tile_int}
+    {\int_use:N \g_@@_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ diamond/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
-    Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
+    Penrose~ tile~ \int_use:N \g_@@_tile_int/.try,
+    Penrose~ tile/.try/.expand~ once=\l_@@_tmpc_tl
   ]{diamond}
   \group_end:
 }
 %    \end{macrocode}
 %
-% \begin{macro}[internal]{\penrose_make_lms:Nnnn}
+% \begin{macro}[internal]{\@@_make_lms:Nnnn}
 % This creates the token list of actions, starting with the seed.
 % The arguments are: a token list to store the result in, the name of the system, the number of iterations, and the initial state.
 %    \begin{macrocode}
-\cs_new_nopar:Npn \penrose_make_lms:Nnnn #1#2#3#4
+\cs_new_nopar:Npn \@@_make_lms:Nnnn #1#2#3#4
 {
   \group_begin:
 %    \end{macrocode}
 % On the first time round, we start with the given seed.
 %    \begin{macrocode}
-  \tl_set:Nn \l__penrose_tmpb_tl {#4}
+  \tl_set:Nn \l_@@_tmpb_tl {#4}
 %    \end{macrocode}
 % We repeat the specified number of times.
 %    \begin{macrocode}
@@ -1383,29 +1782,29 @@
 %    \end{macrocode}
 % Duplicate the current state.
 %    \begin{macrocode}
-    \tl_set_eq:NN \l__penrose_tmpa_tl \l__penrose_tmpb_tl
+    \tl_set_eq:NN \l_@@_tmpa_tl \l_@@_tmpb_tl
 %    \end{macrocode}
 % Clear the receiving token list.
 %    \begin{macrocode}
-    \tl_clear:N \l__penrose_tmpb_tl
+    \tl_clear:N \l_@@_tmpb_tl
 %    \end{macrocode}
 % Walk through the current list, appending to the receiving list according to the rules.
 %    \begin{macrocode}
-    \tl_map_inline:Nn \l__penrose_tmpa_tl
+    \tl_map_inline:Nn \l_@@_tmpa_tl
     {
 %    \end{macrocode}
 % If a rule exists, copy that.
 %    \begin{macrocode}
-      \prop_if_in:cnTF {g__penrose_#2_lms_rule_prop} {##1}
+      \prop_if_in:cnTF {g_@@_#2_lms_rule_prop} {##1}
       {
-        \tl_put_right:Nx \l__penrose_tmpb_tl
-        {\prop_item:cn {g__penrose_#2_lms_rule_prop} {##1} }
+        \tl_put_right:Nx \l_@@_tmpb_tl
+        {\prop_item:cn {g_@@_#2_lms_rule_prop} {##1} }
       }
       {
 %    \end{macrocode}
 % Otherwise, just copy the token.
 %    \begin{macrocode}
-        \tl_put_right:Nn \l__penrose_tmpb_tl {##1}
+        \tl_put_right:Nn \l_@@_tmpb_tl {##1}
       }
     }
   }
@@ -1412,21 +1811,21 @@
 %    \end{macrocode}
 % We've done all this inside a group, now pass the result outside.
 %    \begin{macrocode}
-  \tl_set:Nn \l__penrose_tmpa_tl {
+  \tl_set:Nn \l_@@_tmpa_tl {
     \group_end:
     \tl_set:Nn #1
   }
-  \tl_put_right:Nx \l__penrose_tmpa_tl {{\tl_use:N \l__penrose_tmpb_tl}}
-  \tl_use:N \l__penrose_tmpa_tl
+  \tl_put_right:Nx \l_@@_tmpa_tl {{\tl_use:N \l_@@_tmpb_tl}}
+  \tl_use:N \l_@@_tmpa_tl
 }
-\cs_generate_variant:Nn \penrose_make_lms:Nnnn {Nnnx}
+\cs_generate_variant:Nn \@@_make_lms:Nnnn {Nnnx}
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}[internal]{\penrose_invoke_lms:Nn}
+% \begin{macro}[internal]{\@@_invoke_lms:Nn}
 % This carries out the actions specified by the resulting rules.
 %    \begin{macrocode}
-\cs_new_nopar:Npn \penrose_invoke_lms:Nn #1#2
+\cs_new_nopar:Npn \@@_invoke_lms:Nn #1#2
 {
   \group_begin:
 %    \end{macrocode}
@@ -1435,14 +1834,14 @@
 % Otherwise, just do nothing.
 %    \begin{macrocode}
   \tl_map_inline:Nn #1 {
-    \prop_if_in:cnTF {g__penrose_#2_lms_action_prop} {##1}
+    \prop_if_in:cnTF {g_@@_#2_lms_action_prop} {##1}
     {
-      \prop_item:cn {g__penrose_#2_lms_action_prop} {##1}
+      \prop_item:cn {g_@@_#2_lms_action_prop} {##1}
     }
     {
-      \prop_if_in:cnT {g__penrose_default_lms_action_prop} {##1}
+      \prop_if_in:cnT {g_@@_default_lms_action_prop} {##1}
       {
-        \prop_item:cn {g__penrose_default_lms_action_prop} {##1}
+        \prop_item:cn {g_@@_default_lms_action_prop} {##1}
       }
     }
   }
@@ -1453,11 +1852,11 @@
 %
 % We keep track of the number of tiles.
 %    \begin{macrocode}
-\int_new:N \l__penrose_tile_int
-\int_new:N \l__penrose_tiles_int
+\int_new:N \g_@@_tile_int
+\int_new:N \g_@@_tiles_int
 %    \end{macrocode}
 %
-% \begin{macro}[internal]{\PenroseDecomposition}
+% \begin{function}{\PenroseDecomposition}
 % This is the user macro to invoke the decomposition.
 % The arguments are: optional styles, the name, number of iterations, and starting seed.
 %    \begin{macrocode}
@@ -1465,39 +1864,39 @@
 {
   \group_begin:
   \tikzset{#1}
-  \penrose_make_lms:Nnnx \l__penrose_tmpa_tl {#2} {#3} {#4}
-  \penrose_count_lms:N \l__penrose_tmpa_tl
-  \int_gzero:N \l__penrose_tile_int
-  \int_gset:Nn \l__penrose_pentagon_parity_int {2}
-  \penrose_invoke_lms:Nn \l__penrose_tmpa_tl {#2}
+  \@@_make_lms:Nnnx \l_@@_tmpa_tl {#2} {#3} {#4}
+  \@@_count_lms:N \l_@@_tmpa_tl
+  \int_gzero:N \g_@@_tile_int
+  \int_set:Nn \l_@@_pentagon_parity_int {2}
+  \@@_invoke_lms:Nn \l_@@_tmpa_tl {#2}
   \group_end:
 }
 %    \end{macrocode}
-% \end{macro}
+% \end{function}
 %
-% \begin{macro}[internal]{\penrose_count_lms:N}
+% \begin{macro}[internal]{\@@_count_lms:N}
 % This counts the number of tiles in the string.
 %    \begin{macrocode}
-\cs_new_nopar:Npn \penrose_count_lms:N #1
+\cs_new_nopar:Npn \@@_count_lms:N #1
 {
-  \int_gzero:N \l__penrose_tiles_int
+  \int_gzero:N \g_@@_tiles_int
   \tl_map_inline:Nn #1
   {
     \tl_if_eq:nnT {##1} {T}
     {
-      \int_incr:N \l__penrose_tiles_int
+      \int_gincr:N \g_@@_tiles_int
     }
     \tl_if_eq:nnT {##1} {t}
     {
-      \int_incr:N \l__penrose_tiles_int
+      \int_gincr:N \g_@@_tiles_int
     }
     \tl_if_eq:nnT {##1} {G}
     {
-      \int_incr:N \l__penrose_tiles_int
+      \int_gincr:N \g_@@_tiles_int
     }
     \tl_if_eq:nnT {##1} {g}
     {
-      \int_incr:N \l__penrose_tiles_int
+      \int_gincr:N \g_@@_tiles_int
     }
   }
 }
@@ -1508,7 +1907,7 @@
 %    \begin{macrocode}
 \tikzset{
   Penrose~ step/.code={
-    \dim_set:Nn \l__penrose_step_dim {#1}
+    \dim_set:Nn \l_@@_step_dim {#1}
   }
 }
 %    \end{macrocode}
@@ -2717,8 +3116,11 @@
 }
 %    \end{macrocode}
 %
-% \iffalse
-%</library>
-% \fi
+%    \begin{macrocode}
+%</package>
+%    \end{macrocode}
+%
+% \end{implementation}
+%
 %\Finale
 \endinput

Added: trunk/Master/texmf-dist/source/latex/penrose/penrose_code.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/penrose/penrose_code.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/penrose/penrose_code.ins	2021-01-23 22:20:01 UTC (rev 57507)
@@ -0,0 +1,77 @@
+%%
+%% This is file `penrose_code.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% penrose_code.dtx  (with options: `install')
+%% ----------------------------------------------------------------
+%% penrose --- TikZ library for producing Penrose tilings
+%% E-mail: loopspace at mathforge.org
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%% ----------------------------------------------------------------
+%% 
+\input l3docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\preamble
+----------------------------------------------------------------
+penrose --- TikZ library for producing Penrose tilings
+E-mail: loopspace at mathforge.org
+Released under the LaTeX Project Public License v1.3c or later
+See http://www.latex-project.org/lppl.txt
+----------------------------------------------------------------
+
+\endpreamble
+\postamble
+
+Copyright (C) 2014-2019 by Andrew Stacey <loopspace at mathforge.org>
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License (LPPL), either
+version 1.3c of this license or (at your option) any later
+version.  The latest version of this license is in the file:
+
+http://www.latex-project.org/lppl.txt
+
+This work is "maintained" (as per LPPL maintenance status) by
+Andrew Stacey.
+
+This work consists of the files  penrose_code.dtx
+                                 penrose.tex
+and the derived files            penrose.ins
+                                 penrose_code.pdf
+                                 penrose.pdf
+                                 tikzlibrarypenrose.code.tex
+                                 README.txt
+
+\endpostamble
+\usedir{tex/latex/penrose}
+\generate{
+  \file{tikzlibrarypenrose.code.tex}{\from{\jobname.dtx}{package}}
+}
+\endbatchfile
+%% 
+%% Copyright (C) 2014-2019 by Andrew Stacey <loopspace at mathforge.org>
+%% 
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License (LPPL), either
+%% version 1.3c of this license or (at your option) any later
+%% version.  The latest version of this license is in the file:
+%% 
+%% http://www.latex-project.org/lppl.txt
+%% 
+%% This work is "maintained" (as per LPPL maintenance status) by
+%% Andrew Stacey.
+%% 
+%% This work consists of the files  penrose_code.dtx
+%%                                  penrose.tex
+%% and the derived files            penrose.ins
+%%                                  penrose_code.pdf
+%%                                  penrose.pdf
+%%                                  tikzlibrarypenrose.code.tex
+%%                                  README.txt
+%% 
+%%
+%% End of file `penrose_code.ins'.

Modified: trunk/Master/texmf-dist/tex/latex/penrose/tikzlibrarypenrose.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/penrose/tikzlibrarypenrose.code.tex	2021-01-23 22:18:57 UTC (rev 57506)
+++ trunk/Master/texmf-dist/tex/latex/penrose/tikzlibrarypenrose.code.tex	2021-01-23 22:20:01 UTC (rev 57507)
@@ -4,7 +4,7 @@
 %%
 %% The original source files were:
 %%
-%% penrose_code.dtx  (with options: `library')
+%% penrose_code.dtx  (with options: `package')
 %% ----------------------------------------------------------------
 %% penrose --- TikZ library for producing Penrose tilings
 %% E-mail: loopspace at mathforge.org
@@ -12,34 +12,60 @@
 %% See http://www.latex-project.org/lppl.txt
 %% ----------------------------------------------------------------
 %% 
+\ProvidesExplFile {tikzlibrarypenrose.code.tex} {2021/01/22} {1.4} {TikZ pics for Penrose and other tiles}
 \RequirePackage{spath3}
+\usetikzlibrary{spath3}
 \ExplSyntaxOn
-\MakeSPath{Penrose path a}
-      {
-        \pgfsyssoftpath at movetotoken{0pt}{0pt}
-        \pgfsyssoftpath at linetotoken{1pt}{0pt}
-      }
-\SPathPrepare{Penrose path a}
-\CloneSPath {Penrose path a}{Penrose path b}
-\CloneSPath {Penrose path a}{Penrose path c}
-\CloneSPath {Penrose path a}{Penrose path d}
-\CloneSPath {Penrose path a}{Penrose path A}
-\CloneSPath {Penrose path a}{Penrose path B}
-\CloneSPath {Penrose path a}{Penrose path C}
-\CloneSPath {Penrose path a}{Penrose path D}
+\tl_new:N \g__penrose_side_a_tl
+\tl_new:N \g__penrose_side_b_tl
+\tl_new:N \g__penrose_side_c_tl
+\tl_new:N \g__penrose_side_d_tl
+\tl_new:N \g__penrose_side_e_tl
+\tl_new:N \g__penrose_side_A_tl
+\tl_new:N \g__penrose_side_B_tl
+\tl_new:N \g__penrose_side_C_tl
+\tl_new:N \g__penrose_side_D_tl
+\tl_new:N \g__penrose_side_E_tl
+\tl_gset:Nn \g__penrose_side_a_tl
+{
+  \pgfsyssoftpath at movetotoken{0pt}{0pt}
+  \pgfsyssoftpath at linetotoken{1pt}{0pt}
+}
+\tl_gset_eq:NN \g__penrose_side_b_tl \g__penrose_side_a_tl
+\tl_gset_eq:NN \g__penrose_side_c_tl \g__penrose_side_a_tl
+\tl_gset_eq:NN \g__penrose_side_d_tl \g__penrose_side_a_tl
+\tl_gset_eq:NN \g__penrose_side_e_tl \g__penrose_side_a_tl
+\tl_gset_eq:NN \g__penrose_side_A_tl \g__penrose_side_a_tl
+\tl_gset_eq:NN \g__penrose_side_B_tl \g__penrose_side_a_tl
+\tl_gset_eq:NN \g__penrose_side_C_tl \g__penrose_side_a_tl
+\tl_gset_eq:NN \g__penrose_side_D_tl \g__penrose_side_a_tl
+\tl_gset_eq:NN \g__penrose_side_E_tl \g__penrose_side_a_tl
 \fp_new:N \l__penrose_tmpa_fp
 \fp_new:N \l__penrose_tmpb_fp
 \fp_new:N \l__penrose_tmpc_fp
+\str_new:N \l__penrose_tmpa_str
+\str_new:N \l__penrose_tmpb_str
 \tl_new:N \l__penrose_tmpa_tl
 \tl_new:N \l__penrose_tmpb_tl
 \tl_new:N \l__penrose_tmpc_tl
-\cs_new_nopar:Npn \penrose_normalise_path:n #1
+\tl_new:N \l__penrose_tmpd_tl
+\tl_new:N \l__penrose_tmp_tile_path_tl
+\tl_new:N \g__penrose_smuggle_tl
+\int_new:N \l__penrose_tmpa_int
+\int_new:N \l__penrose_tmpb_int
+\dim_new:N \l__penrose_xa_dim
+\dim_new:N \l__penrose_ya_dim
+\dim_new:N \l__penrose_xb_dim
+\dim_new:N \l__penrose_yb_dim
+\prop_new:N \l__penrose_tmpa_prop
+\cs_new_nopar:Npn \__penrose_normalise_path:Nn #1#2
 {
-  \spath_get:nnN {#1} {initial point} \l__penrose_tmpa_tl
+  \group_begin:
+  \spath_initialpoint:Nn \l__penrose_tmpa_tl {#2}
   \fp_set:Nn \l__penrose_tmpa_fp {\tl_head:N \l__penrose_tmpa_tl}
   \tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
   \fp_set:Nn \l__penrose_tmpb_fp {\tl_head:N \l__penrose_tmpa_tl}
-  \spath_get:nnN {#1} {final point} \l__penrose_tmpa_tl
+  \spath_finalpoint:Nn \l__penrose_tmpa_tl {#2}
   \fp_set:Nn \l__penrose_tmpa_fp
   {\tl_head:N \l__penrose_tmpa_tl - \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
@@ -53,11 +79,11 @@
   \tl_set:Nx \l__penrose_tmpb_tl
   {
     {\fp_use:N \l__penrose_tmpa_fp}
-    {\fp_use:N \l__penrose_tmpb_fp}
-    {\fp_use:N \l__penrose_tmpc_fp}
+    {\fp_use:N \l__penrose_tmpc_fp} % swapped
+    {\fp_use:N \l__penrose_tmpb_fp} % swapped
     {\fp_use:N \l__penrose_tmpa_fp}
   }
-  \spath_get:nnN {#1} {initial point} \l__penrose_tmpa_tl
+  \spath_initialpoint:Nn \l__penrose_tmpa_tl {#2}
   \fp_set:Nn \l__penrose_tmpa_fp
   {
     (-1) * \l__penrose_tmpa_fp * \tl_head:N \l__penrose_tmpa_tl
@@ -72,14 +98,23 @@
     {\fp_to_dim:N \l__penrose_tmpa_fp}
     {\fp_to_dim:N \l__penrose_tmpb_fp}
   }
-  \spath_transform:nV {#1} \l__penrose_tmpb_tl
+  \spath_transform:NnV \l__penrose_tmpa_tl {#2} \l__penrose_tmpb_tl
+  \tl_gset_eq:NN \g__penrose_smuggle_tl \l__penrose_tmpa_tl
+  \group_end:
+  \tl_set_eq:NN #1 \g__penrose_smuggle_tl
+  \tl_gclear:N \g__penrose_smuggle_tl
 }
+\cs_generate_variant:Nn \__penrose_normalise_path:Nn {NV, cn, cV}
+\cs_new_protected_nopar:Npn \__penrose_normalise_path:N #1
+{
+  \__penrose_normalise_path:NV #1#1
+}
+\cs_generate_variant:Nn \__penrose_normalise_path:N {c}
 \NewDocumentCommand \SetPenrosePath { m }
 {
   \pgfsyssoftpath at getcurrentpath\l__penrose_tmpa_tl
-  \spath_clear_new:n {Penrose path #1}
-  \spath_put:nnV {Penrose path #1} {path} \l__penrose_tmpa_tl
-  \penrose_normalise_path:n {Penrose path #1}
+  \__penrose_normalise_path:N \l__penrose_tmpa_tl
+  \tl_gset_eq:cN {g__penrose_side_#1_tl} \l__penrose_tmpa_tl
 }
 \cs_new_nopar:Npn \tikz_scan_point:n #1
 {
@@ -86,8 +121,9 @@
   \tikz at scan@one at point\pgfutil at firstofone#1\relax
 }
 \cs_generate_variant:Nn \tikz_scan_point:n {V}
-\cs_new_nopar:Npn \penrose_make_tile:nnn #1#2#3
+\cs_new_nopar:Npn \__penrose_make_tile:nnn #1#2#3
 {
+  \group_begin:
   \tl_set:Nn \l__penrose_tmpa_tl {#3}
   \tl_set:Nx \l__penrose_tmpb_tl {\tl_head:N \l__penrose_tmpa_tl}
   \tl_set:Nn \l__penrose_tmpa_tl {\pgfsyssoftpath at movetotoken}
@@ -96,12 +132,12 @@
   {
     {\dim_use:N \pgf at x}{\dim_use:N \pgf at y}
   }
-  \spath_clear_new:n {Penrose path tile #1}
-  \spath_put:nnV {Penrose path tile #1} {path} \l__penrose_tmpa_tl
+  \tl_set_eq:NN \l__penrose_tmp_tile_path_tl \l__penrose_tmpa_tl
   \tl_set:Nn \l__penrose_tmpa_tl {#3}
   \tl_put_right:Nx \l__penrose_tmpa_tl {{\tl_head:N \l__penrose_tmpa_tl}}
   \tl_map_inline:nn {#2} {
-    \spath_clone:nn {Penrose path ##1} {Penrose path tmpa}
+    \tl_set:Nx \l__penrose_tmpc_tl {\tl_head:n {##1}}
+    \tl_set_eq:Nc \l__penrose_tmpd_tl {g__penrose_side_ \tl_use:N \l__penrose_tmpc_tl _tl}
     \tl_set:Nx \l__penrose_tmpb_tl {\tl_head:N \l__penrose_tmpa_tl}
     \tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
     \tikz_scan_point:V \l__penrose_tmpb_tl
@@ -115,24 +151,29 @@
     \tl_set:Nx \l__penrose_tmpb_tl
     {
       {\fp_use:N \l__penrose_tmpa_fp}
-      {\fp_use:N \l__penrose_tmpc_fp}
-      {\fp_use:N \l__penrose_tmpb_fp}
+      {\fp_use:N \l__penrose_tmpb_fp} % not swapped
+      {\fp_use:N \l__penrose_tmpc_fp} % not swapped
       {\fp_use:N \l__penrose_tmpa_fp}
       {0}
       {0}
     }
-    \spath_transform:nV {Penrose path tmpa} \l__penrose_tmpb_tl
-    \spath_weld:nn {Penrose path tile #1} {Penrose path tmpa}
+    \spath_transform:NV \l__penrose_tmpd_tl \l__penrose_tmpb_tl
+    \spath_weld:NV \l__penrose_tmp_tile_path_tl \l__penrose_tmpd_tl
   }
-  \spath_close_path:n {Penrose path tile #1}
+  \spath_close:N \l__penrose_tmp_tile_path_tl
+  \tl_gset_eq:NN \g__penrose_smuggle_tl \l__penrose_tmp_tile_path_tl
+  \group_end:
+  \tl_gclear_new:c {g__penrose_tile_#1_tl}
+  \tl_gset_eq:cN {g__penrose_tile_#1_tl} \g__penrose_smuggle_tl
+  \tl_gclear:N \g__penrose_smuggle_tl
 }
-\cs_new_nopar:Npn \penrose_make_tile:nn #1#2
+\cs_new_nopar:Npn \__penrose_make_tile:nn #1#2
 {
-  \penrose_make_tile:nnn {#1} #2
+  \__penrose_make_tile:nnn {#1} #2
 }
-\cs_generate_variant:Nn \penrose_make_tile:nn {nV}
+\cs_generate_variant:Nn \__penrose_make_tile:nn {nV}
 \prop_new:N \g__penrose_tiles_prop
-\cs_new_nopar:Npn \tl_add_coordinate:Nnn #1#2#3 {
+\cs_new_nopar:Npn \__penrose_add_coordinate:Nnn #1#2#3 {
   \fp_set:Nn \l__penrose_tmpa_fp{#2}
   \fp_set:Nn \l__penrose_tmpb_fp{#3}
   \tl_put_right:Nx #1
@@ -140,192 +181,367 @@
     {(\fp_use:N \l__penrose_tmpa_fp, \fp_use:N \l__penrose_tmpb_fp)}
   }
 }
+\cs_new_nopar:Npn \__penrose_add_coordinate:w #1#2,#3 \q_stop
+{
+  \__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {#2}{#3}
+}
 \tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(18)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(18)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
 
 \prop_gput:Nnx \g__penrose_tiles_prop {thin~ rhombus}
 {{a A B b} {\tl_use:N \l__penrose_tmpa_tl}}
 \tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(36)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{-sind(36)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{sind(36)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(36)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{-sind(36)}
 
 \prop_gput:Nnx \g__penrose_tiles_prop {thick~ rhombus}
 {{B a A b} {\tl_use:N \l__penrose_tmpa_tl}}
 \tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl
 {2*sind(18)*cosd(108)}{2*sind(18)*sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*sind(18)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {2*sind(18)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl
 {2*sind(18)*cosd(108)}{-2*sind(18)*sind(108)}
 
 \prop_gput:Nnx \g__penrose_tiles_prop {dart}
 {{c a A C} {\tl_use:N \l__penrose_tmpa_tl}}
 \tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{-sind(36)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{sind(36)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{-sind(36)}
 
 \prop_gput:Nnx \g__penrose_tiles_prop {kite}
 {{a c C A} {\tl_use:N \l__penrose_tmpa_tl}}
 \tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
 
 \prop_gput:Nnx \g__penrose_tiles_prop {golden~ triangle}
 {{a c b} {\tl_use:N \l__penrose_tmpa_tl}}
 \tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
 
 \prop_gput:Nnx \g__penrose_tiles_prop {reverse~ golden~ triangle}
 {{B C A} {\tl_use:N \l__penrose_tmpa_tl}}
 \tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(36)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{sind(36)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(36)}{0}
 
 \prop_gput:Nnx \g__penrose_tiles_prop {golden~ gnomon}
 {{C b A} {\tl_use:N \l__penrose_tmpa_tl}}
 \tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(36)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{-sind(36)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(36)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{-sind(36)}
 \prop_gput:Nnx \g__penrose_tiles_prop {reverse~ golden~ gnomon}
 {{a B c} {\tl_use:N \l__penrose_tmpa_tl}}
 \tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{sind(108)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl
 {1+cosd(72)+cosd(144)}{sind(72)+sind(144)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1+cosd(72)}{sind(72)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {1+cosd(72)}{sind(72)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
 \prop_gput:Nnx \g__penrose_tiles_prop {pentagon~ 5}
 {{a a a a a} {\tl_use:N \l__penrose_tmpa_tl}}
 \prop_gput:Nnx \g__penrose_tiles_prop {pentagon~ 3}
 {{A b a a b} {\tl_use:N \l__penrose_tmpa_tl}}
 \prop_gput:Nnx \g__penrose_tiles_prop {pentagon~ 2}
-{{d A c c A} {\tl_use:N \l__penrose_tmpa_tl}}
+{{d A e c A} {\tl_use:N \l__penrose_tmpa_tl}}
 \tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1-cosd(36)}{-sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {1-cosd(36)}{-sind(36)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl
 {1-cosd(36)-cosd(108)}{-sind(36)-sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{-sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{-sind(108)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl
 {-1+3*cosd(108)+cosd(36)}{-sind(36)-sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl
 {-1+2*cosd(108)+cosd(36)}{-sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {-1+2*cosd(108)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(108)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {-1+2*cosd(108)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(108)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{sind(108)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
 \prop_gput:Nnx \g__penrose_tiles_prop {pentagram}
-{{C C C C C C C C C C} {\tl_use:N \l__penrose_tmpa_tl}}
+{{C E C E C E C E C E} {\tl_use:N \l__penrose_tmpa_tl}}
 \tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {-1+2*cosd(108)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(108)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1-cosd(36)}{-sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {-1+2*cosd(108)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(108)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{sind(108)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {1-cosd(36)}{-sind(36)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl
 {-1+2*cosd(108)+cosd(36)}{-sind(36)}
 \prop_gput:Nnx \g__penrose_tiles_prop {boat}
-{{C C C C B D B} {\tl_use:N \l__penrose_tmpa_tl}}
+{{C E C E B D B} {\tl_use:N \l__penrose_tmpa_tl}}
 \tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(18)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(18)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
 \prop_gput:Nnx \g__penrose_tiles_prop {diamond}
 {{D B B D} {\tl_use:N \l__penrose_tmpa_tl}}
-\NewDocumentCommand \MakePenroseTile {m}
+\NewDocumentCommand \BakePenroseTile {m}
 {
   \prop_get:NnN \g__penrose_tiles_prop {#1} \l__penrose_tmpa_tl
-  \penrose_make_tile:nV {#1} \l__penrose_tmpa_tl
+  \__penrose_make_tile:nV {#1} \l__penrose_tmpa_tl
 }
+\cs_set_eq:NN \MakePenroseTile \BakePenroseTile
 \NewDocumentCommand \UsePenroseTile {O{} m}
 {
-  \spath_clone:nn {Penrose path tile #2} {Penrose path tmpa}
+  \tl_set_eq:Nc \l__penrose_tmp_tile_path_tl {g__penrose_tile_#2_tl}
   \pgfgettransform \l__penrose_tmpa_tl
-  \tl_clear:N \l__penrose_tmpb_tl
-  \tl_set:Nx \l__penrose_tmpb_tl {{\tl_head:N \l__penrose_tmpa_tl}}
-  \tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
-  \tl_put_right:Nx \l__penrose_tmpb_tl
-  {
-    {\tl_item:Nn \l__penrose_tmpa_tl {2}}
-  }
-  \tl_put_right:Nx \l__penrose_tmpb_tl
-  {
-    {\tl_item:Nn \l__penrose_tmpa_tl {1}}
-  }
-  \tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
-  \tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
-  \tl_put_right:NV \l__penrose_tmpb_tl \l__penrose_tmpa_tl
-  \spath_transform:nV {Penrose path tmpa} \l__penrose_tmpb_tl
-  \spath_protocol_path:n {Penrose path tmpa}
-  \spath_tikz_path:nn {#1}{Penrose path tmpa}
+  \spath_transform:NV \l__penrose_tmp_tile_path_tl \l__penrose_tmpa_tl
+  \spath_tikz_path:nV {#1} \l__penrose_tmp_tile_path_tl
 }
 \tikzset{
   save~ Penrose~ path/.code={
     \tikz at addmode{
       \pgfsyssoftpath at getcurrentpath\l__penrose_tmpa_tl
-      \spath_clear_new:n {Penrose path #1}
-      \spath_put:nnV {Penrose path #1} {path} \l__penrose_tmpa_tl
-      \penrose_normalise_path:n {Penrose path #1}
-      \tex_uppercase:D {\tl_set:Nx \l__penrose_tmpa_tl {#1}}
-      \spath_clone:nn {Penrose path #1}
-      {Penrose path \tl_use:N \l__penrose_tmpa_tl }
-      \spath_reverse:n {Penrose path \tl_use:N \l__penrose_tmpa_tl}
-      \spath_transform:nnnnnnn {Penrose path \tl_use:N \l__penrose_tmpa_tl}
-      {-1} {0} {0} {-1} {1} {0}
+      \__penrose_normalise_path:N \l__penrose_tmpa_tl
+      \tl_gclear_new:c {g__penrose_side_#1_tl}
+      \tl_gset_eq:cN {g__penrose_side_#1_tl} \l__penrose_tmpa_tl
+      \tl_set:Nx \l__penrose_tmpb_tl {\str_uppercase:n {#1}}
+      \spath_reverse:N \l__penrose_tmpa_tl
+      \spath_transform:Nnnnnnn \l__penrose_tmpa_tl {-1} {0} {0} {-1} {1} {0}
+      \tl_gclear_new:c {g__penrose_side_ \tl_use:N \l__penrose_tmpb_tl _tl}
+      \tl_gset_eq:cN {g__penrose_side_ \tl_use:N \l__penrose_tmpb_tl _tl} \l__penrose_tmpa_tl
     }
   },
+  clone~ Penrose~ side~ path/.style~ 2~ args={
+    spath/set~ name=Penrose~side,
+    spath/clone~ global={#1}{#2}
+  },
+  spath/prefix/Penrose~side/.style={
+    spath/set~ prefix=g__penrose_side_,
+  },
+  spath/suffix/Penrose~side/.style={
+    spath/set~ suffix=_tl,
+  },
+  clone~ Penrose~ tile~ path/.style~ 2~ args={
+    spath/set~ name=Penrose~tile,
+    spath/clone~ global={#1}{#2}
+  },
+  spath/prefix/Penrose~tile/.style={
+    spath/set~ prefix=g__penrose_tile_,
+  },
+  spath/suffix/Penrose~tile/.style={
+    spath/set~ suffix=_tl,
+  },
   expand~ key/.code={
     \exp_args:NV \pgfkeysalso #1
   }
 }
-\MakePenroseTile {thin~ rhombus}
-\MakePenroseTile {thick~ rhombus}
-\MakePenroseTile {dart}
-\MakePenroseTile {kite}
-\MakePenroseTile {golden~ triangle}
-\MakePenroseTile {reverse~ golden~ triangle}
-\MakePenroseTile {golden~ gnomon}
-\MakePenroseTile {reverse~ golden~ gnomon}
-\MakePenroseTile {pentagon~ 5}
-\MakePenroseTile {pentagon~ 3}
-\MakePenroseTile {pentagon~ 2}
-\MakePenroseTile {pentagram}
-\MakePenroseTile {boat}
-\MakePenroseTile {diamond}
+\BakePenroseTile {thin~ rhombus}
+\BakePenroseTile {thick~ rhombus}
+\BakePenroseTile {dart}
+\BakePenroseTile {kite}
+\BakePenroseTile {golden~ triangle}
+\BakePenroseTile {reverse~ golden~ triangle}
+\BakePenroseTile {golden~ gnomon}
+\BakePenroseTile {reverse~ golden~ gnomon}
+\BakePenroseTile {pentagon~ 5}
+\BakePenroseTile {pentagon~ 3}
+\BakePenroseTile {pentagon~ 2}
+\BakePenroseTile {pentagram}
+\BakePenroseTile {boat}
+\BakePenroseTile {diamond}
+\cs_new_nopar:Npn \__penrose_transform_side:nn #1#2
+{
+  \prop_get:NnN \g__penrose_tiles_prop {#1} \l__penrose_tmpa_tl
+  \int_zero:N \l__penrose_tmpb_int
+  \int_incr:N \l__penrose_tmpb_int
+  \tl_set:Nx \l__penrose_tmpc_tl {\tl_head:N \l__penrose_tmpa_tl}
+  \tl_map_inline:Nn \l__penrose_tmpc_tl {
+    \str_if_eq:nnT {##1} {#2} {
+      \tl_map_break:
+    }
+    \int_incr:N \l__penrose_tmpb_int
+  }
+  \tl_set:Nx \l__penrose_tmpc_tl {\tl_tail:N \l__penrose_tmpa_tl}
+  \tl_set:Nx \l__penrose_tmpc_tl {\tl_item:Nn \l__penrose_tmpc_tl {1}}
+  \tl_put_right:Nx \l__penrose_tmpc_tl
+  {{\tl_item:Nn \l__penrose_tmpc_tl {1}}}
+  \tl_set:Nx \l__penrose_tmpa_tl
+  {\tl_item:Nn \l__penrose_tmpc_tl {\int_use:N \l__penrose_tmpb_int}}
+  \tl_set:Nx \l__penrose_tmpb_tl
+  {\tl_item:Nn \l__penrose_tmpc_tl {\int_use:N \l__penrose_tmpb_int + 1}}
+  \tikz_scan_point:V \l__penrose_tmpb_tl
+  \dim_set_eq:Nc \l__penrose_xa_dim {pgf at x}
+  \dim_set_eq:Nc \l__penrose_ya_dim {pgf at y}
+  \tikz_scan_point:V \l__penrose_tmpa_tl
+  \dim_set_eq:Nc \l__penrose_xb_dim {pgf at x}
+  \dim_set_eq:Nc \l__penrose_yb_dim {pgf at y}
+
+  \dim_sub:Nn \l__penrose_xb_dim {\l__penrose_xa_dim }
+  \dim_sub:Nn \l__penrose_yb_dim {\l__penrose_ya_dim }
+  \pgfpointnormalised{\pgfpoint{\l__penrose_xb_dim}{\l__penrose_yb_dim}}
+  \dim_set_eq:Nc \l__penrose_xb_dim {pgf at x}
+  \dim_set_eq:Nc \l__penrose_yb_dim {pgf at y}
+    \pgftransformtriangle%
+    {\pgfpoint{0pt}{0pt}}%
+    {\pgfpoint{\l__penrose_xb_dim}{-\l__penrose_yb_dim}}
+    {\pgfpoint{\l__penrose_yb_dim}{\l__penrose_xb_dim}}
+
+  \pgftransformshift{\pgfpoint{-\l__penrose_xa_dim}{-\l__penrose_ya_dim}}
+
+}
+\cs_generate_variant:Nn \tl_if_eq:nnT {nVT}
+\cs_generate_variant:Nn \__penrose_transform_side:nn {nx,nV}
+\DeclareDocumentCommand \TransformAlongSide {m m}
+{
+  \__penrose_transform_side:nx {#1}{#2}
+}
+\cs_new_nopar:Npn \__penrose_coordinates_at_vertices:n #1
+{
+  \prop_get:NnN \g__penrose_tiles_prop {#1} \l__penrose_tmpa_tl
+  \tl_set:Nx \l__penrose_tmpb_tl {\tl_head:N \l__penrose_tmpa_tl}
+  \tl_set:Nx \l__penrose_tmpc_tl {\tl_tail:N \l__penrose_tmpa_tl}
+  \tl_set:Nx \l__penrose_tmpc_tl
+  {\tl_item:Nn \l__penrose_tmpc_tl {1}}
+  \tl_put_right:Nx \l__penrose_tmpc_tl
+  {{\tl_item:Nn \l__penrose_tmpc_tl {1}}}
+  \tl_set:Nx \l__penrose_tmpa_tl {\tl_head:N \l__penrose_tmpc_tl}
+  \tl_set:Nx \l__penrose_tmpc_tl {\tl_tail:N \l__penrose_tmpc_tl}
+  \tl_map_inline:Nn \l__penrose_tmpb_tl {
+    \tl_set:Nx \l__penrose_tmpd_tl {
+      \exp_not:N \coordinate
+      (-edge~ ##1~ start)~ at \tl_use:N \l__penrose_tmpa_tl;
+    }
+    \tl_use:N \l__penrose_tmpd_tl
+    \tl_set:Nx \l__penrose_tmpa_tl {\tl_head:N \l__penrose_tmpc_tl}
+    \tl_set:Nx \l__penrose_tmpc_tl {\tl_tail:N \l__penrose_tmpc_tl}
+    \tl_set:Nx \l__penrose_tmpd_tl {
+      \exp_not:N \coordinate
+      (-edge~ ##1~ end)~ at \tl_use:N \l__penrose_tmpa_tl;
+    }
+    \tl_use:N \l__penrose_tmpd_tl
+  }
+}
+\DeclareDocumentCommand \CoordinatesAtVertices {m}
+{
+  \__penrose_coordinates_at_vertices:n {#1}
+}
+\DeclareDocumentCommand \DefineTile { m m m }
+{
+  \tl_clear:N \l__penrose_tmpa_tl
+  \tl_map_inline:nn {#3} {
+    \__penrose_add_coordinate:w \l__penrose_tmpa_tl ##1 \q_stop
+  }
+  \prop_clear:N \l__penrose_tmpa_prop
+  \tl_map_inline:nn {#2} {
+    \prop_if_in:NnTF \l__penrose_tmpa_prop {##1}
+    {
+      \prop_put:Nnn \l__penrose_tmpa_prop {##1} {1}
+    }
+    {
+      \prop_put:Nnn \l__penrose_tmpa_prop {##1} {0}
+    }
+  }
+  \tl_clear:N \l__penrose_tmpb_tl
+  \tl_map_inline:nn {#2}
+  {
+    \tl_clear:N \l__penrose_tmpc_tl
+    \tl_put_right:Nn \l__penrose_tmpc_tl {##1}
+    \int_compare:nF {\prop_item:Nn \l__penrose_tmpa_prop {##1} == 0} {
+      \tl_put_right:Nx \l__penrose_tmpc_tl
+      {\prop_item:Nn \l__penrose_tmpa_prop {##1}}
+      \prop_put:Nnx \l__penrose_tmpa_prop {##1}
+      {\int_eval:n {\prop_item:Nn \l__penrose_tmpa_prop {##1} + 1}}
+    }
+    \tl_put_right:Nx \l__penrose_tmpb_tl {{ \l__penrose_tmpc_tl }}
+  }
+  \prop_gput:Nnx \g__penrose_tiles_prop {#1}
+  {{\tl_use:N \l__penrose_tmpb_tl} {\tl_use:N \l__penrose_tmpa_tl}}
+  \tikzset{
+    #1/.pic={
+      \begin{scope}
+      \pgfkeysgetvalue{/tikz/Penrose/alignment~ location}{\prloc}
+      \ifx\prloc\pgfutil at empty
+      \else
+    \begingroup
+      \tikzset{name~ prefix~ ..}%
+      \tikz at scan@one at point\pgfutil at firstofone%
+    (\prloc-edge~ \pgfkeysvalueof{/tikz/Penrose/alignment~ edge}~ start)%
+    \global\pgf at xa=\pgf at x
+    \global\pgf at ya=\pgf at y
+    \tikz at scan@one at point\pgfutil at firstofone%
+    (\prloc-edge~ \pgfkeysvalueof{/tikz/Penrose/alignment~ edge}~ end)%
+    \global\pgf at xb=\pgf at x
+    \global\pgf at yb=\pgf at y
+      \endgroup
+    \advance\pgf at xb by -\pgf at xa
+    \advance\pgf at yb by -\pgf at ya
+    \pgftransformshift{\pgfpoint{\pgf at xa}{\pgf at ya}}%
+    \pgfpointnormalised{\pgfpoint{\pgf at xb}{\pgf at yb}}
+    \pgf at xb=\pgf at x
+    \pgf at yb=\pgf at y
+    \pgftransformtriangle%
+    {\pgfpoint{0pt}{0pt}}%
+    {\pgfpoint{\pgf at xb}{\pgf at yb}}%
+    {\pgfpoint{-\pgf at yb}{\pgf at xb}}
+    \str_set:Nx \l__penrose_tmpa_str
+    {\pgfkeysvalueof{/tikz/Penrose/alignment~ edge}}
+    \str_set:Nx \l__penrose_tmpa_str {\str_head:N \l__penrose_tmpa_str}
+    \str_put_right:Nx \l__penrose_tmpa_str
+    {\pgfkeysvalueof{/tikz/Penrose/alignment~ new~ edge}}
+    \str_set:Nx \l__penrose_tmpb_str {\str_lowercase:f { \l__penrose_tmpa_str}}
+    \str_if_eq:NNT \l__penrose_tmpa_str \l__penrose_tmpb_str
+    {
+      \str_set:Nx \l__penrose_tmpb_str
+      {\str_uppercase:f { \l__penrose_tmpa_str}}
+    }
+
+    \__penrose_transform_side:nV {#1} \l__penrose_tmpb_str
+    \fi
+    \UsePenroseTile[
+      every~ Penrose~ tile~ clip/.try,
+      every~ #1~ clip/.try
+    ]{#1}
+    \UsePenroseTile[
+      every~ Penrose~ tile/.try,
+      every~ #1/.try,
+      pic~ actions
+    ]{#1}
+    \__penrose_coordinates_at_vertices:n {#1}
+    \end{scope}
+    },
+  #1/.style={
+    every~ Penrose~ pic/.try,
+    pic~ type=#1,
+    },
+  }
+}
 \prop_new:N \g__penrose_rhombus_lms_rule_prop
-\prop_put:Nnn \g__penrose_rhombus_lms_rule_prop {T} {[f*sT][f>g]}
-\prop_put:Nnn \g__penrose_rhombus_lms_rule_prop {t} {[f_st][f>G]}
-\prop_put:Nnn \g__penrose_rhombus_lms_rule_prop {G} {[f+sG][sf>g][sf*sT]}
-\prop_put:Nnn \g__penrose_rhombus_lms_rule_prop {g} {[f-sg][sf>G][sf_st]}
+\prop_gput:Nnn \g__penrose_rhombus_lms_rule_prop {T} {[f*sT][f>g]}
+\prop_gput:Nnn \g__penrose_rhombus_lms_rule_prop {t} {[f_st][f>G]}
+\prop_gput:Nnn \g__penrose_rhombus_lms_rule_prop {G} {[f+sG][sf>g][sf*sT]}
+\prop_gput:Nnn \g__penrose_rhombus_lms_rule_prop {g} {[f-sg][sf>G][sf_st]}
 \prop_new:N \g__penrose_kite_lms_rule_prop
-\prop_put:Nnn \g__penrose_kite_lms_rule_prop {T} {[f*sT][f>st][+sg]}
-\prop_put:Nnn \g__penrose_kite_lms_rule_prop {t} {[f_st][f>sT][-sG]}
-\prop_put:Nnn \g__penrose_kite_lms_rule_prop {G} {[f*+sG][sT]}
-\prop_put:Nnn \g__penrose_kite_lms_rule_prop {g} {[f-_sg][st]}
+\prop_gput:Nnn \g__penrose_kite_lms_rule_prop {T} {[f*sT][f>st][+sg]}
+\prop_gput:Nnn \g__penrose_kite_lms_rule_prop {t} {[f_st][f>sT][-sG]}
+\prop_gput:Nnn \g__penrose_kite_lms_rule_prop {G} {[f*+sG][sT]}
+\prop_gput:Nnn \g__penrose_kite_lms_rule_prop {g} {[f-_sg][st]}
 \prop_new:N \g__penrose_pentagon_lms_rule_prop
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {P}
+\prop_gput:Nnn \g__penrose_pentagon_lms_rule_prop {P}
 {[s>P][1sF+Q][1+sF+Q][1*sF+Q][1-sF+Q][1_sF+Q]} % pentagon 5
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {Q}
+\prop_gput:Nnn \g__penrose_pentagon_lms_rule_prop {Q}
 {[s>P][1+sFR][1*sF*R][1-sF+Q][1_sF+Q][1sF+Q][->fsD]} % pentagon 3
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {R}
+\prop_gput:Nnn \g__penrose_pentagon_lms_rule_prop {R}
 {[s>P][1-sF+Q][1+sF*R][1*sFR][1_sF*R][1sFR][_>fsD][>fsD]} % pentagon 2
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {G}
+\prop_gput:Nnn \g__penrose_pentagon_lms_rule_prop {G}
 {
   [s>G]
   [se[>d+R][e1B]]
@@ -334,7 +550,7 @@
   [*se[>d+R][e1B]]
   [_se[>d+R][e1B]]
 } % pentagram
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {B}
+\prop_gput:Nnn \g__penrose_pentagon_lms_rule_prop {B}
 {
   [s>G]
   [se[>d+R][e1B]]
@@ -341,11 +557,11 @@
   [+se[>d+R][e1B]]
   [-se[>d+R][e1B]]
 } % boat
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {D}
+\prop_gput:Nnn \g__penrose_pentagon_lms_rule_prop {D}
 {[s>d+R][s>eG][se1B]} % diamond
-\prop_set_eq:NN \g__penrose_rtriangle_lms_rule_prop
+\prop_gset_eq:NN \g__penrose_rtriangle_lms_rule_prop
 \g__penrose_rhombus_lms_rule_prop
-\prop_set_eq:NN \g__penrose_ktriangle_lms_rule_prop
+\prop_gset_eq:NN \g__penrose_ktriangle_lms_rule_prop
 \g__penrose_kite_lms_rule_prop
 \prop_new:N \g__penrose_default_lms_action_prop
 \prop_new:N \g__penrose_rhombus_lms_action_prop
@@ -355,29 +571,29 @@
 \prop_new:N \g__penrose_pentagon_lms_action_prop
 \dim_new:N \l__penrose_step_dim
 \dim_set:Nn \l__penrose_step_dim {1cm}
-\prop_put:Nnn \g__penrose_default_lms_action_prop {[} {\group_begin:}
-\prop_put:Nnn \g__penrose_default_lms_action_prop {]} {\group_end:}
-\prop_put:Nnn \g__penrose_default_lms_action_prop {f}
+\prop_gput:Nnn \g__penrose_default_lms_action_prop {[} {\group_begin:}
+\prop_gput:Nnn \g__penrose_default_lms_action_prop {]} {\group_end:}
+\prop_gput:Nnn \g__penrose_default_lms_action_prop {f}
 {\pgftransformxshift{\l__penrose_step_dim}}
-\prop_put:Nnn \g__penrose_default_lms_action_prop {s} {
+\prop_gput:Nnn \g__penrose_default_lms_action_prop {s} {
   \fp_set:Nn \l__penrose_tmpa_fp { 2 * sind(18) * \l__penrose_step_dim }
   \dim_set:Nn \l__penrose_step_dim {\fp_to_dim:N \l__penrose_tmpa_fp}
 }
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {+}
+\prop_gput:Nnn \g__penrose_rhombus_lms_action_prop {+}
 {\pgftransformrotate{144}}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {*}
+\prop_gput:Nnn \g__penrose_rhombus_lms_action_prop {*}
 {\pgftransformrotate{108}}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {-}
+\prop_gput:Nnn \g__penrose_rhombus_lms_action_prop {-}
 {\pgftransformrotate{216}}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {_}
+\prop_gput:Nnn \g__penrose_rhombus_lms_action_prop {_}
 {\pgftransformrotate{252}}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {>}
+\prop_gput:Nnn \g__penrose_rhombus_lms_action_prop {>}
 {\pgftransformrotate{180}}
-\prop_set_eq:NN \g__penrose_rtriangle_lms_action_prop
+\prop_gset_eq:NN \g__penrose_rtriangle_lms_action_prop
 \g__penrose_rhombus_lms_action_prop
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {T} {
+\prop_gput:Nnn \g__penrose_rhombus_lms_action_prop {T} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \pgftransformrotate{198}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*2*cosd(18)}
   \pgftransformxshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
@@ -385,65 +601,65 @@
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ thin~ rhombus/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{thin~rhombus}
   \group_end:
 }
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {G} {
+\prop_gput:Nnn \g__penrose_rhombus_lms_action_prop {G} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)/(2*cosd(36))}
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ thick~ rhombus/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{thick~rhombus}
   \group_end:
 }
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {+} {\pgftransformrotate{36}}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {*} {\pgftransformrotate{108}}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {-} {\pgftransformrotate{-36}}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {_}
+\prop_gput:Nnn \g__penrose_kite_lms_action_prop {+} {\pgftransformrotate{36}}
+\prop_gput:Nnn \g__penrose_kite_lms_action_prop {*} {\pgftransformrotate{108}}
+\prop_gput:Nnn \g__penrose_kite_lms_action_prop {-} {\pgftransformrotate{-36}}
+\prop_gput:Nnn \g__penrose_kite_lms_action_prop {_}
 {\pgftransformrotate{-108}}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {>} {\pgftransformrotate{180}}
-\prop_set_eq:NN \g__penrose_ktriangle_lms_action_prop
+\prop_gput:Nnn \g__penrose_kite_lms_action_prop {>} {\pgftransformrotate{180}}
+\prop_gset_eq:NN \g__penrose_ktriangle_lms_action_prop
 \g__penrose_kite_lms_action_prop
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {T} {
+\prop_gput:Nnn \g__penrose_kite_lms_action_prop {T} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \pgftransformrotate{36}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ kite/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{kite}
   \group_end:
 }
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {g} {
+\prop_gput:Nnn \g__penrose_kite_lms_action_prop {g} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \pgftransformrotate{144}
   \pgftransformxshift{-\l__penrose_step_dim * 2 * sin(18)}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
@@ -450,63 +666,63 @@
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ dart/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{dart}
   \group_end:
 }
-\prop_put:Nnn \g__penrose_rtriangle_lms_action_prop {T} {
+\prop_gput:Nnn \g__penrose_rtriangle_lms_action_prop {T} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \pgftransformrotate{18}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ reverse~ golden~ triangle/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{reverse~ golden~ triangle}
   \group_end:
 }
-\prop_put:Nnn \g__penrose_rtriangle_lms_action_prop {t} {
+\prop_gput:Nnn \g__penrose_rtriangle_lms_action_prop {t} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \pgftransformrotate{-18}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ golden~ triangle/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{golden~ triangle}
   \group_end:
 }
-\prop_put:Nnn \g__penrose_rtriangle_lms_action_prop {G} {
+\prop_gput:Nnn \g__penrose_rtriangle_lms_action_prop {G} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \pgftransformrotate{180}
   \pgftransformxshift{-\l__penrose_step_dim}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)/(2*cosd(36))}
@@ -513,20 +729,20 @@
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ reverse~ golden~ gnomon/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{reverse~ golden~ gnomon}
   \group_end:
 }
-\prop_put:Nnn \g__penrose_rtriangle_lms_action_prop {g} {
+\prop_gput:Nnn \g__penrose_rtriangle_lms_action_prop {g} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \pgftransformrotate{180}
   \pgftransformxshift{-\l__penrose_step_dim}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)/(2*cosd(36))}
@@ -533,58 +749,58 @@
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ golden~ gnomon/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{golden~ gnomon}
   \group_end:
 }
-\prop_put:Nnn \g__penrose_ktriangle_lms_action_prop {T} {
+\prop_gput:Nnn \g__penrose_ktriangle_lms_action_prop {T} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \pgftransformrotate{18}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ reverse~ golden~ triangle/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{reverse~ golden~ triangle}
   \group_end:
 }
-\prop_put:Nnn \g__penrose_ktriangle_lms_action_prop {t} {
+\prop_gput:Nnn \g__penrose_ktriangle_lms_action_prop {t} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \pgftransformrotate{-18}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ golden~ triangle/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{golden~ triangle}
   \group_end:
 }
-\prop_put:Nnn \g__penrose_ktriangle_lms_action_prop {G} {
+\prop_gput:Nnn \g__penrose_ktriangle_lms_action_prop {G} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \pgftransformrotate{180}
   \pgftransformxshift{-\l__penrose_step_dim}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)/(2*cosd(36))}
@@ -591,20 +807,20 @@
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ reverse~ golden~ gnomon/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{reverse~ golden~ gnomon}
   \group_end:
 }
-\prop_put:Nnn \g__penrose_ktriangle_lms_action_prop {g} {
+\prop_gput:Nnn \g__penrose_ktriangle_lms_action_prop {g} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \pgftransformrotate{180}
   \pgftransformxshift{-\l__penrose_step_dim}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)/(2*cosd(36))}
@@ -611,13 +827,13 @@
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ golden~ gnomon/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{golden~ gnomon}
   \group_end:
@@ -625,23 +841,23 @@
 \int_new:N \l__penrose_pentagon_parity_int
 \seq_new:N \l__penrose_pentagon_parity_seq
 \seq_set_from_clist:Nn \l__penrose_pentagon_parity_seq {odd,even}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {1} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {1} {
   \int_set:Nn \l__penrose_pentagon_parity_int
   {3 -  \l__penrose_pentagon_parity_int}
   }
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {+}
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {+}
 {\pgftransformrotate{72}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {*}
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {*}
 {\pgftransformrotate{144}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {-}
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {-}
 {\pgftransformrotate{288}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {_}
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {_}
 {\pgftransformrotate{216}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {>}
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {>}
 {\pgftransformrotate{180}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {|}
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {|}
 {\pgftransformxscale{-1}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {s} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {s} {
   \fp_set:Nn \l__penrose_tmpa_fp
   {
     1/(2 + 2 * cosd(72) ) * \l__penrose_step_dim
@@ -648,15 +864,15 @@
   }
   \dim_set:Nn \l__penrose_step_dim {\fp_to_dim:N \l__penrose_tmpa_fp}
 }
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {f} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {f} {
   \fp_set:Nn \l__penrose_tmpa_fp {  tand(54)/2 * \l__penrose_step_dim }
   \pgftransformyshift{\fp_to_dim:N \l__penrose_tmpa_fp}
 }
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {F} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {F} {
   \fp_set:Nn \l__penrose_tmpa_fp {  tand(54) * \l__penrose_step_dim }
   \pgftransformyshift{\fp_to_dim:N \l__penrose_tmpa_fp}
 }
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {d} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {d} {
   \fp_set:Nn \l__penrose_tmpa_fp
   {
     (tand(54)/2 - tand(72)/2 + sind(36) ) * \l__penrose_step_dim
@@ -663,7 +879,7 @@
   }
   \pgftransformyshift{\fp_to_dim:N \l__penrose_tmpa_fp}
 }
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {e} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {e} {
   \fp_set:Nn \l__penrose_tmpa_fp
   {
     tand(54) * cosd(36) * \l__penrose_step_dim
@@ -670,9 +886,9 @@
   }
   \pgftransformyshift{\fp_to_dim:N \l__penrose_tmpa_fp}
 }
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {P} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {P} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/2}
   \pgftransformxshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*tand(54)/2}
@@ -681,8 +897,8 @@
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
@@ -692,14 +908,14 @@
     {\l__penrose_pentagon_parity_int}
     \space pentagon/.try,
     every~ pentagon~ 5/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{pentagon~5}
   \group_end:
 }
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {Q} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {Q} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/2}
   \pgftransformxshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*tand(54)/2}
@@ -708,8 +924,8 @@
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
@@ -719,14 +935,14 @@
     {\l__penrose_pentagon_parity_int}
     \space pentagon/.try,
     every~ pentagon~ 3/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{pentagon~3}
   \group_end:
 }
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {R} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {R} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/2}
   \pgftransformxshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*tand(54)/2}
@@ -735,8 +951,8 @@
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
@@ -746,14 +962,14 @@
     {\l__penrose_pentagon_parity_int}
     \space pentagon/.try,
     every~ pentagon~ 2/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{pentagon~2}
   \group_end:
 }
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {G} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {G} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*cosd(72)}
   \pgftransformxshift{\fp_to_dim:N \l__penrose_tmpa_fp}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*tand(54)*cosd(72)}
@@ -762,20 +978,20 @@
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ pentagram/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{pentagram}
   \group_end:
 }
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {B} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {B} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*cosd(72)}
   \pgftransformxshift{\fp_to_dim:N \l__penrose_tmpa_fp}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*tand(54)*cosd(72)}
@@ -784,20 +1000,20 @@
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ boat/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{boat}
   \group_end:
 }
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {D} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {D} {
   \group_begin:
-  \int_gincr:N \l__penrose_tile_int
+  \int_gincr:N \g__penrose_tile_int
   \pgftransformrotate{90}
   \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*cosd(18)}
   \pgftransformxshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
@@ -805,18 +1021,18 @@
   \pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
   \tl_set:Nx \l__penrose_tmpc_tl
   {
-    {\int_use:N  \l__penrose_tile_int}
-    {\int_use:N \l__penrose_tiles_int}
+    {\int_use:N  \g__penrose_tile_int}
+    {\int_use:N \g__penrose_tiles_int}
   }
   \UsePenroseTile[
     every~ Penrose~ tile/.try,
     every~ diamond/.try,
-    Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+    Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
     Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
   ]{diamond}
   \group_end:
 }
-\cs_new_nopar:Npn \penrose_make_lms:Nnnn #1#2#3#4
+\cs_new_nopar:Npn \__penrose_make_lms:Nnnn #1#2#3#4
 {
   \group_begin:
   \tl_set:Nn \l__penrose_tmpb_tl {#4}
@@ -842,8 +1058,8 @@
   \tl_put_right:Nx \l__penrose_tmpa_tl {{\tl_use:N \l__penrose_tmpb_tl}}
   \tl_use:N \l__penrose_tmpa_tl
 }
-\cs_generate_variant:Nn \penrose_make_lms:Nnnn {Nnnx}
-\cs_new_nopar:Npn \penrose_invoke_lms:Nn #1#2
+\cs_generate_variant:Nn \__penrose_make_lms:Nnnn {Nnnx}
+\cs_new_nopar:Npn \__penrose_invoke_lms:Nn #1#2
 {
   \group_begin:
   \tl_map_inline:Nn #1 {
@@ -860,39 +1076,39 @@
   }
   \group_end:
 }
-\int_new:N \l__penrose_tile_int
-\int_new:N \l__penrose_tiles_int
+\int_new:N \g__penrose_tile_int
+\int_new:N \g__penrose_tiles_int
 \NewDocumentCommand \PenroseDecomposition { O{} m m m }
 {
   \group_begin:
   \tikzset{#1}
-  \penrose_make_lms:Nnnx \l__penrose_tmpa_tl {#2} {#3} {#4}
-  \penrose_count_lms:N \l__penrose_tmpa_tl
-  \int_gzero:N \l__penrose_tile_int
-  \int_gset:Nn \l__penrose_pentagon_parity_int {2}
-  \penrose_invoke_lms:Nn \l__penrose_tmpa_tl {#2}
+  \__penrose_make_lms:Nnnx \l__penrose_tmpa_tl {#2} {#3} {#4}
+  \__penrose_count_lms:N \l__penrose_tmpa_tl
+  \int_gzero:N \g__penrose_tile_int
+  \int_set:Nn \l__penrose_pentagon_parity_int {2}
+  \__penrose_invoke_lms:Nn \l__penrose_tmpa_tl {#2}
   \group_end:
 }
-\cs_new_nopar:Npn \penrose_count_lms:N #1
+\cs_new_nopar:Npn \__penrose_count_lms:N #1
 {
-  \int_gzero:N \l__penrose_tiles_int
+  \int_gzero:N \g__penrose_tiles_int
   \tl_map_inline:Nn #1
   {
     \tl_if_eq:nnT {##1} {T}
     {
-      \int_incr:N \l__penrose_tiles_int
+      \int_gincr:N \g__penrose_tiles_int
     }
     \tl_if_eq:nnT {##1} {t}
     {
-      \int_incr:N \l__penrose_tiles_int
+      \int_gincr:N \g__penrose_tiles_int
     }
     \tl_if_eq:nnT {##1} {G}
     {
-      \int_incr:N \l__penrose_tiles_int
+      \int_gincr:N \g__penrose_tiles_int
     }
     \tl_if_eq:nnT {##1} {g}
     {
-      \int_incr:N \l__penrose_tiles_int
+      \int_gincr:N \g__penrose_tiles_int
     }
   }
 }
@@ -1986,7 +2202,7 @@
   },
 }
 %% 
-%% Copyright (C) 2014-2018 by Andrew Stacey <loopspace at mathforge.org>
+%% Copyright (C) 2014-2019 by Andrew Stacey <loopspace at mathforge.org>
 %% 
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License (LPPL), either
@@ -1998,13 +2214,13 @@
 %% This work is "maintained" (as per LPPL maintenance status) by
 %% Andrew Stacey.
 %% 
-%% This work consists of the files  penrose3.dtx
+%% This work consists of the files  penrose_code.dtx
 %%                                  penrose.tex
 %% and the derived files            penrose.ins
-%%                                  penrose3.pdf
+%%                                  penrose_code.pdf
 %%                                  penrose.pdf
 %%                                  tikzlibrarypenrose.code.tex
-%%                                  README
+%%                                  README.txt
 %% 
 %%
 %% End of file `tikzlibrarypenrose.code.tex'.

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2021-01-23 22:18:57 UTC (rev 57506)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2021-01-23 22:20:01 UTC (rev 57507)
@@ -2943,6 +2943,7 @@
  'nwejm'	=> 'tex',
  'nomentbl'     => 'latex -translate-file=empty.tcx',   # no 8-bit
  'pbsheet'      => 'latex',  # requires interaction
+ 'penrose'	=> 'etex',
  'thumb'        => 'latex -translate-file=empty.tcx',   # no 8-bit
  'pagesel'	=> 'tex',
  'pageslts'     => 'tex -translate-file=empty.tcx',     # no 8-bit



More information about the tex-live-commits mailing list.