-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix csv input by removing leading and trailing spaces (#12)
- Loading branch information
Showing
1 changed file
with
8 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
% File : tikz-network.sty -- Library for plotting networks in TikZ | ||
% Author : Juergen Hackl <[email protected]> | ||
% Creation : 2017-02-28 | ||
% Time-stamp: <Mon 2018-07-30 11:26 juergen> | ||
% Time-stamp: <Wed 2019-08-14 14:49 juergen> | ||
% Version : 1.0 (2018-07-30) | ||
% | ||
% Copyright (c) 2018 Juergen Hackl <[email protected]> | ||
|
@@ -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}% | ||
|