diff options
author | Karl Berry <karl@freefriends.org> | 2014-01-25 22:42:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-01-25 22:42:24 +0000 |
commit | 40d79de6e8268eb6f3dcd9b24b656fe6643b5792 (patch) | |
tree | 43b6737e0ff6d7b6d8f26459c471471729a720a7 /Master/texmf-dist/tex/latex/sa-tikz | |
parent | 1db7092b704f1203699f36e7065b822324747a3a (diff) |
sa-tikz (25jan14)
git-svn-id: svn://tug.org/texlive/trunk@32788 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/sa-tikz')
-rw-r--r-- | Master/texmf-dist/tex/latex/sa-tikz/sa-tikz.sty | 48 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/sa-tikz/tikzlibraryswitching-architectures.code.tex | 46 |
2 files changed, 29 insertions, 65 deletions
diff --git a/Master/texmf-dist/tex/latex/sa-tikz/sa-tikz.sty b/Master/texmf-dist/tex/latex/sa-tikz/sa-tikz.sty index b54c154e131..bb4d1983080 100644 --- a/Master/texmf-dist/tex/latex/sa-tikz/sa-tikz.sty +++ b/Master/texmf-dist/tex/latex/sa-tikz/sa-tikz.sty @@ -1,10 +1,10 @@ % * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * % -% Sa-TikZ package v0.6 * * (C) Claudio Fiandrino 2012-2013 +% Sa-TikZ package v0.7 * * (C) Claudio Fiandrino 2012-2014 % % * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{sa-tikz}[2013/9/28 v0.6 Switching architectures design library.] +\ProvidesPackage{sa-tikz}[2014/1/21 v0.7 Switching architectures design library.] \RequirePackage{tikz} \usetikzlibrary{backgrounds,calc,positioning,decorations.pathreplacing} @@ -12,22 +12,6 @@ % UTILITY % * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -% PGFMATHISODD: 1 = true, 0 = false -% -% #1: number to be checked -% #2: output macro -% -% example: -%% \pgfmathisodd{32}{output} -%% \ifnum\output=1 -%% \node{\output}; -%% \fi -\newcommand*{\pgfmathisodd}[2]{ - \pgfmathparse{mod(#1,2)} - \pgfmathtruncatemacro\res\pgfmathresult - \global\expandafter\edef\csname #2\endcsname{\res} -} - % PGFMATHOMEGAROTATION: % % #1: number to be rotated @@ -35,8 +19,8 @@ % #3: output macro % \newcommand*{\pgfmathomegarotation}[3]{ - \pgfmathisodd{#1}{test} - \ifnum\test=1 + \pgfmathisodd{#1} + \ifnum\pgfmathresult=1 \pgfmathparse{#1/2 + 2^#2} \else \pgfmathparse{#1/2} @@ -45,8 +29,6 @@ \global\expandafter\edef\csname #3\endcsname{\res} } - - % * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * % KEY DEFINITION - Design choices % * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -912,9 +894,9 @@ \pgfmathtruncatemacro\startingpoint{1+((\t-1)*\applicationon)} \pgfmathtruncatemacro\endingpoint{(\startingpoint+\applicationon)-1} \foreach \startmodule in {\startingpoint,...,\endingpoint}{ - \pgfmathisodd{\startmodule}{initmodule} + \pgfmathisodd{\startmodule} \ifnum\t=1 - \ifnum\initmodule=1 + \ifnum\pgfmathresult=1 % if odd \pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2)} \pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2)} @@ -929,7 +911,7 @@ \fi \fi \ifnum\t=2 - \ifnum\initmodule=1 + \ifnum\pgfmathresult=1 % if odd \pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2+(\applicationon/2))} \pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2+(\applicationon/2))} @@ -944,7 +926,7 @@ \fi \fi \ifnum\t>2 - \ifnum\initmodule=1 + \ifnum\pgfmathresult=1 % if odd \pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2+(\applicationon/2)+((\applicationon/2)*(\t-2)))} \pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2+(\applicationon/2)+((\applicationon/2)*(\t-2)))} @@ -972,9 +954,9 @@ \pgfmathtruncatemacro\startingpoint{1+((\t-1)*\applicationon)} \pgfmathtruncatemacro\endingpoint{(\startingpoint+\applicationon)-1} \foreach \startmodule in {\startingpoint,...,\endingpoint}{ - \pgfmathisodd{\startmodule}{initmodule} + \pgfmathisodd{\startmodule} \ifnum\t=1 - \ifnum\initmodule=1 + \ifnum\pgfmathresult=1 % if odd \pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2)} \pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2)} @@ -989,7 +971,7 @@ \fi \fi \ifnum\t=2 - \ifnum\initmodule=1 + \ifnum\pgfmathresult=1 % if odd \pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2+(\applicationon/2))} \pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2+(\applicationon/2))} @@ -1004,7 +986,7 @@ \fi \fi \ifnum\t>2 - \ifnum\initmodule=1 + \ifnum\pgfmathresult=1 % if odd \pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2+(\applicationon/2)+((\applicationon/2)*(\t-2)))} \pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2+(\applicationon/2)+((\applicationon/2)*(\t-2)))} @@ -1036,8 +1018,8 @@ % Drawing \foreach \startmodule in {1,...,\r}{ - \pgfmathisodd{\startmodule}{initmodule} - \ifnum\initmodule=1 + \pgfmathisodd{\startmodule} + \ifnum\pgfmathresult=1 % if odd \pgfmathtruncatemacro\endmodule{int(\startmodule+1)} \draw(r\middlestage-\startmodule-output-1)--(r\middlestagei-\startmodule-input-1); @@ -1060,7 +1042,7 @@ % BANYAN NETWORKS -% BANYAN-OMEGA (thanks to Joćo Gabriel Reis) +% BANYAN-OMEGA (thanks to JoĆ£o Gabriel Reis) \tikzset{banyan omega/.code={ % Number of ports per module diff --git a/Master/texmf-dist/tex/latex/sa-tikz/tikzlibraryswitching-architectures.code.tex b/Master/texmf-dist/tex/latex/sa-tikz/tikzlibraryswitching-architectures.code.tex index 9b42c78ed5e..6b4351887a4 100644 --- a/Master/texmf-dist/tex/latex/sa-tikz/tikzlibraryswitching-architectures.code.tex +++ b/Master/texmf-dist/tex/latex/sa-tikz/tikzlibraryswitching-architectures.code.tex @@ -1,6 +1,6 @@ % * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * % -% Sa-TikZ package v0.6 * * (C) Claudio Fiandrino 2012-2013 +% Sa-TikZ package v0.7 * * (C) Claudio Fiandrino 2012-2014 % % * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -14,22 +14,6 @@ % UTILITY % * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -% PGFMATHISODD: 1 = true, 0 = false -% -% #1: number to be checked -% #2: output macro -% -% example: -%% \pgfmathisodd{32}{output} -%% \ifnum\output=1 -%% \node{\output}; -%% \fi -\newcommand*{\pgfmathisodd}[2]{ - \pgfmathparse{mod(#1,2)} - \pgfmathtruncatemacro\res\pgfmathresult - \global\expandafter\edef\csname #2\endcsname{\res} -} - % PGFMATHOMEGAROTATION: % % #1: number to be rotated @@ -37,8 +21,8 @@ % #3: output macro % \newcommand*{\pgfmathomegarotation}[3]{ - \pgfmathisodd{#1}{test} - \ifnum\test=1 + \pgfmathisodd{#1} + \ifnum\pgfmathresult=1 \pgfmathparse{#1/2 + 2^#2} \else \pgfmathparse{#1/2} @@ -47,8 +31,6 @@ \global\expandafter\edef\csname #3\endcsname{\res} } - - % * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * % KEY DEFINITION - Design choices % * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -914,9 +896,9 @@ \pgfmathtruncatemacro\startingpoint{1+((\t-1)*\applicationon)} \pgfmathtruncatemacro\endingpoint{(\startingpoint+\applicationon)-1} \foreach \startmodule in {\startingpoint,...,\endingpoint}{ - \pgfmathisodd{\startmodule}{initmodule} + \pgfmathisodd{\startmodule} \ifnum\t=1 - \ifnum\initmodule=1 + \ifnum\pgfmathresult=1 % if odd \pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2)} \pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2)} @@ -931,7 +913,7 @@ \fi \fi \ifnum\t=2 - \ifnum\initmodule=1 + \ifnum\pgfmathresult=1 % if odd \pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2+(\applicationon/2))} \pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2+(\applicationon/2))} @@ -946,7 +928,7 @@ \fi \fi \ifnum\t>2 - \ifnum\initmodule=1 + \ifnum\pgfmathresult=1 % if odd \pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2+(\applicationon/2)+((\applicationon/2)*(\t-2)))} \pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2+(\applicationon/2)+((\applicationon/2)*(\t-2)))} @@ -974,9 +956,9 @@ \pgfmathtruncatemacro\startingpoint{1+((\t-1)*\applicationon)} \pgfmathtruncatemacro\endingpoint{(\startingpoint+\applicationon)-1} \foreach \startmodule in {\startingpoint,...,\endingpoint}{ - \pgfmathisodd{\startmodule}{initmodule} + \pgfmathisodd{\startmodule} \ifnum\t=1 - \ifnum\initmodule=1 + \ifnum\pgfmathresult=1 % if odd \pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2)} \pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2)} @@ -991,7 +973,7 @@ \fi \fi \ifnum\t=2 - \ifnum\initmodule=1 + \ifnum\pgfmathresult=1 % if odd \pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2+(\applicationon/2))} \pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2+(\applicationon/2))} @@ -1006,7 +988,7 @@ \fi \fi \ifnum\t>2 - \ifnum\initmodule=1 + \ifnum\pgfmathresult=1 % if odd \pgfmathtruncatemacro\endmodulei{int((\startmodule+1)/2+(\applicationon/2)+((\applicationon/2)*(\t-2)))} \pgfmathtruncatemacro\endmoduleii{int((\startmodule+1+\applicationon)/2+(\applicationon/2)+((\applicationon/2)*(\t-2)))} @@ -1038,8 +1020,8 @@ % Drawing \foreach \startmodule in {1,...,\r}{ - \pgfmathisodd{\startmodule}{initmodule} - \ifnum\initmodule=1 + \pgfmathisodd{\startmodule} + \ifnum\pgfmathresult=1 % if odd \pgfmathtruncatemacro\endmodule{int(\startmodule+1)} \draw(r\middlestage-\startmodule-output-1)--(r\middlestagei-\startmodule-input-1); @@ -1062,7 +1044,7 @@ % BANYAN NETWORKS -% BANYAN-OMEGA (thanks to Joćo Gabriel Reis) +% BANYAN-OMEGA (thanks to JoĆ£o Gabriel Reis) \tikzset{banyan omega/.code={ % Number of ports per module |