summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-12-01 22:47:10 +0000
committerKarl Berry <karl@freefriends.org>2018-12-01 22:47:10 +0000
commit608fb06f9098a25c854017f05d2a20192083baf8 (patch)
tree78d63a21a155207464329dba5348cfd8fcd1933a
parent6a8c1f1989f77d1cbfb63c938b9a9ad0093803ce (diff)
adigraph (1dec18)
git-svn-id: svn://tug.org/texlive/trunk@49294 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/adigraph/README.md15
-rw-r--r--Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.pdfbin104688 -> 110876 bytes
-rw-r--r--Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex117
-rw-r--r--Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.pdfbin31637 -> 32081 bytes
-rw-r--r--Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.tex2
-rw-r--r--Master/texmf-dist/tex/latex/adigraph/adigraph.sty17
6 files changed, 138 insertions, 13 deletions
diff --git a/Master/texmf-dist/doc/latex/adigraph/README.md b/Master/texmf-dist/doc/latex/adigraph/README.md
index 5bc102883b6..a8de76fe968 100644
--- a/Master/texmf-dist/doc/latex/adigraph/README.md
+++ b/Master/texmf-dist/doc/latex/adigraph/README.md
@@ -17,6 +17,21 @@ sudo tlmgr install fp etoolbox adigraph
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.
diff --git a/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.pdf b/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.pdf
index dee66bb844b..518bbb8a9e7 100644
--- a/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.pdf
+++ b/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex b/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex
index 4d2773c0d1e..85567bf7f15 100644
--- a/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex
+++ b/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex
@@ -2,7 +2,7 @@
\title{Adigraph, \AdigraphVersionNumber}
\author{Luca Cappelletti}
-\date{March 2018}
+\date{December 2018}
\usepackage{adigraph}
\usepackage{xcolor}
@@ -115,7 +115,9 @@ Here we create a new Adigraph object, called \textit{myAdigraph}.
<edges here, separated by semicolon>
}{
<cuts here, separated by semicolon>
-}
+}[
+ <edge style here>
+]
\end{minted}
\section{Changing an existing graph}
@@ -128,7 +130,9 @@ You can renovate an older graph by calling \textbackslash RenewAdigraph
<edges here, separated by semicolon>
}{
<cuts here, separated by semicolon>
-}
+}[
+ <edge style here>
+]
\end{minted}
\section{Adding nodes}
@@ -556,7 +560,7 @@ Looped edges position automatically by themselves to minimize overlapping.
\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 @@ This works only when you don't have a node called \textit{<*>}. When this happen
\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 @@ If you'd like to color the cuts you just have to add the color as follows: \text
\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:
diff --git a/Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.pdf b/Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.pdf
index b6ba3781b74..8ca68710bd9 100644
--- a/Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.pdf
+++ b/Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.tex b/Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.tex
index 9d91b642c2c..2a8e76a5acf 100644
--- a/Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.tex
+++ b/Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.tex
@@ -4,7 +4,7 @@
\title{Adigraph, \AdigraphVersionNumber, small working test}
\author{Luca Cappelletti}
-\date{March 2018}
+\date{November 2018}
\begin{document}
\maketitle
diff --git a/Master/texmf-dist/tex/latex/adigraph/adigraph.sty b/Master/texmf-dist/tex/latex/adigraph/adigraph.sty
index 04f734c3de4..4d7865439b9 100644
--- a/Master/texmf-dist/tex/latex/adigraph/adigraph.sty
+++ b/Master/texmf-dist/tex/latex/adigraph/adigraph.sty
@@ -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,13 +591,14 @@
\ProcessList{#1}{\AdigraphCutBuilder}
}
-\NewDocumentCommand{\Adigraph}{m m m m m}{%
+\NewDocumentCommand{\Adigraph}{m m m m m m}{%
%
% #1 -> Vertices
% #2 -> Edges
% #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}{%