summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-29 22:12:09 +0000
committerKarl Berry <karl@freefriends.org>2019-01-29 22:12:09 +0000
commit7051618f193878d7680d2575f4878c65c9a7826a (patch)
treeb35fadc5dd7f95c785c86fc1aaa03507b63f21c4 /Master/texmf-dist
parent6bfe500db52351270f34959f456fd5955a83d386 (diff)
adigraph (29jan19)
git-svn-id: svn://tug.org/texlive/trunk@49862 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.pdfbin203860 -> 204715 bytes
-rw-r--r--Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex14
-rw-r--r--Master/texmf-dist/doc/latex/adigraph/test.tex57
-rw-r--r--Master/texmf-dist/tex/latex/adigraph/adigraph.sty94
4 files changed, 67 insertions, 98 deletions
diff --git a/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.pdf b/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.pdf
index f97e049df7d..949814b056b 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 d0c25207d73..6bcf6a0c8a1 100644
--- a/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex
+++ b/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex
@@ -1227,6 +1227,19 @@ And once you compile that you receive a graph like the following:
\includegraphics[width=0.5\textwidth]{img_examples/pyadigraph.png}
\end{figure}
+\chapter{Utilities}
+If for some reason you need to disable all the adigraphs in your latex code, for example using an online editor such as Overleaf that allows only a given maximum compile time, you can use the following command:
+
+\begin{minted}{latex}
+ \DisableAdigraphs
+\end{minted}
+
+You can then re-enable adigraphs with:
+
+\begin{minted}{latex}
+ \EnableAdigraphs
+\end{minted}
+
\chapter{Warnings}
\section{Reserved words}
I reserve to use for the package the following tokens:
@@ -1266,6 +1279,7 @@ I reserve to use for the package the following tokens:
\item \textbackslash AdigraphSimpleSum
\item \textbackslash NewAdigraph
\item \textbackslash RenewAdigraph
+ \item \textbackslash DisableAdigraphs
\end{enumerate}
\end{multicols}
diff --git a/Master/texmf-dist/doc/latex/adigraph/test.tex b/Master/texmf-dist/doc/latex/adigraph/test.tex
deleted file mode 100644
index 5695e13b566..00000000000
--- a/Master/texmf-dist/doc/latex/adigraph/test.tex
+++ /dev/null
@@ -1,57 +0,0 @@
-\documentclass{report}
-\usepackage{adigraph}
-\usepackage{subcaption}
-
-\begin{document}
-\begin{figure}
- \begin{subfigure}{0.5\textwidth}
- \NewAdigraph{myAdigraph}{
- 0,red!90,:-0.3809786411983217,-1.060040755194991:;
- 1,red!90,:2.064011612238266,0.1152269298455566:;
- 2,gray!90,:-1.5184462984334735,1.4027622819243912:;
- 3,gray!90,:1.0781998579762053,2.9999996538001836:;
- 4,cyan!90,:1.5184463673043251,-1.4027619074610054:;
- 5,gray!90,:-2.064011426978595,-0.11522659721231196:;
- 6,gray!90,:-1.0781999824004174,-3.0:;
- 7,cyan!90,:0.3809785114920088,1.0600403942981784:;
- }{
- 0,4,gray!90,::;
- 0,5,gray!90,::;
- 0,6,gray!90,::;
- 0,7,gray!90,::;
- 1,4,gray!90,::;
- 1,7,gray!90,::;
- 2,5,gray!90,::;
- 2,7,gray!90,::;
- 3,7,gray!90,::;
- }[]
- \myAdigraph{}
- \caption{My little adigraph}
- \end{subfigure}
- \begin{subfigure}{0.5\textwidth}
- \NewAdigraph{myAdigraph}{
- 0,red!90,:-1.0600955397170124,-0.909092429879124:;
- 1,red!90,:-0.7769016878576507,2.441830442018683:;
- 2,gray!90,:2.294827403537843,-1.1401225057579754:;
- 3,gray!90,:2.9999983208930674,2.572669783991166:;
- 4,cyan!90,:-2.2948254523229066,1.1401236892970583:;
- 5,gray!90,:0.7769031550591187,-2.441828694069911:;
- 6,gray!90,:-3.0,-2.5726712239220655:;
- 7,cyan!90,:1.0600938004075402,0.909090938322168:;
- }{
- 0,4,gray!90,::;
- 0,5,gray!90,::;
- 0,6,gray!90,::;
- 0,7,gray!90,::;
- 1,4,gray!90,::;
- 1,7,gray!90,::;
- 2,5,gray!90,::;
- 2,7,gray!90,::;
- 3,7,gray!90,::;
- }[]
- \myAdigraph{}
- \caption{Another adigraph}
- \end{subfigure}
- \caption{A graph generated with python and latex.}
-\end{figure}
-\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/adigraph/adigraph.sty b/Master/texmf-dist/tex/latex/adigraph/adigraph.sty
index 52f9e8de77d..e472ebd59fe 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.7.0}
+\def\AdigraphVersionNumber{v1.7.1}
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{adigraph}
@@ -26,6 +26,8 @@
\def\AdigraphDefaultWidth{0.4}
\def\AdigraphRed{red!90}
\def\AdigraphCyan{cyan!90}
+\providebool{AdigraphDrawGraphs}
+\booltrue{AdigraphDrawGraphs}
\makeatletter
\newcommand{\AdigraphRom}[1]{\expandafter\@slowromancap\romannumeral #1@}
@@ -712,53 +714,55 @@
% #5 -> Current augmenting paths
% #6 -> Style
%
- \def\AdigraphNodeList{}
- \def\AdigraphEdgeList{}
- \letcs{\AdigraphAugmentingPaths}{#3}
- \begin{tikzpicture}
- \tikzset{%
- vertex/.style={circle,draw,minimum size=2em},
- edge/.style={#6}
- }
+ \ifbool{AdigraphDrawGraphs}{%
+ \def\AdigraphNodeList{}
+ \def\AdigraphEdgeList{}
+ \letcs{\AdigraphAugmentingPaths}{#3}
+ \begin{tikzpicture}
+ \tikzset{%
+ vertex/.style={circle,draw,minimum size=2em},
+ edge/.style={#6}
+ }
- % vertices
- \ifblank{#1}{%
- % List is empty
- }{%
- \AdigraphNodesCounter{#1}
- \AdigraphProcessNodes{#1}
- }
+ % vertices
+ \ifblank{#1}{%
+ % List is empty
+ }{%
+ \AdigraphNodesCounter{#1}
+ \AdigraphProcessNodes{#1}
+ }
- \ifblank{#2}{%
- % List is empty
- }{%
- \AdigraphProcessEdges{#2}
- }
+ \ifblank{#2}{%
+ % List is empty
+ }{%
+ \AdigraphProcessEdges{#2}
+ }
- \ifblank{\AdigraphAugmentingPaths}{%
- % List is empty
- }{%
- \ifblank{#5}{%
- \defcounter{AdigraphNumberOfPaths}{100000}
+ \ifblank{\AdigraphAugmentingPaths}{%
+ % List is empty
}{%
+ \ifblank{#5}{%
+ \defcounter{AdigraphNumberOfPaths}{100000}
+ }{%
+ }
+ \forlistloop{\AdigraphCountPaths}{\AdigraphAugmentingPaths}
+ \forlistloop{\AdigraphProcessPaths}{\AdigraphAugmentingPaths}
}
- \forlistloop{\AdigraphCountPaths}{\AdigraphAugmentingPaths}
- \forlistloop{\AdigraphProcessPaths}{\AdigraphAugmentingPaths}
- }
- \ifblank{#2}{%
- % List is empty
- }{%
- \forlistloop{\AdigraphEdgeDrawer}{\AdigraphEdgeList}
- }
+ \ifblank{#2}{%
+ % List is empty
+ }{%
+ \forlistloop{\AdigraphEdgeDrawer}{\AdigraphEdgeList}
+ }
- % %cuts
- \ifblank{#4}{%
- % List is empty
- }{%
- \AdigraphProcessCuts{#4}
- }
- \end{tikzpicture}
+ % %cuts
+ \ifblank{#4}{%
+ % List is empty
+ }{%
+ \AdigraphProcessCuts{#4}
+ }
+ \end{tikzpicture}
+ }{}
}
\NewDocumentCommand{\AdigraphProcessAugmentingPaths}{m}{}
@@ -834,6 +838,14 @@
}
}
+\NewDocumentCommand{\DisableAdigraphs}{}{%
+ \boolfalse{AdigraphDrawGraphs}
+}
+
+\NewDocumentCommand{\EnableAdigraphs}{}{%
+ \booltrue{AdigraphDrawGraphs}
+}
+
\endinput
%%