diff options
author | Karl Berry <karl@freefriends.org> | 2013-09-06 23:12:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-09-06 23:12:20 +0000 |
commit | 4b008e6f0003c1cdf8e326fbb3fbeeab257eb321 (patch) | |
tree | bad9a058be530a70ccec9d89662bc140c7fa16e8 /Master/texmf-dist/tex/latex/sseq | |
parent | fd742022c0774507d86404341cfe78973fa971c0 (diff) |
sseq (6sep13)
git-svn-id: svn://tug.org/texlive/trunk@31585 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/sseq')
-rw-r--r-- | Master/texmf-dist/tex/latex/sseq/sseq.sty | 63 |
1 files changed, 43 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/latex/sseq/sseq.sty b/Master/texmf-dist/tex/latex/sseq/sseq.sty index c57d7549b78..d00f34e6e36 100644 --- a/Master/texmf-dist/tex/latex/sseq/sseq.sty +++ b/Master/texmf-dist/tex/latex/sseq/sseq.sty @@ -26,9 +26,9 @@ \ProvidesPackage{sseq}[2009/04/09 ver 2.0] \RequirePackage{ifthen,calc,pifont} -\RequirePackage{pgf}[2006/01/01] +\RequirePackage{pgf}[2008/02/20] \RequirePackage{xkeyval} -\usepgflibrary{snakes} +\usepgflibrary{decorations.pathmorphing} \newboolean{usescolor} \setboolean{usescolor}{true} @@ -418,6 +418,9 @@ \def\sseq@setcircumference{ \expandafter\ss@size\expandafter=\expandafter\csname\sseq@currentname size\endcsname \advance\ss@size by 1pt + \ifKV@sseqdrop@boxed + \advance\ss@size by 2pt + \fi \ss@setshapesep{\the\ss@size} } @@ -622,7 +625,16 @@ \edef\sslabelcolor{\sseq@savecolor} \fi } -\def\ssdropextension{ +\define@key{sseqdropext}{circled}[true]{\newif\ifKV@sseqdrop@circled\csname KV@sseqdrop@circled#1\endcsname} +\define@key{sseqdropext}{boxed}[true]{\newif\ifKV@sseqdrop@boxed\csname KV@sseqdrop@boxed#1\endcsname} +\define@key{sseqdropext}{color}{\def\ssplacecolor{#1}} +\define@key{sseqdropext}{name}{\def\sseq@name{#1}} +\def\ssdropextension{\@ifnextchar[\sseq@dropextension{\sseq@dropextension[]}} +\def\sseq@dropextension[#1]{ + \edef\sseq@savecolor{\ssplacecolor} + \def\sseq@name{\relax} + \presetkeys{sseqdropext}{circled=false,boxed=false}{} + \setkeys{sseqdrop}{#1} \ssassertsource \expandafter\def\expandafter\tmpname\expandafter{\csname sseqdrop\the\sseqposx,\the\sseqposy\endcsname} \edef\setcnt{\noexpand\count0=\tmpname} @@ -637,7 +649,11 @@ \else \sseqwritecolor{\ssplacecolor} \sseq@setcircumference - \putxyq{\pgfnode{circle}{center}{}} + \ifKV@sseqdrop@boxed + \putxyq{\pgfnode{rectangle}{center}{}} + \else + \putxyq{\pgfnode{circle}{center}{}} + \fi \putxy{{ss(\the\sseqposx,\the\sseqposy)\tmpname}} \putxyq{{\pgfusepath{stroke}}} \fi @@ -645,6 +661,11 @@ \edef\sseq@currentname{ss(\number\sseqposx,\number\sseqposy)\tmpname} \expandafter\edef\csname \sseq@currentname size\endcsname{\number\ss@size sp} \ifthenelse{\boolean{sseqhasopenconn}}{\sseqconcludeconnection}{} + \edef\ssplacecolor{\sseq@savecolor} + \def\temp{\relax} + \ifx\sseq@name\temp \else + \@eval\ssname{{\sseq@name}} + \fi } \def\ssprepareline#1#2{ \ssassertsource\ssfinishpos @@ -702,20 +723,21 @@ \putxyq{\pgfpathmoveto} \putxy{{\noexpand\pgfpointshapeborder{\sseq@previousname}{\noexpand \pgfpointanchor{\sseq@currentname}{center}}}} } +\putxyq{\pgfpathlineto} +\ifthenelse{\boolean{#3}}{ + \putxy{{\noexpand\pgfpoint{\the\sseqx}{\the\sseqy}}} + }{ + \putxy{{\noexpand\pgfpointshapeborder{\sseq@currentname}{\noexpand \pgfpointanchor{\sseq@previousname}{center}}}} + } \def\sseq@temp{#2} \ifx\sseq@temp\empty - \putxyq{\pgfpathlineto} \else - \putxyq{\pgfsnakesegmentamplitude=#2pc} - \putxyq{\multiply\pgfsnakesegmentamplitude by 3 } - \putxyq{\pgfsnakesegmentaspect=.3} - \putxyq{\pgfpathsnaketo{bent}} + \putxyq{\pgfdecorationsegmentamplitude=#2pc} + \putxyq{\multiply\pgfdecorationsegmentamplitude by 3 } + \putxyq{\pgfdecorationsegmentaspect=.3} + \putxyq{\pgfdecoratecurrentpath{bent}} \fi - \ifthenelse{\boolean{#3}}{ - \putxy{{\noexpand\pgfpoint{\the\sseqx}{\the\sseqy}}} - }{ - \putxy{{\noexpand\pgfpointshapeborder{\sseq@currentname}{\noexpand \pgfpointanchor{\sseq@previousname}{center}}}} - } \edef\sseq@connbuffer{\noexpand\sseqwritecolor{\ssconncolor}\noexpand\putxyq{\noexpand\pgfusepath{stroke}\noexpand\pgftransformreset}} + \edef\sseq@connbuffer{\noexpand\sseqwritecolor{\ssconncolor}\noexpand\putxyq{\noexpand\pgfusepath{stroke}\noexpand\pgftransformreset}} \fi \fi } @@ -845,20 +867,21 @@ \putxyq{\pgfpathmoveto} \putxy{{\noexpand\pgfpointshapeborder{#1}% {\noexpand\pgfpoint{\noexpand\sseqx}{\noexpand\sseqy}}}} + \putxyq{\pgfpathlineto} + \putxyq{{\pgfpoint{\sseqx}{\sseqy}}} \def\temp{#7} \ifx\temp\empty - \putxyq{\pgfpathlineto} \else \dimen0=#7pc \ifsseq@connreverse \multiply\dimen0 by -1 \fi - \putxy{\noexpand\pgfsnakesegmentamplitude=\number\dimen0 sp} - \putxyq{\advance\pgfsnakesegmentamplitude by \pgfsnakesegmentamplitude} - \putxyq{\pgfsnakesegmentaspect=.3} - \putxyq{\pgfpathsnaketo{bent}} + \putxy{\noexpand\pgfdecorationsegmentamplitude=\number\dimen0 sp} + \putxyq{\advance\pgfdecorationsegmentamplitude by \pgfdecorationsegmentamplitude} + \putxyq{\pgfdecorationsegmentaspect=.3} + \putxyq{\pgfdecoratecurrentpath{bent}} \fi - \putxyq{{\pgfpoint{\sseqx}{\sseqy}}} + \edef\sseq@connbuffer{\noexpand\sseqwritecolor{\ssconncolor}% \noexpand\putxyq{\noexpand\pgfusepath{stroke}\noexpand\end{pgfscope}}} } |