summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-04-10 03:00:55 +0000
committerNorbert Preining <norbert@preining.info>2024-04-10 03:00:55 +0000
commitf58130da9ab2f6181b0b2ca4e02895b11d902e20 (patch)
tree3e7d142983aab069b10f920bb36a95b9fb1af620 /graphics
parenteb49829734b61c8d5a80ff94393e6c28739ee969 (diff)
CTAN sync 202404100300
Diffstat (limited to 'graphics')
-rw-r--r--graphics/pmdraw/README.md8
-rw-r--r--graphics/pmdraw/pmdraw.pdfbin377618 -> 384283 bytes
-rw-r--r--graphics/pmdraw/pmdraw.sty54
-rw-r--r--graphics/pmdraw/pmdraw.tex258
4 files changed, 252 insertions, 68 deletions
diff --git a/graphics/pmdraw/README.md b/graphics/pmdraw/README.md
index bf3990436a..dd9954a495 100644
--- a/graphics/pmdraw/README.md
+++ b/graphics/pmdraw/README.md
@@ -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 @@ README V1.2 2024-01-10
|``````````````|MF|````````````|
|``````````````|MF|````````````|
|``````````````|MF|````````````|
-|3````````````````````````````4|
+|1````````````````````````````3|
*------------------------------*
-->
diff --git a/graphics/pmdraw/pmdraw.pdf b/graphics/pmdraw/pmdraw.pdf
index de0d091292..4809713987 100644
--- a/graphics/pmdraw/pmdraw.pdf
+++ b/graphics/pmdraw/pmdraw.pdf
Binary files differ
diff --git a/graphics/pmdraw/pmdraw.sty b/graphics/pmdraw/pmdraw.sty
index 20d8bad74b..0cfa1f2709 100644
--- a/graphics/pmdraw/pmdraw.sty
+++ b/graphics/pmdraw/pmdraw.sty
@@ -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@drawDots\pmdraw@drawDotsDefault% Draws dots between bricks at (#1,#2)
+\newcommand{\pmdraw@drawEdgeDrawOptions}{}% Draw options for edge
+
\newcommand{\pmdraw@drawLabelBDrawOptions}{}% Draw options for label of a vertex in bottom row
\newcommand{\pmdraw@drawLabelBNodeOptions}{}% Node options for label of a vertex in bottom row
\newcommand{\pmdraw@drawLabelBottomDefault}[3]{% For bottom row, draws the label #3 for a vertex at (#1,#2) - DEFAULT
@@ -102,36 +104,39 @@
\newcommand{\pmdraw@drawLedgesDrawOptions}{}% Draw options for lower non-transversal edges
\newcommand{\pmdraw@drawLedgesDrawDefault}[2]{% Draws lower non-transversal edge from #1 vertex to #2 vertex, assumes #1<#2 - DEFAULT
- \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptions] (#1,0) arc (180:90:\pmdraw{edgeHeight});% Draw left arch
- \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptions] (#1+\pmdraw{edgeHeight},\pmdraw{edgeHeight}) -- (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight});% Draw straight line
- \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptions] (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight}) arc (90:0:\pmdraw{edgeHeight});% Draw right arc
+ \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1,0) arc (180:90:\pmdraw{edgeHeight});% Draw left arch
+ \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1+\pmdraw{edgeHeight},\pmdraw{edgeHeight}) -- (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight});% Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight}) arc (90:0:\pmdraw{edgeHeight});% Draw right arc
+ \renewcommand{\pmdraw@drawEdgeDrawOptions}{}% Reset draw options for edge
}
\let\pmdraw@drawLedgesDraw\pmdraw@drawLedgesDrawDefault% Draws lower non-transversal edge from #1 vertex to #2 vertex, assumes #1<#2
\newcommand{\pmdraw@drawTedgesDrawOptions}{}% Draw options for transversal edges
\newcommand{\pmdraw@drawTedgesDrawDefault}[2]{% Draws transversal edge from #1 vertex in top row to #2 vertex in bottom row - DEFAULT
\ifnum\pmdraw@ifTedgeHorizontal=0% If drawing a straight line edge
- \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions] (#1,\pmdraw@rowSep) -- (#2,0);% Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1,\pmdraw@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@drawTedgesDrawOptions] (#2,0) arc (180:90:\pmdraw{Tlevel});% Draw bottom arch
- \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions] (#2+\pmdraw{Tlevel},\pmdraw{Tlevel}) -- (#1-\pmdraw@rowSep+\pmdraw{Tlevel}, \pmdraw{Tlevel});% Draw straight line
- \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions] (#1-\pmdraw@rowSep+\pmdraw{Tlevel},\pmdraw{Tlevel}) arc (270:360:{\pmdraw@rowSep-\pmdraw{Tlevel}});% Draw top arc
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#2,0) arc (180:90:\pmdraw{Tlevel});% Draw bottom arch
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#2+\pmdraw{Tlevel},\pmdraw{Tlevel}) -- (#1-\pmdraw@rowSep+\pmdraw{Tlevel}, \pmdraw{Tlevel});% Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1-\pmdraw@rowSep+\pmdraw{Tlevel},\pmdraw{Tlevel}) arc (270:360:{\pmdraw@rowSep-\pmdraw{Tlevel}});% Draw top arc
\else% If edge goes from top left to bottom right
- \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions] (#2,0) arc (0:90:\pmdraw{Tlevel});% Draw bottom arch
- \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions] (#2-\pmdraw{Tlevel},\pmdraw{Tlevel}) -- (#1+\pmdraw@rowSep-\pmdraw{Tlevel}, \pmdraw{Tlevel});% Draw straight line
- \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions] (#1+\pmdraw@rowSep-\pmdraw{Tlevel},\pmdraw{Tlevel}) arc (270:180:{\pmdraw@rowSep-\pmdraw{Tlevel}});% Draw top arc
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#2,0) arc (0:90:\pmdraw{Tlevel});% Draw bottom arch
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#2-\pmdraw{Tlevel},\pmdraw{Tlevel}) -- (#1+\pmdraw@rowSep-\pmdraw{Tlevel}, \pmdraw{Tlevel});% Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1+\pmdraw@rowSep-\pmdraw{Tlevel},\pmdraw{Tlevel}) arc (270:180:{\pmdraw@rowSep-\pmdraw{Tlevel}});% Draw top arc
\fi%
\renewcommand{\pmdraw@ifTedgeHorizontal}{0}% Reset flag to default
\fi%
+ \renewcommand{\pmdraw@drawEdgeDrawOptions}{}% Reset draw options for edge
}
\let\pmdraw@drawTedgesDraw\pmdraw@drawTedgesDrawDefault% Draws transversal edge from #1 vertex in top row to #2 vertex in bottom row
\newcommand{\pmdraw@drawUedgesDrawOptions}{}% Draw options for upper non-transversal edges
\newcommand{\pmdraw@drawUedgesDrawDefault}[2]{% Draws upper non-transversal edge from #1 vertex to #2 vertex, assumes #1<#2 - DEFAULT
- \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptions] (#1,\pmdraw@rowSep) arc (180:270:\pmdraw{edgeHeight});% Draw left arch
- \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptions] (#1+\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight}) -- (#2-\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight});% Draw straight line
- \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptions] (#2-\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight}) arc (270:360:\pmdraw{edgeHeight});% Draw right arc
+ \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1,\pmdraw@rowSep) arc (180:270:\pmdraw{edgeHeight});% Draw left arch
+ \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1+\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight}) -- (#2-\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight});% Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#2-\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight}) arc (270:360:\pmdraw{edgeHeight});% Draw right arc
+ \renewcommand{\pmdraw@drawEdgeDrawOptions}{}% Reset draw options for edge
}
\let\pmdraw@drawUedgesDraw\pmdraw@drawUedgesDrawDefault% Draws upper non-transversal edge from #1 vertex to #2 vertex, assumes #1<#2
@@ -166,6 +171,7 @@
\renewcommand{\pmdraw@ifDiagWDots}{0}% Reset if drawing a diagram with dots
\renewcommand{\pmdraw@rowSep}{2}% Resets vertical separation between rows of vertices in brick
\renewcommand{\pmdraw@tikz}{}% Resets tikz options
+ \renewcommand{\pmdraw@vertexSep}{0}% Resets vertical space between product diagrams
\setcounter{pmdraw@blankB}{0}% Resets number of blank vertices in bottom row to the left of brick
\setcounter{pmdraw@blankT}{0}% Resets number of blank vertices in top row to the left of brick
\setcounter{pmdraw@bottomShift}{0}% Resets shift on right end of bottom row of brick
@@ -177,6 +183,8 @@
\newcommand{\pmdraw@tikz}{}% Tikz options
+\newcommand{\pmdraw@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,17 +407,22 @@
\define@key{pmdraw@NTedges}{height}{% Sets manual height of non-transversal edge
\renewcommand{\pmdraw@NTedgesHeight}{#1}%
}
+\define@key{pmdraw@NTedges}{edge draw}{% Sets the draw options for drawing of edge
+ \renewcommand{\pmdraw@drawEdgeDrawOptions}{#1}%
+}
\define@key{pmdraw@NTedges}{options}{% Sets the draw command of non-transversal edge
\renewcommand{\pmdraw@drawUedgesDraw}[2]{#1}%
\renewcommand{\pmdraw@drawLedgesDraw}[2]{#1}%
}
-
\define@key{pmdraw@Tedges}{height}{% Sets manual height of transversal edge
\tikzmath{%
\pmdraw{Tlevel} = #1;%
}%
\renewcommand{\pmdraw@ifTedgeHorizontal}{1}% Flags manual height
}
+\define@key{pmdraw@Tedges}{edge draw}{% Sets the draw options for drawing of edge
+ \renewcommand{\pmdraw@drawEdgeDrawOptions}{#1}%
+}
\define@key{pmdraw@Tedges}{options}{% Sets the draw command of transversal edge
\renewcommand{\pmdraw@drawTedgesDraw}[2]{#1}%
}
@@ -466,6 +479,9 @@
\define@key{pmdraw@diagram}{diagram sep}{% Sets vertical separation between bottom row of top diagram and top row of bottom diagram in product diagram
\renewcommand{\pmdraw@diagSep}{#1}%
}
+\define@key{pmdraw@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@vertexSep}{#1}%
+}
\define@key{pmdraw@diagram}{edges added}{% Sets the draw options for drawing of added edges in product diagram
\renewcommand{\pmdraw@drawAedgesOptions}{#1}%
}
@@ -551,7 +567,7 @@
\renewcommand{\pmdraw@ifProdDiag}{0}% Resets flag that diagram is product
\setcounter{pmdraw@ifDiagWDotsFirst}{1}% Reset if drawing first brick of diagram
\setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks
- \begin{scope}[shift={(0,-\pmdraw@diagSep-\pmdraw@rowSep)}]% Shift coordinates to be underneath top diagram
+ \begin{scope}[shift={(0,-\pmdraw@diagSep-\pmdraw@rowSep-\pmdraw@vertexSep)}]% Shift coordinates to be underneath top diagram
\pmdraw@bricksLoop% Commences loop for each brick to be drawn
#4%
\pmdEmpty% Terminates loop
@@ -581,7 +597,7 @@
\renewcommand{\pmdraw@ifProdDiag}{0}% Resets flag that diagram is products
\setcounter{pmdraw@ifDiagWDotsFirst}{1}% Reset if drawing first brick of diagram
\setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks
- \begin{scope}[shift={(0,-\pmdraw@diagSep-\pmdraw@rowSep)}]% Shift coordinates to be underneath top diagram
+ \begin{scope}[shift={(0,-\pmdraw@diagSep-\pmdraw@rowSep-\pmdraw@vertexSep)}]% Shift coordinates to be underneath top diagram
\pmdraw@bricksLoop% Commences loop for each brick to be drawn
#4%
\pmdEmpty% Terminates loop
diff --git a/graphics/pmdraw/pmdraw.tex b/graphics/pmdraw/pmdraw.tex
index d5ce4ee4ea..bba50fdd59 100644
--- a/graphics/pmdraw/pmdraw.tex
+++ b/graphics/pmdraw/pmdraw.tex
@@ -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@slmail.me}}
\maketitle
@@ -78,7 +78,8 @@ I would like this package to be as perfect as it can be but I will need your hel
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 @@ specifies the number of blank vertices to the left of the top (bottom) row of th
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 @@ specifies a manually set horizontal height of a non-transversal edges. Default i
\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@drawUedgesDrawOptions]
- (#1,\pmdraw@rowSep) arc (180:270:\pmdraw{edgeHeight}); % Draw left arch
- \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptions]
- (#1+\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight})
- -- (#2-\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight}); % Draw straight line
- \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptions]
- (#2-\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight})
- arc (270:360:\pmdraw{edgeHeight}); % Draw right arc
+ \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1,\pmdraw@rowSep) arc (180:270:\pmdraw{edgeHeight});% Draw left arch
+ \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1+\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight}) -- (#2-\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight});% Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#2-\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight}) arc (270:360:\pmdraw{edgeHeight});% Draw right arc
+ \renewcommand{\pmdraw@drawEdgeDrawOptions}{}% Reset draw options for edge
\end{verbatim}
and for a lower non-transversal
\begin{verbatim}
- \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptions]
- (#1,0) arc (180:90:\pmdraw{edgeHeight}); % Draw left arch
- \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptions]
- (#1+\pmdraw{edgeHeight},\pmdraw{edgeHeight})
- -- (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight}); % Draw straight line
- \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptions]
- (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight})
- arc (90:0:\pmdraw{edgeHeight}); % Draw right arc
+ \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1,0) arc (180:90:\pmdraw{edgeHeight});% Draw left arch
+ \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1+\pmdraw{edgeHeight},\pmdraw{edgeHeight}) -- (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight});% Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight}) arc (90:0:\pmdraw{edgeHeight});% Draw right arc
+ \renewcommand{\pmdraw@drawEdgeDrawOptions}{}% Reset draw options for edge
\end{verbatim}
An example use is
\begin{center}
@@ -1993,34 +2024,78 @@ draws transversal edges with a horizontal component and specifies the manually s
}
\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@ifTedgeHorizontal=0 % If drawing a straight line edge
- \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions]
- (#1,\pmdraw@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@drawTedgesDrawOptions]
- (#2,0) arc (180:90:\pmdraw{Tlevel}); % Draw bottom arch
- \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions]
- (#2+\pmdraw{Tlevel},\pmdraw{Tlevel})
- -- (#1-\pmdraw@rowSep+\pmdraw{Tlevel}, \pmdraw{Tlevel}); % Draw straight line
- \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions]
- (#1-\pmdraw@rowSep+\pmdraw{Tlevel},\pmdraw{Tlevel})
- arc (270:360:{\pmdraw@rowSep-\pmdraw{Tlevel}}); % Draw top arc
- \else % If edge goes from top left to bottom right
- \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions]
- (#2,0) arc (0:90:\pmdraw{Tlevel}); % Draw bottom arch
- \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions]
- (#2-\pmdraw{Tlevel},\pmdraw{Tlevel})
- -- (#1+\pmdraw@rowSep-\pmdraw{Tlevel}, \pmdraw{Tlevel}); % Draw straight line
- \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions]
- (#1+\pmdraw@rowSep-\pmdraw{Tlevel},\pmdraw{Tlevel})
- arc (270:180:{\pmdraw@rowSep-\pmdraw{Tlevel}}); % Draw top arc
+ \ifnum\pmdraw@ifTedgeHorizontal=0% If drawing a straight line edge
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#1,\pmdraw@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@drawTedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#2,0) arc
+ (180:90:\pmdraw{Tlevel});% Draw bottom arch
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#2+\pmdraw{Tlevel},\pmdraw{Tlevel}) --
+ (#1-\pmdraw@rowSep+\pmdraw{Tlevel}, \pmdraw{Tlevel});% Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#1-\pmdraw@rowSep+\pmdraw{Tlevel},\pmdraw{Tlevel}) arc
+ (270:360:{\pmdraw@rowSep-\pmdraw{Tlevel}});% Draw top arc
+ \else% If edge goes from top left to bottom right
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#2,0) arc (0:90:\pmdraw{Tlevel});% Draw bottom arch
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#2-\pmdraw{Tlevel},\pmdraw{Tlevel}) --
+ (#1+\pmdraw@rowSep-\pmdraw{Tlevel}, \pmdraw{Tlevel});% Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#1+\pmdraw@rowSep-\pmdraw{Tlevel},\pmdraw{Tlevel}) arc
+ (270:180:{\pmdraw@rowSep-\pmdraw{Tlevel}});% Draw top arc
\fi%
- \renewcommand{\pmdraw@ifTedgeHorizontal}{0} % Reset flag to default
+ \renewcommand{\pmdraw@ifTedgeHorizontal}{0}% Reset flag to default
\fi%
+ \renewcommand{\pmdraw@drawEdgeDrawOptions}{}% Reset draw options for edge
\end{verbatim}
An example use is
\begin{center}
@@ -2686,7 +2761,7 @@ For the drawing order of a brick see Section~\ref{sec: order}.
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 @@ specifies the vertical separation between the bottom row of vertices in top diag
}
\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 @@ The following are some of the aims for the future for this package:
\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}