From ff587f620cc7c6d0068c33b27a8e554bce2b08fe Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 3 Aug 2017 21:07:30 +0000
Subject: spectralsequences (3aug17)

git-svn-id: svn://tug.org/texlive/trunk@44942 c570f23f-e606-0410-a88d-b1316a301751
---
 .../latex/spectralsequences/sseqloadstore.code.tex | 41 ++++++++++++++--------
 1 file changed, 26 insertions(+), 15 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/spectralsequences/sseqloadstore.code.tex')

diff --git a/Master/texmf-dist/tex/latex/spectralsequences/sseqloadstore.code.tex b/Master/texmf-dist/tex/latex/spectralsequences/sseqloadstore.code.tex
index e86a1baf071..a72988b39dc 100644
--- a/Master/texmf-dist/tex/latex/spectralsequences/sseqloadstore.code.tex
+++ b/Master/texmf-dist/tex/latex/spectralsequences/sseqloadstore.code.tex
@@ -1,8 +1,8 @@
 %%
-%% Package: spectralsequences.sty version 1.0
+%% Package: spectralsequences v1.1.0
 %% Author: Hood Chatham
 %% Email: hood@mit.edu
-%% Date: 2017-06-18
+%% Date: 2017-08-02
 %% License: Latex Project Public License
 %%
 %% File: sseqloadstore.code.tex
@@ -21,6 +21,7 @@
     \sseq@x@addto@macro\sseq@storelist@setdefaults{\global\let\@nx#1\@xp\@nx\csname \sseq@macroname#1@default\endcsname}%
     \@xp\gdef\csname\sseq@macroname#1@default\endcsname{#2}%
 }
+% TODO: is this used?
 \def\sseq@addtostorelistlet#1#2{%
     \sseq@g@addto@macro\sseq@storelist{\\#1}%
     \sseq@x@addto@macro\sseq@storelist@setdefaults{\global\let\@nx#1\@xp\@nx\csname \sseq@macroname#1@default\endcsname}%
@@ -68,7 +69,6 @@
     \global\@xp\let\csname pgfk@#1/.@body\@xp\endcsname\csname pgfk@#1/.@body@@@\sseq@thename\endcsname
 }
 
-
 \def\sseq@storecmds{\let\\\sseq@storelist@store\let\sseq@storelistif\sseq@storelistif@store\let\sseq@storelistkey\sseq@storelistkey@store\sseq@storelist}
 \def\sseq@getcmds{\let\\\sseq@storelist@get\let\sseq@storelistif\sseq@storelistif@get\let\sseq@storelistkey\sseq@storelistkey@get\sseq@storelist}
 
@@ -82,18 +82,19 @@
 \def\sseq@obj@xdef#1{\@xptwo\xdef\sseq@obj{#1}}
 \def\sseq@obj@protectedxdef#1{\@xptwo\sseq@protected@xdef\sseq@obj{#1}}
 \def\sseq@obj@xodef#1{\@xp\gdef\csname \sseq@obj@fullname{#1}\@xp\endcsname\@xp}
-\def\sseq@obj@let#1{\@xptwo\let\sseq@obj{#1}}
+\def\sseq@obj@let#1{\@xptwo\let\sseq@obj{#1}} % This shouldn't be used anywhere because all object assignments should be global...
+\def\sseq@obj@glet#1{\global\@xptwo\let\sseq@obj{#1}}
 \def\sseq@obj@gletcsname#1#2{\global\@xp\let\csname\sseq@obj@fullname{#1}\@xp\endcsname\csname#2\endcsname}
 \def\sseq@obj@gletobj#1#2{\global\@xp\let\csname\sseq@obj@fullname{#1}\@xp\endcsname\csname\sseq@obj@fullname{#2}\endcsname}
-\def\sseq@obj@undef#1{\@xptwo\let\sseq@obj{#1}\relax}
+\def\sseq@obj@undef#1{\global\@xptwo\let\sseq@obj{#1}\relax}
 \def\sseq@obj@show#1{\@xptwo\show\sseq@obj{#1}}
 \def\sseq@obj@ifundef#1{\@ifundefined{\sseq@obj@fullname{#1}}}
 \def\sseq@obj@ifdef#1#2#3{\@ifundefined{\sseq@obj@fullname{#1}}{#3}{#2}}
+\def\sseq@obj@useifdef@else#1#2{\@ifundefined{\sseq@obj@fullname{#1}}{#2}{\sseq@obj{#1}}}
 \def\sseq@obj@inc#1{\bgroup\sseq@tempcount\sseq@obj{#1}\relax\advance\sseq@tempcount\@ne\sseq@obj@xdef{#1}{\the\sseq@tempcount}\egroup}
-\def\sseq@obj@gaddto{\@xptwo\sseq@g@addto@macro\sseq@obj}
-\def\sseq@obj@xaddto{\@xptwo\sseq@x@addto@macro\sseq@obj}
-\def\sseq@obj@xaddto{\@xptwo\sseq@x@addto@macro\sseq@obj}
-\def\sseq@obj@xoaddto#1{\@xp\sseq@g@addto@macro\csname \sseq@obj@fullname{#1}\@xp\endcsname\@xp}
+\def\sseq@obj@gaddto#1{\sseq@obj@ifundef{#1}{\sseq@obj@gdef{#1}}{\@xptwo\sseq@g@addto@macro\sseq@obj{#1}}}
+\def\sseq@obj@xaddto#1{\sseq@obj@ifundef{#1}{\sseq@obj@xdef{#1}}{\@xptwo\sseq@x@addto@macro\sseq@obj{#1}}}
+\def\sseq@obj@xoaddto#1{\sseq@obj@ifundef{#1}{\sseq@obj@xodef{#1}}{\@xp\sseq@g@addto@macro\csname \sseq@obj@fullname{#1}\@xp\endcsname\@xp}}
 \def\sseq@obj@map#1#2{\def\\##1{#2}\sseq@obj{#1}}
 
 
@@ -126,6 +127,7 @@
 \def\sseq@savedpaths@addclass@standard#1{\sseq@x@addto@macro\sseq@savedpaths{\@nx\sseq@class@draw@ifpage{#1}}}
 \def\sseq@savedpaths@adddifferential@standard#1{\sseq@x@addto@macro\sseq@savedpaths{\@nx\sseq@differential@draw@ifpage{#1}}}
 \def\sseq@savedpaths@addstructline@standard#1{\sseq@x@addto@macro\sseq@savedpaths{\@nx\sseq@structline@draw@ifpage{#1}}}
+\def\sseq@savedpaths@xaddtikzpath@standard#1{\sseq@x@addto@macro\sseq@savedpaths{#1}}
 \def\sseq@savedpaths@add@standard{\sseq@g@addto@macro\sseq@savedpaths}
 \def\sseq@savedpaths@xadd@standard{\sseq@x@addto@macro\sseq@savedpaths}
 \def\sseq@savedpaths@show@standard{\show\sseq@savedpaths}
@@ -134,6 +136,7 @@
 \def\sseq@savedpaths@addclass@temporary#1{\sseq@x@addto@macro\sseq@tempsavedpaths{\@nx\sseq@class@draw@ifpage{#1}}}
 \def\sseq@savedpaths@adddifferential@temporary#1{\sseq@x@addto@macro\sseq@tempsavedpaths{\@nx\sseq@differential@draw@ifpage{#1}}}
 \def\sseq@savedpaths@addstructline@temporary#1{\sseq@x@addto@macro\sseq@tempsavedpaths{\@nx\sseq@structline@draw@ifpage{#1}}}
+\def\sseq@savedpaths@xaddtikzpath@temporary#1{\sseq@x@addto@macro\sseq@tempsavedpaths{#1}}
 \def\sseq@savedpaths@add@temporary{\sseq@g@addto@macro\sseq@tempsavedpaths}
 \def\sseq@savedpaths@xadd@temporary{\sseq@x@addto@macro\sseq@tempsavedpaths}
 \def\sseq@savedpaths@show@temporary{\show\sseq@tempsavedpaths}
@@ -143,6 +146,7 @@
 \def\sseq@savedpaths@addclass@background#1{\sseq@error@internal@n{illegal-add-background-mode}{\sseq@savedpaths@addclass}}
 \def\sseq@savedpaths@adddifferential@background#1{\sseq@error@internal@n{illegal-add-background-mode}{\sseq@savedpaths@adddifferential}}
 \def\sseq@savedpaths@addstructline@background#1{\sseq@error@internal@n{illegal-add-background-mode}{\sseq@savedpaths@addstructline}}
+\def\sseq@savedpaths@xaddtikzpath@background#1{\sseq@x@addto@macro\sseq@savedbackgroundpaths{#1}}
 \def\sseq@savedpaths@add@background{\sseq@g@addto@macro\sseq@savedbackgroundpaths}
 \def\sseq@savedpaths@xadd@background{\sseq@x@addto@macro\sseq@savedbackgroundpaths}
 \def\sseq@savedpaths@show@background{\show\sseq@savedbackgroundpaths}
@@ -150,6 +154,7 @@
 \def\sseq@savedpaths@addclass@ignore#1{}
 \def\sseq@savedpaths@adddifferential@ignore#1{}
 \def\sseq@savedpaths@addstructline@ignore#1{}
+\def\sseq@savedpaths@xaddtikzpath@ignore#1{}
 \def\sseq@savedpaths@add@ignore#1{}
 \def\sseq@savedpaths@xadd@ignore#1{}
 \def\sseq@savedpaths@show@ignore#1{}
@@ -159,6 +164,7 @@
     \@xp\let\@xp\sseq@savedpaths@addclass       \csname sseq@savedpaths@addclass@#1\endcsname
     \@xp\let\@xp\sseq@savedpaths@adddifferential\csname sseq@savedpaths@adddifferential@#1\endcsname
     \@xp\let\@xp\sseq@savedpaths@addstructline  \csname sseq@savedpaths@addstructline@#1\endcsname
+    \@xp\let\@xp\sseq@savedpaths@xaddtikzpath  \csname sseq@savedpaths@xaddtikzpath@#1\endcsname
     \@xp\let\@xp\sseq@savedpaths@add            \csname sseq@savedpaths@add@#1\endcsname
     \@xp\let\@xp\sseq@savedpaths@xadd            \csname sseq@savedpaths@xadd@#1\endcsname
     \pgfutil@ifundefined{sseq@scope@savedpaths@add@#1}{}{%
@@ -167,9 +173,14 @@
     }%
 }
 
-\def\sseq@usesavedpaths{%
-    \sseq@savedpaths
-    \sseq@clearchangestyles
-    \sseq@tempsavedpaths
-    \gdef\sseq@tempsavedpaths{}%
-} 
\ No newline at end of file
+% We don't want to add anything to paths except for tikz paths in background mode
+% We need to draw those because they might affect the bounding box.
+\def\sseq@setsavedpaths@draftmode{
+    \sseq@setsavedpaths{ignore}     % Don't add stuff to paths
+    % Only add tikzpaths if in background mode (so ignore in standard or temporary)
+    \let\sseq@savedpaths@xaddtikzpath@standard\@gobble
+    \let\sseq@savedpaths@xaddtikzpath@temporary\@gobble
+    % Only update mode for tikzpath
+    \def\sseq@setsavedpaths##1{\@xp\let\@xp\sseq@savedpaths@xaddtikzpath  \csname sseq@savedpaths@xaddtikzpath@##1\endcsname}
+}
+
-- 
cgit v1.2.3

