texlive[49631] Master/texmf-dist: memorygraphs (7jan19)

commits+karl at tug.org commits+karl at tug.org
Mon Jan 7 23:12:07 CET 2019


Revision: 49631
          http://tug.org/svn/texlive?view=revision&revision=49631
Author:   karl
Date:     2019-01-07 23:12:07 +0100 (Mon, 07 Jan 2019)
Log Message:
-----------
memorygraphs (7jan19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/memorygraphs/memorygraphs.pdf
    trunk/Master/texmf-dist/doc/latex/memorygraphs/memorygraphs.tex
    trunk/Master/texmf-dist/tex/latex/memorygraphs/memorygraphs.sty

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

Modified: trunk/Master/texmf-dist/doc/latex/memorygraphs/memorygraphs.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/memorygraphs/memorygraphs.tex	2019-01-07 12:01:21 UTC (rev 49630)
+++ trunk/Master/texmf-dist/doc/latex/memorygraphs/memorygraphs.tex	2019-01-07 22:12:07 UTC (rev 49631)
@@ -1,5 +1,5 @@
 %% memorygraphs.tex
-%% Copyright 2018 C. Staps
+%% Copyright 2018-2019 C. Staps
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either version 1.3

Modified: trunk/Master/texmf-dist/tex/latex/memorygraphs/memorygraphs.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/memorygraphs/memorygraphs.sty	2019-01-07 12:01:21 UTC (rev 49630)
+++ trunk/Master/texmf-dist/tex/latex/memorygraphs/memorygraphs.sty	2019-01-07 22:12:07 UTC (rev 49631)
@@ -1,5 +1,5 @@
 %% memorygraphs.tex
-%% Copyright 2018 C. Staps
+%% Copyright 2018-2019 C. Staps
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either version 1.3
@@ -16,7 +16,7 @@
 % This work consists of the files memorygraphs.sty and the documentation in
 % memorygraphs.tex and example-fibonacci.tex.
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{memorygraphs}[2018/12/26 v0.1 Draw memory graphs using TikZ]
+\ProvidesPackage{memorygraphs}[2019/01/06 v0.1.1 Draw memory graphs using TikZ]
 
 \RequirePackage{tikz}
 \usetikzlibrary{arrows.meta,calc,positioning,shapes}
@@ -90,15 +90,18 @@
 		anchor=mid,
 		every block,
 	},
-	block/.append code={\let\arg\memorygraphs at arg},
+	block/.append code={%
+		\let\arg\memorygraphs at arg%
+		\gdef\memorygraphs at arity{0}%
+	},
 	block mark north east/.style={
 		append after command={
 			\pgfextra
 				\pgfinterruptpath
 				\draw[#1]
-					($(\tikzlastnode.head north east)-(0,.5\pgflinewidth)$)
+					($(\tikzlastnode.head north east)-(\ifnum\memorygraphs at arity=0 .5\pgflinewidth\else0\fi,.5\pgflinewidth)$)
 					-- +(0,-\memorygraphs at marklength)
-					-- ($(\tikzlastnode.head north east)-(0+\memorygraphs at marklength,.5\pgflinewidth)$)
+					-- ($(\tikzlastnode.head north east)-(\ifnum\memorygraphs at arity=0 .5\pgflinewidth\else0\fi+\memorygraphs at marklength,.5\pgflinewidth)$)
 					-- cycle;
 				\endpgfinterruptpath
 			\endpgfextra
@@ -109,9 +112,9 @@
 			\pgfextra
 				\pgfinterruptpath
 				\draw[#1]
-					($(\tikzlastnode.head south east)+(0,.5\pgflinewidth)$)
+					($(\tikzlastnode.head south east)+(\ifnum\memorygraphs at arity=0 -.5\pgflinewidth\else0\fi,.5\pgflinewidth)$)
 					-- +(0,\memorygraphs at marklength)
-					-- ($(\tikzlastnode.head south east)+(0-\memorygraphs at marklength,.5\pgflinewidth)$)
+					-- ($(\tikzlastnode.head south east)+(\ifnum\memorygraphs at arity=0 -.5\pgflinewidth\else0\fi-\memorygraphs at marklength,.5\pgflinewidth)$)
 					-- cycle;
 				\endpgfinterruptpath
 			\endpgfextra
@@ -151,6 +154,11 @@
 		rectangle split every empty part={},
 		rectangle split empty part width=.2em,
 	},
+	arity/.append code={%
+		\pgfmathsetcount\c at pgf@counta{\pgfkeysvalueof{/pgf/rectangle split parts}}%
+		\ifnum\c at pgf@counta=0\else\advance\c at pgf@counta by-1 \fi
+		\xdef\memorygraphs at arity{\the\c at pgf@counta}%
+	},
   ref/.style={
 		{Circle[length=3pt]}-Latex,
 		shorten <=-1.5pt,



More information about the tex-live-commits mailing list