From 3c4740bffef244eff176af0d3aa8a93eb1225953 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 15 Aug 2019 20:22:22 +0000 Subject: tikz-network (15aug19) git-svn-id: svn://tug.org/texlive/trunk@51884 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/tikz-network/tikz-network.sty | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'Master/texmf-dist/tex/latex/tikz-network') diff --git a/Master/texmf-dist/tex/latex/tikz-network/tikz-network.sty b/Master/texmf-dist/tex/latex/tikz-network/tikz-network.sty index 497f34fa2c2..b40d157cece 100644 --- a/Master/texmf-dist/tex/latex/tikz-network/tikz-network.sty +++ b/Master/texmf-dist/tex/latex/tikz-network/tikz-network.sty @@ -2,10 +2,10 @@ % File : tikz-network.sty -- Library for plotting networks in TikZ % Author : Juergen Hackl % Creation : 2017-02-28 -% Time-stamp: -% Version : 1.0 (2018-07-30) +% Time-stamp: +% Version : 1.1 (2019-08-15) % -% Copyright (c) 2018 Juergen Hackl +% Copyright (c) 2019 Juergen Hackl % % This program is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ % ============================================================================ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{tikz-network}[2018/07/30 tikz-network v1.0] +\ProvidesPackage{tikz-network}[2019/08/15 tikz-network v1.1] %============================================================================= % Used packages @@ -33,6 +33,7 @@ \RequirePackage{tikz} \RequirePackage{datatool} \RequirePackage{graphicx} +\RequirePackage{trimspaces} \usetikzlibrary{arrows} \usetikzlibrary{positioning} \usetikzlibrary{3d} @@ -797,6 +798,8 @@ \edef\vertex@rgbValues{}% % Go through each row element \DTLforeachkeyinrow{\thisValue}{ + % Remove leading and trailing spaces + \trim@spaces@in\dtlkey \DTLifeq{\dtlkey}{id}{ % Assign vertex id to storage variable \edef\vertex@id{\thisValue}% @@ -970,8 +973,10 @@ {1\DefaultUnit}, position = {}, loopposition = {0}, loopshape = {90}, distance = {.5}, path = {}, fontcolor = {}, fontsize = {}, fontscale ={},} \edef\edge@rgbValues{}% - % Go through each row element - \DTLforeachkeyinrow{\thisValue}{ + % Go through each row element + \DTLforeachkeyinrow{\thisValue}{ + % Remove leading and trailing spaces + \trim@spaces@in\dtlkey \DTLifeq{\dtlkey}{u}{ % Assign edge id to storage variable \edef\edge@u{\thisValue}% @@ -1038,6 +1043,9 @@ \Edge[Network](\edge@u)(\edge@v) }{ \ifthenelse{\not\equal{\cmdNW@edges@vertices}{}}{ + % Generate pseudo vertices + \Vertices[Pseudo,NoLabel]{\cmdNW@edges@vertices} + % Delete existing vertices data base \DTLifdbexists{vertices}{ \DTLgdeletedb{vertices} }{} -- cgit v1.2.3