diff options
author | Karl Berry <karl@freefriends.org> | 2018-03-13 21:51:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-03-13 21:51:13 +0000 |
commit | eb8ef25be547b60759a018127fc2676c21b02e6d (patch) | |
tree | fb51d59d5157abc414e1d90302e336d2427d630e /Master/texmf-dist/doc/latex/adigraph | |
parent | f6fe5fa1202a5ac086787d0b2f99644e074f626e (diff) |
adigraph (13mar18)
git-svn-id: svn://tug.org/texlive/trunk@46948 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/adigraph')
-rw-r--r-- | Master/texmf-dist/doc/latex/adigraph/README.md | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.pdf | bin | 87660 -> 94597 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex | 118 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.pdf | bin | 16456 -> 24878 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.tex | 146 |
5 files changed, 205 insertions, 63 deletions
diff --git a/Master/texmf-dist/doc/latex/adigraph/README.md b/Master/texmf-dist/doc/latex/adigraph/README.md index f7d9e127783..aa937ad3acd 100644 --- a/Master/texmf-dist/doc/latex/adigraph/README.md +++ b/Master/texmf-dist/doc/latex/adigraph/README.md @@ -6,7 +6,7 @@ It handles automatically the positioning of labels, with the exception of the ho **This library is released under MIT license (Copyright 2018 Luca Cappelletti)**. ## Documentation -For more information, you can read the documentation available [here](https://github.com/LucaCappelletti94/adigraph/blob/master/documentation.pdf) +For more information, you can read the documentation available [here](https://github.com/LucaCappelletti94/adigraph/blob/master/adigraph_documentation.pdf) ## Basic setup ### Installing the package @@ -25,7 +25,7 @@ Remember to require the package in the document. ``` ## Basic example -More examples and step by step explanation is available in the [documentation](https://github.com/LucaCappelletti94/adigraph/blob/master/documentation.pdf). +More examples and step by step explanation is available in the [documentation](https://github.com/LucaCappelletti94/adigraph/blob/master/adigraph_documentation.pdf). Suppose you want to create a graph as the following, with an augmenting path highlighted and a couple of cuts: diff --git a/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.pdf b/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.pdf Binary files differindex 4123dc6ead7..c26a4ddb559 100644 --- a/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.pdf +++ b/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.pdf diff --git a/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex b/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex index 5ec01003f68..1dbcc0fa0bf 100644 --- a/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex +++ b/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex @@ -1,6 +1,6 @@ \documentclass{report} -\title{Adigraph, V1.3} +\title{Adigraph, \AdigraphVersionNumber} \author{Luca Cappelletti} \date{March 2018} @@ -200,7 +200,7 @@ To add a custom label you can use the following syntax: either \textit{<node nam \end{figure} \section{Automatically position nodes} -When no coordinates are given or you just don't have time to think abount where to put those nodes, just choose a radius and Adigraph will position them on the circle of that radius. +When no coordinates are given or you just don't have time to think about where to put those nodes, just choose a radius and Adigraph will position them on the circle of that radius. \begin{figure} \begin{subfigure}{0.49\textwidth} @@ -294,6 +294,35 @@ We set its nodes with the following syntax: \textit{<node name: \(x\) coordinate \end{subfigure} \end{figure} +\subsection{A looped edge} +Looped edges position automatically by themselves to minimize overlapping. +\begin{figure} + \begin{subfigure}{0.49\textwidth} + \begin{minted}{latex} +\NewAdigraph{myAdigraph}{ + s:0,0; + t:4,0; +}{ + s,s; + t,t; + s,t; +} +\myAdigraph{} +\end{minted} + \end{subfigure} + \begin{subfigure}{0.49\textwidth} + \NewAdigraph{myAdigraph}{ + s:0,0; + t:4,0; + }{ + s,s; + t,t; + s,t; + } + \myAdigraph{} + \end{subfigure} +\end{figure} + \subsection{A colored simple edge} \begin{figure} \begin{subfigure}{0.49\textwidth} @@ -525,6 +554,89 @@ We set its nodes with the following syntax: \textit{<node name: \(x\) coordinate \end{subfigure} \end{figure} +\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. +\begin{figure} + \begin{subfigure}{0.49\textwidth} + \begin{minted}{latex} +\NewAdigraph{myAdigraph}{ + 1:3; + 2:3; + 3:3; + 4:3; + 5:3; + 6:3; + 7:3; + 8:3; +}{ + 1,*,blue; + *,4,red; +} +\myAdigraph{} +\end{minted} + \end{subfigure} + \begin{subfigure}{0.49\textwidth} + \NewAdigraph{myAdigraph}{ + 1:3; + 2:3; + 3:3; + 4:3; + 5:3; + 6:3; + 7:3; + 8:3; + }{ + 1,*,blue; + *,4,red; + } + \myAdigraph{} + \end{subfigure} +\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. +\begin{figure} + \begin{subfigure}{0.49\textwidth} + \begin{minted}{latex} +\NewAdigraph{myAdigraph}{ + 1:3; + 2:3; + 3:3; + 4:3; + 5:3; + 6:3; + 7:3; + 8:3; +}{ + 1,+,blue; + +,4; +} +\myAdigraph{} +\end{minted} + \end{subfigure} + \begin{subfigure}{0.49\textwidth} + \NewAdigraph{myAdigraph}{ + 1:3; + 2:3; + 3:3; + 4:3; + 5:3; + 6:3; + 7:3; + 8:3; + }{ + 1,+,blue; + +,4; + } + \myAdigraph{} + \end{subfigure} +\end{figure} + + +\subsection{Combining Kleene operations} +Sadly, operations such as \textit{<*,+>} or \textit{<+,+>} are not currently supported and not for lack of trying. I'll try implementing them again in the future when I'll have more time. + \section{Augmenting paths} An augmenting path is specified by the following syntax: \textit{<comma separated list of nodes:units>}. It is \textbf{very important} to note that incremental paths called upon the same object are memorized by default. @@ -696,11 +808,11 @@ If you'd like to color the cuts you just have to add the color as follows: \text \myAdigraph{}{ 2,t,red; 3,4,blue; + 2,4,green; } \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 Binary files differindex f9d1eb94f6e..bf6b1b407f5 100644 --- a/Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.pdf +++ b/Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.pdf 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 ac4c40406e9..b3aeaec44be 100644 --- a/Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.tex +++ b/Master/texmf-dist/doc/latex/adigraph/adigraph_working_test.tex @@ -2,74 +2,104 @@ \usepackage{adigraph} -\title{Adigraph, V1.3, small working test} +\title{Adigraph, \AdigraphVersionNumber, small working test} \author{Luca Cappelletti} \date{March 2018} \begin{document} \maketitle -\NewAdigraph{myAdigraph}{ - 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; -} +\begin{center} + \NewAdigraph{myAdigraph}{ + 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; + } -\myAdigraph{} + \begin{figure} + \myAdigraph{} + \end{figure} -\myAdigraph{ - s,3,4,2,t:5; -} + \begin{figure} + \myAdigraph{ + s,3,4,2,t:5; + } + \end{figure} -\myAdigraph{}{ - 2,t,red; - 3,4,blue; -} + \begin{figure} + \myAdigraph{}{ + 2,t,red; + 3,4,blue; + } + \end{figure} + \NewAdigraph{mySecondAdigraph}{ + 1:4; + 2:4; + 3:4; + 4:4; + 5:4; + 6:4; + 7:4; + 8:4; + }{ + 1,*:3; + 2,*:3; + 3,*:3; + 4,*:3; + 5,*:3; + 6,*:3; + 7,*:3; + 8,*:3; + } -\NewAdigraph{mySecondAdigraph}{ - s:3; - 1:3; - 3:3; - 2:3; - 4:3; - t:3; -}{ - 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; -} + \begin{figure} + \mySecondAdigraph{} + \end{figure} + \NewAdigraph{myThirdAdigraph}{ + s:0,0; + 1:2,2; + 3:2,-2; + 2:6,2; + 4:6,-2; + t:8,0; + }{ + s,+:25; + s,+:25; + 3,+:25; + 1,*:35; + 2,+:20.567; + 3,+:1.67; + 4,+:10; + 2,+:15.97; + 4,+:5; + } -\mySecondAdigraph{} - - -\mySecondAdigraph{ - s,3,4,2,t:5; -} - -\mySecondAdigraph{}{ - 2,t,red; - 3,4,blue; -} + \begin{figure} + \myThirdAdigraph{} + \end{figure} + \begin{figure} + \myThirdAdigraph{s,3,4,2,t:5;} + \end{figure} + \begin{figure}% + \myThirdAdigraph{}{ + 2,1,red; + 3,4,blue; + } + \end{figure} +\end{center} \end{document}
\ No newline at end of file |