texlive[49294] Master/texmf-dist: adigraph (1dec18)

commits+karl at tug.org commits+karl at tug.org
Sat Dec 1 23:47:10 CET 2018


Revision: 49294
          http://tug.org/svn/texlive?view=revision&revision=49294
Author:   karl
Date:     2018-12-01 23:47:10 +0100 (Sat, 01 Dec 2018)
Log Message:
-----------
adigraph (1dec18)

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

Modified: trunk/Master/texmf-dist/doc/latex/adigraph/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/adigraph/README.md	2018-12-01 22:46:56 UTC (rev 49293)
+++ trunk/Master/texmf-dist/doc/latex/adigraph/README.md	2018-12-01 22:47:10 UTC (rev 49294)
@@ -17,6 +17,21 @@
 
 Otherwise install the packages with the package manager of your choice.
 
+## Checking the version
+All recent (1.3+) Adigraph versions offer the following command:
+
+```latex
+\AdigraphVersionNumber
+```
+
+If you get an `Undefined control sequence` error you have a version previous to 1.3, you should consider updating it manually.
+
+An approach could be the following:
+
+1. Download the latest version from ctan: [here](https://ctan.org/pkg/adigraph).
+2. Identify the position of the installed adigraph by running `find / -type d -name adigraph`.
+3. Replace the old adigraph.sty with the new adigraph.sty downloaded from ctan.
+
 ### Requiring the package in the document
 Remember to require the package in the document.
 

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

Modified: trunk/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex	2018-12-01 22:46:56 UTC (rev 49293)
+++ trunk/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex	2018-12-01 22:47:10 UTC (rev 49294)
@@ -2,7 +2,7 @@
 
 \title{Adigraph, \AdigraphVersionNumber}
 \author{Luca Cappelletti}
-\date{March 2018}
+\date{December 2018}
 
 \usepackage{adigraph}
 \usepackage{xcolor}
@@ -115,7 +115,9 @@
 	<edges here, separated by semicolon>
 }{
 	<cuts here, separated by semicolon>
-}
+}[
+	<edge style here>
+]
 \end{minted}
 
 \section{Changing an existing graph}
@@ -128,7 +130,9 @@
 	<edges here, separated by semicolon>
 }{
 	<cuts here, separated by semicolon>
-}
+}[
+	<edge style here>
+]
 \end{minted}
 
 \section{Adding nodes}
@@ -556,7 +560,7 @@
 
 \section{Kleene star operators}
 \subsection{Kleene star on an element}
-This works only when you don't have a node called \textit{<*>}. When this happens, the behavior of a tuple \textit{<a,*>} becomes the normal one.
+This works only when you don't have a node called \textit{<*>}. When this happens, the behaviour of a tuple \textit{<a,*>} becomes the normal one.
 \begin{figure}
 	\begin{subfigure}{0.49\textwidth}
 		\begin{minted}{latex}
@@ -595,7 +599,7 @@
 \end{figure}
 
 \subsection{Kleene star minus the element}
-This works only when you don't have a node called \textit{<+>}. When this happens, the behavior of a tuple \textit{<a,+>} becomes the normal one.
+This works only when you don't have a node called \textit{<+>}. When this happens, the behaviour of a tuple \textit{<a,+>} becomes the normal one.
 \begin{figure}
 	\begin{subfigure}{0.49\textwidth}
 		\begin{minted}{latex}
@@ -986,6 +990,109 @@
 	\end{subfigure}
 \end{figure}
 
+\section{Non oriented edges and custom edge stiles}
+If you need non oriented edges or in general to ad a custom style to your edges you can proceed as follows:
+\subsection{Non oriented}
+\begin{figure}
+	\begin{subfigure}{0.49\textwidth}
+		\begin{minted}{latex}
+\NewAdigraph{myCustomEdgesAdigraph}{
+	s:0,0;
+	1:2,2;
+	3:2,-2;
+	2:6,2;
+	4:6,-2;
+	t:8,0;
+}{
+	s,1:25;
+	s,3:25;
+	3,4:25;
+	1,2:35;
+	2,t:20;
+	4,t:30;
+	3,1:10;
+	4,2:10;
+	2,3:15::near start;
+	4,1:5::near start;
+}[-]
+\myCustomEdgesAdigraph{}
+\end{minted}
+	\end{subfigure}
+	\begin{subfigure}{0.49\textwidth}
+		\NewAdigraph{myCustomEdgesAdigraph}{
+			s:0,0;
+			1:2,2;
+			3:2,-2;
+			2:6,2;
+			4:6,-2;
+			t:8,0;
+		}{
+			s,1:25;
+			s,3:25;
+			3,4:25;
+			1,2:35;
+			2,t:20;
+			4,t:30;
+			3,1:10;
+			4,2:10;
+			2,3:15::near start;
+			4,1:5::near start;
+		}[-]
+		\myCustomEdgesAdigraph{}
+	\end{subfigure}
+\end{figure}
+
+\subsection{Dashed}
+\begin{figure}
+	\begin{subfigure}{0.49\textwidth}
+		\begin{minted}{latex}
+\NewAdigraph{myCustomEdgesAdigraph}{
+	s:0,0;
+	1:2,2;
+	3:2,-2;
+	2:6,2;
+	4:6,-2;
+	t:8,0;
+}{
+	s,1:25;
+	s,3:25;
+	3,4:25;
+	1,2:35;
+	2,t:20;
+	4,t:30;
+	3,1:10;
+	4,2:10;
+	2,3:15::near start;
+	4,1:5::near start;
+}[dashed]
+\myCustomEdgesAdigraph{}
+\end{minted}
+	\end{subfigure}
+	\begin{subfigure}{0.49\textwidth}
+		\NewAdigraph{myCustomEdgesAdigraph}{
+			s:0,0;
+			1:2,2;
+			3:2,-2;
+			2:6,2;
+			4:6,-2;
+			t:8,0;
+		}{
+			s,1:25;
+			s,3:25;
+			3,4:25;
+			1,2:35;
+			2,t:20;
+			4,t:30;
+			3,1:10;
+			4,2:10;
+			2,3:15::near start;
+			4,1:5::near start;
+		}[dashed]
+		\myCustomEdgesAdigraph{}
+	\end{subfigure}
+\end{figure}
+
+
 \chapter{Warnings}
 \section{Reserved words}
 I reserve to use for the package the following tokens:

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

Modified: trunk/Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.tex	2018-12-01 22:46:56 UTC (rev 49293)
+++ trunk/Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.tex	2018-12-01 22:47:10 UTC (rev 49294)
@@ -4,7 +4,7 @@
 
 \title{Adigraph, \AdigraphVersionNumber, small working test}
 \author{Luca Cappelletti}
-\date{March 2018}
+\date{November 2018}
 
 \begin{document}
 \maketitle

Modified: trunk/Master/texmf-dist/tex/latex/adigraph/adigraph.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/adigraph/adigraph.sty	2018-12-01 22:46:56 UTC (rev 49293)
+++ trunk/Master/texmf-dist/tex/latex/adigraph/adigraph.sty	2018-12-01 22:47:10 UTC (rev 49294)
@@ -7,7 +7,7 @@
 %
 % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 %
-\def\AdigraphVersionNumber{v1.5.1}
+\def\AdigraphVersionNumber{v1.6.0}
 
 \NeedsTeXFormat{LaTeX2e}[1994/06/01]
 \ProvidesPackage{adigraph}
@@ -591,7 +591,7 @@
 	\ProcessList{#1}{\AdigraphCutBuilder}
 }
 
-\NewDocumentCommand{\Adigraph}{m m m m m}{%
+\NewDocumentCommand{\Adigraph}{m m m m m m}{%
 	%
 	% #1 -> Vertices
 	% #2 -> Edges
@@ -598,6 +598,7 @@
 	% #3 -> Augmenting paths
 	% #4 -> Cuts
 	% #5 -> Current augmenting paths
+	% #6 -> Style
 	%
 	\def\AdigraphNodeList{}
 	\def\AdigraphEdgeList{}
@@ -605,7 +606,7 @@
 	\begin{tikzpicture}
 		\tikzset{%
 			vertex/.style={circle,draw,minimum size=2em},
-			edge/.style={->,> = latex}
+			edge/.style={#6}
 		}
 
 		% vertices
@@ -651,11 +652,12 @@
 \NewDocumentCommand{\AdigraphProcessAugmentingPaths}{m}{}
 \NewDocumentCommand{\AdigraphProcessAugmentingPathsList}{m}{}
 
-\NewDocumentCommand{\NewAdigraph}{m m G{}}{%
+\NewDocumentCommand{\NewAdigraph}{m m G{} O{->,> = latex}}{%
 	%
 	% #1 -> Variable to assign to as command
 	% #2 -> Nodes
 	% #3 -> Edges
+	% #4 -> Style
 	%
 	\ifcsdef{#1}{
 		\PackageError{adigraph}{%
@@ -680,16 +682,17 @@
 			\setcounter{AdigraphNumberOfPaths}{0}
 			\setcounter{AdigraphCurrentPathNumber}{0}
 			\AdigraphProcessAugmentingPathsList{##1}
-			\Adigraph{#2}{#3}{Adigraph#1AugmentingPaths}{##2}{##1}
+			\Adigraph{#2}{#3}{Adigraph#1AugmentingPaths}{##2}{##1}{#4}
 		}%
 	}
 }
 
-\NewDocumentCommand{\RenewAdigraph}{m m G{}}{%
+\NewDocumentCommand{\RenewAdigraph}{m m G{} O{->,> = latex}}{%
 	%
 	% #1 -> Variable to assign to as command
 	% #2 -> Nodes
 	% #3 -> Edges
+	% #4 -> Style
 	%
 	\ifcsdef{#1}{
 		\csdef{Adigraph#1AugmentingPaths}{}%
@@ -708,7 +711,7 @@
 			\setcounter{AdigraphNumberOfPaths}{0}
 			\setcounter{AdigraphCurrentPathNumber}{0}
 			\AdigraphProcessAugmentingPathsList{##1}
-			\Adigraph{#2}{#3}{Adigraph#1AugmentingPaths}{##2}{##1}
+			\Adigraph{#2}{#3}{Adigraph#1AugmentingPaths}{##2}{##1}{#4}
 		}%
 	}{
 		\PackageError{adigraph}{%



More information about the tex-live-commits mailing list