texlive[72486] Master/texmf-dist: pmdraw (7oct24)
commits+mseven at tug.org
commits+mseven at tug.org
Tue Oct 8 03:01:43 CEST 2024
Revision: 72486
https://tug.org/svn/texlive?view=revision&revision=72486
Author: mseven
Date: 2024-10-08 03:01:42 +0200 (Tue, 08 Oct 2024)
Log Message:
-----------
pmdraw (7oct24)
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-10-07 23:44:34 UTC (rev 72485)
+++ trunk/Master/texmf-dist/doc/latex/pmdraw/README.md 2024-10-08 01:01:42 UTC (rev 72486)
@@ -1,12 +1,12 @@
pmdraw
======
-*README V1.4 2024-06-02*
+*README V1.5 2024-10-07*
<!--
*------------------------------*
-|6````````````````````````````5|
+|4````````````````````````````1|
|`````____````____`````````````|
|````|MFMF\ /MFMF|````````````|
|````|MF|MF\/MF|MF|````````````|
@@ -18,7 +18,7 @@
|``````````````|MF|````````````|
|``````````````|MF|````````````|
|``````````````|MF|````````````|
-|4````````````````````````````1|
+|5````````````````````````````7|
*------------------------------*
-->
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-10-07 23:44:34 UTC (rev 72485)
+++ trunk/Master/texmf-dist/doc/latex/pmdraw/pmdraw.tex 2024-10-08 01:01:42 UTC (rev 72486)
@@ -1,7 +1,7 @@
\documentclass{ltxdoc}
% *------------------------------*
-% |6````````````````````````````2|
+% |2````````````````````````````3|
% |`````____````____`````````````|
% |````|MFMF\ /MFMF|````````````|
% |````|MF|MF\/MF|MF|````````````|
@@ -13,7 +13,7 @@
% |``````````````|MF|````````````|
% |``````````````|MF|````````````|
% |``````````````|MF|````````````|
-% |3````````````````````````````0|
+% |6````````````````````````````2|
% *------------------------------*
\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.4, 2024-06-02.}}
+ corresponds to \textsf{pmdraw}~v1.5, 2024-10-07.}}
\author{Matthias Fresacher \\ \texttt{matthias.ypg37 at slmail.me}}
\maketitle
@@ -86,7 +86,7 @@
The following are a list of known problems or incompatibilities that are not scheduled to be resolved anytime soon:
\begin{enumerate}
- \item None at the moment
+ \item Whilst not strictly an incompatibility, when using \texttt{beamer}, frames have to be \texttt{fragile}.
\end{enumerate}
\section{Usage}
@@ -569,6 +569,221 @@
}
\end{center}
+\DescribeMacro{\pmdProductTriple}
+draws three diagrams on top of each other as is the case during multiplication or concatenation of three diagrams and has the syntax
+\begin{verbatim}
+\pmdProductTriple[<options>]{<ATedges>}{<ABedges>}{<Tbricks>}}{<Mbricks>}{<Bbricks>}
+\end{verbatim}
+where
+\DescribeMacro{diagram/<options>}
+the \texttt{<options>} are described in Section~\ref{sec: diagram/options}.
+
+\DescribeMacro{<ATedges>}\DescribeMacro{<ABedges>}
+is a list of edges that are added during the concatenation process. \texttt{<ATedges>} is the list of edges between the top and middle diagrams, whilst \texttt{<ABedges>} is the list of edges between the middle and bottom diagrams. An added edge has two components, namely \texttt{<ATedges>~=~\{<Svertex>\}\{<Tvertex>\}} and \texttt{<ABedges>~=~\{<Svertex>\}\{<Tvertex>\}}, where \texttt{\{<Svertex>\}} is the starting vertex and \texttt{\{<Tvertex>\}} is the terminating vertex of the collection of added edges. Both \texttt{\{<Svertex>\}} and \texttt{\{<Tvertex>\}} are a \( x \)-coordinate and it is assumed that \( \texttt{\{<Svertex>\}} < \texttt{\{<Tvertex>\}} \).
+
+\DescribeMacro{<Tbricks>}
+is a list of bricks that correspond to the top diagram, with each brick enclosed in curly brackets.
+
+\DescribeMacro{<Mbricks>}
+is a list of bricks that correspond to the top diagram, with each brick enclosed in curly brackets.
+
+\DescribeMacro{<Bbricks>}
+is a list of bricks that correspond to the bottom diagram, with each brick enclosed in curly brackets.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdProductTriple{ % Top added edges
+ {1}{5}
+ {7}{8}
+}{ % Bottom added edges
+ {1}{5}
+ {7}{8}
+}{ % 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}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }
+}{ % Middle diagram
+ % Continued on next page ...
+\end{verbatim}
+ \end{minipage}
+ \end{minipage}
+\end{center}
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+ % ... continued from previous page (note repeated line)
+}{ % Middle diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{3}
+ {3}{2}
+ {4}{5}
+ {5}{4}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{2}
+ {2}{1}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ {1}{2}
+ }{ % Lower non-transversal edges
+ {1}{2}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdProductTriple{ % Top added edges
+ {1}{5}
+ {7}{8}
+}{ % Bottom added edges
+ {1}{5}
+ {7}{8}
+}{ % 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}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }
+}{ % Middle diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{3}
+ {3}{2}
+ {4}{5}
+ {5}{4}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{2}
+ {2}{1}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ {1}{2}
+ }{ % Lower non-transversal edges
+ {1}{2}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}
+\end{center}
+
\subsection{Brick options} \label{sec: brick/options}
The following are all of the keys that are available for bricks.
@@ -1321,7 +1536,7 @@
\end{center}
\DescribeMacro{vertices top uncover}\DescribeMacro{vertices bottom uncover}
-allows for all of the top or bottom vertices to be uncovered in a \texttt{beamer} presentation using the command \verb`\uncover<n->{text}`. Simply passes the slide uncover information \verb`<n->` to the embedded \texttt{uncover} command within the vertex drawing macros. This uncover will also apply to the labels of that row (top or bottom) of vertices. To only uncover a selected number of vertices, use seperate bricks. The default is~\texttt{1-}.
+allows for all of the top or bottom vertices to be uncovered in a \texttt{beamer} presentation\footnote{Make sure to use a \texttt{fragile} frame.} using the command \verb`\uncover<n->{text}`. Simply passes the slide uncover information \verb`<n->` to the embedded \texttt{uncover} command within the vertex drawing macros. This uncover will also apply to the labels of that row (top or bottom) of vertices. To only uncover a selected number of vertices, use seperate bricks. The default is~\texttt{1-}.
\begin{center}
\begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
\begin{minipage}[c]{0.4\linewidth}
@@ -1712,7 +1927,7 @@
\end{center}
\DescribeMacro{edges uncover}
-allows for all edges to be uncovered in a \texttt{beamer} presentation using the command \verb`\uncover<n->{text}`. Simply passes the slide uncover information \verb`<n->` to the embedded \texttt{uncover} command within the edge drawing macros. The default is~\texttt{1-}.
+allows for all edges to be uncovered in a \texttt{beamer} presentation\footnote{Make sure to use a \texttt{fragile} frame.} using the command \verb`\uncover<n->{text}`. Simply passes the slide uncover information \verb`<n->` to the embedded \texttt{uncover} command within the edge drawing macros. The default is~\texttt{1-}.
\begin{center}
\begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
\begin{minipage}[c]{0.4\linewidth}
@@ -2283,7 +2498,7 @@
\end{center}
\DescribeMacro{uncover}
-allows for that edge to be uncovered in a \texttt{beamer} presentation using the command \verb`\uncover<n->{text}`. Simply passes the slide uncover information \verb`<n->` to the embedded \texttt{uncover} command within the edge drawing macros. This uncover is nested inside the \texttt{edges uncover} and hence the limitations of nested uncovers are present here. For example, an individual edge will not uncover until the \texttt{edges uncover} has been uncovered. In such instances only use individual uncovers for each edge. The default is~\texttt{1-}.
+allows for that edge to be uncovered in a \texttt{beamer} presentation\footnote{Make sure to use a \texttt{fragile} frame.} using the command \verb`\uncover<n->{text}`. Simply passes the slide uncover information \verb`<n->` to the embedded \texttt{uncover} command within the edge drawing macros. This uncover is nested inside the \texttt{edges uncover} and hence the limitations of nested uncovers are present here. For example, an individual edge will not uncover until the \texttt{edges uncover} has been uncovered. In such instances only use individual uncovers for each edge. The default is~\texttt{1-}.
\begin{center}
\begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
\begin{minipage}[c]{0.4\linewidth}
@@ -2589,7 +2804,7 @@
\end{center}
\DescribeMacro{uncover}
-allows for that edge to be uncovered in a \texttt{beamer} presentation using the command \verb`\uncover<n->{text}`. Simply passes the slide uncover information \verb`<n->` to the embedded \texttt{uncover} command within the edge drawing macros. This uncover is nested inside the \texttt{edges uncover} and hence the limitations of nested uncovers are present here. For example, an individual edge will not uncover until the \texttt{edges uncover} has been uncovered. In such instances only use individual uncovers for each edge. The default is~\texttt{1-}.
+allows for that edge to be uncovered in a \texttt{beamer} presentation\footnote{Make sure to use a \texttt{fragile} frame.} using the command \verb`\uncover<n->{text}`. Simply passes the slide uncover information \verb`<n->` to the embedded \texttt{uncover} command within the edge drawing macros. This uncover is nested inside the \texttt{edges uncover} and hence the limitations of nested uncovers are present here. For example, an individual edge will not uncover until the \texttt{edges uncover} has been uncovered. In such instances only use individual uncovers for each edge. The default is~\texttt{1-}.
\begin{center}
\begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
\begin{minipage}[c]{0.4\linewidth}
@@ -3203,7 +3418,7 @@
For the drawing order of a brick see Section~\ref{sec: order}.
-\subsubsection{For product diagrams only}
+\subsubsection{For product diagrams only} \label{sec: prod only}
The following options can only be used for product diagrams (\verb`\pmdProduct`).
@@ -3554,7 +3769,7 @@
\end{center}
\DescribeMacro{edges added uncover}
-allows for the added edges to be uncovered in a \texttt{beamer} presentation using the command \verb`\uncover<n->{text}`. Simply passes the slide uncover information \verb`<n->` to the embedded \texttt{uncover} command within the added edge drawing macros. The default is~\texttt{1-}.
+allows for the added edges to be uncovered in a \texttt{beamer} presentation\footnote{Make sure to use a \texttt{fragile} frame.} using the command \verb`\uncover<n->{text}`. Simply passes the slide uncover information \verb`<n->` to the embedded \texttt{uncover} command within the added edge drawing macros. The default is~\texttt{1-}.
\begin{center}
\begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
\begin{minipage}[c]{0.4\linewidth}
@@ -3661,6 +3876,7 @@
\item Create \texttt{shift} key for edges that shifts horizontal position.
\item Decouple the uncover of labels from \texttt{vertices top uncover}/\texttt{vertices bottom uncover}.
\item Decouple the phantom of labels from \texttt{vertices top phantom}/\texttt{vertices bottom phantom}.
+ \item For all of the keys in Section~\ref{sec: prod only}, create a top and bottom version to be used in \texttt{pmdProductTriple}.
\end{enumerate}
\section{Examples}
Modified: trunk/Master/texmf-dist/tex/latex/pmdraw/pmdraw.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pmdraw/pmdraw.sty 2024-10-07 23:44:34 UTC (rev 72485)
+++ trunk/Master/texmf-dist/tex/latex/pmdraw/pmdraw.sty 2024-10-08 01:01:42 UTC (rev 72486)
@@ -1,8 +1,8 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{pmdraw}[2024-06-02 v1.4 pmdraw]
+\ProvidesPackage{pmdraw}[2024-10-07 v1.5 pmdraw]
% *------------------------------*
-% |7````````````````````````````4|
+% |9````````````````````````````5|
% |`````____````____`````````````|
% |````|MFMF\ /MFMF|````````````|
% |````|MF|MF\/MF|MF|````````````|
@@ -14,7 +14,7 @@
% |``````````````|MF|````````````|
% |``````````````|MF|````````````|
% |``````````````|MF|````````````|
-% |3````````````````````````````4|
+% |3````````````````````````````1|
% *------------------------------*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -840,6 +840,98 @@
\pmdraw at reset% Resets user keys and other flags to default values
}
+\newcommand{\pmdProductTriple}[6][]{% Draws triple product diagram
+ % #1 Options
+ % #2 List of top added edges
+ % #3 List of bottom added edges
+ % #4 Top diagram as list of bricks
+ % #5 Middle diagram as list of bricks
+ % #6 Bottom diagram as list of bricks
+ \setkeys{pmdraw at diagram}{#1}% Processes options
+ \ifmmode% If drawing diagram in a maths equation
+ \,% Add space
+ \ifnum\pmdraw at ifGrid=1% If displaying helper grid
+ \begin{tikzpicture}[scale=.5,baseline=-1.0975cm,show grid=true,apply style/.expand once=\pmdraw at tikz]%
+ \else% If not displaying helper grid
+ \begin{tikzpicture}[scale=.5,baseline=-1.0975cm,apply style/.expand once=\pmdraw at tikz]%
+ \fi%
+ \pmdraw at hookBeforeDiagram% Hook before drawing diagrams
+ \pmdraw at AedgesLoop% Commences loop for top added edges to be drawn
+ #2%
+ \pmdEmpty% Terminates loop
+ \renewcommand{\pmdraw at ifDiagWDots}{1}% Flags that diagram has dot
+ \renewcommand{\pmdraw at ifProdDiag}{1}% Flags that diagram is product
+ \setcounter{pmdraw at brickShift}{0}% Reset shifting of individual bricks
+ \pmdraw at bricksLoop% Commences loop for each top brick to be drawn
+ #4%
+ \pmdEmpty% Terminates loop
+ \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-\pmdraw at vertexSep)}]% Shift coordinates to be underneath top diagram
+ \pmdraw at AedgesLoop% Commences loop for bottom added edges to be drawn
+ #3%
+ \pmdEmpty% Terminates loop
+ \pmdraw at bricksLoop% Commences loop for each middle brick to be drawn
+ #5%
+ \pmdEmpty% Terminates loop
+ \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-\pmdraw at vertexSep)}]% Shift coordinates to be underneath middle diagram
+ \pmdraw at bricksLoop% Commences loop for each bottom brick to be drawn
+ #6%
+ \pmdEmpty% Terminates loop
+ \setcounter{pmdraw at brickShift}{0}% Reset shifting of individual bricks
+ \end{scope}%
+ \end{scope}%
+ \renewcommand{\pmdraw at ifDiagWDots}{0}% Reset if drawing a diagram with dots
+ \pmdraw at hookAfterDiagram% Hook after drawing diagrams
+ \end{tikzpicture}%
+ \,% Add space
+ \else% If drawing diagram in normal text
+ \raisebox{2cm}{% Raise diagram so bottom row is on text baseline
+ \ifnum\pmdraw at ifGrid=1% If displaying helper grid
+ \begin{tikzpicture}[scale=.5,baseline=-1.095cm,show grid=true,apply style/.expand once=\pmdraw at tikz]%
+ \else% If not displaying helper grid
+ \begin{tikzpicture}[scale=.5,baseline=-1.095cm,apply style/.expand once=\pmdraw at tikz]%
+ \fi%
+ \pmdraw at hookBeforeDiagram% Hook before drawing diagrams
+ \pmdraw at AedgesLoop% Commences loop for added edges to be drawn
+ #2%
+ \pmdEmpty% Terminates loop
+ \renewcommand{\pmdraw at ifDiagWDots}{1}% Flags that diagram has dot
+ \renewcommand{\pmdraw at ifProdDiag}{1}% Flags that diagram is product
+ \setcounter{pmdraw at brickShift}{0}% Reset shifting of individual bricks
+ \pmdraw at bricksLoop% Commences loop for each brick to be drawn
+ #4%
+ \pmdEmpty% Terminates loop
+ \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-\pmdraw at vertexSep)}]% Shift coordinates to be underneath top diagram
+ \pmdraw at AedgesLoop% Commences loop for bottom added edges to be drawn
+ #3%
+ \pmdEmpty% Terminates loop
+ \pmdraw at bricksLoop% Commences loop for each middle brick to be drawn
+ #5%
+ \pmdEmpty% Terminates loop
+ \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-\pmdraw at vertexSep)}]% Shift coordinates to be underneath middle diagram
+ \pmdraw at bricksLoop% Commences loop for each bottom brick to be drawn
+ #6%
+ \pmdEmpty% Terminates loop
+ \setcounter{pmdraw at brickShift}{0}% Reset shifting of individual bricks
+ \end{scope}%
+ \end{scope}%
+ \renewcommand{\pmdraw at ifDiagWDots}{0}% Reset if drawing a diagram with dots
+ \pmdraw at hookAfterDiagram% Hook after drawing diagrams
+ \end{tikzpicture}%
+ }%
+ \fi%
+ \pmdraw at reset% Resets user keys and other flags to default values
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% For loop commands %
More information about the tex-live-commits
mailing list.