From db41b86c00901e5b59926666e1dd4e4b24b219d6 Mon Sep 17 00:00:00 2001 From: Max Chernoff Date: Tue, 8 Oct 2024 01:01:42 +0000 Subject: pmdraw (7oct24) git-svn-id: svn://tug.org/texlive/trunk@72486 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/pmdraw/README.md | 6 +- Master/texmf-dist/doc/latex/pmdraw/pmdraw.pdf | Bin 397582 -> 420095 bytes Master/texmf-dist/doc/latex/pmdraw/pmdraw.tex | 236 ++++++++++++++++++++++++-- Master/texmf-dist/tex/latex/pmdraw/pmdraw.sty | 98 ++++++++++- 4 files changed, 324 insertions(+), 16 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/pmdraw/README.md b/Master/texmf-dist/doc/latex/pmdraw/README.md index dfc3e2924dd..24bdba4e67a 100644 --- a/Master/texmf-dist/doc/latex/pmdraw/README.md +++ b/Master/texmf-dist/doc/latex/pmdraw/README.md @@ -1,12 +1,12 @@ pmdraw ====== -*README V1.4 2024-06-02* +*README V1.5 2024-10-07* diff --git a/Master/texmf-dist/doc/latex/pmdraw/pmdraw.pdf b/Master/texmf-dist/doc/latex/pmdraw/pmdraw.pdf index 1cc4de91352..20a7cdf3390 100644 Binary files a/Master/texmf-dist/doc/latex/pmdraw/pmdraw.pdf and b/Master/texmf-dist/doc/latex/pmdraw/pmdraw.pdf differ diff --git a/Master/texmf-dist/doc/latex/pmdraw/pmdraw.tex b/Master/texmf-dist/doc/latex/pmdraw/pmdraw.tex index b4111bcff2c..af516b18e6d 100644 --- a/Master/texmf-dist/doc/latex/pmdraw/pmdraw.tex +++ b/Master/texmf-dist/doc/latex/pmdraw/pmdraw.tex @@ -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@slmail.me}} \maketitle @@ -86,7 +86,7 @@ The following are a list of currently known bugs that will be addressed: 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 @@ is a list of bricks that correspond to the bottom diagram, with each brick enclo } \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[]{}{}{}}{}{} +\end{verbatim} +where +\DescribeMacro{diagram/} +the \texttt{} are described in Section~\ref{sec: diagram/options}. + +\DescribeMacro{}\DescribeMacro{} +is a list of edges that are added during the concatenation process. \texttt{} is the list of edges between the top and middle diagrams, whilst \texttt{} is the list of edges between the middle and bottom diagrams. An added edge has two components, namely \texttt{~=~\{\}\{\}} and \texttt{~=~\{\}\{\}}, where \texttt{\{\}} is the starting vertex and \texttt{\{\}} is the terminating vertex of the collection of added edges. Both \texttt{\{\}} and \texttt{\{\}} are a \( x \)-coordinate and it is assumed that \( \texttt{\{\}} < \texttt{\{\}} \). + +\DescribeMacro{} +is a list of bricks that correspond to the top diagram, with each brick enclosed in curly brackets. + +\DescribeMacro{} +is a list of bricks that correspond to the top diagram, with each brick enclosed in curly brackets. + +\DescribeMacro{} +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 @@ These flags allow for all of the top or bottom vertices to be hidden using the \ \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{text}`. Simply passes the slide uncover information \verb`` 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{text}`. Simply passes the slide uncover information \verb`` 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 @@ This flag allows for all edges to be hidden using the \texttt{phantom} command. \end{center} \DescribeMacro{edges uncover} -allows for all edges to be uncovered in a \texttt{beamer} presentation using the command \verb`\uncover{text}`. Simply passes the slide uncover information \verb`` 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{text}`. Simply passes the slide uncover information \verb`` 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 @@ This flag allows for the edge to be hidden using the \texttt{phantom} command. S \end{center} \DescribeMacro{uncover} -allows for that edge to be uncovered in a \texttt{beamer} presentation using the command \verb`\uncover{text}`. Simply passes the slide uncover information \verb`` 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{text}`. Simply passes the slide uncover information \verb`` 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 @@ This flag allows for the edge to be hidden using the \texttt{phantom} command. S \end{center} \DescribeMacro{uncover} -allows for that edge to be uncovered in a \texttt{beamer} presentation using the command \verb`\uncover{text}`. Simply passes the slide uncover information \verb`` 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{text}`. Simply passes the slide uncover information \verb`` 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 @@ And this is default drawing order for a product diagram: 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 @@ This flag allows for the added edges to be hidden using the \texttt{phantom} com \end{center} \DescribeMacro{edges added uncover} -allows for the added edges to be uncovered in a \texttt{beamer} presentation using the command \verb`\uncover{text}`. Simply passes the slide uncover information \verb`` 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{text}`. Simply passes the slide uncover information \verb`` 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 @@ The following are some of the aims for the future for this package: \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} diff --git a/Master/texmf-dist/tex/latex/pmdraw/pmdraw.sty b/Master/texmf-dist/tex/latex/pmdraw/pmdraw.sty index 36f506b51fa..9819f848938 100644 --- a/Master/texmf-dist/tex/latex/pmdraw/pmdraw.sty +++ b/Master/texmf-dist/tex/latex/pmdraw/pmdraw.sty @@ -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@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@diagram}{#1}% Processes options + \ifmmode% If drawing diagram in a maths equation + \,% Add space + \ifnum\pmdraw@ifGrid=1% If displaying helper grid + \begin{tikzpicture}[scale=.5,baseline=-1.0975cm,show grid=true,apply style/.expand once=\pmdraw@tikz]% + \else% If not displaying helper grid + \begin{tikzpicture}[scale=.5,baseline=-1.0975cm,apply style/.expand once=\pmdraw@tikz]% + \fi% + \pmdraw@hookBeforeDiagram% Hook before drawing diagrams + \pmdraw@AedgesLoop% Commences loop for top added edges to be drawn + #2% + \pmdEmpty% Terminates loop + \renewcommand{\pmdraw@ifDiagWDots}{1}% Flags that diagram has dot + \renewcommand{\pmdraw@ifProdDiag}{1}% Flags that diagram is product + \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks + \pmdraw@bricksLoop% Commences loop for each top brick to be drawn + #4% + \pmdEmpty% Terminates loop + \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-\pmdraw@vertexSep)}]% Shift coordinates to be underneath top diagram + \pmdraw@AedgesLoop% Commences loop for bottom added edges to be drawn + #3% + \pmdEmpty% Terminates loop + \pmdraw@bricksLoop% Commences loop for each middle brick to be drawn + #5% + \pmdEmpty% Terminates loop + \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-\pmdraw@vertexSep)}]% Shift coordinates to be underneath middle diagram + \pmdraw@bricksLoop% Commences loop for each bottom brick to be drawn + #6% + \pmdEmpty% Terminates loop + \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks + \end{scope}% + \end{scope}% + \renewcommand{\pmdraw@ifDiagWDots}{0}% Reset if drawing a diagram with dots + \pmdraw@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@ifGrid=1% If displaying helper grid + \begin{tikzpicture}[scale=.5,baseline=-1.095cm,show grid=true,apply style/.expand once=\pmdraw@tikz]% + \else% If not displaying helper grid + \begin{tikzpicture}[scale=.5,baseline=-1.095cm,apply style/.expand once=\pmdraw@tikz]% + \fi% + \pmdraw@hookBeforeDiagram% Hook before drawing diagrams + \pmdraw@AedgesLoop% Commences loop for added edges to be drawn + #2% + \pmdEmpty% Terminates loop + \renewcommand{\pmdraw@ifDiagWDots}{1}% Flags that diagram has dot + \renewcommand{\pmdraw@ifProdDiag}{1}% Flags that diagram is product + \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks + \pmdraw@bricksLoop% Commences loop for each brick to be drawn + #4% + \pmdEmpty% Terminates loop + \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-\pmdraw@vertexSep)}]% Shift coordinates to be underneath top diagram + \pmdraw@AedgesLoop% Commences loop for bottom added edges to be drawn + #3% + \pmdEmpty% Terminates loop + \pmdraw@bricksLoop% Commences loop for each middle brick to be drawn + #5% + \pmdEmpty% Terminates loop + \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-\pmdraw@vertexSep)}]% Shift coordinates to be underneath middle diagram + \pmdraw@bricksLoop% Commences loop for each bottom brick to be drawn + #6% + \pmdEmpty% Terminates loop + \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks + \end{scope}% + \end{scope}% + \renewcommand{\pmdraw@ifDiagWDots}{0}% Reset if drawing a diagram with dots + \pmdraw@hookAfterDiagram% Hook after drawing diagrams + \end{tikzpicture}% + }% + \fi% + \pmdraw@reset% Resets user keys and other flags to default values +} + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % For loop commands % -- cgit v1.2.3