summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/spectralsequences/sseqkeys.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/spectralsequences/sseqkeys.code.tex')
-rw-r--r--Master/texmf-dist/tex/latex/spectralsequences/sseqkeys.code.tex166
1 files changed, 117 insertions, 49 deletions
diff --git a/Master/texmf-dist/tex/latex/spectralsequences/sseqkeys.code.tex b/Master/texmf-dist/tex/latex/spectralsequences/sseqkeys.code.tex
index 8c08ffa3a64..fcb843904d2 100644
--- a/Master/texmf-dist/tex/latex/spectralsequences/sseqkeys.code.tex
+++ b/Master/texmf-dist/tex/latex/spectralsequences/sseqkeys.code.tex
@@ -1,8 +1,8 @@
%%
-%% Package: spectralsequences v1.1.1 2017-09-16 2017-09-16
+%% Package: spectralsequences v1.2.0 2017-09-16 2017-09-16
%% Author: Hood Chatham
%% Email: hood@mit.edu
-%% Date: 2017-09-16
+%% Date: 2017-12-10
%% License: Latex Project Public License
%%
%% File: sseqkeys.code.tex
@@ -203,6 +203,7 @@
}%
}
+
\def\sseq@keys@unknown@handlecolor{%
\sseq@add@tikzkey@to@options{\@nx\sseq@options@secondpass{\@nx\tikz@addoption{\@nx\tikz@compat@color@set{\tikz@key}}}}%
\sseq@add@tikzkey@to@options{\@nx\sseq@options@secondpass{\def\@nx\tikz@textcolor{\tikz@key}}}%
@@ -294,6 +295,7 @@
\fi
}
+
% This has to be expandable, so \sseq@tempa and \sseq@tempb are set to "/tikz/" and "/pgf/" ahead of time
% Defer the command if it is in directories /pgf or /tikz, otherwise run it now. TODO: explain here why we need this.
\def\sseq@options@secondpass@iftikz{%
@@ -386,17 +388,19 @@
\@ifnextchar[{\sseq@setlabeldirectionkeys@{#1}}{\sseq@setlabeldirectionkeys@{#1}[/.code]}%]
}
\def\sseq@setlabeldirectionkeys@#1[#2]#3{
+ \bgroup
\def\sseq@temp##1{#3}
\sseq@temptoks{}
\def\\##1{
\sseq@eval{\sseq@temptoks{\the\sseq@temptoks##1#2={\unexpanded\@xp{\sseq@temp{##1}}},}}
}
\sseq@labeldirectionlist
- \sseq@eval{\@nx\pgfqkeys{#1}{\the\sseq@temptoks}}
+ \sseq@eval{\egroup\@nx\pgfqkeys{#1}{\the\sseq@temptoks}}
}
-
+\begingroup
\def\\#1{\@xp\sseq@addtostorelist\csname sseq@default@#1@distance\endcsname{1ex}}
\sseq@labeldirectionlist
+\endgroup
\def\sseq@defaultlabeldistance#1{\@xp\csname sseq@default@#1@distance\endcsname}
\def\sseq@setdefaultlabeldistance#1#2{\sseq@savedpaths@add{\@xp\gdef\csname sseq@default@#1@distance\endcsname{#2}}}
\def\sseq@setdefaultlabeldistances#1{\def\\##1{\sseq@setdefaultlabeldistance{##1}{#1}}\sseq@labeldirectionlist}
@@ -419,8 +423,11 @@
-\sseq@addtostorelist\sseq@classlabeltextfn{} % \sseq@classlabeltextfn is public via "class label handler"
-\def\sseq@classlabeltextfn@default#1{\def\processedlabel{#1}}
+\sseq@addtostorelist\sseq@classlabel@handler{} % \sseq@classlabel@handler is public via "class label handler"
+\def\sseq@classlabel@handler@default#1{\def\result{#1}}
+\sseq@addtostorelist\sseq@classname@handler{} % \sseq@classname@handler is public via "class name handler"
+\def\sseq@classname@handler@default#1{\def\result{#1}}
+
\def\sseq@labeltextfn#1{#1} % labeltextfn is private
\def\sseq@labeltextfn@rotatescale#1{%
\@nx\ifmmode
@@ -488,13 +495,13 @@
}
}
-
+% We just do the parsing in sseqkeys, \sseq@handleclassquotes@inner which does the main work is defined sseqmain.
\def\sseq@handlescopequotes#1#2{% We use this via \let\tikz@quotes@as\sseq@handleclassquotes
/utils/exec={% so it's called inside \pgfkeysalso{stuff}. Need to surround with /utils/exec={} to get out.
\global\let\sseq@classnodetext\pgfutil@empty%
\global\let\sseq@classnodetextoptions\pgfutil@empty%
\global\let\sseq@classlabelnodes\pgfutil@empty%
- \sseq@handleclassquotes@inner{#1}{#2}%
+ \sseq@handleclassquotes@inner{#1}{#2}
}
}
@@ -535,7 +542,6 @@
\let\structline\sseq@structline
}
-
\sseq@pgfqkeysdirlist{/sseqpages,/sseqpages/tikz primitives}{%
standard parse/.code={
\let\sseq@firstpass@shifttransform\@gobbletwo
@@ -556,6 +562,7 @@
/tikz/handle quote/.code={\sseq@error{tikz-edge-quotes}}
}
+
\sseq@pgfqkeysdirlist{/sseqpages/class,/sseqpages/differential}{
standard parse/.sseq @ first pass code={\sseq@error@n{option-tikz-prims-only}{standard parse}},
background/.sseq @ first pass code={\sseq@error@n{option-tikz-prims-only}{background}}
@@ -575,14 +582,25 @@
}
\def\sseq@classinsert{}
+\def\sseq@classnameprefix{}
+\def\sseq@classnamepostfix{}
+\pgfqkeys{/sseqpages}{
+ class name prefix/.store in=\sseq@classnameprefix,
+ class name postfix/.store in=\sseq@classnamepostfix
+}
+
\pgfqkeys{/sseqpages/class}{
- name/.code={\def\sseq@class@name{#1}\pgfkeysalso{/sseqpages/alias=#1}},
+ name/.code={%
+ \sseq@protectedeval{\@nx\sseq@classname@handler{\sseq@classnameprefix#1\sseq@classnamepostfix}}%
+ \edef\sseq@class@name{\unexpanded\@xp{\result}}%
+ \pgfkeysalso{/sseqpages/alias/.expand once=\detokenize\@xp{\sseq@class@name}}%
+ },
show name/.store in=\sseq@class@showname,
page/.code={\sseq@getnumrange\sseq@class@page{#1}},% page & gen are only for \classoptions.
generation/.code={\sseq@getnumrange\sseq@gen{#1}}, % \class tests if \sseq@class@page is set and throw an error if so.
tag/.code={\sseq@d@addto@macro\sseq@class@tag{#1}},
offset/.store in=\sseq@tempoffset,
- tooltip/.sseq @ first pass code={\def\sseq@tooltip{#1}},
+ tooltip/.sseq @ first pass code={\ifx\sseqtooltip\undefined \sseq@error{no-tooltip}\else \def\sseq@tooltip{#1}\fi},
insert/.store in=\sseq@classinsert
}
@@ -792,7 +810,7 @@
#1s/.ecode={%
\@nx\sseq@addstylecodetotoks{\sseq@tempcmd}{\sseq@temppath}{##1}
\@nx\ifsseq@inprogress
- \@nx\sseq@savedpaths@xadd{\sseq@tempcmd{\@nx\the\sseq@tempcmd}}%
+ \@nx\sseq@savedpaths@xadd{\@nx\sseq@style@object{\sseq@tempcmd{\@nx\the\sseq@tempcmd}}}%
\@nx\fi
},%
change #1s/.ecode={%
@@ -826,7 +844,7 @@
}%
\sseq@addstylecodetomacro\sseq@sseqstyle@globalpart{/sseqpages/global}{#1}%
\ifsseq@inprogress
- \sseq@savedpaths@xadd{\sseq@sseqstyle{\the\sseq@sseqstyle}}%
+ \sseq@savedpaths@xadd{\@nx\sseq@style@object{\sseq@sseqstyle{\the\sseq@sseqstyle}}}%
\fi
% Restore hook
\let\sseq@addstylecodetooptions@unknown\sseq@keys@unknown
@@ -892,8 +910,8 @@
%% Families (also called collections in code)
%%
%% These are supposed to make it easy to display / hide and change appearance of logically connected families of classes.
-%% In order to allow a set of options to be given that applies uniformly to all features, we separately apply the options in each of these bins.
-%%
+%% In order to allow a set of options to be given that applies uniformly to all features, we separately apply the options in each of these bins.
+%%
\def\sseq@featurelist{\\{class}\\{differential}\\{structline}\\{circleclass}\\{tikzprimitive}}
@@ -1311,9 +1329,11 @@
}
\def\sseq@keys@removehandler#1{\sseq@keys@removehandler@#1=\sseq@nil}
\def\sseq@keys@removehandler@#1/.#2=#3\sseq@nil{%
+ \bgroup
\def\sseq@temp{#2}%
- \def\\##1{\def\sseq@tempii{##1}\ifx\sseq@tempii\sseq@temp \sseq@tempiffalse\let\\\@gobble\fi}%
+ \def\\##1{\def\sseq@tempii{##1}\ifx\sseq@tempii\sseq@temp \global\sseq@tempiffalse\let\\\@gobble\fi}%
\sseq@keys@ignorehandlers
+ \egroup
\def\sseq@temp{#1}%
}
@@ -1477,6 +1497,7 @@
\sseq@addiftostorelist{specifiedxrange}
\sseq@addiftostorelist{specifiedyrange}
+% We used to \let\xmin\sseq@xmin in here, but that's a bad idea. Hopefully things work now...
\def\sseq@xrange#1#2{%
\global\let\sseq@xminmax\@gobbletwo % Don't need to calculate range of nodes if user specifies it
\global\sseq@specifiedxrangetrue
@@ -1484,22 +1505,19 @@
\sseq@sanitize@intexpr{#2}{x range={#1}{#2}}
\xdef\sseq@xmin{\the\numexpr#1}%
\xdef\sseq@xmax{\the\numexpr#2}%
- \let\xmin\sseq@xmin
- \let\xmax\sseq@xmax
% Need to know decremented \xmin and incremented \xmax to decide which nodes to print
\sseq@tempcount=#1 \advance\sseq@tempcount-1\xdef\sseq@xminmm{\the\sseq@tempcount}%
\sseq@tempcount=#2 \advance\sseq@tempcount1\xdef\sseq@xmaxpp{\the\sseq@tempcount}%
\sseq@breakpoint
}
+
\def\sseq@yrange#1#2{%
\global\let\sseq@yminmax\@gobbletwo %
- \sseq@sanitize@intexpr{#1}{x range={#1}{#2}}
- \sseq@sanitize@intexpr{#2}{x range={#1}{#2}}
+ \sseq@sanitize@intexpr{#1}{y range={#1}{#2}}
+ \sseq@sanitize@intexpr{#2}{y range={#1}{#2}}
\global\sseq@specifiedyrangetrue
- \gdef\sseq@ymin{#1}%
- \gdef\sseq@ymax{#2}%
- \let\ymin\sseq@ymin
- \let\ymax\sseq@ymax
+ \xdef\sseq@ymin{\the\numexpr#1}%
+ \xdef\sseq@ymax{\the\numexpr#2}%
\sseq@tempcount=#1 \advance\sseq@tempcount-1\xdef\sseq@yminmm{\the\sseq@tempcount}%
\sseq@tempcount=#2 \advance\sseq@tempcount1\xdef\sseq@ymaxpp{\the\sseq@tempcount}%
}
@@ -1625,27 +1643,51 @@
x tick handler/.sseq default code={\def\sseq@xtickfn@default##1{#1}},
y tick handler/.code={\def\sseq@ytickfn##1{#1}},
y tick handler/.sseq default code={\def\sseq@ytickfn@default##1{#1}},
- class label handler/.code = { % \long so that \ifx\classlabeltextfn\@gobble compares true if this is empty (\@gobble is long...)
- \long\def\sseq@classlabeltextfn##1{#1}
- \ifx\sseq@classlabeltextfn\@gobble
- \def\sseq@classlabeltextfn##1{\def\processedlabel{##1}}
+ class label handler/.code = { % \long so that \ifx\sseq@classname@handler\@gobble compares true if this is empty (\@gobble is long...)
+ \long\def\sseq@classlabel@handler##1{#1}
+ \ifx\sseq@classlabel@handler\@gobble
+ \def\sseq@classlabel@handler##1{\def\result{##1}}
\else
- \edef\sseq@tempa{\unexpanded\@xp{\sseq@classlabeltextfn{}}}
- \edef\sseq@tempb{\unexpanded\@xp{\sseq@classlabeltextfn{blah}}}
+ \edef\sseq@tempa{\unexpanded\@xp{\sseq@classlabel@handler{}}}
+ \edef\sseq@tempb{\unexpanded\@xp{\sseq@classlabel@handler{blah}}}
\ifx\sseq@tempa\sseq@tempb
- \long\def\sseq@classlabeltextfn##1{#1{##1}}
+ \long\def\sseq@classlabel@handler##1{#1{##1}}
\fi
\fi
},
class label handler/.sseq default code={
- \long\def\sseq@classlabeltextfn@default##1{#1}
- \ifx\sseq@classlabeltextfn@default\@gobble
- \def\sseq@classlabeltextfn@default##1{\def\processedlabel{##1}}
+ \long\def\sseq@classlabel@handler@default##1{#1}
+ \ifx\sseq@classlabel@handler@default\@gobble
+ \def\sseq@classlabel@handler@default##1{\def\result{##1}}
\else
- \edef\sseq@tempa{\unexpanded\@xp{\sseq@classlabeltextfn@default{}}}
- \edef\sseq@tempb{\unexpanded\@xp{\sseq@classlabeltextfn@default{blah}}}
+ \edef\sseq@tempa{\unexpanded\@xp{\sseq@classlabel@handler@default{}}}
+ \edef\sseq@tempb{\unexpanded\@xp{\sseq@classlabel@handler@default{blah}}}
\ifx\sseq@tempa\sseq@tempb
- \long\def\sseq@classlabeltextfn@default##1{#1{##1}}
+ \long\def\sseq@classlabel@handler@default##1{#1{##1}}
+ \fi
+ \fi
+ },
+ class name handler/.code = { % \long so that \ifx\sseq@classname@handler\@gobble compares true if this is empty (\@gobble is long...)
+ \long\def\sseq@classname@handler##1{#1}
+ \ifx\sseq@classname@handler\@gobble
+ \def\sseq@classname@handler##1{\def\result{##1}}
+ \else
+ \edef\sseq@tempa{\unexpanded\@xp{\sseq@classname@handler{}}}
+ \edef\sseq@tempb{\unexpanded\@xp{\sseq@classname@handler{blah}}}
+ \ifx\sseq@tempa\sseq@tempb
+ \long\def\sseq@classname@handler##1{#1{##1}}
+ \fi
+ \fi
+ },
+ class name handler/.sseq default code={
+ \long\def\sseq@classname@handler@default##1{#1}
+ \ifx\sseq@classname@handler@default\@gobble
+ \def\sseq@classname@handler@default##1{\def\result{##1}}
+ \else
+ \edef\sseq@tempa{\unexpanded\@xp{\sseq@classname@handler@default{}}}
+ \edef\sseq@tempb{\unexpanded\@xp{\sseq@classname@handler@default{blah}}}
+ \ifx\sseq@tempa\sseq@tempb
+ \long\def\sseq@classname@handler@default##1{#1{##1}}
\fi
\fi
},
@@ -1700,15 +1742,27 @@
\let\sseq@axistypesanitizer\sseq@axistypesanitizera
\pgfqkeys{/sseqpages}{%
- class label handler/.code = { % \long so that \ifx\classlabeltextfn\@gobble compares true if this is empty (\@gobble is long...)
- \long\def\sseq@classlabeltextfn##1{#1}
- \ifx\sseq@classlabeltextfn\@gobble
- \def\sseq@classlabeltextfn##1{\def\processedlabel{##1}}
+ class label handler/.code = { % \long so that \ifx\sseq@classlabel@handler\@gobble compares true if this is empty (\@gobble is long...)
+ \long\def\sseq@classlabel@handler##1{#1}
+ \ifx\sseq@classlabel@handler\@gobble
+ \def\sseq@classlabel@handler##1{\def\result{##1}}
+ \else
+ \edef\sseq@tempa{\unexpanded\@xp{\sseq@classlabel@handler{}}}
+ \edef\sseq@tempb{\unexpanded\@xp{\sseq@classlabel@handler{blah}}}
+ \ifx\sseq@tempa\sseq@tempb
+ \long\def\sseq@classlabel@handler##1{#1{##1}}
+ \fi
+ \fi
+ },
+ class name handler/.code = { % \long so that \ifx\sseq@classname@handler\@gobble compares true if this is empty (\@gobble is long...)
+ \long\def\sseq@classname@handler##1{#1}
+ \ifx\sseq@classname@handler\@gobble
+ \def\sseq@classname@handler##1{\def\result{##1}}
\else
- \edef\sseq@tempa{\unexpanded\@xp{\sseq@classlabeltextfn{}}}
- \edef\sseq@tempb{\unexpanded\@xp{\sseq@classlabeltextfn{blah}}}
+ \edef\sseq@tempa{\unexpanded\@xp{\sseq@classname@handler{}}}
+ \edef\sseq@tempb{\unexpanded\@xp{\sseq@classname@handler{blah}}}
\ifx\sseq@tempa\sseq@tempb
- \long\def\sseq@classlabeltextfn##1{#1{##1}}
+ \long\def\sseq@classname@handler##1{#1{##1}}
\fi
\fi
}
@@ -1762,7 +1816,11 @@
}
\def\sseq@globalscaleoption#1{%
\sseq@globaldetonefalse
- \@xp\gdef\@xp\sseq@globalscaletransform\@xp{\sseq@globalscaletransform#1}%
+ \@ifundefined{sseq@globalscaletransform}{
+ \@xp\gdef\@xp\sseq@globalscaletransform@default\@xp{\sseq@globalscaletransform@default#1}%
+ }{
+ \@xp\gdef\@xp\sseq@globalscaletransform\@xp{\sseq@globalscaletransform#1}%
+ }
}
\pgfqkeys{/sseqpages/global}{%
x/.sseq @ illegal,
@@ -1802,8 +1860,13 @@
\sseq@break
\fi
\sseq@globalscaleoption{\pgfsetxvec{\pgfpointxy{#1}{0}}}
- \pgfmathparse{\sseq@xscale*#1}
- \edef\sseq@xscale{\pgfmathresult}
+ \@ifundefined{sseq@xscale}{
+ \pgfmathparse{\sseq@xscale@default*#1}
+ \edef\sseq@xscale@default{\pgfmathresult}
+ }{
+ \pgfmathparse{\sseq@xscale*#1}
+ \edef\sseq@xscale{\pgfmathresult}
+ }
\sseq@breakpoint
},
xscale/.value required,
@@ -1821,8 +1884,13 @@
\sseq@break
\fi
\sseq@globalscaleoption{\pgfsetyvec{\pgfpointxy{0}{#1}}}
- \pgfmathparse{\sseq@yscale*#1}
- \edef\sseq@yscale{\pgfmathresult}
+ \@ifundefined{sseq@yscale}{
+ \pgfmathparse{\sseq@yscale@default*#1}
+ \edef\sseq@yscale@default{\pgfmathresult}
+ }{
+ \pgfmathparse{\sseq@yscale*#1}
+ \edef\sseq@yscale{\pgfmathresult}
+ }
\sseq@breakpoint
},
yscale/.value required,