texlive[49862] Master/texmf-dist: adigraph (29jan19)
commits+karl at tug.org
commits+karl at tug.org
Tue Jan 29 23:12:09 CET 2019
Revision: 49862
http://tug.org/svn/texlive?view=revision&revision=49862
Author: karl
Date: 2019-01-29 23:12:09 +0100 (Tue, 29 Jan 2019)
Log Message:
-----------
adigraph (29jan19)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.pdf
trunk/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex
trunk/Master/texmf-dist/tex/latex/adigraph/adigraph.sty
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/latex/adigraph/test.tex
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 2019-01-29 22:11:57 UTC (rev 49861)
+++ trunk/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex 2019-01-29 22:12:09 UTC (rev 49862)
@@ -1227,6 +1227,19 @@
\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 @@
\item \textbackslash AdigraphSimpleSum
\item \textbackslash NewAdigraph
\item \textbackslash RenewAdigraph
+ \item \textbackslash DisableAdigraphs
\end{enumerate}
\end{multicols}
Deleted: trunk/Master/texmf-dist/doc/latex/adigraph/test.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/adigraph/test.tex 2019-01-29 22:11:57 UTC (rev 49861)
+++ trunk/Master/texmf-dist/doc/latex/adigraph/test.tex 2019-01-29 22:12:09 UTC (rev 49862)
@@ -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
Modified: trunk/Master/texmf-dist/tex/latex/adigraph/adigraph.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/adigraph/adigraph.sty 2019-01-29 22:11:57 UTC (rev 49861)
+++ trunk/Master/texmf-dist/tex/latex/adigraph/adigraph.sty 2019-01-29 22:12:09 UTC (rev 49862)
@@ -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,7 +838,15 @@
}
}
+\NewDocumentCommand{\DisableAdigraphs}{}{%
+ \boolfalse{AdigraphDrawGraphs}
+}
+\NewDocumentCommand{\EnableAdigraphs}{}{%
+ \booltrue{AdigraphDrawGraphs}
+}
+
+
\endinput
%%
%% End of file `adigraph.sty'.
\ No newline at end of file
More information about the tex-live-commits
mailing list