texlive[70900] Master/texmf-dist: pmdraw (9apr24)

commits+karl at tug.org commits+karl at tug.org
Tue Apr 9 20:47:40 CEST 2024


Revision: 70900
          https://tug.org/svn/texlive?view=revision&revision=70900
Author:   karl
Date:     2024-04-09 20:47:40 +0200 (Tue, 09 Apr 2024)
Log Message:
-----------
pmdraw (9apr24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/pmdraw/README.md
    trunk/Master/texmf-dist/doc/latex/pmdraw/pmdraw.pdf
    trunk/Master/texmf-dist/doc/latex/pmdraw/pmdraw.tex
    trunk/Master/texmf-dist/tex/latex/pmdraw/pmdraw.sty

Modified: trunk/Master/texmf-dist/doc/latex/pmdraw/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pmdraw/README.md	2024-04-09 18:47:13 UTC (rev 70899)
+++ trunk/Master/texmf-dist/doc/latex/pmdraw/README.md	2024-04-09 18:47:40 UTC (rev 70900)
@@ -1,12 +1,12 @@
 pmdraw
 ======
 
+*README V1.3 2024-04-09*
+
 <!--
 
-README V1.2 2024-01-10
-
 *------------------------------*
-|3```````````````````````````2|
+|0````````````````````````````8|
 |`````____````____`````````````|
 |````|MFMF\  /MFMF|````````````|
 |````|MF|MF\/MF|MF|````````````|
@@ -18,7 +18,7 @@
 |``````````````|MF|````````````|
 |``````````````|MF|````````````|
 |``````````````|MF|````````````|
-|3````````````````````````````4|
+|1````````````````````````````3|
 *------------------------------*
 -->
 

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

Modified: trunk/Master/texmf-dist/doc/latex/pmdraw/pmdraw.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pmdraw/pmdraw.tex	2024-04-09 18:47:13 UTC (rev 70899)
+++ trunk/Master/texmf-dist/doc/latex/pmdraw/pmdraw.tex	2024-04-09 18:47:40 UTC (rev 70900)
@@ -1,7 +1,7 @@
 \documentclass{ltxdoc}
 
 % *------------------------------*
-% |3````````````````````````````7|
+% |7````````````````````````````6|
 % |`````____````____`````````````|
 % |````|MFMF\  /MFMF|````````````|
 % |````|MF|MF\/MF|MF|````````````|
@@ -13,7 +13,7 @@
 % |``````````````|MF|````````````|
 % |``````````````|MF|````````````|
 % |``````````````|MF|````````````|
-% |2````````````````````````````6|
+% |8````````````````````````````4|
 % *------------------------------*
 
 \usepackage{pmdraw}
@@ -26,7 +26,7 @@
 \hypersetup{colorlinks, linkcolor=blue, urlcolor=blue}
 
 \title{The \textsf{pmdraw} package\thanks{This document
-  corresponds to \textsf{pmdraw}~v1.2, 2024-01-10.}}
+  corresponds to \textsf{pmdraw}~v1.3, 2024-04-09.}}
 \author{Matthias Fresacher \\ \texttt{matthias.ypg37 at slmail.me}}
 
 \maketitle
@@ -78,7 +78,8 @@
 The following are a list of currently known bugs that will be addressed:
 \begin{enumerate}
     \item When the radius of the arc for non-transversal edges is too large compared to the distance between the two nodes, the arcs overlap. The current solution is to manually specify a \texttt{level} or \texttt{height} that makes the arcs smaller.
-    \item Baseline adjustments are hard coded so when changing \texttt{scale} or text size, for example, the vertical position of diagrams is likely to be incorrect. The current solution is to manually adjust the \texttt{baseline} within the \texttt{tikz} key.
+    \item Baseline adjustments are hard coded so when changing \texttt{scale}, \texttt{row sep} or text size, for example, the vertical position of diagrams is likely to be incorrect. The current solution is to manually adjust the \texttt{baseline} within the \texttt{tikz} key.
+    \item In a product diagram, if \texttt{row sep} is used in the bottom diagram, the spacing between diagrams is incorrect.
 \end{enumerate}
 
 \subsection{Incompatibilities}
@@ -693,7 +694,7 @@
 It should also be noted that the \texttt{blank top} and \texttt{blank bottom} can also be used to create more space between bricks and the dots between bricks by setting a large number. Likewise if set to \( -1 \) and the dots is redefined to not draw, the space between bricks can be removed altogether. See Examples~13-15.
 
 \DescribeMacro{row sep}
-specifies the vertical separation between rows of vertices. Default is two.
+specifies the vertical separation between rows of vertices. Default is two. If using edge options such as \texttt{levels}, \texttt{row sep} must be given before \texttt{levels}.
 \begin{center}
     \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
         \begin{minipage}[c]{0.4\linewidth}
@@ -1851,28 +1852,58 @@
     \end{minipage}%
 \end{center}
 
+\DescribeMacro{edge draw}
+passes through options to the \verb`\draw` command of the edge. The default is no argument.
+\begin{center}
+    \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+        \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+    degree=5
+]{ % Upper non-transversal edges
+    {1}{2}
+    [edge draw=red]{2}{3}
+    {4}{5}
+    }{ % Lower non-transversal edges
+    [edge draw=dotted]{1}{2}
+    {3}{4}
+}{ % Transversal edges
+    \pmdEmpty
+}
+\end{verbatim}
+        \end{minipage}
+        \hfill
+        \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+    degree=5
+]{ % Upper non-transversal edges
+    {1}{2}
+    [edge draw=red]{2}{3}
+    {4}{5}
+}{ % Lower non-transversal edges
+    [edge draw=dotted]{1}{2}
+    {3}{4}
+}{ % Transversal edges
+    \pmdEmpty
+}
+        \end{minipage}
+    \end{minipage}%
+\end{center}
+
 \DescribeMacro{options}
 allows for the redefinition of the command that draws the non-transversal edge. It has two arguments, the start and end \( x \)-position of the edge. The default for an upper non-transversal is
 \begin{verbatim}
-    \draw[apply style/.expand once=\pmdraw at drawUedgesDrawOptions]
-        (#1,\pmdraw at rowSep) arc (180:270:\pmdraw{edgeHeight}); % Draw left arch
-    \draw[apply style/.expand once=\pmdraw at drawUedgesDrawOptions]
-        (#1+\pmdraw{edgeHeight},\pmdraw at rowSep-\pmdraw{edgeHeight}) 
-        -- (#2-\pmdraw{edgeHeight},\pmdraw at rowSep-\pmdraw{edgeHeight}); % Draw straight line
-    \draw[apply style/.expand once=\pmdraw at drawUedgesDrawOptions]
-        (#2-\pmdraw{edgeHeight},\pmdraw at rowSep-\pmdraw{edgeHeight}) 
-        arc (270:360:\pmdraw{edgeHeight}); % Draw right arc
+    \draw[apply style/.expand once=\pmdraw at drawUedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#1,\pmdraw at rowSep) arc (180:270:\pmdraw{edgeHeight});% Draw left arch
+    \draw[apply style/.expand once=\pmdraw at drawUedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#1+\pmdraw{edgeHeight},\pmdraw at rowSep-\pmdraw{edgeHeight}) -- (#2-\pmdraw{edgeHeight},\pmdraw at rowSep-\pmdraw{edgeHeight});% Draw straight line
+    \draw[apply style/.expand once=\pmdraw at drawUedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#2-\pmdraw{edgeHeight},\pmdraw at rowSep-\pmdraw{edgeHeight}) arc (270:360:\pmdraw{edgeHeight});% Draw right arc
+    \renewcommand{\pmdraw at drawEdgeDrawOptions}{}% Reset draw options for edge
 \end{verbatim}
 and for a lower non-transversal
 \begin{verbatim}
-    \draw[apply style/.expand once=\pmdraw at drawLedgesDrawOptions]
-        (#1,0) arc (180:90:\pmdraw{edgeHeight}); % Draw left arch
-    \draw[apply style/.expand once=\pmdraw at drawLedgesDrawOptions]
-        (#1+\pmdraw{edgeHeight},\pmdraw{edgeHeight}) 
-        -- (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight}); % Draw straight line
-    \draw[apply style/.expand once=\pmdraw at drawLedgesDrawOptions]
-        (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight}) 
-        arc (90:0:\pmdraw{edgeHeight}); % Draw right arc
+    \draw[apply style/.expand once=\pmdraw at drawLedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#1,0) arc (180:90:\pmdraw{edgeHeight});% Draw left arch
+    \draw[apply style/.expand once=\pmdraw at drawLedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#1+\pmdraw{edgeHeight},\pmdraw{edgeHeight}) -- (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight});% Draw straight line
+    \draw[apply style/.expand once=\pmdraw at drawLedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight}) arc (90:0:\pmdraw{edgeHeight});% Draw right arc
+    \renewcommand{\pmdraw at drawEdgeDrawOptions}{}% Reset draw options for edge
 \end{verbatim}
 An example use is
 \begin{center}
@@ -1993,34 +2024,78 @@
 }
 \end{center}
 
+\DescribeMacro{edge draw}
+passes through options to the \verb`\draw` command of the edge. The default is no argument.
+\begin{center}
+    \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+        \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+    degree=5
+]{ % Upper non-transversal edges
+    {1}{2}
+    }{ % Lower non-transversal edges
+    {4}{5}
+    {3}{4}
+}{ % Transversal edges
+    [edge draw=red]{1}{1}
+}
+\end{verbatim}
+        \end{minipage}
+        \hfill
+        \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+    degree=5
+]{ % Upper non-transversal edges
+    {1}{2}
+}{ % Lower non-transversal edges
+    {4}{5}
+    {3}{4}
+}{ % Transversal edges
+    [edge draw=red]{1}{1}
+    {3}{2}
+    [edge draw=dashed]{4}{5}
+}
+        \end{minipage}
+    \end{minipage}%
+\end{center}
+
 \DescribeMacro{options}
 allows for the redefinition of the command that draws the transversal edge. It has two arguments, the \( x \)-position of the edge in the top row of vertices and the \( x \)-position of the edge in the bottom row of vertices. The default is
 \begin{verbatim}
-    \ifnum\pmdraw at ifTedgeHorizontal=0 % If drawing a straight line edge
-        \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions] 
-            (#1,\pmdraw at rowSep) -- (#2,0); % Draw straight line
-    \else % If transversal edge is drawn horizontally
-        \ifnum#1>#2 % If edge goes from top right to bottom left
-            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions] 
-                (#2,0) arc (180:90:\pmdraw{Tlevel}); % Draw bottom arch
-            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions] 
-                (#2+\pmdraw{Tlevel},\pmdraw{Tlevel}) 
-                -- (#1-\pmdraw at rowSep+\pmdraw{Tlevel}, \pmdraw{Tlevel}); % Draw straight line
-            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions] 
-                (#1-\pmdraw at rowSep+\pmdraw{Tlevel},\pmdraw{Tlevel}) 
-                arc (270:360:{\pmdraw at rowSep-\pmdraw{Tlevel}}); % Draw top arc
-        \else % If edge goes from top left to bottom right
-            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions] 
-                (#2,0) arc (0:90:\pmdraw{Tlevel}); % Draw bottom arch
-            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions] 
-                (#2-\pmdraw{Tlevel},\pmdraw{Tlevel}) 
-                -- (#1+\pmdraw at rowSep-\pmdraw{Tlevel}, \pmdraw{Tlevel}); % Draw straight line
-            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions] 
-                (#1+\pmdraw at rowSep-\pmdraw{Tlevel},\pmdraw{Tlevel}) 
-                arc (270:180:{\pmdraw at rowSep-\pmdraw{Tlevel}}); % Draw top arc
+    \ifnum\pmdraw at ifTedgeHorizontal=0% If drawing a straight line edge
+        \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions,
+            apply style/.expand once=\pmdraw at drawEdgeDrawOptions] 
+            (#1,\pmdraw at rowSep) -- (#2,0);% Draw straight line
+    \else% If transversal edge is drawn horizontally
+        \ifnum#1>#2% If edge goes from top right to bottom left
+            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions,
+                apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#2,0) arc 
+                (180:90:\pmdraw{Tlevel});% Draw bottom arch
+            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions,
+                apply style/.expand once=\pmdraw at drawEdgeDrawOptions] 
+                (#2+\pmdraw{Tlevel},\pmdraw{Tlevel}) -- 
+                (#1-\pmdraw at rowSep+\pmdraw{Tlevel}, \pmdraw{Tlevel});% Draw straight line
+            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions,
+                apply style/.expand once=\pmdraw at drawEdgeDrawOptions] 
+                (#1-\pmdraw at rowSep+\pmdraw{Tlevel},\pmdraw{Tlevel}) arc 
+                (270:360:{\pmdraw at rowSep-\pmdraw{Tlevel}});% Draw top arc
+        \else% If edge goes from top left to bottom right
+            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions,
+                apply style/.expand once=\pmdraw at drawEdgeDrawOptions] 
+                (#2,0) arc (0:90:\pmdraw{Tlevel});% Draw bottom arch
+            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions,
+                apply style/.expand once=\pmdraw at drawEdgeDrawOptions] 
+                (#2-\pmdraw{Tlevel},\pmdraw{Tlevel}) -- 
+                (#1+\pmdraw at rowSep-\pmdraw{Tlevel}, \pmdraw{Tlevel});% Draw straight line
+            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions,
+                apply style/.expand once=\pmdraw at drawEdgeDrawOptions] 
+                (#1+\pmdraw at rowSep-\pmdraw{Tlevel},\pmdraw{Tlevel}) arc 
+                (270:180:{\pmdraw at rowSep-\pmdraw{Tlevel}});% Draw top arc
         \fi%
-        \renewcommand{\pmdraw at ifTedgeHorizontal}{0} % Reset flag to default
+        \renewcommand{\pmdraw at ifTedgeHorizontal}{0}% Reset flag to default
     \fi%
+    \renewcommand{\pmdraw at drawEdgeDrawOptions}{}% Reset draw options for edge
 \end{verbatim}
 An example use is
 \begin{center}
@@ -2686,7 +2761,7 @@
 The following options can only be used for product diagrams (\verb`\pmdProduct`).
 
 \DescribeMacro{diagram sep}
-specifies the vertical separation between the bottom row of vertices in top diagram and the top row of vertices in bottom diagram. Default is one.
+specifies the vertical separation between the bottom row of vertices in top diagram and the top row of vertices in bottom diagram. Also controls the length of the added edges. Default is one.
 \begin{center}
     \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
         \begin{minipage}[c]{0.4\linewidth}
@@ -2771,6 +2846,94 @@
 }
 \end{center}
 
+\DescribeMacro{vertex sep}
+increases the vertical separation between the bottom row of vertices in top diagram and the top row of vertices in bottom diagram without altering the length of the added edges. Useful for things when adjusting the \texttt{row sep} of the bottom diagram for example. Default is zero.
+\begin{center}
+    \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+        \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdProduct[ % Options
+    vertex sep=1
+]{ % Added edges
+    {1}{5}
+}{ % Top diagram
+    { % Brick 1
+        [ % Options
+            degree=5
+        ]{ % Upper non-transversal edges
+            \pmdEmpty
+        }{ % Lower non-transversal edges
+            \pmdEmpty
+        }{ % Transversal edges
+            {1}{1}
+            {2}{2}
+            {3}{3}
+            {4}{4}
+            {5}{5}
+        }
+    }
+}{ % Bottom diagram
+    { % Brick 1
+        [ % Options
+            degree=5,
+            row sep=3
+        ]{ % Upper non-transversal edges
+            {2}{3}
+            {4}{5}
+        }{ % Lower non-transversal edges
+            {2}{3}
+            {4}{5}
+        }{ % Transversal edges
+            {1}{1}
+        }
+    }
+}
+\end{verbatim}
+        \end{minipage}
+        \hfill
+        \begin{minipage}[c]{0.4\linewidth}
+        \end{minipage}
+    \end{minipage}%
+\end{center}
+\begin{center}
+\pmdProduct[ % Options
+    vertex sep=1
+]{ % Added edges
+    {1}{5}
+}{ % Top diagram
+    { % Brick 1
+        [ % Options
+            degree=5
+        ]{ % Upper non-transversal edges
+            \pmdEmpty
+        }{ % Lower non-transversal edges
+            \pmdEmpty
+        }{ % Transversal edges
+            {1}{1}
+            {2}{2}
+            {3}{3}
+            {4}{4}
+            {5}{5}
+        }
+    }
+}{ % Bottom diagram
+    { % Brick 1
+        [ % Options
+            degree=5,
+            row sep=3
+        ]{ % Upper non-transversal edges
+            {2}{3}
+            {4}{5}
+        }{ % Lower non-transversal edges
+            {2}{3}
+            {4}{5}
+        }{ % Transversal edges
+            {1}{1}
+        }
+    }
+}
+\end{center}
+
 \DescribeMacro{edges added}
 passes through options to the \verb`\draw` command of the added edges. The default is no argument.
 \begin{center}
@@ -2871,6 +3034,11 @@
     \item Allow appropriate diagram keys to work as brick keys. Notably the \texttt{grid} key.
     \item The creation of user profiles that allows for fast and efficient setting of default key values that are different to the package defaults. Hence within a diagram, there can be a number of different diagram styles that can be accessed with one command.
     \item Allow for adjusting the horizontal spacing of vertices. Need to think about making that a simple scale factor so that integer interface for edge positions is the same but then hooks will have very messy coordinates or keep it as absolute coordinates with messy edges. Alternatively, do both, allowing the user to choose which option to do and somehow distinguish between the two in the background.
+    \item Create \texttt{pmdMirror} command that mirrors all upper non-transversals into lower non-transversals.
+    \item Create \texttt{invert} key for bricks, diagrams and product diagrams that inverts everything. Probably easiest done with a \texttt{scope} environment around everything and \texttt{yscale=-1}.
+    \item For product diagram, have interface where you input diagram instead of bricks so that you have access to diagram options.
+    \item Create a transversal edge key \texttt{identity} so that all edges in between the two values are straight vertical edges. Thus eliminating the need to write out each edge manually.
+    \item Create \texttt{shift} key for edges that shifts horizontal position.
 \end{enumerate}
 
 \section{Examples}

Modified: trunk/Master/texmf-dist/tex/latex/pmdraw/pmdraw.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pmdraw/pmdraw.sty	2024-04-09 18:47:13 UTC (rev 70899)
+++ trunk/Master/texmf-dist/tex/latex/pmdraw/pmdraw.sty	2024-04-09 18:47:40 UTC (rev 70900)
@@ -1,8 +1,8 @@
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{pmdraw}[2024-01-10 v1.2 pmdraw]
+\ProvidesPackage{pmdraw}[2024-04-09 v1.3 pmdraw]
 
 % *------------------------------*
-% |4````````````````````````````7|
+% |2````````````````````````````3|
 % |`````____````____`````````````|
 % |````|MFMF\  /MFMF|````````````|
 % |````|MF|MF\/MF|MF|````````````|
@@ -14,7 +14,7 @@
 % |``````````````|MF|````````````|
 % |``````````````|MF|````````````|
 % |``````````````|MF|````````````|
-% |8````````````````````````````4|
+% |1````````````````````````````1|
 % *------------------------------*
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -86,6 +86,8 @@
 }
 \let\pmdraw at drawDots\pmdraw at drawDotsDefault% Draws dots between bricks at (#1,#2)
 
+\newcommand{\pmdraw at drawEdgeDrawOptions}{}% Draw options for edge
+
 \newcommand{\pmdraw at drawLabelBDrawOptions}{}% Draw options for label of a vertex in bottom row
 \newcommand{\pmdraw at drawLabelBNodeOptions}{}% Node options for label of a vertex in bottom row
 \newcommand{\pmdraw at drawLabelBottomDefault}[3]{% For bottom row, draws the label #3 for a vertex at (#1,#2) - DEFAULT
@@ -102,9 +104,10 @@
 
 \newcommand{\pmdraw at drawLedgesDrawOptions}{}% Draw options for lower non-transversal edges
 \newcommand{\pmdraw at drawLedgesDrawDefault}[2]{% Draws lower non-transversal edge from #1 vertex to #2 vertex, assumes #1<#2 - DEFAULT
-    \draw[apply style/.expand once=\pmdraw at drawLedgesDrawOptions] (#1,0) arc (180:90:\pmdraw{edgeHeight});% Draw left arch
-    \draw[apply style/.expand once=\pmdraw at drawLedgesDrawOptions] (#1+\pmdraw{edgeHeight},\pmdraw{edgeHeight}) -- (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight});% Draw straight line
-    \draw[apply style/.expand once=\pmdraw at drawLedgesDrawOptions] (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight}) arc (90:0:\pmdraw{edgeHeight});% Draw right arc
+    \draw[apply style/.expand once=\pmdraw at drawLedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#1,0) arc (180:90:\pmdraw{edgeHeight});% Draw left arch
+    \draw[apply style/.expand once=\pmdraw at drawLedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#1+\pmdraw{edgeHeight},\pmdraw{edgeHeight}) -- (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight});% Draw straight line
+    \draw[apply style/.expand once=\pmdraw at drawLedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight}) arc (90:0:\pmdraw{edgeHeight});% Draw right arc
+    \renewcommand{\pmdraw at drawEdgeDrawOptions}{}% Reset draw options for edge
 }
 \let\pmdraw at drawLedgesDraw\pmdraw at drawLedgesDrawDefault% Draws lower non-transversal edge from #1 vertex to #2 vertex, assumes #1<#2
 
@@ -111,27 +114,29 @@
 \newcommand{\pmdraw at drawTedgesDrawOptions}{}% Draw options for transversal edges
 \newcommand{\pmdraw at drawTedgesDrawDefault}[2]{% Draws transversal edge from #1 vertex in top row to #2 vertex in bottom row - DEFAULT
     \ifnum\pmdraw at ifTedgeHorizontal=0% If drawing a straight line edge
-        \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions] (#1,\pmdraw at rowSep) -- (#2,0);% Draw straight line
+        \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#1,\pmdraw at rowSep) -- (#2,0);% Draw straight line
     \else% If transversal edge is drawn horizontally
         \ifnum#1>#2% If edge goes from top right to bottom left
-            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions] (#2,0) arc (180:90:\pmdraw{Tlevel});% Draw bottom arch
-            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions] (#2+\pmdraw{Tlevel},\pmdraw{Tlevel}) -- (#1-\pmdraw at rowSep+\pmdraw{Tlevel}, \pmdraw{Tlevel});% Draw straight line
-            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions] (#1-\pmdraw at rowSep+\pmdraw{Tlevel},\pmdraw{Tlevel}) arc (270:360:{\pmdraw at rowSep-\pmdraw{Tlevel}});% Draw top arc
+            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#2,0) arc (180:90:\pmdraw{Tlevel});% Draw bottom arch
+            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#2+\pmdraw{Tlevel},\pmdraw{Tlevel}) -- (#1-\pmdraw at rowSep+\pmdraw{Tlevel}, \pmdraw{Tlevel});% Draw straight line
+            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#1-\pmdraw at rowSep+\pmdraw{Tlevel},\pmdraw{Tlevel}) arc (270:360:{\pmdraw at rowSep-\pmdraw{Tlevel}});% Draw top arc
         \else% If edge goes from top left to bottom right
-            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions] (#2,0) arc (0:90:\pmdraw{Tlevel});% Draw bottom arch
-            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions] (#2-\pmdraw{Tlevel},\pmdraw{Tlevel}) -- (#1+\pmdraw at rowSep-\pmdraw{Tlevel}, \pmdraw{Tlevel});% Draw straight line
-            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions] (#1+\pmdraw at rowSep-\pmdraw{Tlevel},\pmdraw{Tlevel}) arc (270:180:{\pmdraw at rowSep-\pmdraw{Tlevel}});% Draw top arc
+            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#2,0) arc (0:90:\pmdraw{Tlevel});% Draw bottom arch
+            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#2-\pmdraw{Tlevel},\pmdraw{Tlevel}) -- (#1+\pmdraw at rowSep-\pmdraw{Tlevel}, \pmdraw{Tlevel});% Draw straight line
+            \draw[apply style/.expand once=\pmdraw at drawTedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#1+\pmdraw at rowSep-\pmdraw{Tlevel},\pmdraw{Tlevel}) arc (270:180:{\pmdraw at rowSep-\pmdraw{Tlevel}});% Draw top arc
         \fi%
         \renewcommand{\pmdraw at ifTedgeHorizontal}{0}% Reset flag to default
     \fi%
+    \renewcommand{\pmdraw at drawEdgeDrawOptions}{}% Reset draw options for edge
 }
 \let\pmdraw at drawTedgesDraw\pmdraw at drawTedgesDrawDefault% Draws transversal edge from #1 vertex in top row to #2 vertex in bottom row
 
 \newcommand{\pmdraw at drawUedgesDrawOptions}{}% Draw options for upper non-transversal edges
 \newcommand{\pmdraw at drawUedgesDrawDefault}[2]{% Draws upper non-transversal edge from #1 vertex to #2 vertex, assumes #1<#2 - DEFAULT
-    \draw[apply style/.expand once=\pmdraw at drawUedgesDrawOptions] (#1,\pmdraw at rowSep) arc (180:270:\pmdraw{edgeHeight});% Draw left arch
-    \draw[apply style/.expand once=\pmdraw at drawUedgesDrawOptions] (#1+\pmdraw{edgeHeight},\pmdraw at rowSep-\pmdraw{edgeHeight}) -- (#2-\pmdraw{edgeHeight},\pmdraw at rowSep-\pmdraw{edgeHeight});% Draw straight line
-    \draw[apply style/.expand once=\pmdraw at drawUedgesDrawOptions] (#2-\pmdraw{edgeHeight},\pmdraw at rowSep-\pmdraw{edgeHeight}) arc (270:360:\pmdraw{edgeHeight});% Draw right arc
+    \draw[apply style/.expand once=\pmdraw at drawUedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#1,\pmdraw at rowSep) arc (180:270:\pmdraw{edgeHeight});% Draw left arch
+    \draw[apply style/.expand once=\pmdraw at drawUedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#1+\pmdraw{edgeHeight},\pmdraw at rowSep-\pmdraw{edgeHeight}) -- (#2-\pmdraw{edgeHeight},\pmdraw at rowSep-\pmdraw{edgeHeight});% Draw straight line
+    \draw[apply style/.expand once=\pmdraw at drawUedgesDrawOptions,apply style/.expand once=\pmdraw at drawEdgeDrawOptions] (#2-\pmdraw{edgeHeight},\pmdraw at rowSep-\pmdraw{edgeHeight}) arc (270:360:\pmdraw{edgeHeight});% Draw right arc
+    \renewcommand{\pmdraw at drawEdgeDrawOptions}{}% Reset draw options for edge
 }
 \let\pmdraw at drawUedgesDraw\pmdraw at drawUedgesDrawDefault% Draws upper non-transversal edge from #1 vertex to #2 vertex, assumes #1<#2
 
@@ -166,6 +171,7 @@
     \renewcommand{\pmdraw at ifDiagWDots}{0}% Reset if drawing a diagram with dots
     \renewcommand{\pmdraw at rowSep}{2}% Resets vertical separation between rows of vertices in brick
     \renewcommand{\pmdraw at tikz}{}% Resets tikz options
+    \renewcommand{\pmdraw at vertexSep}{0}% Resets vertical space between product diagrams
     \setcounter{pmdraw at blankB}{0}% Resets number of blank vertices in bottom row to the left of brick
     \setcounter{pmdraw at blankT}{0}% Resets number of blank vertices in top row to the left of brick
     \setcounter{pmdraw at bottomShift}{0}% Resets shift on right end of bottom row of brick
@@ -177,6 +183,8 @@
 
 \newcommand{\pmdraw at tikz}{}% Tikz options
 
+\newcommand{\pmdraw at vertexSep}{0}% Vertical separation between bottom row of top diagram and top row of bottom diagram in product diagram not for added edges
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %                                                        %
 %  Counters                                              %
@@ -399,11 +407,13 @@
 \define at key{pmdraw at NTedges}{height}{% Sets manual height of non-transversal edge
     \renewcommand{\pmdraw at NTedgesHeight}{#1}%
 }
+\define at key{pmdraw at NTedges}{edge draw}{% Sets the draw options for drawing of edge
+    \renewcommand{\pmdraw at drawEdgeDrawOptions}{#1}%
+}
 \define at key{pmdraw at NTedges}{options}{% Sets the draw command of non-transversal edge
     \renewcommand{\pmdraw at drawUedgesDraw}[2]{#1}%
     \renewcommand{\pmdraw at drawLedgesDraw}[2]{#1}%
 }
-
 \define at key{pmdraw at Tedges}{height}{% Sets manual height of transversal edge
     \tikzmath{%
         \pmdraw{Tlevel} = #1;%
@@ -410,6 +420,9 @@
     }%
     \renewcommand{\pmdraw at ifTedgeHorizontal}{1}% Flags manual height
 }
+\define at key{pmdraw at Tedges}{edge draw}{% Sets the draw options for drawing of edge
+    \renewcommand{\pmdraw at drawEdgeDrawOptions}{#1}%
+}
 \define at key{pmdraw at Tedges}{options}{% Sets the draw command of transversal edge
     \renewcommand{\pmdraw at drawTedgesDraw}[2]{#1}%
 }
@@ -466,6 +479,9 @@
 \define at key{pmdraw at diagram}{diagram sep}{% Sets vertical separation between bottom row of top diagram and top row of bottom diagram in product diagram
     \renewcommand{\pmdraw at diagSep}{#1}%
 }
+\define at key{pmdraw at diagram}{vertex sep}{% Sets vertical separation between bottom row of top diagram and top row of bottom diagram in product diagram not for added edges
+    \renewcommand{\pmdraw at vertexSep}{#1}%
+}
 \define at key{pmdraw at diagram}{edges added}{% Sets the draw options for drawing of added edges in product diagram
     \renewcommand{\pmdraw at drawAedgesOptions}{#1}%
 }
@@ -551,7 +567,7 @@
             \renewcommand{\pmdraw at ifProdDiag}{0}% Resets flag that diagram is product
             \setcounter{pmdraw at ifDiagWDotsFirst}{1}% Reset if drawing first brick of diagram
             \setcounter{pmdraw at brickShift}{0}% Reset shifting of individual bricks
-            \begin{scope}[shift={(0,-\pmdraw at diagSep-\pmdraw at rowSep)}]% Shift coordinates to be underneath top diagram
+            \begin{scope}[shift={(0,-\pmdraw at diagSep-\pmdraw at rowSep-\pmdraw at vertexSep)}]% Shift coordinates to be underneath top diagram
                 \pmdraw at bricksLoop% Commences loop for each brick to be drawn
                 #4%
                 \pmdEmpty% Terminates loop
@@ -581,7 +597,7 @@
                 \renewcommand{\pmdraw at ifProdDiag}{0}% Resets flag that diagram is products
                 \setcounter{pmdraw at ifDiagWDotsFirst}{1}% Reset if drawing first brick of diagram
                 \setcounter{pmdraw at brickShift}{0}% Reset shifting of individual bricks
-                \begin{scope}[shift={(0,-\pmdraw at diagSep-\pmdraw at rowSep)}]% Shift coordinates to be underneath top diagram
+                \begin{scope}[shift={(0,-\pmdraw at diagSep-\pmdraw at rowSep-\pmdraw at vertexSep)}]% Shift coordinates to be underneath top diagram
                     \pmdraw at bricksLoop% Commences loop for each brick to be drawn
                     #4%
                     \pmdEmpty% Terminates loop



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