the spectral sequences package -...

52
spectralsequences Hood Chatham [email protected] Version 1.2.2 2019/2/18 The spectralsequences package is a specialized tool built on top of PGF/Tik Z for drawing spectral sequence charts. It provides a powerful, concise syntax for specifying the data of a spectral sequence, and then allows the user to print various pages of a spectral sequence, automatically choosing which subset of the classes, differentials, and structure lines to display on each page. It also handles most of the details of the layout. At the same time, spectralsequences is extremely flexible. It is closely integrated with Tik Z to ensure that users can take advantage of as much as possible of its expressive power. It is possible to turn off most of the automated layout features and draw replacements using Tik Z commands. spectralsequences also has a carefully designed error reporting system intended to ensure that it is as clear as possible what is going wrong. Many thanks to the authors of Tik Z for producing such a wonderful package with such thorough documentation. I would have needed to spend a lot more time reading the Tik Z code if the documentation weren’t so excellent. I took ideas or code or both from tikzcd (part of the code for turning quotes into class or edge labels), pgfplots (axes labels), and sseq (the grid types, the stack). I lifted a fair amount of code from T E Xstack exchange. Thanks to Eva Belmont for tons of helpful suggestions, bug reports, and productive conversations. Talking to her has helped to clarify many design concepts for the package. Thanks to Eric Peterson for being a very early adopter and reporting many bugs. Also thanks to all my friends, family, and acquaintances listened to me talk about L A T E X programming even though they probably found it dreadfully boring.

Upload: others

Post on 10-Aug-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

spectralsequences

Hood Chathamhoodmitedu

Version 1222019218

The spectralsequences package is a specialized tool built on top of PGFTikZfor drawing spectral sequence charts It provides a powerful concise syntax forspecifying the data of a spectral sequence and then allows the user to printvarious pages of a spectral sequence automatically choosing which subset of theclasses differentials and structure lines to display on each page It also handlesmost of the details of the layout At the same time spectralsequences isextremely flexible It is closely integrated with TikZ to ensure that users can takeadvantage of as much as possible of its expressive power It is possible to turnoff most of the automated layout features and draw replacements using TikZcommands spectralsequences also has a carefully designed error reportingsystem intended to ensure that it is as clear as possible what is going wrong

Many thanks to the authors of TikZ for producing such a wonderful packagewith such thorough documentation I would have needed to spend a lot moretime reading the TikZ code if the documentation werenrsquot so excellent I tookideas or code or both from tikzcd (part of the code for turning quotes into classor edge labels) pgfplots (axes labels) and sseq (the grid types the stack) Ilifted a fair amount of code from TEXstack exchange Thanks to Eva Belmont fortons of helpful suggestions bug reports and productive conversations Talkingto her has helped to clarify many design concepts for the package Thanks toEric Peterson for being a very early adopter and reporting many bugs Alsothanks to all my friends family and acquaintances listened to me talk aboutLATEX programming even though they probably found it dreadfully boring

Contents

1 Introduction 3

11 Installation 3

12 Memory Constraints 3

13 A warning about fragile macros 4

2 Package Options and Environments 4

3 The Main Commands 4

4 Options for the main commands 9

41 Universal options 9

42 Options for class 12

43 Options for d and structline 17

44 Options for circleclass 19

45 Options for TikZ primitives 20

5 Miscellaneous Commands 23

51 Settings 23

52 Code reuse commands 24

53 Families 27

54 Utilities 28

55 Coordinate parsers and related 30

56 The class stack 32

6 Styles 33

61 Style-like options 37

7 Global Options 39

71 Global coordinate transformations 45

72 Plot options and axes style 45

73 Layout 49

1 Introduction

The spectralsequences package consists of two main environments ndash the sseqdata environment whichspecifies the data for a named spectral sequence and the sseqpage environment which prints a singlepage of a spectral sequence The printpage command is also available as a synonym for a sseqpageenvironment with an empty body

Here is a basic example

0 1 2 3

0

1

2

0 1 2 3

0

1

2

beginsseqdata[ name = basic xscale = 06cohomological Serre grading ]

class(00)class(02)class(30)class(32)d3(02)endsseqdataprintpage[ name = basic page = 3 ] quadprintpage[ name = basic page = 4 ]

beginsseqdata[name = basic cohomological Serre grading] starts the declaration of the data ofa spectral sequence named basic with cohomological Serre grading ndash that is the page r differentials gor to the right and down rminus 1 Then we specify four classes and one page 3 differential and we askspectralsequences to print the third and fourth pages of the spectral sequence Note that on the fourthpage the source and target of the differential have disappeared

11 Installation

In both MiKTEX and TEX Live installation should be automatic ndash your TEX distribution should automaticallyinstall the package the first time you include usepackagespectralsequences in a document and compileit However in 2016 TEX Live made an incompatible change to their database so no new packages will runon versions of TEX Live from before 2016 This includes spectralsequences If you have an old version ofTEX Live you can either perform a manual install or better you should install an up to date version ofTEX Live If you want to do a manual install see this TEXstack exchange post for instructions

12 Memory Constraints

In a default TEX install PDFLATEX has small static memory caps that prevent it from using more than about60 megabytes of total ram However spectralsequences and PGFTikZ use a large amount of memory Forthis reason using PDFLATEX with a default install you cannot draw more than about 2500 classes acrossall of your diagrams (fewer if you include differentials structure lines and other features) There are a fewsolutions to this

The easiest solution is to run LuaLATEX LuaLATEX dynamically allocates memory and so is unlikely to runout of it Using LuaLATEX on my computer I can compile a document that draws two copies of a diagramwith 20000 classes in it (so a total of 40000 classes) This takes about 50 seconds and 250 megabytes ofram I expect any real-world use case will compile fine on a modern computer using LuaLATEX This optionhas the advantage that any modern TEX install comes with a copy of LuaLATEX and that LuaLATEX is thedesignated successor to PDFLATEX It has the disadvantage that there are some incompatibilities betweenLuaLATEX and PDFLATEX so if your document depends on PDFLATEX-specific features it might be a painto switch to LuaLATEX

Another option is to increase the static memory caps for PDFLATEX See this TEXstack exchange post forinstructions on how to do this

3

13 A warning about fragile macros

All the data in a spectralsequences environment is stored and used later As a result most of the spec-tralsequences commands currently cannot tolerate fragile macros Unfortunately it is impossible for spec-tralsequences to warn you about this situation ndash if you use a fragile command in a place that it doesnrsquotbelong the result will be an incomprehensible error message If you are getting nonsense error messagesthis might be why The solution is to convert fragile macros into robust ones Common examples of fragilemacros include widehat and underline My suggested solution to this is to add the following code toyour preamble for each fragile macro (example given for mathbb)

letoldwidehatwidehatprotecteddefwidehatoldwidehat

2 Package Options and EnvironmentsDraft Mode

The drawings that spectralsequences produces can be quite slow especially if they are large Draftmode skips drawing the content of the spectral sequence but still takes up exactly the same amountof space in the document so that you can deal with formatting issues To active draft mode load thepackage by saying usepackage[draft]spectralsequences

beginsseqdata[〈options〉]〈environment contents〉

endsseqdata

The sseqdata environment is for storing a spectral sequence to be printed later This environment isintended for circumstances where you want to print multiple pages of the same spectral sequence Whenusing the sseqdata environment you must use the name option to tell spectralsequences where tostore the spectral sequence so that you can access it later

beginsseqpage[〈options〉]〈environment contents〉

endsseqpage

This environment is used for printing a page of existing spectral sequence that was already specified usingthe sseqdata environment The body of the environment adds local changes ndash classes differentialsstructure lines and arbitrary TikZ options that are by default only printed on this particular page Thesseqpage environment can also be used to print a stand-alone page of a spectral sequence ndash that isif you only want to print a single page of the spectral sequence you can skip using the sseqdataenvironment

printpage[〈options〉]This command prints a single page of an existing spectral sequence as-is This is equivalent to asseqpage environment with an empty body

3 The Main Commandsclass[〈options〉](〈x 〉〈y〉)

This places a class at (xy) where x and y are integers If multiple classes occur at the same positionspectralsequences will automatically arrange them in a pre-specified pattern This pattern may bealtered using the class pattern option

4

beginsseqpage[ no axes ymirror yscale = 08 ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqpage

The effect of the class command is to print a TikZ node on a range of pages Any option that wouldwork for a TikZ node command will also work in the same way for the class replaceclass andclassoptions commandsIf a class is the source or the target of a differential on a certain page then the page of the class is setto that page and the class is only rendered on pages up to that number

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = class exampleAdams gradingyscale = 053 ]

class(10)class(02)class(03)d2(10)endsseqdataprintpage[ name = class example page = 2 ]quadprintpage[ name = class example page = 3 ]

See the class options section for a list of the sort of options available for classes

replaceclass[〈options〉](〈x 〉〈y〉〈n〉)replaceclass[〈options〉](〈classname〉)replacesource[〈options〉]replacetarget[〈options〉]

After a class is the source or target of a differential it disappears on the next page However somedifferentials are not injective or not surjective Using the command replaceclass causes a new symbolto appear on the page after a class supported or accepted a differential (or both) If there are multipleclasses at the coordinate (xy) you may specify which using an integer or a tag n By default thiscommand will affect the first class placed in that position You can also provide the name of a classThe variants replacesource and replacetarget replace the source and target respectively of themost recent differential

0 1

0

1

2

3 Z

Z

Z

middot2middot2

0 1

0

1

2

3 Z2

Z

0 1

0

1

2

3

2Z

5

beginsseqdata[name = replace class example Adams grading classes = draw = none ]class[mathbbZ](03)class[mathbbZ](11)class[mathbbZ](10)d[cdot 2]2(11)replacetarget[mathbbZ2] replaceclass[mathbbZ2](03)d[-raquo]3(10)replacesource[2mathbbZ] replaceclass[2mathbbZ](10)endsseqdataprintpage[ name = replace class example page = 2 ] qquadprintpage[ name = replace class example page = 3 ] qquadprintpage[ name = replace class example page = 4 ]

Note that this will not restore any structure lines coming into or off of the class if you want the structurelines to persist you must call structline again (or use the page option)

classoptions[〈options〉](〈x 〉〈y〉〈n〉)classoptions[〈options〉](〈classname〉)classoptions[〈options〉]

This adds options to an existing class This can be used in a sseqpage environment to modify theappearance of a class for just one drawing of the spectral sequence for instance to highlight it fordiscussion purposesIf there are multiple classes at the coordinate (xy) you may specify which using an integer or a tagn By default this command will affect the first class placed in that position You can also provide thename of a class If no coordinate is indicated at all then lastclass is used

0 1 2

0

1

The red class is the problem

beginsseqdata[ name = class options exampleclasses = fill ]

class(21)foreach x in 02 foreach y in 01

class(xy)endsseqdatabeginsseqpage[ name = class options example

right clip padding = 06cm ]classoptions[red](212) Only is red on this pagenode[ background ] at (03-22)

textupThe red class is the problemendsseqpage

Another reason to use this is to give a label to one instance of a class that shows up in a loop or acommand defined using NewSseqGroup

0 1 2 3

0

1

2

3

4

2 η

NewSseqGroupmygroup class(00)class(01)class(02)class(11)class(22)structline(00)(01)structline(01)(02)structline(00)(11)structline(11)(22)

beginsseqpage[ classes = fill class labels = left = 03em ]mygroup(00)mygroup(12)classoptions[2](01)classoptions[eta](11)endsseqpage

See the class options section for a list of the sort of options available for classes

d[〈options〉]〈page〉d[〈options〉]〈page〉(〈x 〉〈y〉〈source n〉〈target n〉)

6

d[〈options〉]〈page〉(〈source name〉〈target n〉)d[〈options〉]〈page〉(〈source coordinate〉)(〈target coordinate〉)

Calling d〈page〉(〈x 〉〈y〉) creates a differential starting at (〈x 〉〈y〉) of length determined by the speci-fied page In order to use the d command like this you must first specify the degree of the differentialsas an option to the sseqdata or sseqpage environment The degree indicates how far to the rightand how far up a page r differential will go as a function of r If there is a page r differential on pager+ 1 the source target and any structure lines connected to the source and target of the differentialdisappear If no class is specified the default is to use lastclassIf there are multiple nodes in the source or target you may specify which one the differential should goto using an index or tag for 〈source n〉 or 〈target n〉 It is also possible to provide the name of the sourcecoordinate and an optional target or to separately provide the source and target coordinate either asnames or as (〈x 〉〈y〉〈n〉) Using d with explicit source and target coordinates works even if you didnot provide a degree to the spectral sequence If you did provide a degree then spectralsequenceswill check whether the difference between the source and target is appropriate for a differential of a givenpage and if not it will throw an error If this is undesirable you can use the lax degree option

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = d example degree = -11struct lines = blue yscale = 13 ]

class(02)class(12)class(11)class(10)structline(12)(02)structline(12)(11)structline(11)(10)d2(10)endsseqdataprintpage[ name = d example page = 2 ] quadprintpage[ name = d example page = 3 ]

If there are multiple nodes in the source or target coordinate then there is a funny syntax for indicatingwhich one should be the source and target d〈page〉(〈x 〉〈y〉sourcentargetn)

0 1 2 3

0

1

2

beginsseqpage[ Adams grading yscale = 08 ]class(10) class(10)class(02) class(02)d2(1012)class(20) class(20)class(12)d2(202)class(30)class(22) class(22)d2(30bdquo2)endsseqpage

Negative indices will count from the most recent class in the coordinate (so the most recent is -1the second most recent is -2 etc) You can also use a tag which works better if the situation iscomplicated

0 1

0

1

2

beginsseqpage[ Adams grading yscale = 065 ]class(10)class(02) class(02)d[blue]2(10-1-1)class(10)class(02)d[orange]2(10-1-1)class(10)d[red]2(10-1-2)endsseqpage

doptions[〈options〉]〈page〉(〈x 〉〈y〉〈source n〉〈target n〉)doptions[〈options〉]〈page〉(〈source name〉〈target n〉)

7

doptions[〈options〉]〈page〉(〈source coordinate〉)(〈target coordinate〉)This command adds options to an existing differential just like classoptions except for differentialsIts syntax is identical to that of d

kill〈page〉[〈coord〉]This command sets the indicated coordinate to die on the indicated page but does not establish a targetfor the differential This is useful if you want to draw your own differential using tikz (see getdtarget)or if you are not drawing the class on the other side of the differential for clutter reasons As usual ifno coordinate is provided the default argument is lastclass

structline[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command creates a structure line from 〈source coordinate〉 to 〈target coordinate〉 The source andtarget coordinates are either of the form (〈x 〉〈y〉〈n〉) or (〈class name〉) If there are multiple classesat (x y) then 〈n〉 specifies which of the classes at (x y) the structure line starts and ends at ndash if n ispositive then it counts from the first class in that position if n is negative it counts backwards fromthe most recent You can also use a tag for n If the 〈target coordinate〉 is omitted then lastclass isused so that structline(sourcecoord) connects the most recent class to the specified coordinateIf both coordinates are omitted then lastclass and lastclass1 are used and so structline withno arguments at all will connect the two most recent classesIf the source or target of a structure line is hit by a differential then on subsequent pages the structureline disappearsIf the source or target has had multiple generations (ie they got hit and you used replaceclass)then the structline will only appear starting on the first page where the current generation of boththe source and target are present If this is undesirable you can use the page option to change it

DeclareSseqGrouptower class(00)foreach y in 15

class(0y)structline

class(02)structline(01-1)structline(03-1)

beginsseqdata[ name = structline example

classes = circle fill Adams grading no axesyscale = 128 ]

class(11) class(12)class(23) class(23) class(25)tower[classes = blue](00)tower[struct lines = dashedorange](10)tower[struct lines = red](20)d2(112)endsseqdataprintpage[ name = structline example page = 2 ] quadprintpage[ name = structline example page = 3 ]

structlineoptions[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command adds options to an existing structure line just like classoptions except for structurelines Its syntax is identical to structline

circleclasses[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command is a lot like structline except that it puts a circle around the classes instead of connect-ing them with a line It might take a certain amount of fiddling with options to get circleclasses toproduce good results There is no circleclassesoptions command because it doesnrsquot seem necessaryand (more importantly) I didnrsquot feel like making one Maybe someday Irsquoll put one in

8

drawpathnodeclip

Any code that would work in a tikzpicture environment will also work unchanged in a sseqdataor sseqpage environment with a few minor differences This is a very flexible way to add arbitrarybackground or foreground features to the spectral sequence

0 1 2

0

1

2

Consider thisdifferential

0 1 2

0

1

2

This isthe source

This isthe target

0 1 2

0

1

2

Now itrsquos gone

beginsseqdata[ name = tikz example Adams grading math nodes = falsetikz primitives = blue font = tiny lt- circle classes = tikz primitive stylex range = 02 x axis extend end = 2em ]

class(00)class(10)class(02)d2(10)endsseqdatabeginsseqpage[ name = tikz example ]circleclasses[ name path = myellipse inner sep = 3pt ellipse ratio = 16 ] (10) (02)path[ name path = myline ] (13125) -- (061)draw[ name intersections = of = myellipse and myline ]

(intersection-1) to (13125) node[ right text width = 16cm ] Consider this differentialendsseqpage qquadbeginsseqpage[ name = tikz example ]draw[ xshift = 1 ] (00) to (0602) node[ right text width = 11cm ] This is the sourcedraw[ yshift = 2 ] (00) to (0602) node[ right text width = 11cm ] This is the targetendsseqpage qquadbeginsseqpage[ page = 3 name = tikz example ]circleclasses[ inner sep = 3pt ellipse ratio = 16 ] (10)(02)node[ right font = tiny ] at (1212) Now itrsquos goneendsseqpage

4 Options for the main commands

41 Universal options

The following options work with all of the drawing commands in this package including class d andstructline their friends replaceclass classoptions doptions and structlines as well as withTikZ primitives

xshift = 〈integer〉yshift = 〈integer〉

Shifts by integer values are the only coordinate changes that are allowed to be applied to class dstructline their relatives or to a scope environment that contains any of these commands Theseshift commands help with reusing code For instance

9

0 1 2 3

0

1

2

beginsseqpage[ cohomological Serre grading yscale = 045 ]foreach x in 01 foreach y in 01

beginscope[ xshift = x yshift = y ]class(20)class(01)d2(01)endscope

endsseqpage

This code segment is very useful so spectralsequences has the command NewSseqGroup which tomake code like this more convenient The following code produces the same output as above

NewSseqGroupexamplegroup class(20)class(01)d2(01)

beginsseqpageexamplegroup(00)examplegroup(01)examplegroup(10)examplegroup(11)endsseqpage

A word of warning the behavior of xshift in spectralsequences is incompatible with the normalbehavior of xshift in TikZ For some reason saying xshift = 1 in TikZ does not shift the coordinate(00) to the coordinate (10) ndash instead it shifts by 1pt In spectralsequences saying xshift = 1moves the coordinate (00) to the coordinate (10) This includes TikZ primitives saying draw[xshift = 1 ] (00) -- (10) inside a sseqdata or sseqpage environment is the same as sayingdraw(10) -- (20) despite the fact that this is not the case in the tikzpicture environment

ColorsThese come from the LATEX color package via TikZ so see the color package documentation for moreinformation

beginsseqpage[ classes = fillinner sep = 04emno axes scale = 13 ]

class[red](00)class[blue](10)class[green](20)class[cyan](01)class[magenta](11)class[yellow](21)class[blue50red](02) a 50-50 blend of blue and redclass[green30yellow](12) 30 green 70 yellowclass[blue50black](22)endsseqpage

〈text〉〈options〉Specify a label for a class a differential or a structure line This uses the TikZ quotes syntax Ifthe label text includes an equal sign or comma you need to enclose the entire label in braces egclass[x = y](00) The options include anything you might pass as an option to a TikZ nodeincluding arbitrary coordinate transforms colors opacity options shapes fill draw etc The behavioris a little different depending on whether you use it on a class or on a differential or structure lineFor a class the 〈text〉 is placed in the position inside the node by default ndash in effect the 〈text〉 becomesthe label text of the node (so saying class[label text](00) causes a similar effect to sayingnode at (00) label text) There are other position options such as left above left etcwhich cause the label text to be placed in a separate node positioned appropriately If the placement isabove left etc then any option that you may pass to a TikZ node will also work for the label includinggeneral coordinate transformations If the placement is ldquoinsiderdquo then the only relevant 〈options〉 arethose that alter the appearance of text such as opacity and color

10

a a a

b

b

a beginsseqpage[ classes = minimum width = width(a) + 05em no axes ]class[a](00)class[a red](10)class[a black red](20)class[b above](01)class[b below right yshift = 01cm ](11)class[a above right = 1em ](21)endsseqpage

You can adjust the default behavior of class labels using the labels style option or its relativesclass labels inner class labels or outer class labels Note that it is also possible to givea label to a node this way although the behavior is slightly different In particular the label defaultsto the above position instead of going in the node text by default Also this wonrsquot respect the variouslabel style options like labels etc

a beginsseqpage[ no axes ]class(00)class(20)node[circle fill a] at (10) endsseqpage

pin = 〈style〉The pin key makes spectralsequences draw a line connecting the label to the relevant class whichcan provide necessary clarification in dense diagrams The pin key itself can take options whichadjust the way that the line is drawn

0

0

1

xy

beginsseqpageclass(00)class[xy above xshift = -4pt pin = red ](00)class(00)class(01)structlineendsseqpage

For either a structline or a class the label normally goes on the right side of the edge The specialoption rsquo makes it go in the opposite position from the default I imitated the label handling in thetikzcd package so if you use tikzcd this should be familiar

0 1

0

1

2

aa bb

middot2middot2

beginsseqpage[ Adams grading yscale = 063 ]class(00)class(01)class(02)structline[arsquo blue](00)(01)class(10)class(11)structline[b](10)(11)d[ cdot 2 pos = 07 yshift = -5pt ] 2 (10)endsseqpage

You can use the style options labels edge labels differential labels and struct line labelsto adjust the styling of edge labels For instance if you would prefer for the labels to default to the lefthand side of the edge rather than the right hand side you could say edge labels = auto = leftYou can also use quotes to label edges drawn with TikZ primitives

hi

beginsseqpage[ yscale = 058 no axes ]class(00)class(11)draw (10) to[hirsquo pos = 07 yshift = -05em ] (01)endsseqpage

11

description

The description key stolen from tikzcd places the label on top of the edge In order to makethis option work correctly if the background coolor is not the default white you must informspectralsequences about this using the key background color = 〈color〉 In this document thebackground color is called graphicbackground

aa aprimeb

aprimeb

cc

beginsseqpage[ no axes background color = graphicbackground ]foreach x in 012 foreach y in 01

class(xy)structline[a red](00)(01)structline[arsquorsquobluebyshift = 1em](10)(11)structline[c description](20)(21)endsseqpage

42 Options for class

Because the main job of the class command is to print a TikZ node on the appropriate pages of thespectral sequence most options that would work for a TikZ node also work for the commands classreplaceclass and classoptions Here are a few that you might care about

A TikZ shapeIf you give the name of a TikZ shape the class node will be of that shape The standard TikZ shapesare circle and rectangle spectralsequences defines two new shapes

circlen = 〈n〉This draws n concentric circles Itrsquos intended for indicating a Zpn summand For large values ofn the result isnrsquot all that appealing

beginsseqpage[ no axes ]class[circlen = 2](00)class[circlen = 2fill](10)class[circlen = 3](01)class[circlen = 4](11)endsseqpage

newellipseellipse ratio = 〈ratio〉

This shape is used for circleclasses Itrsquos a variant on the ellipse shape that gives more controlover the ellipsersquos aspect ratio

There are many more TikZ shapes in the shapes library which you can load using the commandusetikzlibraryshapes The following are some examples

beginsseqpage[ no axes classes = inner sep = 04em class placement transform = scale = 18 yscale = 163 ]

class(00)class[isosceles triangle](20)class[rectangle](10)class[diamond](01)class[semicircle](11)class[regular polygon regular polygon sides = 5](22)class[regular polygon regular polygon sides = 6](22)class[regular polygon regular polygon sides = 7](22)class[regular polygon regular polygon sides = 8](22)endsseqpage

See the TikZ manual for more information

12

minimum width = 〈dimension〉minimum height = 〈dimension〉minimum size = 〈dimension〉inner sep = 〈dimension〉outer sep = 〈dimension〉

These options control the size of a node This is typically useful to make the size of nodes consistentindependent of the size of their label text For instance

ab

a

ab

a

beginsseqdata[ name = minimum width example no axes yscale = 08 ]class[ab](00)class[a](01)class(02)endsseqdataprintpage[ name = minimum width example ]printpage[ name = minimum width examplechange classes = blue minimum width = width(ab) + 05em ]

name = 〈node name〉The class command makes a TikZ node on appropriate pages You can refer to this node using TikZcommands by using its coordinates Using the name option you can give the node a name which youcan use to refer to the class Using names creates more readable code The show name option can beused to display the names of classes You can modify the names of classes systematically using theoptions class name prefix class name postfix and class name handlerNamed classes are immune to coordinate transformations For example in the following code xshiftdoes not apply to the nodes specified by (id) and (eta) but does apply to the coordinate specified by(11)

0 1 2

0

1

1

η beginsseqpage[classes = show name=above ]class[name = 1](00)class[name = eta](11)class(21)structline[xshift = 1] (1) (eta)structline[xshift = 1blue] (1) (11)endsseqpage

show name = 〈label options〉This option is like saying class name〈label options〉 if the class has a name and does nothing ifthe class has no name If the class has multiple names only the most recent is used This is particularlyuseful with class styles For instance by saying this page classes = show name = above youcan display names of all of the sources and targets of differentials on each page

0 1

0

1

2

3

a

x

0 1

0

1

2

3b

2x

beginsseqdata[name = show name examplethis page classes = show name = above right pin

]class[ name = a ](02)class[ name = b ](03)class[ name = x ](10)d2(x)(a)replacesource[name=2x]d3(x)(b)endsseqdata

printpage[ name = show name example page = 2]

printpage[ name = show name example page = 3]

tag = 〈tag〉

13

This key adds a tag to the current class Tags are used for identifying which of multiple classes in thesame position you are referring to They are useful when you have groups of related classes and want afamily of differentials connecting them For instance

0 1 2 3 4 5

0

1

2

3

4

5

DeclareSseqGrouptower class(00)foreach i in 111

class(0i)structline(0i-1-1)(0i-1)

NewSseqGrouphvee

tower(00)foreach i in 111

class(ii)structline(i-1i-1-1)(ii-1)

beginsseqpage[ degree = -11 yscale = 11

x range = 05 y range = 05 ]tower(30)hvee[ tag = id ](00)hvee[ tag = h21 ](42)foreach n in 05

d2(4+n2+nh21id)endsseqpage

We want each differential to go from the h21 vee to the id vee independent of which classes are in thesame position of the two vees The easy way to accomplish this is by giving tags to each of the two vees

insert = 〈integer〉If there are multiple classes in the same position this option allows you to insert classes later into earlierpositions This is intended to help you put logically related classes next to each other If the integer ispositive it inserts the class in the specified position and if the integer is negative it counts backwardsfrom the end Providing 0 is the same as omitting the option entirely Values larger in absolute valuethan the total number of classes are truncated Consider

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

14

DeclareSseqGroup tower class(00)DoUntilOutOfBounds

class(lastxlasty+1)structline

beginsseqdata[ name = insert-example y range = 04 class pattern = linear ]tower(02)tower(03)tower(01)endsseqdataqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 1 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 3 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -3 ](00)endsseqpage

offset = (〈x offset〉〈y offset〉)By default a class uses the offset specified by class pattern Occasionally this is undesirable In thiscase you can specify the offset for a particular class by hand For example if the sum of two classes ishit by a differential it looks better for the class replacing them to be centered

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = offset examplexscale = 07Adams gradingclass placement transform = scale = 18 ]

class(01)class(02)class(02)draw(01)--(02)class(10)d2(10bdquo1)replacetargetd2(10bdquo2)endsseqdataprintpage[name = offset example page=2]printpage[name = offset example page=3]beginsseqpage[name = offset example page=3]classoptions[offset = (00)](02)endsseqpage

tooltip = 〈text〉This key generates a ldquotooltiprdquo over the given class That is if you hover your mouse over it a littlewindow will popup with the tooltip text This is particularly useful to give the coordinates or names ofclasses in large charts where it may be hard to tell from looking at the picture what position the classis in or there may not be room to supply names to classesThe tooltip is made using the pdftooltip command from the pdfcomment package The pdfcommentpackage generates two extra auxiliary files so it is not included by default In order to use thetooltip option you have to use the tooltips package option (eg load spectralsequences with

15

usepackage[tooltips]spectralsequences) This cannot handle math but it will print math ex-pressions into TEX input form Not all pdf viewers will display the tooltip correctly If this concernsyou the command sseqtooltip is used to produce the tooltip and you can redefine it as any othercommand that takes sseqtooltip〈text〉〈tooltip text〉 and produces a tooltip For instance on thisstack exchange post there is code that supposedly produces tooltips that work with Evince I havenot tested whether it works by itself or whether it works with my package but you could You couldpotentially figure out how to get math to work in tooltips too ndash if you find a satisfactory method pleaselet me knowAnyways herersquos an example

0 1

0

1

beginsseqpage[classes = tooltip = (xcoordycoord)]class(00)class(01)class(10)class(11)endsseqpage

Therersquos another example at the beginning of the section on the class stack

page = 〈page〉--〈page max 〉generation = 〈generation〉--〈generation max 〉

These options only work in classoptions The page option gives a range of pages for which theoptions apply to If only one page is specified it is the minimum page and the option applies to alllarger pages

1 2 4 beginsseqdata[ name = page_example no axestitle = page title style = yshift = -05cm ]

class(00)classoptions[page = 2 -- 3 fill blue](00)endsseqdata

printpage[ name = page_example page = 1 ] qquadprintpage[ name = page_example page = 2 ] qquadprintpage[ name = page_example page = 4 ]

A ldquogenerationrdquo of a class is the interval from one call of class or replaceclass to the page onwhich it next supports or is hit by a differential By default the classoptions command adds optionsonly to the most recent generation of the class in a sseqdata environment or on the generationappropriate to the current page in a sseqpage environment Using the generation option allows youto provide a single generation or range of generations of the class that the options should apply to Thefirst generation is generation 0 and the most recent generation is generation -1 Larger negative valuescount backwards

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

16

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 2: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

Contents

1 Introduction 3

11 Installation 3

12 Memory Constraints 3

13 A warning about fragile macros 4

2 Package Options and Environments 4

3 The Main Commands 4

4 Options for the main commands 9

41 Universal options 9

42 Options for class 12

43 Options for d and structline 17

44 Options for circleclass 19

45 Options for TikZ primitives 20

5 Miscellaneous Commands 23

51 Settings 23

52 Code reuse commands 24

53 Families 27

54 Utilities 28

55 Coordinate parsers and related 30

56 The class stack 32

6 Styles 33

61 Style-like options 37

7 Global Options 39

71 Global coordinate transformations 45

72 Plot options and axes style 45

73 Layout 49

1 Introduction

The spectralsequences package consists of two main environments ndash the sseqdata environment whichspecifies the data for a named spectral sequence and the sseqpage environment which prints a singlepage of a spectral sequence The printpage command is also available as a synonym for a sseqpageenvironment with an empty body

Here is a basic example

0 1 2 3

0

1

2

0 1 2 3

0

1

2

beginsseqdata[ name = basic xscale = 06cohomological Serre grading ]

class(00)class(02)class(30)class(32)d3(02)endsseqdataprintpage[ name = basic page = 3 ] quadprintpage[ name = basic page = 4 ]

beginsseqdata[name = basic cohomological Serre grading] starts the declaration of the data ofa spectral sequence named basic with cohomological Serre grading ndash that is the page r differentials gor to the right and down rminus 1 Then we specify four classes and one page 3 differential and we askspectralsequences to print the third and fourth pages of the spectral sequence Note that on the fourthpage the source and target of the differential have disappeared

11 Installation

In both MiKTEX and TEX Live installation should be automatic ndash your TEX distribution should automaticallyinstall the package the first time you include usepackagespectralsequences in a document and compileit However in 2016 TEX Live made an incompatible change to their database so no new packages will runon versions of TEX Live from before 2016 This includes spectralsequences If you have an old version ofTEX Live you can either perform a manual install or better you should install an up to date version ofTEX Live If you want to do a manual install see this TEXstack exchange post for instructions

12 Memory Constraints

In a default TEX install PDFLATEX has small static memory caps that prevent it from using more than about60 megabytes of total ram However spectralsequences and PGFTikZ use a large amount of memory Forthis reason using PDFLATEX with a default install you cannot draw more than about 2500 classes acrossall of your diagrams (fewer if you include differentials structure lines and other features) There are a fewsolutions to this

The easiest solution is to run LuaLATEX LuaLATEX dynamically allocates memory and so is unlikely to runout of it Using LuaLATEX on my computer I can compile a document that draws two copies of a diagramwith 20000 classes in it (so a total of 40000 classes) This takes about 50 seconds and 250 megabytes ofram I expect any real-world use case will compile fine on a modern computer using LuaLATEX This optionhas the advantage that any modern TEX install comes with a copy of LuaLATEX and that LuaLATEX is thedesignated successor to PDFLATEX It has the disadvantage that there are some incompatibilities betweenLuaLATEX and PDFLATEX so if your document depends on PDFLATEX-specific features it might be a painto switch to LuaLATEX

Another option is to increase the static memory caps for PDFLATEX See this TEXstack exchange post forinstructions on how to do this

3

13 A warning about fragile macros

All the data in a spectralsequences environment is stored and used later As a result most of the spec-tralsequences commands currently cannot tolerate fragile macros Unfortunately it is impossible for spec-tralsequences to warn you about this situation ndash if you use a fragile command in a place that it doesnrsquotbelong the result will be an incomprehensible error message If you are getting nonsense error messagesthis might be why The solution is to convert fragile macros into robust ones Common examples of fragilemacros include widehat and underline My suggested solution to this is to add the following code toyour preamble for each fragile macro (example given for mathbb)

letoldwidehatwidehatprotecteddefwidehatoldwidehat

2 Package Options and EnvironmentsDraft Mode

The drawings that spectralsequences produces can be quite slow especially if they are large Draftmode skips drawing the content of the spectral sequence but still takes up exactly the same amountof space in the document so that you can deal with formatting issues To active draft mode load thepackage by saying usepackage[draft]spectralsequences

beginsseqdata[〈options〉]〈environment contents〉

endsseqdata

The sseqdata environment is for storing a spectral sequence to be printed later This environment isintended for circumstances where you want to print multiple pages of the same spectral sequence Whenusing the sseqdata environment you must use the name option to tell spectralsequences where tostore the spectral sequence so that you can access it later

beginsseqpage[〈options〉]〈environment contents〉

endsseqpage

This environment is used for printing a page of existing spectral sequence that was already specified usingthe sseqdata environment The body of the environment adds local changes ndash classes differentialsstructure lines and arbitrary TikZ options that are by default only printed on this particular page Thesseqpage environment can also be used to print a stand-alone page of a spectral sequence ndash that isif you only want to print a single page of the spectral sequence you can skip using the sseqdataenvironment

printpage[〈options〉]This command prints a single page of an existing spectral sequence as-is This is equivalent to asseqpage environment with an empty body

3 The Main Commandsclass[〈options〉](〈x 〉〈y〉)

This places a class at (xy) where x and y are integers If multiple classes occur at the same positionspectralsequences will automatically arrange them in a pre-specified pattern This pattern may bealtered using the class pattern option

4

beginsseqpage[ no axes ymirror yscale = 08 ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqpage

The effect of the class command is to print a TikZ node on a range of pages Any option that wouldwork for a TikZ node command will also work in the same way for the class replaceclass andclassoptions commandsIf a class is the source or the target of a differential on a certain page then the page of the class is setto that page and the class is only rendered on pages up to that number

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = class exampleAdams gradingyscale = 053 ]

class(10)class(02)class(03)d2(10)endsseqdataprintpage[ name = class example page = 2 ]quadprintpage[ name = class example page = 3 ]

See the class options section for a list of the sort of options available for classes

replaceclass[〈options〉](〈x 〉〈y〉〈n〉)replaceclass[〈options〉](〈classname〉)replacesource[〈options〉]replacetarget[〈options〉]

After a class is the source or target of a differential it disappears on the next page However somedifferentials are not injective or not surjective Using the command replaceclass causes a new symbolto appear on the page after a class supported or accepted a differential (or both) If there are multipleclasses at the coordinate (xy) you may specify which using an integer or a tag n By default thiscommand will affect the first class placed in that position You can also provide the name of a classThe variants replacesource and replacetarget replace the source and target respectively of themost recent differential

0 1

0

1

2

3 Z

Z

Z

middot2middot2

0 1

0

1

2

3 Z2

Z

0 1

0

1

2

3

2Z

5

beginsseqdata[name = replace class example Adams grading classes = draw = none ]class[mathbbZ](03)class[mathbbZ](11)class[mathbbZ](10)d[cdot 2]2(11)replacetarget[mathbbZ2] replaceclass[mathbbZ2](03)d[-raquo]3(10)replacesource[2mathbbZ] replaceclass[2mathbbZ](10)endsseqdataprintpage[ name = replace class example page = 2 ] qquadprintpage[ name = replace class example page = 3 ] qquadprintpage[ name = replace class example page = 4 ]

Note that this will not restore any structure lines coming into or off of the class if you want the structurelines to persist you must call structline again (or use the page option)

classoptions[〈options〉](〈x 〉〈y〉〈n〉)classoptions[〈options〉](〈classname〉)classoptions[〈options〉]

This adds options to an existing class This can be used in a sseqpage environment to modify theappearance of a class for just one drawing of the spectral sequence for instance to highlight it fordiscussion purposesIf there are multiple classes at the coordinate (xy) you may specify which using an integer or a tagn By default this command will affect the first class placed in that position You can also provide thename of a class If no coordinate is indicated at all then lastclass is used

0 1 2

0

1

The red class is the problem

beginsseqdata[ name = class options exampleclasses = fill ]

class(21)foreach x in 02 foreach y in 01

class(xy)endsseqdatabeginsseqpage[ name = class options example

right clip padding = 06cm ]classoptions[red](212) Only is red on this pagenode[ background ] at (03-22)

textupThe red class is the problemendsseqpage

Another reason to use this is to give a label to one instance of a class that shows up in a loop or acommand defined using NewSseqGroup

0 1 2 3

0

1

2

3

4

2 η

NewSseqGroupmygroup class(00)class(01)class(02)class(11)class(22)structline(00)(01)structline(01)(02)structline(00)(11)structline(11)(22)

beginsseqpage[ classes = fill class labels = left = 03em ]mygroup(00)mygroup(12)classoptions[2](01)classoptions[eta](11)endsseqpage

See the class options section for a list of the sort of options available for classes

d[〈options〉]〈page〉d[〈options〉]〈page〉(〈x 〉〈y〉〈source n〉〈target n〉)

6

d[〈options〉]〈page〉(〈source name〉〈target n〉)d[〈options〉]〈page〉(〈source coordinate〉)(〈target coordinate〉)

Calling d〈page〉(〈x 〉〈y〉) creates a differential starting at (〈x 〉〈y〉) of length determined by the speci-fied page In order to use the d command like this you must first specify the degree of the differentialsas an option to the sseqdata or sseqpage environment The degree indicates how far to the rightand how far up a page r differential will go as a function of r If there is a page r differential on pager+ 1 the source target and any structure lines connected to the source and target of the differentialdisappear If no class is specified the default is to use lastclassIf there are multiple nodes in the source or target you may specify which one the differential should goto using an index or tag for 〈source n〉 or 〈target n〉 It is also possible to provide the name of the sourcecoordinate and an optional target or to separately provide the source and target coordinate either asnames or as (〈x 〉〈y〉〈n〉) Using d with explicit source and target coordinates works even if you didnot provide a degree to the spectral sequence If you did provide a degree then spectralsequenceswill check whether the difference between the source and target is appropriate for a differential of a givenpage and if not it will throw an error If this is undesirable you can use the lax degree option

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = d example degree = -11struct lines = blue yscale = 13 ]

class(02)class(12)class(11)class(10)structline(12)(02)structline(12)(11)structline(11)(10)d2(10)endsseqdataprintpage[ name = d example page = 2 ] quadprintpage[ name = d example page = 3 ]

If there are multiple nodes in the source or target coordinate then there is a funny syntax for indicatingwhich one should be the source and target d〈page〉(〈x 〉〈y〉sourcentargetn)

0 1 2 3

0

1

2

beginsseqpage[ Adams grading yscale = 08 ]class(10) class(10)class(02) class(02)d2(1012)class(20) class(20)class(12)d2(202)class(30)class(22) class(22)d2(30bdquo2)endsseqpage

Negative indices will count from the most recent class in the coordinate (so the most recent is -1the second most recent is -2 etc) You can also use a tag which works better if the situation iscomplicated

0 1

0

1

2

beginsseqpage[ Adams grading yscale = 065 ]class(10)class(02) class(02)d[blue]2(10-1-1)class(10)class(02)d[orange]2(10-1-1)class(10)d[red]2(10-1-2)endsseqpage

doptions[〈options〉]〈page〉(〈x 〉〈y〉〈source n〉〈target n〉)doptions[〈options〉]〈page〉(〈source name〉〈target n〉)

7

doptions[〈options〉]〈page〉(〈source coordinate〉)(〈target coordinate〉)This command adds options to an existing differential just like classoptions except for differentialsIts syntax is identical to that of d

kill〈page〉[〈coord〉]This command sets the indicated coordinate to die on the indicated page but does not establish a targetfor the differential This is useful if you want to draw your own differential using tikz (see getdtarget)or if you are not drawing the class on the other side of the differential for clutter reasons As usual ifno coordinate is provided the default argument is lastclass

structline[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command creates a structure line from 〈source coordinate〉 to 〈target coordinate〉 The source andtarget coordinates are either of the form (〈x 〉〈y〉〈n〉) or (〈class name〉) If there are multiple classesat (x y) then 〈n〉 specifies which of the classes at (x y) the structure line starts and ends at ndash if n ispositive then it counts from the first class in that position if n is negative it counts backwards fromthe most recent You can also use a tag for n If the 〈target coordinate〉 is omitted then lastclass isused so that structline(sourcecoord) connects the most recent class to the specified coordinateIf both coordinates are omitted then lastclass and lastclass1 are used and so structline withno arguments at all will connect the two most recent classesIf the source or target of a structure line is hit by a differential then on subsequent pages the structureline disappearsIf the source or target has had multiple generations (ie they got hit and you used replaceclass)then the structline will only appear starting on the first page where the current generation of boththe source and target are present If this is undesirable you can use the page option to change it

DeclareSseqGrouptower class(00)foreach y in 15

class(0y)structline

class(02)structline(01-1)structline(03-1)

beginsseqdata[ name = structline example

classes = circle fill Adams grading no axesyscale = 128 ]

class(11) class(12)class(23) class(23) class(25)tower[classes = blue](00)tower[struct lines = dashedorange](10)tower[struct lines = red](20)d2(112)endsseqdataprintpage[ name = structline example page = 2 ] quadprintpage[ name = structline example page = 3 ]

structlineoptions[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command adds options to an existing structure line just like classoptions except for structurelines Its syntax is identical to structline

circleclasses[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command is a lot like structline except that it puts a circle around the classes instead of connect-ing them with a line It might take a certain amount of fiddling with options to get circleclasses toproduce good results There is no circleclassesoptions command because it doesnrsquot seem necessaryand (more importantly) I didnrsquot feel like making one Maybe someday Irsquoll put one in

8

drawpathnodeclip

Any code that would work in a tikzpicture environment will also work unchanged in a sseqdataor sseqpage environment with a few minor differences This is a very flexible way to add arbitrarybackground or foreground features to the spectral sequence

0 1 2

0

1

2

Consider thisdifferential

0 1 2

0

1

2

This isthe source

This isthe target

0 1 2

0

1

2

Now itrsquos gone

beginsseqdata[ name = tikz example Adams grading math nodes = falsetikz primitives = blue font = tiny lt- circle classes = tikz primitive stylex range = 02 x axis extend end = 2em ]

class(00)class(10)class(02)d2(10)endsseqdatabeginsseqpage[ name = tikz example ]circleclasses[ name path = myellipse inner sep = 3pt ellipse ratio = 16 ] (10) (02)path[ name path = myline ] (13125) -- (061)draw[ name intersections = of = myellipse and myline ]

(intersection-1) to (13125) node[ right text width = 16cm ] Consider this differentialendsseqpage qquadbeginsseqpage[ name = tikz example ]draw[ xshift = 1 ] (00) to (0602) node[ right text width = 11cm ] This is the sourcedraw[ yshift = 2 ] (00) to (0602) node[ right text width = 11cm ] This is the targetendsseqpage qquadbeginsseqpage[ page = 3 name = tikz example ]circleclasses[ inner sep = 3pt ellipse ratio = 16 ] (10)(02)node[ right font = tiny ] at (1212) Now itrsquos goneendsseqpage

4 Options for the main commands

41 Universal options

The following options work with all of the drawing commands in this package including class d andstructline their friends replaceclass classoptions doptions and structlines as well as withTikZ primitives

xshift = 〈integer〉yshift = 〈integer〉

Shifts by integer values are the only coordinate changes that are allowed to be applied to class dstructline their relatives or to a scope environment that contains any of these commands Theseshift commands help with reusing code For instance

9

0 1 2 3

0

1

2

beginsseqpage[ cohomological Serre grading yscale = 045 ]foreach x in 01 foreach y in 01

beginscope[ xshift = x yshift = y ]class(20)class(01)d2(01)endscope

endsseqpage

This code segment is very useful so spectralsequences has the command NewSseqGroup which tomake code like this more convenient The following code produces the same output as above

NewSseqGroupexamplegroup class(20)class(01)d2(01)

beginsseqpageexamplegroup(00)examplegroup(01)examplegroup(10)examplegroup(11)endsseqpage

A word of warning the behavior of xshift in spectralsequences is incompatible with the normalbehavior of xshift in TikZ For some reason saying xshift = 1 in TikZ does not shift the coordinate(00) to the coordinate (10) ndash instead it shifts by 1pt In spectralsequences saying xshift = 1moves the coordinate (00) to the coordinate (10) This includes TikZ primitives saying draw[xshift = 1 ] (00) -- (10) inside a sseqdata or sseqpage environment is the same as sayingdraw(10) -- (20) despite the fact that this is not the case in the tikzpicture environment

ColorsThese come from the LATEX color package via TikZ so see the color package documentation for moreinformation

beginsseqpage[ classes = fillinner sep = 04emno axes scale = 13 ]

class[red](00)class[blue](10)class[green](20)class[cyan](01)class[magenta](11)class[yellow](21)class[blue50red](02) a 50-50 blend of blue and redclass[green30yellow](12) 30 green 70 yellowclass[blue50black](22)endsseqpage

〈text〉〈options〉Specify a label for a class a differential or a structure line This uses the TikZ quotes syntax Ifthe label text includes an equal sign or comma you need to enclose the entire label in braces egclass[x = y](00) The options include anything you might pass as an option to a TikZ nodeincluding arbitrary coordinate transforms colors opacity options shapes fill draw etc The behavioris a little different depending on whether you use it on a class or on a differential or structure lineFor a class the 〈text〉 is placed in the position inside the node by default ndash in effect the 〈text〉 becomesthe label text of the node (so saying class[label text](00) causes a similar effect to sayingnode at (00) label text) There are other position options such as left above left etcwhich cause the label text to be placed in a separate node positioned appropriately If the placement isabove left etc then any option that you may pass to a TikZ node will also work for the label includinggeneral coordinate transformations If the placement is ldquoinsiderdquo then the only relevant 〈options〉 arethose that alter the appearance of text such as opacity and color

10

a a a

b

b

a beginsseqpage[ classes = minimum width = width(a) + 05em no axes ]class[a](00)class[a red](10)class[a black red](20)class[b above](01)class[b below right yshift = 01cm ](11)class[a above right = 1em ](21)endsseqpage

You can adjust the default behavior of class labels using the labels style option or its relativesclass labels inner class labels or outer class labels Note that it is also possible to givea label to a node this way although the behavior is slightly different In particular the label defaultsto the above position instead of going in the node text by default Also this wonrsquot respect the variouslabel style options like labels etc

a beginsseqpage[ no axes ]class(00)class(20)node[circle fill a] at (10) endsseqpage

pin = 〈style〉The pin key makes spectralsequences draw a line connecting the label to the relevant class whichcan provide necessary clarification in dense diagrams The pin key itself can take options whichadjust the way that the line is drawn

0

0

1

xy

beginsseqpageclass(00)class[xy above xshift = -4pt pin = red ](00)class(00)class(01)structlineendsseqpage

For either a structline or a class the label normally goes on the right side of the edge The specialoption rsquo makes it go in the opposite position from the default I imitated the label handling in thetikzcd package so if you use tikzcd this should be familiar

0 1

0

1

2

aa bb

middot2middot2

beginsseqpage[ Adams grading yscale = 063 ]class(00)class(01)class(02)structline[arsquo blue](00)(01)class(10)class(11)structline[b](10)(11)d[ cdot 2 pos = 07 yshift = -5pt ] 2 (10)endsseqpage

You can use the style options labels edge labels differential labels and struct line labelsto adjust the styling of edge labels For instance if you would prefer for the labels to default to the lefthand side of the edge rather than the right hand side you could say edge labels = auto = leftYou can also use quotes to label edges drawn with TikZ primitives

hi

beginsseqpage[ yscale = 058 no axes ]class(00)class(11)draw (10) to[hirsquo pos = 07 yshift = -05em ] (01)endsseqpage

11

description

The description key stolen from tikzcd places the label on top of the edge In order to makethis option work correctly if the background coolor is not the default white you must informspectralsequences about this using the key background color = 〈color〉 In this document thebackground color is called graphicbackground

aa aprimeb

aprimeb

cc

beginsseqpage[ no axes background color = graphicbackground ]foreach x in 012 foreach y in 01

class(xy)structline[a red](00)(01)structline[arsquorsquobluebyshift = 1em](10)(11)structline[c description](20)(21)endsseqpage

42 Options for class

Because the main job of the class command is to print a TikZ node on the appropriate pages of thespectral sequence most options that would work for a TikZ node also work for the commands classreplaceclass and classoptions Here are a few that you might care about

A TikZ shapeIf you give the name of a TikZ shape the class node will be of that shape The standard TikZ shapesare circle and rectangle spectralsequences defines two new shapes

circlen = 〈n〉This draws n concentric circles Itrsquos intended for indicating a Zpn summand For large values ofn the result isnrsquot all that appealing

beginsseqpage[ no axes ]class[circlen = 2](00)class[circlen = 2fill](10)class[circlen = 3](01)class[circlen = 4](11)endsseqpage

newellipseellipse ratio = 〈ratio〉

This shape is used for circleclasses Itrsquos a variant on the ellipse shape that gives more controlover the ellipsersquos aspect ratio

There are many more TikZ shapes in the shapes library which you can load using the commandusetikzlibraryshapes The following are some examples

beginsseqpage[ no axes classes = inner sep = 04em class placement transform = scale = 18 yscale = 163 ]

class(00)class[isosceles triangle](20)class[rectangle](10)class[diamond](01)class[semicircle](11)class[regular polygon regular polygon sides = 5](22)class[regular polygon regular polygon sides = 6](22)class[regular polygon regular polygon sides = 7](22)class[regular polygon regular polygon sides = 8](22)endsseqpage

See the TikZ manual for more information

12

minimum width = 〈dimension〉minimum height = 〈dimension〉minimum size = 〈dimension〉inner sep = 〈dimension〉outer sep = 〈dimension〉

These options control the size of a node This is typically useful to make the size of nodes consistentindependent of the size of their label text For instance

ab

a

ab

a

beginsseqdata[ name = minimum width example no axes yscale = 08 ]class[ab](00)class[a](01)class(02)endsseqdataprintpage[ name = minimum width example ]printpage[ name = minimum width examplechange classes = blue minimum width = width(ab) + 05em ]

name = 〈node name〉The class command makes a TikZ node on appropriate pages You can refer to this node using TikZcommands by using its coordinates Using the name option you can give the node a name which youcan use to refer to the class Using names creates more readable code The show name option can beused to display the names of classes You can modify the names of classes systematically using theoptions class name prefix class name postfix and class name handlerNamed classes are immune to coordinate transformations For example in the following code xshiftdoes not apply to the nodes specified by (id) and (eta) but does apply to the coordinate specified by(11)

0 1 2

0

1

1

η beginsseqpage[classes = show name=above ]class[name = 1](00)class[name = eta](11)class(21)structline[xshift = 1] (1) (eta)structline[xshift = 1blue] (1) (11)endsseqpage

show name = 〈label options〉This option is like saying class name〈label options〉 if the class has a name and does nothing ifthe class has no name If the class has multiple names only the most recent is used This is particularlyuseful with class styles For instance by saying this page classes = show name = above youcan display names of all of the sources and targets of differentials on each page

0 1

0

1

2

3

a

x

0 1

0

1

2

3b

2x

beginsseqdata[name = show name examplethis page classes = show name = above right pin

]class[ name = a ](02)class[ name = b ](03)class[ name = x ](10)d2(x)(a)replacesource[name=2x]d3(x)(b)endsseqdata

printpage[ name = show name example page = 2]

printpage[ name = show name example page = 3]

tag = 〈tag〉

13

This key adds a tag to the current class Tags are used for identifying which of multiple classes in thesame position you are referring to They are useful when you have groups of related classes and want afamily of differentials connecting them For instance

0 1 2 3 4 5

0

1

2

3

4

5

DeclareSseqGrouptower class(00)foreach i in 111

class(0i)structline(0i-1-1)(0i-1)

NewSseqGrouphvee

tower(00)foreach i in 111

class(ii)structline(i-1i-1-1)(ii-1)

beginsseqpage[ degree = -11 yscale = 11

x range = 05 y range = 05 ]tower(30)hvee[ tag = id ](00)hvee[ tag = h21 ](42)foreach n in 05

d2(4+n2+nh21id)endsseqpage

We want each differential to go from the h21 vee to the id vee independent of which classes are in thesame position of the two vees The easy way to accomplish this is by giving tags to each of the two vees

insert = 〈integer〉If there are multiple classes in the same position this option allows you to insert classes later into earlierpositions This is intended to help you put logically related classes next to each other If the integer ispositive it inserts the class in the specified position and if the integer is negative it counts backwardsfrom the end Providing 0 is the same as omitting the option entirely Values larger in absolute valuethan the total number of classes are truncated Consider

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

14

DeclareSseqGroup tower class(00)DoUntilOutOfBounds

class(lastxlasty+1)structline

beginsseqdata[ name = insert-example y range = 04 class pattern = linear ]tower(02)tower(03)tower(01)endsseqdataqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 1 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 3 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -3 ](00)endsseqpage

offset = (〈x offset〉〈y offset〉)By default a class uses the offset specified by class pattern Occasionally this is undesirable In thiscase you can specify the offset for a particular class by hand For example if the sum of two classes ishit by a differential it looks better for the class replacing them to be centered

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = offset examplexscale = 07Adams gradingclass placement transform = scale = 18 ]

class(01)class(02)class(02)draw(01)--(02)class(10)d2(10bdquo1)replacetargetd2(10bdquo2)endsseqdataprintpage[name = offset example page=2]printpage[name = offset example page=3]beginsseqpage[name = offset example page=3]classoptions[offset = (00)](02)endsseqpage

tooltip = 〈text〉This key generates a ldquotooltiprdquo over the given class That is if you hover your mouse over it a littlewindow will popup with the tooltip text This is particularly useful to give the coordinates or names ofclasses in large charts where it may be hard to tell from looking at the picture what position the classis in or there may not be room to supply names to classesThe tooltip is made using the pdftooltip command from the pdfcomment package The pdfcommentpackage generates two extra auxiliary files so it is not included by default In order to use thetooltip option you have to use the tooltips package option (eg load spectralsequences with

15

usepackage[tooltips]spectralsequences) This cannot handle math but it will print math ex-pressions into TEX input form Not all pdf viewers will display the tooltip correctly If this concernsyou the command sseqtooltip is used to produce the tooltip and you can redefine it as any othercommand that takes sseqtooltip〈text〉〈tooltip text〉 and produces a tooltip For instance on thisstack exchange post there is code that supposedly produces tooltips that work with Evince I havenot tested whether it works by itself or whether it works with my package but you could You couldpotentially figure out how to get math to work in tooltips too ndash if you find a satisfactory method pleaselet me knowAnyways herersquos an example

0 1

0

1

beginsseqpage[classes = tooltip = (xcoordycoord)]class(00)class(01)class(10)class(11)endsseqpage

Therersquos another example at the beginning of the section on the class stack

page = 〈page〉--〈page max 〉generation = 〈generation〉--〈generation max 〉

These options only work in classoptions The page option gives a range of pages for which theoptions apply to If only one page is specified it is the minimum page and the option applies to alllarger pages

1 2 4 beginsseqdata[ name = page_example no axestitle = page title style = yshift = -05cm ]

class(00)classoptions[page = 2 -- 3 fill blue](00)endsseqdata

printpage[ name = page_example page = 1 ] qquadprintpage[ name = page_example page = 2 ] qquadprintpage[ name = page_example page = 4 ]

A ldquogenerationrdquo of a class is the interval from one call of class or replaceclass to the page onwhich it next supports or is hit by a differential By default the classoptions command adds optionsonly to the most recent generation of the class in a sseqdata environment or on the generationappropriate to the current page in a sseqpage environment Using the generation option allows youto provide a single generation or range of generations of the class that the options should apply to Thefirst generation is generation 0 and the most recent generation is generation -1 Larger negative valuescount backwards

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

16

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 3: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

1 Introduction

The spectralsequences package consists of two main environments ndash the sseqdata environment whichspecifies the data for a named spectral sequence and the sseqpage environment which prints a singlepage of a spectral sequence The printpage command is also available as a synonym for a sseqpageenvironment with an empty body

Here is a basic example

0 1 2 3

0

1

2

0 1 2 3

0

1

2

beginsseqdata[ name = basic xscale = 06cohomological Serre grading ]

class(00)class(02)class(30)class(32)d3(02)endsseqdataprintpage[ name = basic page = 3 ] quadprintpage[ name = basic page = 4 ]

beginsseqdata[name = basic cohomological Serre grading] starts the declaration of the data ofa spectral sequence named basic with cohomological Serre grading ndash that is the page r differentials gor to the right and down rminus 1 Then we specify four classes and one page 3 differential and we askspectralsequences to print the third and fourth pages of the spectral sequence Note that on the fourthpage the source and target of the differential have disappeared

11 Installation

In both MiKTEX and TEX Live installation should be automatic ndash your TEX distribution should automaticallyinstall the package the first time you include usepackagespectralsequences in a document and compileit However in 2016 TEX Live made an incompatible change to their database so no new packages will runon versions of TEX Live from before 2016 This includes spectralsequences If you have an old version ofTEX Live you can either perform a manual install or better you should install an up to date version ofTEX Live If you want to do a manual install see this TEXstack exchange post for instructions

12 Memory Constraints

In a default TEX install PDFLATEX has small static memory caps that prevent it from using more than about60 megabytes of total ram However spectralsequences and PGFTikZ use a large amount of memory Forthis reason using PDFLATEX with a default install you cannot draw more than about 2500 classes acrossall of your diagrams (fewer if you include differentials structure lines and other features) There are a fewsolutions to this

The easiest solution is to run LuaLATEX LuaLATEX dynamically allocates memory and so is unlikely to runout of it Using LuaLATEX on my computer I can compile a document that draws two copies of a diagramwith 20000 classes in it (so a total of 40000 classes) This takes about 50 seconds and 250 megabytes ofram I expect any real-world use case will compile fine on a modern computer using LuaLATEX This optionhas the advantage that any modern TEX install comes with a copy of LuaLATEX and that LuaLATEX is thedesignated successor to PDFLATEX It has the disadvantage that there are some incompatibilities betweenLuaLATEX and PDFLATEX so if your document depends on PDFLATEX-specific features it might be a painto switch to LuaLATEX

Another option is to increase the static memory caps for PDFLATEX See this TEXstack exchange post forinstructions on how to do this

3

13 A warning about fragile macros

All the data in a spectralsequences environment is stored and used later As a result most of the spec-tralsequences commands currently cannot tolerate fragile macros Unfortunately it is impossible for spec-tralsequences to warn you about this situation ndash if you use a fragile command in a place that it doesnrsquotbelong the result will be an incomprehensible error message If you are getting nonsense error messagesthis might be why The solution is to convert fragile macros into robust ones Common examples of fragilemacros include widehat and underline My suggested solution to this is to add the following code toyour preamble for each fragile macro (example given for mathbb)

letoldwidehatwidehatprotecteddefwidehatoldwidehat

2 Package Options and EnvironmentsDraft Mode

The drawings that spectralsequences produces can be quite slow especially if they are large Draftmode skips drawing the content of the spectral sequence but still takes up exactly the same amountof space in the document so that you can deal with formatting issues To active draft mode load thepackage by saying usepackage[draft]spectralsequences

beginsseqdata[〈options〉]〈environment contents〉

endsseqdata

The sseqdata environment is for storing a spectral sequence to be printed later This environment isintended for circumstances where you want to print multiple pages of the same spectral sequence Whenusing the sseqdata environment you must use the name option to tell spectralsequences where tostore the spectral sequence so that you can access it later

beginsseqpage[〈options〉]〈environment contents〉

endsseqpage

This environment is used for printing a page of existing spectral sequence that was already specified usingthe sseqdata environment The body of the environment adds local changes ndash classes differentialsstructure lines and arbitrary TikZ options that are by default only printed on this particular page Thesseqpage environment can also be used to print a stand-alone page of a spectral sequence ndash that isif you only want to print a single page of the spectral sequence you can skip using the sseqdataenvironment

printpage[〈options〉]This command prints a single page of an existing spectral sequence as-is This is equivalent to asseqpage environment with an empty body

3 The Main Commandsclass[〈options〉](〈x 〉〈y〉)

This places a class at (xy) where x and y are integers If multiple classes occur at the same positionspectralsequences will automatically arrange them in a pre-specified pattern This pattern may bealtered using the class pattern option

4

beginsseqpage[ no axes ymirror yscale = 08 ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqpage

The effect of the class command is to print a TikZ node on a range of pages Any option that wouldwork for a TikZ node command will also work in the same way for the class replaceclass andclassoptions commandsIf a class is the source or the target of a differential on a certain page then the page of the class is setto that page and the class is only rendered on pages up to that number

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = class exampleAdams gradingyscale = 053 ]

class(10)class(02)class(03)d2(10)endsseqdataprintpage[ name = class example page = 2 ]quadprintpage[ name = class example page = 3 ]

See the class options section for a list of the sort of options available for classes

replaceclass[〈options〉](〈x 〉〈y〉〈n〉)replaceclass[〈options〉](〈classname〉)replacesource[〈options〉]replacetarget[〈options〉]

After a class is the source or target of a differential it disappears on the next page However somedifferentials are not injective or not surjective Using the command replaceclass causes a new symbolto appear on the page after a class supported or accepted a differential (or both) If there are multipleclasses at the coordinate (xy) you may specify which using an integer or a tag n By default thiscommand will affect the first class placed in that position You can also provide the name of a classThe variants replacesource and replacetarget replace the source and target respectively of themost recent differential

0 1

0

1

2

3 Z

Z

Z

middot2middot2

0 1

0

1

2

3 Z2

Z

0 1

0

1

2

3

2Z

5

beginsseqdata[name = replace class example Adams grading classes = draw = none ]class[mathbbZ](03)class[mathbbZ](11)class[mathbbZ](10)d[cdot 2]2(11)replacetarget[mathbbZ2] replaceclass[mathbbZ2](03)d[-raquo]3(10)replacesource[2mathbbZ] replaceclass[2mathbbZ](10)endsseqdataprintpage[ name = replace class example page = 2 ] qquadprintpage[ name = replace class example page = 3 ] qquadprintpage[ name = replace class example page = 4 ]

Note that this will not restore any structure lines coming into or off of the class if you want the structurelines to persist you must call structline again (or use the page option)

classoptions[〈options〉](〈x 〉〈y〉〈n〉)classoptions[〈options〉](〈classname〉)classoptions[〈options〉]

This adds options to an existing class This can be used in a sseqpage environment to modify theappearance of a class for just one drawing of the spectral sequence for instance to highlight it fordiscussion purposesIf there are multiple classes at the coordinate (xy) you may specify which using an integer or a tagn By default this command will affect the first class placed in that position You can also provide thename of a class If no coordinate is indicated at all then lastclass is used

0 1 2

0

1

The red class is the problem

beginsseqdata[ name = class options exampleclasses = fill ]

class(21)foreach x in 02 foreach y in 01

class(xy)endsseqdatabeginsseqpage[ name = class options example

right clip padding = 06cm ]classoptions[red](212) Only is red on this pagenode[ background ] at (03-22)

textupThe red class is the problemendsseqpage

Another reason to use this is to give a label to one instance of a class that shows up in a loop or acommand defined using NewSseqGroup

0 1 2 3

0

1

2

3

4

2 η

NewSseqGroupmygroup class(00)class(01)class(02)class(11)class(22)structline(00)(01)structline(01)(02)structline(00)(11)structline(11)(22)

beginsseqpage[ classes = fill class labels = left = 03em ]mygroup(00)mygroup(12)classoptions[2](01)classoptions[eta](11)endsseqpage

See the class options section for a list of the sort of options available for classes

d[〈options〉]〈page〉d[〈options〉]〈page〉(〈x 〉〈y〉〈source n〉〈target n〉)

6

d[〈options〉]〈page〉(〈source name〉〈target n〉)d[〈options〉]〈page〉(〈source coordinate〉)(〈target coordinate〉)

Calling d〈page〉(〈x 〉〈y〉) creates a differential starting at (〈x 〉〈y〉) of length determined by the speci-fied page In order to use the d command like this you must first specify the degree of the differentialsas an option to the sseqdata or sseqpage environment The degree indicates how far to the rightand how far up a page r differential will go as a function of r If there is a page r differential on pager+ 1 the source target and any structure lines connected to the source and target of the differentialdisappear If no class is specified the default is to use lastclassIf there are multiple nodes in the source or target you may specify which one the differential should goto using an index or tag for 〈source n〉 or 〈target n〉 It is also possible to provide the name of the sourcecoordinate and an optional target or to separately provide the source and target coordinate either asnames or as (〈x 〉〈y〉〈n〉) Using d with explicit source and target coordinates works even if you didnot provide a degree to the spectral sequence If you did provide a degree then spectralsequenceswill check whether the difference between the source and target is appropriate for a differential of a givenpage and if not it will throw an error If this is undesirable you can use the lax degree option

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = d example degree = -11struct lines = blue yscale = 13 ]

class(02)class(12)class(11)class(10)structline(12)(02)structline(12)(11)structline(11)(10)d2(10)endsseqdataprintpage[ name = d example page = 2 ] quadprintpage[ name = d example page = 3 ]

If there are multiple nodes in the source or target coordinate then there is a funny syntax for indicatingwhich one should be the source and target d〈page〉(〈x 〉〈y〉sourcentargetn)

0 1 2 3

0

1

2

beginsseqpage[ Adams grading yscale = 08 ]class(10) class(10)class(02) class(02)d2(1012)class(20) class(20)class(12)d2(202)class(30)class(22) class(22)d2(30bdquo2)endsseqpage

Negative indices will count from the most recent class in the coordinate (so the most recent is -1the second most recent is -2 etc) You can also use a tag which works better if the situation iscomplicated

0 1

0

1

2

beginsseqpage[ Adams grading yscale = 065 ]class(10)class(02) class(02)d[blue]2(10-1-1)class(10)class(02)d[orange]2(10-1-1)class(10)d[red]2(10-1-2)endsseqpage

doptions[〈options〉]〈page〉(〈x 〉〈y〉〈source n〉〈target n〉)doptions[〈options〉]〈page〉(〈source name〉〈target n〉)

7

doptions[〈options〉]〈page〉(〈source coordinate〉)(〈target coordinate〉)This command adds options to an existing differential just like classoptions except for differentialsIts syntax is identical to that of d

kill〈page〉[〈coord〉]This command sets the indicated coordinate to die on the indicated page but does not establish a targetfor the differential This is useful if you want to draw your own differential using tikz (see getdtarget)or if you are not drawing the class on the other side of the differential for clutter reasons As usual ifno coordinate is provided the default argument is lastclass

structline[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command creates a structure line from 〈source coordinate〉 to 〈target coordinate〉 The source andtarget coordinates are either of the form (〈x 〉〈y〉〈n〉) or (〈class name〉) If there are multiple classesat (x y) then 〈n〉 specifies which of the classes at (x y) the structure line starts and ends at ndash if n ispositive then it counts from the first class in that position if n is negative it counts backwards fromthe most recent You can also use a tag for n If the 〈target coordinate〉 is omitted then lastclass isused so that structline(sourcecoord) connects the most recent class to the specified coordinateIf both coordinates are omitted then lastclass and lastclass1 are used and so structline withno arguments at all will connect the two most recent classesIf the source or target of a structure line is hit by a differential then on subsequent pages the structureline disappearsIf the source or target has had multiple generations (ie they got hit and you used replaceclass)then the structline will only appear starting on the first page where the current generation of boththe source and target are present If this is undesirable you can use the page option to change it

DeclareSseqGrouptower class(00)foreach y in 15

class(0y)structline

class(02)structline(01-1)structline(03-1)

beginsseqdata[ name = structline example

classes = circle fill Adams grading no axesyscale = 128 ]

class(11) class(12)class(23) class(23) class(25)tower[classes = blue](00)tower[struct lines = dashedorange](10)tower[struct lines = red](20)d2(112)endsseqdataprintpage[ name = structline example page = 2 ] quadprintpage[ name = structline example page = 3 ]

structlineoptions[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command adds options to an existing structure line just like classoptions except for structurelines Its syntax is identical to structline

circleclasses[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command is a lot like structline except that it puts a circle around the classes instead of connect-ing them with a line It might take a certain amount of fiddling with options to get circleclasses toproduce good results There is no circleclassesoptions command because it doesnrsquot seem necessaryand (more importantly) I didnrsquot feel like making one Maybe someday Irsquoll put one in

8

drawpathnodeclip

Any code that would work in a tikzpicture environment will also work unchanged in a sseqdataor sseqpage environment with a few minor differences This is a very flexible way to add arbitrarybackground or foreground features to the spectral sequence

0 1 2

0

1

2

Consider thisdifferential

0 1 2

0

1

2

This isthe source

This isthe target

0 1 2

0

1

2

Now itrsquos gone

beginsseqdata[ name = tikz example Adams grading math nodes = falsetikz primitives = blue font = tiny lt- circle classes = tikz primitive stylex range = 02 x axis extend end = 2em ]

class(00)class(10)class(02)d2(10)endsseqdatabeginsseqpage[ name = tikz example ]circleclasses[ name path = myellipse inner sep = 3pt ellipse ratio = 16 ] (10) (02)path[ name path = myline ] (13125) -- (061)draw[ name intersections = of = myellipse and myline ]

(intersection-1) to (13125) node[ right text width = 16cm ] Consider this differentialendsseqpage qquadbeginsseqpage[ name = tikz example ]draw[ xshift = 1 ] (00) to (0602) node[ right text width = 11cm ] This is the sourcedraw[ yshift = 2 ] (00) to (0602) node[ right text width = 11cm ] This is the targetendsseqpage qquadbeginsseqpage[ page = 3 name = tikz example ]circleclasses[ inner sep = 3pt ellipse ratio = 16 ] (10)(02)node[ right font = tiny ] at (1212) Now itrsquos goneendsseqpage

4 Options for the main commands

41 Universal options

The following options work with all of the drawing commands in this package including class d andstructline their friends replaceclass classoptions doptions and structlines as well as withTikZ primitives

xshift = 〈integer〉yshift = 〈integer〉

Shifts by integer values are the only coordinate changes that are allowed to be applied to class dstructline their relatives or to a scope environment that contains any of these commands Theseshift commands help with reusing code For instance

9

0 1 2 3

0

1

2

beginsseqpage[ cohomological Serre grading yscale = 045 ]foreach x in 01 foreach y in 01

beginscope[ xshift = x yshift = y ]class(20)class(01)d2(01)endscope

endsseqpage

This code segment is very useful so spectralsequences has the command NewSseqGroup which tomake code like this more convenient The following code produces the same output as above

NewSseqGroupexamplegroup class(20)class(01)d2(01)

beginsseqpageexamplegroup(00)examplegroup(01)examplegroup(10)examplegroup(11)endsseqpage

A word of warning the behavior of xshift in spectralsequences is incompatible with the normalbehavior of xshift in TikZ For some reason saying xshift = 1 in TikZ does not shift the coordinate(00) to the coordinate (10) ndash instead it shifts by 1pt In spectralsequences saying xshift = 1moves the coordinate (00) to the coordinate (10) This includes TikZ primitives saying draw[xshift = 1 ] (00) -- (10) inside a sseqdata or sseqpage environment is the same as sayingdraw(10) -- (20) despite the fact that this is not the case in the tikzpicture environment

ColorsThese come from the LATEX color package via TikZ so see the color package documentation for moreinformation

beginsseqpage[ classes = fillinner sep = 04emno axes scale = 13 ]

class[red](00)class[blue](10)class[green](20)class[cyan](01)class[magenta](11)class[yellow](21)class[blue50red](02) a 50-50 blend of blue and redclass[green30yellow](12) 30 green 70 yellowclass[blue50black](22)endsseqpage

〈text〉〈options〉Specify a label for a class a differential or a structure line This uses the TikZ quotes syntax Ifthe label text includes an equal sign or comma you need to enclose the entire label in braces egclass[x = y](00) The options include anything you might pass as an option to a TikZ nodeincluding arbitrary coordinate transforms colors opacity options shapes fill draw etc The behavioris a little different depending on whether you use it on a class or on a differential or structure lineFor a class the 〈text〉 is placed in the position inside the node by default ndash in effect the 〈text〉 becomesthe label text of the node (so saying class[label text](00) causes a similar effect to sayingnode at (00) label text) There are other position options such as left above left etcwhich cause the label text to be placed in a separate node positioned appropriately If the placement isabove left etc then any option that you may pass to a TikZ node will also work for the label includinggeneral coordinate transformations If the placement is ldquoinsiderdquo then the only relevant 〈options〉 arethose that alter the appearance of text such as opacity and color

10

a a a

b

b

a beginsseqpage[ classes = minimum width = width(a) + 05em no axes ]class[a](00)class[a red](10)class[a black red](20)class[b above](01)class[b below right yshift = 01cm ](11)class[a above right = 1em ](21)endsseqpage

You can adjust the default behavior of class labels using the labels style option or its relativesclass labels inner class labels or outer class labels Note that it is also possible to givea label to a node this way although the behavior is slightly different In particular the label defaultsto the above position instead of going in the node text by default Also this wonrsquot respect the variouslabel style options like labels etc

a beginsseqpage[ no axes ]class(00)class(20)node[circle fill a] at (10) endsseqpage

pin = 〈style〉The pin key makes spectralsequences draw a line connecting the label to the relevant class whichcan provide necessary clarification in dense diagrams The pin key itself can take options whichadjust the way that the line is drawn

0

0

1

xy

beginsseqpageclass(00)class[xy above xshift = -4pt pin = red ](00)class(00)class(01)structlineendsseqpage

For either a structline or a class the label normally goes on the right side of the edge The specialoption rsquo makes it go in the opposite position from the default I imitated the label handling in thetikzcd package so if you use tikzcd this should be familiar

0 1

0

1

2

aa bb

middot2middot2

beginsseqpage[ Adams grading yscale = 063 ]class(00)class(01)class(02)structline[arsquo blue](00)(01)class(10)class(11)structline[b](10)(11)d[ cdot 2 pos = 07 yshift = -5pt ] 2 (10)endsseqpage

You can use the style options labels edge labels differential labels and struct line labelsto adjust the styling of edge labels For instance if you would prefer for the labels to default to the lefthand side of the edge rather than the right hand side you could say edge labels = auto = leftYou can also use quotes to label edges drawn with TikZ primitives

hi

beginsseqpage[ yscale = 058 no axes ]class(00)class(11)draw (10) to[hirsquo pos = 07 yshift = -05em ] (01)endsseqpage

11

description

The description key stolen from tikzcd places the label on top of the edge In order to makethis option work correctly if the background coolor is not the default white you must informspectralsequences about this using the key background color = 〈color〉 In this document thebackground color is called graphicbackground

aa aprimeb

aprimeb

cc

beginsseqpage[ no axes background color = graphicbackground ]foreach x in 012 foreach y in 01

class(xy)structline[a red](00)(01)structline[arsquorsquobluebyshift = 1em](10)(11)structline[c description](20)(21)endsseqpage

42 Options for class

Because the main job of the class command is to print a TikZ node on the appropriate pages of thespectral sequence most options that would work for a TikZ node also work for the commands classreplaceclass and classoptions Here are a few that you might care about

A TikZ shapeIf you give the name of a TikZ shape the class node will be of that shape The standard TikZ shapesare circle and rectangle spectralsequences defines two new shapes

circlen = 〈n〉This draws n concentric circles Itrsquos intended for indicating a Zpn summand For large values ofn the result isnrsquot all that appealing

beginsseqpage[ no axes ]class[circlen = 2](00)class[circlen = 2fill](10)class[circlen = 3](01)class[circlen = 4](11)endsseqpage

newellipseellipse ratio = 〈ratio〉

This shape is used for circleclasses Itrsquos a variant on the ellipse shape that gives more controlover the ellipsersquos aspect ratio

There are many more TikZ shapes in the shapes library which you can load using the commandusetikzlibraryshapes The following are some examples

beginsseqpage[ no axes classes = inner sep = 04em class placement transform = scale = 18 yscale = 163 ]

class(00)class[isosceles triangle](20)class[rectangle](10)class[diamond](01)class[semicircle](11)class[regular polygon regular polygon sides = 5](22)class[regular polygon regular polygon sides = 6](22)class[regular polygon regular polygon sides = 7](22)class[regular polygon regular polygon sides = 8](22)endsseqpage

See the TikZ manual for more information

12

minimum width = 〈dimension〉minimum height = 〈dimension〉minimum size = 〈dimension〉inner sep = 〈dimension〉outer sep = 〈dimension〉

These options control the size of a node This is typically useful to make the size of nodes consistentindependent of the size of their label text For instance

ab

a

ab

a

beginsseqdata[ name = minimum width example no axes yscale = 08 ]class[ab](00)class[a](01)class(02)endsseqdataprintpage[ name = minimum width example ]printpage[ name = minimum width examplechange classes = blue minimum width = width(ab) + 05em ]

name = 〈node name〉The class command makes a TikZ node on appropriate pages You can refer to this node using TikZcommands by using its coordinates Using the name option you can give the node a name which youcan use to refer to the class Using names creates more readable code The show name option can beused to display the names of classes You can modify the names of classes systematically using theoptions class name prefix class name postfix and class name handlerNamed classes are immune to coordinate transformations For example in the following code xshiftdoes not apply to the nodes specified by (id) and (eta) but does apply to the coordinate specified by(11)

0 1 2

0

1

1

η beginsseqpage[classes = show name=above ]class[name = 1](00)class[name = eta](11)class(21)structline[xshift = 1] (1) (eta)structline[xshift = 1blue] (1) (11)endsseqpage

show name = 〈label options〉This option is like saying class name〈label options〉 if the class has a name and does nothing ifthe class has no name If the class has multiple names only the most recent is used This is particularlyuseful with class styles For instance by saying this page classes = show name = above youcan display names of all of the sources and targets of differentials on each page

0 1

0

1

2

3

a

x

0 1

0

1

2

3b

2x

beginsseqdata[name = show name examplethis page classes = show name = above right pin

]class[ name = a ](02)class[ name = b ](03)class[ name = x ](10)d2(x)(a)replacesource[name=2x]d3(x)(b)endsseqdata

printpage[ name = show name example page = 2]

printpage[ name = show name example page = 3]

tag = 〈tag〉

13

This key adds a tag to the current class Tags are used for identifying which of multiple classes in thesame position you are referring to They are useful when you have groups of related classes and want afamily of differentials connecting them For instance

0 1 2 3 4 5

0

1

2

3

4

5

DeclareSseqGrouptower class(00)foreach i in 111

class(0i)structline(0i-1-1)(0i-1)

NewSseqGrouphvee

tower(00)foreach i in 111

class(ii)structline(i-1i-1-1)(ii-1)

beginsseqpage[ degree = -11 yscale = 11

x range = 05 y range = 05 ]tower(30)hvee[ tag = id ](00)hvee[ tag = h21 ](42)foreach n in 05

d2(4+n2+nh21id)endsseqpage

We want each differential to go from the h21 vee to the id vee independent of which classes are in thesame position of the two vees The easy way to accomplish this is by giving tags to each of the two vees

insert = 〈integer〉If there are multiple classes in the same position this option allows you to insert classes later into earlierpositions This is intended to help you put logically related classes next to each other If the integer ispositive it inserts the class in the specified position and if the integer is negative it counts backwardsfrom the end Providing 0 is the same as omitting the option entirely Values larger in absolute valuethan the total number of classes are truncated Consider

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

14

DeclareSseqGroup tower class(00)DoUntilOutOfBounds

class(lastxlasty+1)structline

beginsseqdata[ name = insert-example y range = 04 class pattern = linear ]tower(02)tower(03)tower(01)endsseqdataqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 1 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 3 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -3 ](00)endsseqpage

offset = (〈x offset〉〈y offset〉)By default a class uses the offset specified by class pattern Occasionally this is undesirable In thiscase you can specify the offset for a particular class by hand For example if the sum of two classes ishit by a differential it looks better for the class replacing them to be centered

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = offset examplexscale = 07Adams gradingclass placement transform = scale = 18 ]

class(01)class(02)class(02)draw(01)--(02)class(10)d2(10bdquo1)replacetargetd2(10bdquo2)endsseqdataprintpage[name = offset example page=2]printpage[name = offset example page=3]beginsseqpage[name = offset example page=3]classoptions[offset = (00)](02)endsseqpage

tooltip = 〈text〉This key generates a ldquotooltiprdquo over the given class That is if you hover your mouse over it a littlewindow will popup with the tooltip text This is particularly useful to give the coordinates or names ofclasses in large charts where it may be hard to tell from looking at the picture what position the classis in or there may not be room to supply names to classesThe tooltip is made using the pdftooltip command from the pdfcomment package The pdfcommentpackage generates two extra auxiliary files so it is not included by default In order to use thetooltip option you have to use the tooltips package option (eg load spectralsequences with

15

usepackage[tooltips]spectralsequences) This cannot handle math but it will print math ex-pressions into TEX input form Not all pdf viewers will display the tooltip correctly If this concernsyou the command sseqtooltip is used to produce the tooltip and you can redefine it as any othercommand that takes sseqtooltip〈text〉〈tooltip text〉 and produces a tooltip For instance on thisstack exchange post there is code that supposedly produces tooltips that work with Evince I havenot tested whether it works by itself or whether it works with my package but you could You couldpotentially figure out how to get math to work in tooltips too ndash if you find a satisfactory method pleaselet me knowAnyways herersquos an example

0 1

0

1

beginsseqpage[classes = tooltip = (xcoordycoord)]class(00)class(01)class(10)class(11)endsseqpage

Therersquos another example at the beginning of the section on the class stack

page = 〈page〉--〈page max 〉generation = 〈generation〉--〈generation max 〉

These options only work in classoptions The page option gives a range of pages for which theoptions apply to If only one page is specified it is the minimum page and the option applies to alllarger pages

1 2 4 beginsseqdata[ name = page_example no axestitle = page title style = yshift = -05cm ]

class(00)classoptions[page = 2 -- 3 fill blue](00)endsseqdata

printpage[ name = page_example page = 1 ] qquadprintpage[ name = page_example page = 2 ] qquadprintpage[ name = page_example page = 4 ]

A ldquogenerationrdquo of a class is the interval from one call of class or replaceclass to the page onwhich it next supports or is hit by a differential By default the classoptions command adds optionsonly to the most recent generation of the class in a sseqdata environment or on the generationappropriate to the current page in a sseqpage environment Using the generation option allows youto provide a single generation or range of generations of the class that the options should apply to Thefirst generation is generation 0 and the most recent generation is generation -1 Larger negative valuescount backwards

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

16

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 4: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

13 A warning about fragile macros

All the data in a spectralsequences environment is stored and used later As a result most of the spec-tralsequences commands currently cannot tolerate fragile macros Unfortunately it is impossible for spec-tralsequences to warn you about this situation ndash if you use a fragile command in a place that it doesnrsquotbelong the result will be an incomprehensible error message If you are getting nonsense error messagesthis might be why The solution is to convert fragile macros into robust ones Common examples of fragilemacros include widehat and underline My suggested solution to this is to add the following code toyour preamble for each fragile macro (example given for mathbb)

letoldwidehatwidehatprotecteddefwidehatoldwidehat

2 Package Options and EnvironmentsDraft Mode

The drawings that spectralsequences produces can be quite slow especially if they are large Draftmode skips drawing the content of the spectral sequence but still takes up exactly the same amountof space in the document so that you can deal with formatting issues To active draft mode load thepackage by saying usepackage[draft]spectralsequences

beginsseqdata[〈options〉]〈environment contents〉

endsseqdata

The sseqdata environment is for storing a spectral sequence to be printed later This environment isintended for circumstances where you want to print multiple pages of the same spectral sequence Whenusing the sseqdata environment you must use the name option to tell spectralsequences where tostore the spectral sequence so that you can access it later

beginsseqpage[〈options〉]〈environment contents〉

endsseqpage

This environment is used for printing a page of existing spectral sequence that was already specified usingthe sseqdata environment The body of the environment adds local changes ndash classes differentialsstructure lines and arbitrary TikZ options that are by default only printed on this particular page Thesseqpage environment can also be used to print a stand-alone page of a spectral sequence ndash that isif you only want to print a single page of the spectral sequence you can skip using the sseqdataenvironment

printpage[〈options〉]This command prints a single page of an existing spectral sequence as-is This is equivalent to asseqpage environment with an empty body

3 The Main Commandsclass[〈options〉](〈x 〉〈y〉)

This places a class at (xy) where x and y are integers If multiple classes occur at the same positionspectralsequences will automatically arrange them in a pre-specified pattern This pattern may bealtered using the class pattern option

4

beginsseqpage[ no axes ymirror yscale = 08 ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqpage

The effect of the class command is to print a TikZ node on a range of pages Any option that wouldwork for a TikZ node command will also work in the same way for the class replaceclass andclassoptions commandsIf a class is the source or the target of a differential on a certain page then the page of the class is setto that page and the class is only rendered on pages up to that number

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = class exampleAdams gradingyscale = 053 ]

class(10)class(02)class(03)d2(10)endsseqdataprintpage[ name = class example page = 2 ]quadprintpage[ name = class example page = 3 ]

See the class options section for a list of the sort of options available for classes

replaceclass[〈options〉](〈x 〉〈y〉〈n〉)replaceclass[〈options〉](〈classname〉)replacesource[〈options〉]replacetarget[〈options〉]

After a class is the source or target of a differential it disappears on the next page However somedifferentials are not injective or not surjective Using the command replaceclass causes a new symbolto appear on the page after a class supported or accepted a differential (or both) If there are multipleclasses at the coordinate (xy) you may specify which using an integer or a tag n By default thiscommand will affect the first class placed in that position You can also provide the name of a classThe variants replacesource and replacetarget replace the source and target respectively of themost recent differential

0 1

0

1

2

3 Z

Z

Z

middot2middot2

0 1

0

1

2

3 Z2

Z

0 1

0

1

2

3

2Z

5

beginsseqdata[name = replace class example Adams grading classes = draw = none ]class[mathbbZ](03)class[mathbbZ](11)class[mathbbZ](10)d[cdot 2]2(11)replacetarget[mathbbZ2] replaceclass[mathbbZ2](03)d[-raquo]3(10)replacesource[2mathbbZ] replaceclass[2mathbbZ](10)endsseqdataprintpage[ name = replace class example page = 2 ] qquadprintpage[ name = replace class example page = 3 ] qquadprintpage[ name = replace class example page = 4 ]

Note that this will not restore any structure lines coming into or off of the class if you want the structurelines to persist you must call structline again (or use the page option)

classoptions[〈options〉](〈x 〉〈y〉〈n〉)classoptions[〈options〉](〈classname〉)classoptions[〈options〉]

This adds options to an existing class This can be used in a sseqpage environment to modify theappearance of a class for just one drawing of the spectral sequence for instance to highlight it fordiscussion purposesIf there are multiple classes at the coordinate (xy) you may specify which using an integer or a tagn By default this command will affect the first class placed in that position You can also provide thename of a class If no coordinate is indicated at all then lastclass is used

0 1 2

0

1

The red class is the problem

beginsseqdata[ name = class options exampleclasses = fill ]

class(21)foreach x in 02 foreach y in 01

class(xy)endsseqdatabeginsseqpage[ name = class options example

right clip padding = 06cm ]classoptions[red](212) Only is red on this pagenode[ background ] at (03-22)

textupThe red class is the problemendsseqpage

Another reason to use this is to give a label to one instance of a class that shows up in a loop or acommand defined using NewSseqGroup

0 1 2 3

0

1

2

3

4

2 η

NewSseqGroupmygroup class(00)class(01)class(02)class(11)class(22)structline(00)(01)structline(01)(02)structline(00)(11)structline(11)(22)

beginsseqpage[ classes = fill class labels = left = 03em ]mygroup(00)mygroup(12)classoptions[2](01)classoptions[eta](11)endsseqpage

See the class options section for a list of the sort of options available for classes

d[〈options〉]〈page〉d[〈options〉]〈page〉(〈x 〉〈y〉〈source n〉〈target n〉)

6

d[〈options〉]〈page〉(〈source name〉〈target n〉)d[〈options〉]〈page〉(〈source coordinate〉)(〈target coordinate〉)

Calling d〈page〉(〈x 〉〈y〉) creates a differential starting at (〈x 〉〈y〉) of length determined by the speci-fied page In order to use the d command like this you must first specify the degree of the differentialsas an option to the sseqdata or sseqpage environment The degree indicates how far to the rightand how far up a page r differential will go as a function of r If there is a page r differential on pager+ 1 the source target and any structure lines connected to the source and target of the differentialdisappear If no class is specified the default is to use lastclassIf there are multiple nodes in the source or target you may specify which one the differential should goto using an index or tag for 〈source n〉 or 〈target n〉 It is also possible to provide the name of the sourcecoordinate and an optional target or to separately provide the source and target coordinate either asnames or as (〈x 〉〈y〉〈n〉) Using d with explicit source and target coordinates works even if you didnot provide a degree to the spectral sequence If you did provide a degree then spectralsequenceswill check whether the difference between the source and target is appropriate for a differential of a givenpage and if not it will throw an error If this is undesirable you can use the lax degree option

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = d example degree = -11struct lines = blue yscale = 13 ]

class(02)class(12)class(11)class(10)structline(12)(02)structline(12)(11)structline(11)(10)d2(10)endsseqdataprintpage[ name = d example page = 2 ] quadprintpage[ name = d example page = 3 ]

If there are multiple nodes in the source or target coordinate then there is a funny syntax for indicatingwhich one should be the source and target d〈page〉(〈x 〉〈y〉sourcentargetn)

0 1 2 3

0

1

2

beginsseqpage[ Adams grading yscale = 08 ]class(10) class(10)class(02) class(02)d2(1012)class(20) class(20)class(12)d2(202)class(30)class(22) class(22)d2(30bdquo2)endsseqpage

Negative indices will count from the most recent class in the coordinate (so the most recent is -1the second most recent is -2 etc) You can also use a tag which works better if the situation iscomplicated

0 1

0

1

2

beginsseqpage[ Adams grading yscale = 065 ]class(10)class(02) class(02)d[blue]2(10-1-1)class(10)class(02)d[orange]2(10-1-1)class(10)d[red]2(10-1-2)endsseqpage

doptions[〈options〉]〈page〉(〈x 〉〈y〉〈source n〉〈target n〉)doptions[〈options〉]〈page〉(〈source name〉〈target n〉)

7

doptions[〈options〉]〈page〉(〈source coordinate〉)(〈target coordinate〉)This command adds options to an existing differential just like classoptions except for differentialsIts syntax is identical to that of d

kill〈page〉[〈coord〉]This command sets the indicated coordinate to die on the indicated page but does not establish a targetfor the differential This is useful if you want to draw your own differential using tikz (see getdtarget)or if you are not drawing the class on the other side of the differential for clutter reasons As usual ifno coordinate is provided the default argument is lastclass

structline[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command creates a structure line from 〈source coordinate〉 to 〈target coordinate〉 The source andtarget coordinates are either of the form (〈x 〉〈y〉〈n〉) or (〈class name〉) If there are multiple classesat (x y) then 〈n〉 specifies which of the classes at (x y) the structure line starts and ends at ndash if n ispositive then it counts from the first class in that position if n is negative it counts backwards fromthe most recent You can also use a tag for n If the 〈target coordinate〉 is omitted then lastclass isused so that structline(sourcecoord) connects the most recent class to the specified coordinateIf both coordinates are omitted then lastclass and lastclass1 are used and so structline withno arguments at all will connect the two most recent classesIf the source or target of a structure line is hit by a differential then on subsequent pages the structureline disappearsIf the source or target has had multiple generations (ie they got hit and you used replaceclass)then the structline will only appear starting on the first page where the current generation of boththe source and target are present If this is undesirable you can use the page option to change it

DeclareSseqGrouptower class(00)foreach y in 15

class(0y)structline

class(02)structline(01-1)structline(03-1)

beginsseqdata[ name = structline example

classes = circle fill Adams grading no axesyscale = 128 ]

class(11) class(12)class(23) class(23) class(25)tower[classes = blue](00)tower[struct lines = dashedorange](10)tower[struct lines = red](20)d2(112)endsseqdataprintpage[ name = structline example page = 2 ] quadprintpage[ name = structline example page = 3 ]

structlineoptions[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command adds options to an existing structure line just like classoptions except for structurelines Its syntax is identical to structline

circleclasses[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command is a lot like structline except that it puts a circle around the classes instead of connect-ing them with a line It might take a certain amount of fiddling with options to get circleclasses toproduce good results There is no circleclassesoptions command because it doesnrsquot seem necessaryand (more importantly) I didnrsquot feel like making one Maybe someday Irsquoll put one in

8

drawpathnodeclip

Any code that would work in a tikzpicture environment will also work unchanged in a sseqdataor sseqpage environment with a few minor differences This is a very flexible way to add arbitrarybackground or foreground features to the spectral sequence

0 1 2

0

1

2

Consider thisdifferential

0 1 2

0

1

2

This isthe source

This isthe target

0 1 2

0

1

2

Now itrsquos gone

beginsseqdata[ name = tikz example Adams grading math nodes = falsetikz primitives = blue font = tiny lt- circle classes = tikz primitive stylex range = 02 x axis extend end = 2em ]

class(00)class(10)class(02)d2(10)endsseqdatabeginsseqpage[ name = tikz example ]circleclasses[ name path = myellipse inner sep = 3pt ellipse ratio = 16 ] (10) (02)path[ name path = myline ] (13125) -- (061)draw[ name intersections = of = myellipse and myline ]

(intersection-1) to (13125) node[ right text width = 16cm ] Consider this differentialendsseqpage qquadbeginsseqpage[ name = tikz example ]draw[ xshift = 1 ] (00) to (0602) node[ right text width = 11cm ] This is the sourcedraw[ yshift = 2 ] (00) to (0602) node[ right text width = 11cm ] This is the targetendsseqpage qquadbeginsseqpage[ page = 3 name = tikz example ]circleclasses[ inner sep = 3pt ellipse ratio = 16 ] (10)(02)node[ right font = tiny ] at (1212) Now itrsquos goneendsseqpage

4 Options for the main commands

41 Universal options

The following options work with all of the drawing commands in this package including class d andstructline their friends replaceclass classoptions doptions and structlines as well as withTikZ primitives

xshift = 〈integer〉yshift = 〈integer〉

Shifts by integer values are the only coordinate changes that are allowed to be applied to class dstructline their relatives or to a scope environment that contains any of these commands Theseshift commands help with reusing code For instance

9

0 1 2 3

0

1

2

beginsseqpage[ cohomological Serre grading yscale = 045 ]foreach x in 01 foreach y in 01

beginscope[ xshift = x yshift = y ]class(20)class(01)d2(01)endscope

endsseqpage

This code segment is very useful so spectralsequences has the command NewSseqGroup which tomake code like this more convenient The following code produces the same output as above

NewSseqGroupexamplegroup class(20)class(01)d2(01)

beginsseqpageexamplegroup(00)examplegroup(01)examplegroup(10)examplegroup(11)endsseqpage

A word of warning the behavior of xshift in spectralsequences is incompatible with the normalbehavior of xshift in TikZ For some reason saying xshift = 1 in TikZ does not shift the coordinate(00) to the coordinate (10) ndash instead it shifts by 1pt In spectralsequences saying xshift = 1moves the coordinate (00) to the coordinate (10) This includes TikZ primitives saying draw[xshift = 1 ] (00) -- (10) inside a sseqdata or sseqpage environment is the same as sayingdraw(10) -- (20) despite the fact that this is not the case in the tikzpicture environment

ColorsThese come from the LATEX color package via TikZ so see the color package documentation for moreinformation

beginsseqpage[ classes = fillinner sep = 04emno axes scale = 13 ]

class[red](00)class[blue](10)class[green](20)class[cyan](01)class[magenta](11)class[yellow](21)class[blue50red](02) a 50-50 blend of blue and redclass[green30yellow](12) 30 green 70 yellowclass[blue50black](22)endsseqpage

〈text〉〈options〉Specify a label for a class a differential or a structure line This uses the TikZ quotes syntax Ifthe label text includes an equal sign or comma you need to enclose the entire label in braces egclass[x = y](00) The options include anything you might pass as an option to a TikZ nodeincluding arbitrary coordinate transforms colors opacity options shapes fill draw etc The behavioris a little different depending on whether you use it on a class or on a differential or structure lineFor a class the 〈text〉 is placed in the position inside the node by default ndash in effect the 〈text〉 becomesthe label text of the node (so saying class[label text](00) causes a similar effect to sayingnode at (00) label text) There are other position options such as left above left etcwhich cause the label text to be placed in a separate node positioned appropriately If the placement isabove left etc then any option that you may pass to a TikZ node will also work for the label includinggeneral coordinate transformations If the placement is ldquoinsiderdquo then the only relevant 〈options〉 arethose that alter the appearance of text such as opacity and color

10

a a a

b

b

a beginsseqpage[ classes = minimum width = width(a) + 05em no axes ]class[a](00)class[a red](10)class[a black red](20)class[b above](01)class[b below right yshift = 01cm ](11)class[a above right = 1em ](21)endsseqpage

You can adjust the default behavior of class labels using the labels style option or its relativesclass labels inner class labels or outer class labels Note that it is also possible to givea label to a node this way although the behavior is slightly different In particular the label defaultsto the above position instead of going in the node text by default Also this wonrsquot respect the variouslabel style options like labels etc

a beginsseqpage[ no axes ]class(00)class(20)node[circle fill a] at (10) endsseqpage

pin = 〈style〉The pin key makes spectralsequences draw a line connecting the label to the relevant class whichcan provide necessary clarification in dense diagrams The pin key itself can take options whichadjust the way that the line is drawn

0

0

1

xy

beginsseqpageclass(00)class[xy above xshift = -4pt pin = red ](00)class(00)class(01)structlineendsseqpage

For either a structline or a class the label normally goes on the right side of the edge The specialoption rsquo makes it go in the opposite position from the default I imitated the label handling in thetikzcd package so if you use tikzcd this should be familiar

0 1

0

1

2

aa bb

middot2middot2

beginsseqpage[ Adams grading yscale = 063 ]class(00)class(01)class(02)structline[arsquo blue](00)(01)class(10)class(11)structline[b](10)(11)d[ cdot 2 pos = 07 yshift = -5pt ] 2 (10)endsseqpage

You can use the style options labels edge labels differential labels and struct line labelsto adjust the styling of edge labels For instance if you would prefer for the labels to default to the lefthand side of the edge rather than the right hand side you could say edge labels = auto = leftYou can also use quotes to label edges drawn with TikZ primitives

hi

beginsseqpage[ yscale = 058 no axes ]class(00)class(11)draw (10) to[hirsquo pos = 07 yshift = -05em ] (01)endsseqpage

11

description

The description key stolen from tikzcd places the label on top of the edge In order to makethis option work correctly if the background coolor is not the default white you must informspectralsequences about this using the key background color = 〈color〉 In this document thebackground color is called graphicbackground

aa aprimeb

aprimeb

cc

beginsseqpage[ no axes background color = graphicbackground ]foreach x in 012 foreach y in 01

class(xy)structline[a red](00)(01)structline[arsquorsquobluebyshift = 1em](10)(11)structline[c description](20)(21)endsseqpage

42 Options for class

Because the main job of the class command is to print a TikZ node on the appropriate pages of thespectral sequence most options that would work for a TikZ node also work for the commands classreplaceclass and classoptions Here are a few that you might care about

A TikZ shapeIf you give the name of a TikZ shape the class node will be of that shape The standard TikZ shapesare circle and rectangle spectralsequences defines two new shapes

circlen = 〈n〉This draws n concentric circles Itrsquos intended for indicating a Zpn summand For large values ofn the result isnrsquot all that appealing

beginsseqpage[ no axes ]class[circlen = 2](00)class[circlen = 2fill](10)class[circlen = 3](01)class[circlen = 4](11)endsseqpage

newellipseellipse ratio = 〈ratio〉

This shape is used for circleclasses Itrsquos a variant on the ellipse shape that gives more controlover the ellipsersquos aspect ratio

There are many more TikZ shapes in the shapes library which you can load using the commandusetikzlibraryshapes The following are some examples

beginsseqpage[ no axes classes = inner sep = 04em class placement transform = scale = 18 yscale = 163 ]

class(00)class[isosceles triangle](20)class[rectangle](10)class[diamond](01)class[semicircle](11)class[regular polygon regular polygon sides = 5](22)class[regular polygon regular polygon sides = 6](22)class[regular polygon regular polygon sides = 7](22)class[regular polygon regular polygon sides = 8](22)endsseqpage

See the TikZ manual for more information

12

minimum width = 〈dimension〉minimum height = 〈dimension〉minimum size = 〈dimension〉inner sep = 〈dimension〉outer sep = 〈dimension〉

These options control the size of a node This is typically useful to make the size of nodes consistentindependent of the size of their label text For instance

ab

a

ab

a

beginsseqdata[ name = minimum width example no axes yscale = 08 ]class[ab](00)class[a](01)class(02)endsseqdataprintpage[ name = minimum width example ]printpage[ name = minimum width examplechange classes = blue minimum width = width(ab) + 05em ]

name = 〈node name〉The class command makes a TikZ node on appropriate pages You can refer to this node using TikZcommands by using its coordinates Using the name option you can give the node a name which youcan use to refer to the class Using names creates more readable code The show name option can beused to display the names of classes You can modify the names of classes systematically using theoptions class name prefix class name postfix and class name handlerNamed classes are immune to coordinate transformations For example in the following code xshiftdoes not apply to the nodes specified by (id) and (eta) but does apply to the coordinate specified by(11)

0 1 2

0

1

1

η beginsseqpage[classes = show name=above ]class[name = 1](00)class[name = eta](11)class(21)structline[xshift = 1] (1) (eta)structline[xshift = 1blue] (1) (11)endsseqpage

show name = 〈label options〉This option is like saying class name〈label options〉 if the class has a name and does nothing ifthe class has no name If the class has multiple names only the most recent is used This is particularlyuseful with class styles For instance by saying this page classes = show name = above youcan display names of all of the sources and targets of differentials on each page

0 1

0

1

2

3

a

x

0 1

0

1

2

3b

2x

beginsseqdata[name = show name examplethis page classes = show name = above right pin

]class[ name = a ](02)class[ name = b ](03)class[ name = x ](10)d2(x)(a)replacesource[name=2x]d3(x)(b)endsseqdata

printpage[ name = show name example page = 2]

printpage[ name = show name example page = 3]

tag = 〈tag〉

13

This key adds a tag to the current class Tags are used for identifying which of multiple classes in thesame position you are referring to They are useful when you have groups of related classes and want afamily of differentials connecting them For instance

0 1 2 3 4 5

0

1

2

3

4

5

DeclareSseqGrouptower class(00)foreach i in 111

class(0i)structline(0i-1-1)(0i-1)

NewSseqGrouphvee

tower(00)foreach i in 111

class(ii)structline(i-1i-1-1)(ii-1)

beginsseqpage[ degree = -11 yscale = 11

x range = 05 y range = 05 ]tower(30)hvee[ tag = id ](00)hvee[ tag = h21 ](42)foreach n in 05

d2(4+n2+nh21id)endsseqpage

We want each differential to go from the h21 vee to the id vee independent of which classes are in thesame position of the two vees The easy way to accomplish this is by giving tags to each of the two vees

insert = 〈integer〉If there are multiple classes in the same position this option allows you to insert classes later into earlierpositions This is intended to help you put logically related classes next to each other If the integer ispositive it inserts the class in the specified position and if the integer is negative it counts backwardsfrom the end Providing 0 is the same as omitting the option entirely Values larger in absolute valuethan the total number of classes are truncated Consider

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

14

DeclareSseqGroup tower class(00)DoUntilOutOfBounds

class(lastxlasty+1)structline

beginsseqdata[ name = insert-example y range = 04 class pattern = linear ]tower(02)tower(03)tower(01)endsseqdataqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 1 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 3 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -3 ](00)endsseqpage

offset = (〈x offset〉〈y offset〉)By default a class uses the offset specified by class pattern Occasionally this is undesirable In thiscase you can specify the offset for a particular class by hand For example if the sum of two classes ishit by a differential it looks better for the class replacing them to be centered

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = offset examplexscale = 07Adams gradingclass placement transform = scale = 18 ]

class(01)class(02)class(02)draw(01)--(02)class(10)d2(10bdquo1)replacetargetd2(10bdquo2)endsseqdataprintpage[name = offset example page=2]printpage[name = offset example page=3]beginsseqpage[name = offset example page=3]classoptions[offset = (00)](02)endsseqpage

tooltip = 〈text〉This key generates a ldquotooltiprdquo over the given class That is if you hover your mouse over it a littlewindow will popup with the tooltip text This is particularly useful to give the coordinates or names ofclasses in large charts where it may be hard to tell from looking at the picture what position the classis in or there may not be room to supply names to classesThe tooltip is made using the pdftooltip command from the pdfcomment package The pdfcommentpackage generates two extra auxiliary files so it is not included by default In order to use thetooltip option you have to use the tooltips package option (eg load spectralsequences with

15

usepackage[tooltips]spectralsequences) This cannot handle math but it will print math ex-pressions into TEX input form Not all pdf viewers will display the tooltip correctly If this concernsyou the command sseqtooltip is used to produce the tooltip and you can redefine it as any othercommand that takes sseqtooltip〈text〉〈tooltip text〉 and produces a tooltip For instance on thisstack exchange post there is code that supposedly produces tooltips that work with Evince I havenot tested whether it works by itself or whether it works with my package but you could You couldpotentially figure out how to get math to work in tooltips too ndash if you find a satisfactory method pleaselet me knowAnyways herersquos an example

0 1

0

1

beginsseqpage[classes = tooltip = (xcoordycoord)]class(00)class(01)class(10)class(11)endsseqpage

Therersquos another example at the beginning of the section on the class stack

page = 〈page〉--〈page max 〉generation = 〈generation〉--〈generation max 〉

These options only work in classoptions The page option gives a range of pages for which theoptions apply to If only one page is specified it is the minimum page and the option applies to alllarger pages

1 2 4 beginsseqdata[ name = page_example no axestitle = page title style = yshift = -05cm ]

class(00)classoptions[page = 2 -- 3 fill blue](00)endsseqdata

printpage[ name = page_example page = 1 ] qquadprintpage[ name = page_example page = 2 ] qquadprintpage[ name = page_example page = 4 ]

A ldquogenerationrdquo of a class is the interval from one call of class or replaceclass to the page onwhich it next supports or is hit by a differential By default the classoptions command adds optionsonly to the most recent generation of the class in a sseqdata environment or on the generationappropriate to the current page in a sseqpage environment Using the generation option allows youto provide a single generation or range of generations of the class that the options should apply to Thefirst generation is generation 0 and the most recent generation is generation -1 Larger negative valuescount backwards

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

16

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 5: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

beginsseqpage[ no axes ymirror yscale = 08 ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqpage

The effect of the class command is to print a TikZ node on a range of pages Any option that wouldwork for a TikZ node command will also work in the same way for the class replaceclass andclassoptions commandsIf a class is the source or the target of a differential on a certain page then the page of the class is setto that page and the class is only rendered on pages up to that number

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = class exampleAdams gradingyscale = 053 ]

class(10)class(02)class(03)d2(10)endsseqdataprintpage[ name = class example page = 2 ]quadprintpage[ name = class example page = 3 ]

See the class options section for a list of the sort of options available for classes

replaceclass[〈options〉](〈x 〉〈y〉〈n〉)replaceclass[〈options〉](〈classname〉)replacesource[〈options〉]replacetarget[〈options〉]

After a class is the source or target of a differential it disappears on the next page However somedifferentials are not injective or not surjective Using the command replaceclass causes a new symbolto appear on the page after a class supported or accepted a differential (or both) If there are multipleclasses at the coordinate (xy) you may specify which using an integer or a tag n By default thiscommand will affect the first class placed in that position You can also provide the name of a classThe variants replacesource and replacetarget replace the source and target respectively of themost recent differential

0 1

0

1

2

3 Z

Z

Z

middot2middot2

0 1

0

1

2

3 Z2

Z

0 1

0

1

2

3

2Z

5

beginsseqdata[name = replace class example Adams grading classes = draw = none ]class[mathbbZ](03)class[mathbbZ](11)class[mathbbZ](10)d[cdot 2]2(11)replacetarget[mathbbZ2] replaceclass[mathbbZ2](03)d[-raquo]3(10)replacesource[2mathbbZ] replaceclass[2mathbbZ](10)endsseqdataprintpage[ name = replace class example page = 2 ] qquadprintpage[ name = replace class example page = 3 ] qquadprintpage[ name = replace class example page = 4 ]

Note that this will not restore any structure lines coming into or off of the class if you want the structurelines to persist you must call structline again (or use the page option)

classoptions[〈options〉](〈x 〉〈y〉〈n〉)classoptions[〈options〉](〈classname〉)classoptions[〈options〉]

This adds options to an existing class This can be used in a sseqpage environment to modify theappearance of a class for just one drawing of the spectral sequence for instance to highlight it fordiscussion purposesIf there are multiple classes at the coordinate (xy) you may specify which using an integer or a tagn By default this command will affect the first class placed in that position You can also provide thename of a class If no coordinate is indicated at all then lastclass is used

0 1 2

0

1

The red class is the problem

beginsseqdata[ name = class options exampleclasses = fill ]

class(21)foreach x in 02 foreach y in 01

class(xy)endsseqdatabeginsseqpage[ name = class options example

right clip padding = 06cm ]classoptions[red](212) Only is red on this pagenode[ background ] at (03-22)

textupThe red class is the problemendsseqpage

Another reason to use this is to give a label to one instance of a class that shows up in a loop or acommand defined using NewSseqGroup

0 1 2 3

0

1

2

3

4

2 η

NewSseqGroupmygroup class(00)class(01)class(02)class(11)class(22)structline(00)(01)structline(01)(02)structline(00)(11)structline(11)(22)

beginsseqpage[ classes = fill class labels = left = 03em ]mygroup(00)mygroup(12)classoptions[2](01)classoptions[eta](11)endsseqpage

See the class options section for a list of the sort of options available for classes

d[〈options〉]〈page〉d[〈options〉]〈page〉(〈x 〉〈y〉〈source n〉〈target n〉)

6

d[〈options〉]〈page〉(〈source name〉〈target n〉)d[〈options〉]〈page〉(〈source coordinate〉)(〈target coordinate〉)

Calling d〈page〉(〈x 〉〈y〉) creates a differential starting at (〈x 〉〈y〉) of length determined by the speci-fied page In order to use the d command like this you must first specify the degree of the differentialsas an option to the sseqdata or sseqpage environment The degree indicates how far to the rightand how far up a page r differential will go as a function of r If there is a page r differential on pager+ 1 the source target and any structure lines connected to the source and target of the differentialdisappear If no class is specified the default is to use lastclassIf there are multiple nodes in the source or target you may specify which one the differential should goto using an index or tag for 〈source n〉 or 〈target n〉 It is also possible to provide the name of the sourcecoordinate and an optional target or to separately provide the source and target coordinate either asnames or as (〈x 〉〈y〉〈n〉) Using d with explicit source and target coordinates works even if you didnot provide a degree to the spectral sequence If you did provide a degree then spectralsequenceswill check whether the difference between the source and target is appropriate for a differential of a givenpage and if not it will throw an error If this is undesirable you can use the lax degree option

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = d example degree = -11struct lines = blue yscale = 13 ]

class(02)class(12)class(11)class(10)structline(12)(02)structline(12)(11)structline(11)(10)d2(10)endsseqdataprintpage[ name = d example page = 2 ] quadprintpage[ name = d example page = 3 ]

If there are multiple nodes in the source or target coordinate then there is a funny syntax for indicatingwhich one should be the source and target d〈page〉(〈x 〉〈y〉sourcentargetn)

0 1 2 3

0

1

2

beginsseqpage[ Adams grading yscale = 08 ]class(10) class(10)class(02) class(02)d2(1012)class(20) class(20)class(12)d2(202)class(30)class(22) class(22)d2(30bdquo2)endsseqpage

Negative indices will count from the most recent class in the coordinate (so the most recent is -1the second most recent is -2 etc) You can also use a tag which works better if the situation iscomplicated

0 1

0

1

2

beginsseqpage[ Adams grading yscale = 065 ]class(10)class(02) class(02)d[blue]2(10-1-1)class(10)class(02)d[orange]2(10-1-1)class(10)d[red]2(10-1-2)endsseqpage

doptions[〈options〉]〈page〉(〈x 〉〈y〉〈source n〉〈target n〉)doptions[〈options〉]〈page〉(〈source name〉〈target n〉)

7

doptions[〈options〉]〈page〉(〈source coordinate〉)(〈target coordinate〉)This command adds options to an existing differential just like classoptions except for differentialsIts syntax is identical to that of d

kill〈page〉[〈coord〉]This command sets the indicated coordinate to die on the indicated page but does not establish a targetfor the differential This is useful if you want to draw your own differential using tikz (see getdtarget)or if you are not drawing the class on the other side of the differential for clutter reasons As usual ifno coordinate is provided the default argument is lastclass

structline[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command creates a structure line from 〈source coordinate〉 to 〈target coordinate〉 The source andtarget coordinates are either of the form (〈x 〉〈y〉〈n〉) or (〈class name〉) If there are multiple classesat (x y) then 〈n〉 specifies which of the classes at (x y) the structure line starts and ends at ndash if n ispositive then it counts from the first class in that position if n is negative it counts backwards fromthe most recent You can also use a tag for n If the 〈target coordinate〉 is omitted then lastclass isused so that structline(sourcecoord) connects the most recent class to the specified coordinateIf both coordinates are omitted then lastclass and lastclass1 are used and so structline withno arguments at all will connect the two most recent classesIf the source or target of a structure line is hit by a differential then on subsequent pages the structureline disappearsIf the source or target has had multiple generations (ie they got hit and you used replaceclass)then the structline will only appear starting on the first page where the current generation of boththe source and target are present If this is undesirable you can use the page option to change it

DeclareSseqGrouptower class(00)foreach y in 15

class(0y)structline

class(02)structline(01-1)structline(03-1)

beginsseqdata[ name = structline example

classes = circle fill Adams grading no axesyscale = 128 ]

class(11) class(12)class(23) class(23) class(25)tower[classes = blue](00)tower[struct lines = dashedorange](10)tower[struct lines = red](20)d2(112)endsseqdataprintpage[ name = structline example page = 2 ] quadprintpage[ name = structline example page = 3 ]

structlineoptions[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command adds options to an existing structure line just like classoptions except for structurelines Its syntax is identical to structline

circleclasses[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command is a lot like structline except that it puts a circle around the classes instead of connect-ing them with a line It might take a certain amount of fiddling with options to get circleclasses toproduce good results There is no circleclassesoptions command because it doesnrsquot seem necessaryand (more importantly) I didnrsquot feel like making one Maybe someday Irsquoll put one in

8

drawpathnodeclip

Any code that would work in a tikzpicture environment will also work unchanged in a sseqdataor sseqpage environment with a few minor differences This is a very flexible way to add arbitrarybackground or foreground features to the spectral sequence

0 1 2

0

1

2

Consider thisdifferential

0 1 2

0

1

2

This isthe source

This isthe target

0 1 2

0

1

2

Now itrsquos gone

beginsseqdata[ name = tikz example Adams grading math nodes = falsetikz primitives = blue font = tiny lt- circle classes = tikz primitive stylex range = 02 x axis extend end = 2em ]

class(00)class(10)class(02)d2(10)endsseqdatabeginsseqpage[ name = tikz example ]circleclasses[ name path = myellipse inner sep = 3pt ellipse ratio = 16 ] (10) (02)path[ name path = myline ] (13125) -- (061)draw[ name intersections = of = myellipse and myline ]

(intersection-1) to (13125) node[ right text width = 16cm ] Consider this differentialendsseqpage qquadbeginsseqpage[ name = tikz example ]draw[ xshift = 1 ] (00) to (0602) node[ right text width = 11cm ] This is the sourcedraw[ yshift = 2 ] (00) to (0602) node[ right text width = 11cm ] This is the targetendsseqpage qquadbeginsseqpage[ page = 3 name = tikz example ]circleclasses[ inner sep = 3pt ellipse ratio = 16 ] (10)(02)node[ right font = tiny ] at (1212) Now itrsquos goneendsseqpage

4 Options for the main commands

41 Universal options

The following options work with all of the drawing commands in this package including class d andstructline their friends replaceclass classoptions doptions and structlines as well as withTikZ primitives

xshift = 〈integer〉yshift = 〈integer〉

Shifts by integer values are the only coordinate changes that are allowed to be applied to class dstructline their relatives or to a scope environment that contains any of these commands Theseshift commands help with reusing code For instance

9

0 1 2 3

0

1

2

beginsseqpage[ cohomological Serre grading yscale = 045 ]foreach x in 01 foreach y in 01

beginscope[ xshift = x yshift = y ]class(20)class(01)d2(01)endscope

endsseqpage

This code segment is very useful so spectralsequences has the command NewSseqGroup which tomake code like this more convenient The following code produces the same output as above

NewSseqGroupexamplegroup class(20)class(01)d2(01)

beginsseqpageexamplegroup(00)examplegroup(01)examplegroup(10)examplegroup(11)endsseqpage

A word of warning the behavior of xshift in spectralsequences is incompatible with the normalbehavior of xshift in TikZ For some reason saying xshift = 1 in TikZ does not shift the coordinate(00) to the coordinate (10) ndash instead it shifts by 1pt In spectralsequences saying xshift = 1moves the coordinate (00) to the coordinate (10) This includes TikZ primitives saying draw[xshift = 1 ] (00) -- (10) inside a sseqdata or sseqpage environment is the same as sayingdraw(10) -- (20) despite the fact that this is not the case in the tikzpicture environment

ColorsThese come from the LATEX color package via TikZ so see the color package documentation for moreinformation

beginsseqpage[ classes = fillinner sep = 04emno axes scale = 13 ]

class[red](00)class[blue](10)class[green](20)class[cyan](01)class[magenta](11)class[yellow](21)class[blue50red](02) a 50-50 blend of blue and redclass[green30yellow](12) 30 green 70 yellowclass[blue50black](22)endsseqpage

〈text〉〈options〉Specify a label for a class a differential or a structure line This uses the TikZ quotes syntax Ifthe label text includes an equal sign or comma you need to enclose the entire label in braces egclass[x = y](00) The options include anything you might pass as an option to a TikZ nodeincluding arbitrary coordinate transforms colors opacity options shapes fill draw etc The behavioris a little different depending on whether you use it on a class or on a differential or structure lineFor a class the 〈text〉 is placed in the position inside the node by default ndash in effect the 〈text〉 becomesthe label text of the node (so saying class[label text](00) causes a similar effect to sayingnode at (00) label text) There are other position options such as left above left etcwhich cause the label text to be placed in a separate node positioned appropriately If the placement isabove left etc then any option that you may pass to a TikZ node will also work for the label includinggeneral coordinate transformations If the placement is ldquoinsiderdquo then the only relevant 〈options〉 arethose that alter the appearance of text such as opacity and color

10

a a a

b

b

a beginsseqpage[ classes = minimum width = width(a) + 05em no axes ]class[a](00)class[a red](10)class[a black red](20)class[b above](01)class[b below right yshift = 01cm ](11)class[a above right = 1em ](21)endsseqpage

You can adjust the default behavior of class labels using the labels style option or its relativesclass labels inner class labels or outer class labels Note that it is also possible to givea label to a node this way although the behavior is slightly different In particular the label defaultsto the above position instead of going in the node text by default Also this wonrsquot respect the variouslabel style options like labels etc

a beginsseqpage[ no axes ]class(00)class(20)node[circle fill a] at (10) endsseqpage

pin = 〈style〉The pin key makes spectralsequences draw a line connecting the label to the relevant class whichcan provide necessary clarification in dense diagrams The pin key itself can take options whichadjust the way that the line is drawn

0

0

1

xy

beginsseqpageclass(00)class[xy above xshift = -4pt pin = red ](00)class(00)class(01)structlineendsseqpage

For either a structline or a class the label normally goes on the right side of the edge The specialoption rsquo makes it go in the opposite position from the default I imitated the label handling in thetikzcd package so if you use tikzcd this should be familiar

0 1

0

1

2

aa bb

middot2middot2

beginsseqpage[ Adams grading yscale = 063 ]class(00)class(01)class(02)structline[arsquo blue](00)(01)class(10)class(11)structline[b](10)(11)d[ cdot 2 pos = 07 yshift = -5pt ] 2 (10)endsseqpage

You can use the style options labels edge labels differential labels and struct line labelsto adjust the styling of edge labels For instance if you would prefer for the labels to default to the lefthand side of the edge rather than the right hand side you could say edge labels = auto = leftYou can also use quotes to label edges drawn with TikZ primitives

hi

beginsseqpage[ yscale = 058 no axes ]class(00)class(11)draw (10) to[hirsquo pos = 07 yshift = -05em ] (01)endsseqpage

11

description

The description key stolen from tikzcd places the label on top of the edge In order to makethis option work correctly if the background coolor is not the default white you must informspectralsequences about this using the key background color = 〈color〉 In this document thebackground color is called graphicbackground

aa aprimeb

aprimeb

cc

beginsseqpage[ no axes background color = graphicbackground ]foreach x in 012 foreach y in 01

class(xy)structline[a red](00)(01)structline[arsquorsquobluebyshift = 1em](10)(11)structline[c description](20)(21)endsseqpage

42 Options for class

Because the main job of the class command is to print a TikZ node on the appropriate pages of thespectral sequence most options that would work for a TikZ node also work for the commands classreplaceclass and classoptions Here are a few that you might care about

A TikZ shapeIf you give the name of a TikZ shape the class node will be of that shape The standard TikZ shapesare circle and rectangle spectralsequences defines two new shapes

circlen = 〈n〉This draws n concentric circles Itrsquos intended for indicating a Zpn summand For large values ofn the result isnrsquot all that appealing

beginsseqpage[ no axes ]class[circlen = 2](00)class[circlen = 2fill](10)class[circlen = 3](01)class[circlen = 4](11)endsseqpage

newellipseellipse ratio = 〈ratio〉

This shape is used for circleclasses Itrsquos a variant on the ellipse shape that gives more controlover the ellipsersquos aspect ratio

There are many more TikZ shapes in the shapes library which you can load using the commandusetikzlibraryshapes The following are some examples

beginsseqpage[ no axes classes = inner sep = 04em class placement transform = scale = 18 yscale = 163 ]

class(00)class[isosceles triangle](20)class[rectangle](10)class[diamond](01)class[semicircle](11)class[regular polygon regular polygon sides = 5](22)class[regular polygon regular polygon sides = 6](22)class[regular polygon regular polygon sides = 7](22)class[regular polygon regular polygon sides = 8](22)endsseqpage

See the TikZ manual for more information

12

minimum width = 〈dimension〉minimum height = 〈dimension〉minimum size = 〈dimension〉inner sep = 〈dimension〉outer sep = 〈dimension〉

These options control the size of a node This is typically useful to make the size of nodes consistentindependent of the size of their label text For instance

ab

a

ab

a

beginsseqdata[ name = minimum width example no axes yscale = 08 ]class[ab](00)class[a](01)class(02)endsseqdataprintpage[ name = minimum width example ]printpage[ name = minimum width examplechange classes = blue minimum width = width(ab) + 05em ]

name = 〈node name〉The class command makes a TikZ node on appropriate pages You can refer to this node using TikZcommands by using its coordinates Using the name option you can give the node a name which youcan use to refer to the class Using names creates more readable code The show name option can beused to display the names of classes You can modify the names of classes systematically using theoptions class name prefix class name postfix and class name handlerNamed classes are immune to coordinate transformations For example in the following code xshiftdoes not apply to the nodes specified by (id) and (eta) but does apply to the coordinate specified by(11)

0 1 2

0

1

1

η beginsseqpage[classes = show name=above ]class[name = 1](00)class[name = eta](11)class(21)structline[xshift = 1] (1) (eta)structline[xshift = 1blue] (1) (11)endsseqpage

show name = 〈label options〉This option is like saying class name〈label options〉 if the class has a name and does nothing ifthe class has no name If the class has multiple names only the most recent is used This is particularlyuseful with class styles For instance by saying this page classes = show name = above youcan display names of all of the sources and targets of differentials on each page

0 1

0

1

2

3

a

x

0 1

0

1

2

3b

2x

beginsseqdata[name = show name examplethis page classes = show name = above right pin

]class[ name = a ](02)class[ name = b ](03)class[ name = x ](10)d2(x)(a)replacesource[name=2x]d3(x)(b)endsseqdata

printpage[ name = show name example page = 2]

printpage[ name = show name example page = 3]

tag = 〈tag〉

13

This key adds a tag to the current class Tags are used for identifying which of multiple classes in thesame position you are referring to They are useful when you have groups of related classes and want afamily of differentials connecting them For instance

0 1 2 3 4 5

0

1

2

3

4

5

DeclareSseqGrouptower class(00)foreach i in 111

class(0i)structline(0i-1-1)(0i-1)

NewSseqGrouphvee

tower(00)foreach i in 111

class(ii)structline(i-1i-1-1)(ii-1)

beginsseqpage[ degree = -11 yscale = 11

x range = 05 y range = 05 ]tower(30)hvee[ tag = id ](00)hvee[ tag = h21 ](42)foreach n in 05

d2(4+n2+nh21id)endsseqpage

We want each differential to go from the h21 vee to the id vee independent of which classes are in thesame position of the two vees The easy way to accomplish this is by giving tags to each of the two vees

insert = 〈integer〉If there are multiple classes in the same position this option allows you to insert classes later into earlierpositions This is intended to help you put logically related classes next to each other If the integer ispositive it inserts the class in the specified position and if the integer is negative it counts backwardsfrom the end Providing 0 is the same as omitting the option entirely Values larger in absolute valuethan the total number of classes are truncated Consider

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

14

DeclareSseqGroup tower class(00)DoUntilOutOfBounds

class(lastxlasty+1)structline

beginsseqdata[ name = insert-example y range = 04 class pattern = linear ]tower(02)tower(03)tower(01)endsseqdataqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 1 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 3 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -3 ](00)endsseqpage

offset = (〈x offset〉〈y offset〉)By default a class uses the offset specified by class pattern Occasionally this is undesirable In thiscase you can specify the offset for a particular class by hand For example if the sum of two classes ishit by a differential it looks better for the class replacing them to be centered

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = offset examplexscale = 07Adams gradingclass placement transform = scale = 18 ]

class(01)class(02)class(02)draw(01)--(02)class(10)d2(10bdquo1)replacetargetd2(10bdquo2)endsseqdataprintpage[name = offset example page=2]printpage[name = offset example page=3]beginsseqpage[name = offset example page=3]classoptions[offset = (00)](02)endsseqpage

tooltip = 〈text〉This key generates a ldquotooltiprdquo over the given class That is if you hover your mouse over it a littlewindow will popup with the tooltip text This is particularly useful to give the coordinates or names ofclasses in large charts where it may be hard to tell from looking at the picture what position the classis in or there may not be room to supply names to classesThe tooltip is made using the pdftooltip command from the pdfcomment package The pdfcommentpackage generates two extra auxiliary files so it is not included by default In order to use thetooltip option you have to use the tooltips package option (eg load spectralsequences with

15

usepackage[tooltips]spectralsequences) This cannot handle math but it will print math ex-pressions into TEX input form Not all pdf viewers will display the tooltip correctly If this concernsyou the command sseqtooltip is used to produce the tooltip and you can redefine it as any othercommand that takes sseqtooltip〈text〉〈tooltip text〉 and produces a tooltip For instance on thisstack exchange post there is code that supposedly produces tooltips that work with Evince I havenot tested whether it works by itself or whether it works with my package but you could You couldpotentially figure out how to get math to work in tooltips too ndash if you find a satisfactory method pleaselet me knowAnyways herersquos an example

0 1

0

1

beginsseqpage[classes = tooltip = (xcoordycoord)]class(00)class(01)class(10)class(11)endsseqpage

Therersquos another example at the beginning of the section on the class stack

page = 〈page〉--〈page max 〉generation = 〈generation〉--〈generation max 〉

These options only work in classoptions The page option gives a range of pages for which theoptions apply to If only one page is specified it is the minimum page and the option applies to alllarger pages

1 2 4 beginsseqdata[ name = page_example no axestitle = page title style = yshift = -05cm ]

class(00)classoptions[page = 2 -- 3 fill blue](00)endsseqdata

printpage[ name = page_example page = 1 ] qquadprintpage[ name = page_example page = 2 ] qquadprintpage[ name = page_example page = 4 ]

A ldquogenerationrdquo of a class is the interval from one call of class or replaceclass to the page onwhich it next supports or is hit by a differential By default the classoptions command adds optionsonly to the most recent generation of the class in a sseqdata environment or on the generationappropriate to the current page in a sseqpage environment Using the generation option allows youto provide a single generation or range of generations of the class that the options should apply to Thefirst generation is generation 0 and the most recent generation is generation -1 Larger negative valuescount backwards

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

16

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 6: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

beginsseqdata[name = replace class example Adams grading classes = draw = none ]class[mathbbZ](03)class[mathbbZ](11)class[mathbbZ](10)d[cdot 2]2(11)replacetarget[mathbbZ2] replaceclass[mathbbZ2](03)d[-raquo]3(10)replacesource[2mathbbZ] replaceclass[2mathbbZ](10)endsseqdataprintpage[ name = replace class example page = 2 ] qquadprintpage[ name = replace class example page = 3 ] qquadprintpage[ name = replace class example page = 4 ]

Note that this will not restore any structure lines coming into or off of the class if you want the structurelines to persist you must call structline again (or use the page option)

classoptions[〈options〉](〈x 〉〈y〉〈n〉)classoptions[〈options〉](〈classname〉)classoptions[〈options〉]

This adds options to an existing class This can be used in a sseqpage environment to modify theappearance of a class for just one drawing of the spectral sequence for instance to highlight it fordiscussion purposesIf there are multiple classes at the coordinate (xy) you may specify which using an integer or a tagn By default this command will affect the first class placed in that position You can also provide thename of a class If no coordinate is indicated at all then lastclass is used

0 1 2

0

1

The red class is the problem

beginsseqdata[ name = class options exampleclasses = fill ]

class(21)foreach x in 02 foreach y in 01

class(xy)endsseqdatabeginsseqpage[ name = class options example

right clip padding = 06cm ]classoptions[red](212) Only is red on this pagenode[ background ] at (03-22)

textupThe red class is the problemendsseqpage

Another reason to use this is to give a label to one instance of a class that shows up in a loop or acommand defined using NewSseqGroup

0 1 2 3

0

1

2

3

4

2 η

NewSseqGroupmygroup class(00)class(01)class(02)class(11)class(22)structline(00)(01)structline(01)(02)structline(00)(11)structline(11)(22)

beginsseqpage[ classes = fill class labels = left = 03em ]mygroup(00)mygroup(12)classoptions[2](01)classoptions[eta](11)endsseqpage

See the class options section for a list of the sort of options available for classes

d[〈options〉]〈page〉d[〈options〉]〈page〉(〈x 〉〈y〉〈source n〉〈target n〉)

6

d[〈options〉]〈page〉(〈source name〉〈target n〉)d[〈options〉]〈page〉(〈source coordinate〉)(〈target coordinate〉)

Calling d〈page〉(〈x 〉〈y〉) creates a differential starting at (〈x 〉〈y〉) of length determined by the speci-fied page In order to use the d command like this you must first specify the degree of the differentialsas an option to the sseqdata or sseqpage environment The degree indicates how far to the rightand how far up a page r differential will go as a function of r If there is a page r differential on pager+ 1 the source target and any structure lines connected to the source and target of the differentialdisappear If no class is specified the default is to use lastclassIf there are multiple nodes in the source or target you may specify which one the differential should goto using an index or tag for 〈source n〉 or 〈target n〉 It is also possible to provide the name of the sourcecoordinate and an optional target or to separately provide the source and target coordinate either asnames or as (〈x 〉〈y〉〈n〉) Using d with explicit source and target coordinates works even if you didnot provide a degree to the spectral sequence If you did provide a degree then spectralsequenceswill check whether the difference between the source and target is appropriate for a differential of a givenpage and if not it will throw an error If this is undesirable you can use the lax degree option

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = d example degree = -11struct lines = blue yscale = 13 ]

class(02)class(12)class(11)class(10)structline(12)(02)structline(12)(11)structline(11)(10)d2(10)endsseqdataprintpage[ name = d example page = 2 ] quadprintpage[ name = d example page = 3 ]

If there are multiple nodes in the source or target coordinate then there is a funny syntax for indicatingwhich one should be the source and target d〈page〉(〈x 〉〈y〉sourcentargetn)

0 1 2 3

0

1

2

beginsseqpage[ Adams grading yscale = 08 ]class(10) class(10)class(02) class(02)d2(1012)class(20) class(20)class(12)d2(202)class(30)class(22) class(22)d2(30bdquo2)endsseqpage

Negative indices will count from the most recent class in the coordinate (so the most recent is -1the second most recent is -2 etc) You can also use a tag which works better if the situation iscomplicated

0 1

0

1

2

beginsseqpage[ Adams grading yscale = 065 ]class(10)class(02) class(02)d[blue]2(10-1-1)class(10)class(02)d[orange]2(10-1-1)class(10)d[red]2(10-1-2)endsseqpage

doptions[〈options〉]〈page〉(〈x 〉〈y〉〈source n〉〈target n〉)doptions[〈options〉]〈page〉(〈source name〉〈target n〉)

7

doptions[〈options〉]〈page〉(〈source coordinate〉)(〈target coordinate〉)This command adds options to an existing differential just like classoptions except for differentialsIts syntax is identical to that of d

kill〈page〉[〈coord〉]This command sets the indicated coordinate to die on the indicated page but does not establish a targetfor the differential This is useful if you want to draw your own differential using tikz (see getdtarget)or if you are not drawing the class on the other side of the differential for clutter reasons As usual ifno coordinate is provided the default argument is lastclass

structline[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command creates a structure line from 〈source coordinate〉 to 〈target coordinate〉 The source andtarget coordinates are either of the form (〈x 〉〈y〉〈n〉) or (〈class name〉) If there are multiple classesat (x y) then 〈n〉 specifies which of the classes at (x y) the structure line starts and ends at ndash if n ispositive then it counts from the first class in that position if n is negative it counts backwards fromthe most recent You can also use a tag for n If the 〈target coordinate〉 is omitted then lastclass isused so that structline(sourcecoord) connects the most recent class to the specified coordinateIf both coordinates are omitted then lastclass and lastclass1 are used and so structline withno arguments at all will connect the two most recent classesIf the source or target of a structure line is hit by a differential then on subsequent pages the structureline disappearsIf the source or target has had multiple generations (ie they got hit and you used replaceclass)then the structline will only appear starting on the first page where the current generation of boththe source and target are present If this is undesirable you can use the page option to change it

DeclareSseqGrouptower class(00)foreach y in 15

class(0y)structline

class(02)structline(01-1)structline(03-1)

beginsseqdata[ name = structline example

classes = circle fill Adams grading no axesyscale = 128 ]

class(11) class(12)class(23) class(23) class(25)tower[classes = blue](00)tower[struct lines = dashedorange](10)tower[struct lines = red](20)d2(112)endsseqdataprintpage[ name = structline example page = 2 ] quadprintpage[ name = structline example page = 3 ]

structlineoptions[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command adds options to an existing structure line just like classoptions except for structurelines Its syntax is identical to structline

circleclasses[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command is a lot like structline except that it puts a circle around the classes instead of connect-ing them with a line It might take a certain amount of fiddling with options to get circleclasses toproduce good results There is no circleclassesoptions command because it doesnrsquot seem necessaryand (more importantly) I didnrsquot feel like making one Maybe someday Irsquoll put one in

8

drawpathnodeclip

Any code that would work in a tikzpicture environment will also work unchanged in a sseqdataor sseqpage environment with a few minor differences This is a very flexible way to add arbitrarybackground or foreground features to the spectral sequence

0 1 2

0

1

2

Consider thisdifferential

0 1 2

0

1

2

This isthe source

This isthe target

0 1 2

0

1

2

Now itrsquos gone

beginsseqdata[ name = tikz example Adams grading math nodes = falsetikz primitives = blue font = tiny lt- circle classes = tikz primitive stylex range = 02 x axis extend end = 2em ]

class(00)class(10)class(02)d2(10)endsseqdatabeginsseqpage[ name = tikz example ]circleclasses[ name path = myellipse inner sep = 3pt ellipse ratio = 16 ] (10) (02)path[ name path = myline ] (13125) -- (061)draw[ name intersections = of = myellipse and myline ]

(intersection-1) to (13125) node[ right text width = 16cm ] Consider this differentialendsseqpage qquadbeginsseqpage[ name = tikz example ]draw[ xshift = 1 ] (00) to (0602) node[ right text width = 11cm ] This is the sourcedraw[ yshift = 2 ] (00) to (0602) node[ right text width = 11cm ] This is the targetendsseqpage qquadbeginsseqpage[ page = 3 name = tikz example ]circleclasses[ inner sep = 3pt ellipse ratio = 16 ] (10)(02)node[ right font = tiny ] at (1212) Now itrsquos goneendsseqpage

4 Options for the main commands

41 Universal options

The following options work with all of the drawing commands in this package including class d andstructline their friends replaceclass classoptions doptions and structlines as well as withTikZ primitives

xshift = 〈integer〉yshift = 〈integer〉

Shifts by integer values are the only coordinate changes that are allowed to be applied to class dstructline their relatives or to a scope environment that contains any of these commands Theseshift commands help with reusing code For instance

9

0 1 2 3

0

1

2

beginsseqpage[ cohomological Serre grading yscale = 045 ]foreach x in 01 foreach y in 01

beginscope[ xshift = x yshift = y ]class(20)class(01)d2(01)endscope

endsseqpage

This code segment is very useful so spectralsequences has the command NewSseqGroup which tomake code like this more convenient The following code produces the same output as above

NewSseqGroupexamplegroup class(20)class(01)d2(01)

beginsseqpageexamplegroup(00)examplegroup(01)examplegroup(10)examplegroup(11)endsseqpage

A word of warning the behavior of xshift in spectralsequences is incompatible with the normalbehavior of xshift in TikZ For some reason saying xshift = 1 in TikZ does not shift the coordinate(00) to the coordinate (10) ndash instead it shifts by 1pt In spectralsequences saying xshift = 1moves the coordinate (00) to the coordinate (10) This includes TikZ primitives saying draw[xshift = 1 ] (00) -- (10) inside a sseqdata or sseqpage environment is the same as sayingdraw(10) -- (20) despite the fact that this is not the case in the tikzpicture environment

ColorsThese come from the LATEX color package via TikZ so see the color package documentation for moreinformation

beginsseqpage[ classes = fillinner sep = 04emno axes scale = 13 ]

class[red](00)class[blue](10)class[green](20)class[cyan](01)class[magenta](11)class[yellow](21)class[blue50red](02) a 50-50 blend of blue and redclass[green30yellow](12) 30 green 70 yellowclass[blue50black](22)endsseqpage

〈text〉〈options〉Specify a label for a class a differential or a structure line This uses the TikZ quotes syntax Ifthe label text includes an equal sign or comma you need to enclose the entire label in braces egclass[x = y](00) The options include anything you might pass as an option to a TikZ nodeincluding arbitrary coordinate transforms colors opacity options shapes fill draw etc The behavioris a little different depending on whether you use it on a class or on a differential or structure lineFor a class the 〈text〉 is placed in the position inside the node by default ndash in effect the 〈text〉 becomesthe label text of the node (so saying class[label text](00) causes a similar effect to sayingnode at (00) label text) There are other position options such as left above left etcwhich cause the label text to be placed in a separate node positioned appropriately If the placement isabove left etc then any option that you may pass to a TikZ node will also work for the label includinggeneral coordinate transformations If the placement is ldquoinsiderdquo then the only relevant 〈options〉 arethose that alter the appearance of text such as opacity and color

10

a a a

b

b

a beginsseqpage[ classes = minimum width = width(a) + 05em no axes ]class[a](00)class[a red](10)class[a black red](20)class[b above](01)class[b below right yshift = 01cm ](11)class[a above right = 1em ](21)endsseqpage

You can adjust the default behavior of class labels using the labels style option or its relativesclass labels inner class labels or outer class labels Note that it is also possible to givea label to a node this way although the behavior is slightly different In particular the label defaultsto the above position instead of going in the node text by default Also this wonrsquot respect the variouslabel style options like labels etc

a beginsseqpage[ no axes ]class(00)class(20)node[circle fill a] at (10) endsseqpage

pin = 〈style〉The pin key makes spectralsequences draw a line connecting the label to the relevant class whichcan provide necessary clarification in dense diagrams The pin key itself can take options whichadjust the way that the line is drawn

0

0

1

xy

beginsseqpageclass(00)class[xy above xshift = -4pt pin = red ](00)class(00)class(01)structlineendsseqpage

For either a structline or a class the label normally goes on the right side of the edge The specialoption rsquo makes it go in the opposite position from the default I imitated the label handling in thetikzcd package so if you use tikzcd this should be familiar

0 1

0

1

2

aa bb

middot2middot2

beginsseqpage[ Adams grading yscale = 063 ]class(00)class(01)class(02)structline[arsquo blue](00)(01)class(10)class(11)structline[b](10)(11)d[ cdot 2 pos = 07 yshift = -5pt ] 2 (10)endsseqpage

You can use the style options labels edge labels differential labels and struct line labelsto adjust the styling of edge labels For instance if you would prefer for the labels to default to the lefthand side of the edge rather than the right hand side you could say edge labels = auto = leftYou can also use quotes to label edges drawn with TikZ primitives

hi

beginsseqpage[ yscale = 058 no axes ]class(00)class(11)draw (10) to[hirsquo pos = 07 yshift = -05em ] (01)endsseqpage

11

description

The description key stolen from tikzcd places the label on top of the edge In order to makethis option work correctly if the background coolor is not the default white you must informspectralsequences about this using the key background color = 〈color〉 In this document thebackground color is called graphicbackground

aa aprimeb

aprimeb

cc

beginsseqpage[ no axes background color = graphicbackground ]foreach x in 012 foreach y in 01

class(xy)structline[a red](00)(01)structline[arsquorsquobluebyshift = 1em](10)(11)structline[c description](20)(21)endsseqpage

42 Options for class

Because the main job of the class command is to print a TikZ node on the appropriate pages of thespectral sequence most options that would work for a TikZ node also work for the commands classreplaceclass and classoptions Here are a few that you might care about

A TikZ shapeIf you give the name of a TikZ shape the class node will be of that shape The standard TikZ shapesare circle and rectangle spectralsequences defines two new shapes

circlen = 〈n〉This draws n concentric circles Itrsquos intended for indicating a Zpn summand For large values ofn the result isnrsquot all that appealing

beginsseqpage[ no axes ]class[circlen = 2](00)class[circlen = 2fill](10)class[circlen = 3](01)class[circlen = 4](11)endsseqpage

newellipseellipse ratio = 〈ratio〉

This shape is used for circleclasses Itrsquos a variant on the ellipse shape that gives more controlover the ellipsersquos aspect ratio

There are many more TikZ shapes in the shapes library which you can load using the commandusetikzlibraryshapes The following are some examples

beginsseqpage[ no axes classes = inner sep = 04em class placement transform = scale = 18 yscale = 163 ]

class(00)class[isosceles triangle](20)class[rectangle](10)class[diamond](01)class[semicircle](11)class[regular polygon regular polygon sides = 5](22)class[regular polygon regular polygon sides = 6](22)class[regular polygon regular polygon sides = 7](22)class[regular polygon regular polygon sides = 8](22)endsseqpage

See the TikZ manual for more information

12

minimum width = 〈dimension〉minimum height = 〈dimension〉minimum size = 〈dimension〉inner sep = 〈dimension〉outer sep = 〈dimension〉

These options control the size of a node This is typically useful to make the size of nodes consistentindependent of the size of their label text For instance

ab

a

ab

a

beginsseqdata[ name = minimum width example no axes yscale = 08 ]class[ab](00)class[a](01)class(02)endsseqdataprintpage[ name = minimum width example ]printpage[ name = minimum width examplechange classes = blue minimum width = width(ab) + 05em ]

name = 〈node name〉The class command makes a TikZ node on appropriate pages You can refer to this node using TikZcommands by using its coordinates Using the name option you can give the node a name which youcan use to refer to the class Using names creates more readable code The show name option can beused to display the names of classes You can modify the names of classes systematically using theoptions class name prefix class name postfix and class name handlerNamed classes are immune to coordinate transformations For example in the following code xshiftdoes not apply to the nodes specified by (id) and (eta) but does apply to the coordinate specified by(11)

0 1 2

0

1

1

η beginsseqpage[classes = show name=above ]class[name = 1](00)class[name = eta](11)class(21)structline[xshift = 1] (1) (eta)structline[xshift = 1blue] (1) (11)endsseqpage

show name = 〈label options〉This option is like saying class name〈label options〉 if the class has a name and does nothing ifthe class has no name If the class has multiple names only the most recent is used This is particularlyuseful with class styles For instance by saying this page classes = show name = above youcan display names of all of the sources and targets of differentials on each page

0 1

0

1

2

3

a

x

0 1

0

1

2

3b

2x

beginsseqdata[name = show name examplethis page classes = show name = above right pin

]class[ name = a ](02)class[ name = b ](03)class[ name = x ](10)d2(x)(a)replacesource[name=2x]d3(x)(b)endsseqdata

printpage[ name = show name example page = 2]

printpage[ name = show name example page = 3]

tag = 〈tag〉

13

This key adds a tag to the current class Tags are used for identifying which of multiple classes in thesame position you are referring to They are useful when you have groups of related classes and want afamily of differentials connecting them For instance

0 1 2 3 4 5

0

1

2

3

4

5

DeclareSseqGrouptower class(00)foreach i in 111

class(0i)structline(0i-1-1)(0i-1)

NewSseqGrouphvee

tower(00)foreach i in 111

class(ii)structline(i-1i-1-1)(ii-1)

beginsseqpage[ degree = -11 yscale = 11

x range = 05 y range = 05 ]tower(30)hvee[ tag = id ](00)hvee[ tag = h21 ](42)foreach n in 05

d2(4+n2+nh21id)endsseqpage

We want each differential to go from the h21 vee to the id vee independent of which classes are in thesame position of the two vees The easy way to accomplish this is by giving tags to each of the two vees

insert = 〈integer〉If there are multiple classes in the same position this option allows you to insert classes later into earlierpositions This is intended to help you put logically related classes next to each other If the integer ispositive it inserts the class in the specified position and if the integer is negative it counts backwardsfrom the end Providing 0 is the same as omitting the option entirely Values larger in absolute valuethan the total number of classes are truncated Consider

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

14

DeclareSseqGroup tower class(00)DoUntilOutOfBounds

class(lastxlasty+1)structline

beginsseqdata[ name = insert-example y range = 04 class pattern = linear ]tower(02)tower(03)tower(01)endsseqdataqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 1 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 3 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -3 ](00)endsseqpage

offset = (〈x offset〉〈y offset〉)By default a class uses the offset specified by class pattern Occasionally this is undesirable In thiscase you can specify the offset for a particular class by hand For example if the sum of two classes ishit by a differential it looks better for the class replacing them to be centered

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = offset examplexscale = 07Adams gradingclass placement transform = scale = 18 ]

class(01)class(02)class(02)draw(01)--(02)class(10)d2(10bdquo1)replacetargetd2(10bdquo2)endsseqdataprintpage[name = offset example page=2]printpage[name = offset example page=3]beginsseqpage[name = offset example page=3]classoptions[offset = (00)](02)endsseqpage

tooltip = 〈text〉This key generates a ldquotooltiprdquo over the given class That is if you hover your mouse over it a littlewindow will popup with the tooltip text This is particularly useful to give the coordinates or names ofclasses in large charts where it may be hard to tell from looking at the picture what position the classis in or there may not be room to supply names to classesThe tooltip is made using the pdftooltip command from the pdfcomment package The pdfcommentpackage generates two extra auxiliary files so it is not included by default In order to use thetooltip option you have to use the tooltips package option (eg load spectralsequences with

15

usepackage[tooltips]spectralsequences) This cannot handle math but it will print math ex-pressions into TEX input form Not all pdf viewers will display the tooltip correctly If this concernsyou the command sseqtooltip is used to produce the tooltip and you can redefine it as any othercommand that takes sseqtooltip〈text〉〈tooltip text〉 and produces a tooltip For instance on thisstack exchange post there is code that supposedly produces tooltips that work with Evince I havenot tested whether it works by itself or whether it works with my package but you could You couldpotentially figure out how to get math to work in tooltips too ndash if you find a satisfactory method pleaselet me knowAnyways herersquos an example

0 1

0

1

beginsseqpage[classes = tooltip = (xcoordycoord)]class(00)class(01)class(10)class(11)endsseqpage

Therersquos another example at the beginning of the section on the class stack

page = 〈page〉--〈page max 〉generation = 〈generation〉--〈generation max 〉

These options only work in classoptions The page option gives a range of pages for which theoptions apply to If only one page is specified it is the minimum page and the option applies to alllarger pages

1 2 4 beginsseqdata[ name = page_example no axestitle = page title style = yshift = -05cm ]

class(00)classoptions[page = 2 -- 3 fill blue](00)endsseqdata

printpage[ name = page_example page = 1 ] qquadprintpage[ name = page_example page = 2 ] qquadprintpage[ name = page_example page = 4 ]

A ldquogenerationrdquo of a class is the interval from one call of class or replaceclass to the page onwhich it next supports or is hit by a differential By default the classoptions command adds optionsonly to the most recent generation of the class in a sseqdata environment or on the generationappropriate to the current page in a sseqpage environment Using the generation option allows youto provide a single generation or range of generations of the class that the options should apply to Thefirst generation is generation 0 and the most recent generation is generation -1 Larger negative valuescount backwards

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

16

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 7: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

d[〈options〉]〈page〉(〈source name〉〈target n〉)d[〈options〉]〈page〉(〈source coordinate〉)(〈target coordinate〉)

Calling d〈page〉(〈x 〉〈y〉) creates a differential starting at (〈x 〉〈y〉) of length determined by the speci-fied page In order to use the d command like this you must first specify the degree of the differentialsas an option to the sseqdata or sseqpage environment The degree indicates how far to the rightand how far up a page r differential will go as a function of r If there is a page r differential on pager+ 1 the source target and any structure lines connected to the source and target of the differentialdisappear If no class is specified the default is to use lastclassIf there are multiple nodes in the source or target you may specify which one the differential should goto using an index or tag for 〈source n〉 or 〈target n〉 It is also possible to provide the name of the sourcecoordinate and an optional target or to separately provide the source and target coordinate either asnames or as (〈x 〉〈y〉〈n〉) Using d with explicit source and target coordinates works even if you didnot provide a degree to the spectral sequence If you did provide a degree then spectralsequenceswill check whether the difference between the source and target is appropriate for a differential of a givenpage and if not it will throw an error If this is undesirable you can use the lax degree option

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = d example degree = -11struct lines = blue yscale = 13 ]

class(02)class(12)class(11)class(10)structline(12)(02)structline(12)(11)structline(11)(10)d2(10)endsseqdataprintpage[ name = d example page = 2 ] quadprintpage[ name = d example page = 3 ]

If there are multiple nodes in the source or target coordinate then there is a funny syntax for indicatingwhich one should be the source and target d〈page〉(〈x 〉〈y〉sourcentargetn)

0 1 2 3

0

1

2

beginsseqpage[ Adams grading yscale = 08 ]class(10) class(10)class(02) class(02)d2(1012)class(20) class(20)class(12)d2(202)class(30)class(22) class(22)d2(30bdquo2)endsseqpage

Negative indices will count from the most recent class in the coordinate (so the most recent is -1the second most recent is -2 etc) You can also use a tag which works better if the situation iscomplicated

0 1

0

1

2

beginsseqpage[ Adams grading yscale = 065 ]class(10)class(02) class(02)d[blue]2(10-1-1)class(10)class(02)d[orange]2(10-1-1)class(10)d[red]2(10-1-2)endsseqpage

doptions[〈options〉]〈page〉(〈x 〉〈y〉〈source n〉〈target n〉)doptions[〈options〉]〈page〉(〈source name〉〈target n〉)

7

doptions[〈options〉]〈page〉(〈source coordinate〉)(〈target coordinate〉)This command adds options to an existing differential just like classoptions except for differentialsIts syntax is identical to that of d

kill〈page〉[〈coord〉]This command sets the indicated coordinate to die on the indicated page but does not establish a targetfor the differential This is useful if you want to draw your own differential using tikz (see getdtarget)or if you are not drawing the class on the other side of the differential for clutter reasons As usual ifno coordinate is provided the default argument is lastclass

structline[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command creates a structure line from 〈source coordinate〉 to 〈target coordinate〉 The source andtarget coordinates are either of the form (〈x 〉〈y〉〈n〉) or (〈class name〉) If there are multiple classesat (x y) then 〈n〉 specifies which of the classes at (x y) the structure line starts and ends at ndash if n ispositive then it counts from the first class in that position if n is negative it counts backwards fromthe most recent You can also use a tag for n If the 〈target coordinate〉 is omitted then lastclass isused so that structline(sourcecoord) connects the most recent class to the specified coordinateIf both coordinates are omitted then lastclass and lastclass1 are used and so structline withno arguments at all will connect the two most recent classesIf the source or target of a structure line is hit by a differential then on subsequent pages the structureline disappearsIf the source or target has had multiple generations (ie they got hit and you used replaceclass)then the structline will only appear starting on the first page where the current generation of boththe source and target are present If this is undesirable you can use the page option to change it

DeclareSseqGrouptower class(00)foreach y in 15

class(0y)structline

class(02)structline(01-1)structline(03-1)

beginsseqdata[ name = structline example

classes = circle fill Adams grading no axesyscale = 128 ]

class(11) class(12)class(23) class(23) class(25)tower[classes = blue](00)tower[struct lines = dashedorange](10)tower[struct lines = red](20)d2(112)endsseqdataprintpage[ name = structline example page = 2 ] quadprintpage[ name = structline example page = 3 ]

structlineoptions[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command adds options to an existing structure line just like classoptions except for structurelines Its syntax is identical to structline

circleclasses[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command is a lot like structline except that it puts a circle around the classes instead of connect-ing them with a line It might take a certain amount of fiddling with options to get circleclasses toproduce good results There is no circleclassesoptions command because it doesnrsquot seem necessaryand (more importantly) I didnrsquot feel like making one Maybe someday Irsquoll put one in

8

drawpathnodeclip

Any code that would work in a tikzpicture environment will also work unchanged in a sseqdataor sseqpage environment with a few minor differences This is a very flexible way to add arbitrarybackground or foreground features to the spectral sequence

0 1 2

0

1

2

Consider thisdifferential

0 1 2

0

1

2

This isthe source

This isthe target

0 1 2

0

1

2

Now itrsquos gone

beginsseqdata[ name = tikz example Adams grading math nodes = falsetikz primitives = blue font = tiny lt- circle classes = tikz primitive stylex range = 02 x axis extend end = 2em ]

class(00)class(10)class(02)d2(10)endsseqdatabeginsseqpage[ name = tikz example ]circleclasses[ name path = myellipse inner sep = 3pt ellipse ratio = 16 ] (10) (02)path[ name path = myline ] (13125) -- (061)draw[ name intersections = of = myellipse and myline ]

(intersection-1) to (13125) node[ right text width = 16cm ] Consider this differentialendsseqpage qquadbeginsseqpage[ name = tikz example ]draw[ xshift = 1 ] (00) to (0602) node[ right text width = 11cm ] This is the sourcedraw[ yshift = 2 ] (00) to (0602) node[ right text width = 11cm ] This is the targetendsseqpage qquadbeginsseqpage[ page = 3 name = tikz example ]circleclasses[ inner sep = 3pt ellipse ratio = 16 ] (10)(02)node[ right font = tiny ] at (1212) Now itrsquos goneendsseqpage

4 Options for the main commands

41 Universal options

The following options work with all of the drawing commands in this package including class d andstructline their friends replaceclass classoptions doptions and structlines as well as withTikZ primitives

xshift = 〈integer〉yshift = 〈integer〉

Shifts by integer values are the only coordinate changes that are allowed to be applied to class dstructline their relatives or to a scope environment that contains any of these commands Theseshift commands help with reusing code For instance

9

0 1 2 3

0

1

2

beginsseqpage[ cohomological Serre grading yscale = 045 ]foreach x in 01 foreach y in 01

beginscope[ xshift = x yshift = y ]class(20)class(01)d2(01)endscope

endsseqpage

This code segment is very useful so spectralsequences has the command NewSseqGroup which tomake code like this more convenient The following code produces the same output as above

NewSseqGroupexamplegroup class(20)class(01)d2(01)

beginsseqpageexamplegroup(00)examplegroup(01)examplegroup(10)examplegroup(11)endsseqpage

A word of warning the behavior of xshift in spectralsequences is incompatible with the normalbehavior of xshift in TikZ For some reason saying xshift = 1 in TikZ does not shift the coordinate(00) to the coordinate (10) ndash instead it shifts by 1pt In spectralsequences saying xshift = 1moves the coordinate (00) to the coordinate (10) This includes TikZ primitives saying draw[xshift = 1 ] (00) -- (10) inside a sseqdata or sseqpage environment is the same as sayingdraw(10) -- (20) despite the fact that this is not the case in the tikzpicture environment

ColorsThese come from the LATEX color package via TikZ so see the color package documentation for moreinformation

beginsseqpage[ classes = fillinner sep = 04emno axes scale = 13 ]

class[red](00)class[blue](10)class[green](20)class[cyan](01)class[magenta](11)class[yellow](21)class[blue50red](02) a 50-50 blend of blue and redclass[green30yellow](12) 30 green 70 yellowclass[blue50black](22)endsseqpage

〈text〉〈options〉Specify a label for a class a differential or a structure line This uses the TikZ quotes syntax Ifthe label text includes an equal sign or comma you need to enclose the entire label in braces egclass[x = y](00) The options include anything you might pass as an option to a TikZ nodeincluding arbitrary coordinate transforms colors opacity options shapes fill draw etc The behavioris a little different depending on whether you use it on a class or on a differential or structure lineFor a class the 〈text〉 is placed in the position inside the node by default ndash in effect the 〈text〉 becomesthe label text of the node (so saying class[label text](00) causes a similar effect to sayingnode at (00) label text) There are other position options such as left above left etcwhich cause the label text to be placed in a separate node positioned appropriately If the placement isabove left etc then any option that you may pass to a TikZ node will also work for the label includinggeneral coordinate transformations If the placement is ldquoinsiderdquo then the only relevant 〈options〉 arethose that alter the appearance of text such as opacity and color

10

a a a

b

b

a beginsseqpage[ classes = minimum width = width(a) + 05em no axes ]class[a](00)class[a red](10)class[a black red](20)class[b above](01)class[b below right yshift = 01cm ](11)class[a above right = 1em ](21)endsseqpage

You can adjust the default behavior of class labels using the labels style option or its relativesclass labels inner class labels or outer class labels Note that it is also possible to givea label to a node this way although the behavior is slightly different In particular the label defaultsto the above position instead of going in the node text by default Also this wonrsquot respect the variouslabel style options like labels etc

a beginsseqpage[ no axes ]class(00)class(20)node[circle fill a] at (10) endsseqpage

pin = 〈style〉The pin key makes spectralsequences draw a line connecting the label to the relevant class whichcan provide necessary clarification in dense diagrams The pin key itself can take options whichadjust the way that the line is drawn

0

0

1

xy

beginsseqpageclass(00)class[xy above xshift = -4pt pin = red ](00)class(00)class(01)structlineendsseqpage

For either a structline or a class the label normally goes on the right side of the edge The specialoption rsquo makes it go in the opposite position from the default I imitated the label handling in thetikzcd package so if you use tikzcd this should be familiar

0 1

0

1

2

aa bb

middot2middot2

beginsseqpage[ Adams grading yscale = 063 ]class(00)class(01)class(02)structline[arsquo blue](00)(01)class(10)class(11)structline[b](10)(11)d[ cdot 2 pos = 07 yshift = -5pt ] 2 (10)endsseqpage

You can use the style options labels edge labels differential labels and struct line labelsto adjust the styling of edge labels For instance if you would prefer for the labels to default to the lefthand side of the edge rather than the right hand side you could say edge labels = auto = leftYou can also use quotes to label edges drawn with TikZ primitives

hi

beginsseqpage[ yscale = 058 no axes ]class(00)class(11)draw (10) to[hirsquo pos = 07 yshift = -05em ] (01)endsseqpage

11

description

The description key stolen from tikzcd places the label on top of the edge In order to makethis option work correctly if the background coolor is not the default white you must informspectralsequences about this using the key background color = 〈color〉 In this document thebackground color is called graphicbackground

aa aprimeb

aprimeb

cc

beginsseqpage[ no axes background color = graphicbackground ]foreach x in 012 foreach y in 01

class(xy)structline[a red](00)(01)structline[arsquorsquobluebyshift = 1em](10)(11)structline[c description](20)(21)endsseqpage

42 Options for class

Because the main job of the class command is to print a TikZ node on the appropriate pages of thespectral sequence most options that would work for a TikZ node also work for the commands classreplaceclass and classoptions Here are a few that you might care about

A TikZ shapeIf you give the name of a TikZ shape the class node will be of that shape The standard TikZ shapesare circle and rectangle spectralsequences defines two new shapes

circlen = 〈n〉This draws n concentric circles Itrsquos intended for indicating a Zpn summand For large values ofn the result isnrsquot all that appealing

beginsseqpage[ no axes ]class[circlen = 2](00)class[circlen = 2fill](10)class[circlen = 3](01)class[circlen = 4](11)endsseqpage

newellipseellipse ratio = 〈ratio〉

This shape is used for circleclasses Itrsquos a variant on the ellipse shape that gives more controlover the ellipsersquos aspect ratio

There are many more TikZ shapes in the shapes library which you can load using the commandusetikzlibraryshapes The following are some examples

beginsseqpage[ no axes classes = inner sep = 04em class placement transform = scale = 18 yscale = 163 ]

class(00)class[isosceles triangle](20)class[rectangle](10)class[diamond](01)class[semicircle](11)class[regular polygon regular polygon sides = 5](22)class[regular polygon regular polygon sides = 6](22)class[regular polygon regular polygon sides = 7](22)class[regular polygon regular polygon sides = 8](22)endsseqpage

See the TikZ manual for more information

12

minimum width = 〈dimension〉minimum height = 〈dimension〉minimum size = 〈dimension〉inner sep = 〈dimension〉outer sep = 〈dimension〉

These options control the size of a node This is typically useful to make the size of nodes consistentindependent of the size of their label text For instance

ab

a

ab

a

beginsseqdata[ name = minimum width example no axes yscale = 08 ]class[ab](00)class[a](01)class(02)endsseqdataprintpage[ name = minimum width example ]printpage[ name = minimum width examplechange classes = blue minimum width = width(ab) + 05em ]

name = 〈node name〉The class command makes a TikZ node on appropriate pages You can refer to this node using TikZcommands by using its coordinates Using the name option you can give the node a name which youcan use to refer to the class Using names creates more readable code The show name option can beused to display the names of classes You can modify the names of classes systematically using theoptions class name prefix class name postfix and class name handlerNamed classes are immune to coordinate transformations For example in the following code xshiftdoes not apply to the nodes specified by (id) and (eta) but does apply to the coordinate specified by(11)

0 1 2

0

1

1

η beginsseqpage[classes = show name=above ]class[name = 1](00)class[name = eta](11)class(21)structline[xshift = 1] (1) (eta)structline[xshift = 1blue] (1) (11)endsseqpage

show name = 〈label options〉This option is like saying class name〈label options〉 if the class has a name and does nothing ifthe class has no name If the class has multiple names only the most recent is used This is particularlyuseful with class styles For instance by saying this page classes = show name = above youcan display names of all of the sources and targets of differentials on each page

0 1

0

1

2

3

a

x

0 1

0

1

2

3b

2x

beginsseqdata[name = show name examplethis page classes = show name = above right pin

]class[ name = a ](02)class[ name = b ](03)class[ name = x ](10)d2(x)(a)replacesource[name=2x]d3(x)(b)endsseqdata

printpage[ name = show name example page = 2]

printpage[ name = show name example page = 3]

tag = 〈tag〉

13

This key adds a tag to the current class Tags are used for identifying which of multiple classes in thesame position you are referring to They are useful when you have groups of related classes and want afamily of differentials connecting them For instance

0 1 2 3 4 5

0

1

2

3

4

5

DeclareSseqGrouptower class(00)foreach i in 111

class(0i)structline(0i-1-1)(0i-1)

NewSseqGrouphvee

tower(00)foreach i in 111

class(ii)structline(i-1i-1-1)(ii-1)

beginsseqpage[ degree = -11 yscale = 11

x range = 05 y range = 05 ]tower(30)hvee[ tag = id ](00)hvee[ tag = h21 ](42)foreach n in 05

d2(4+n2+nh21id)endsseqpage

We want each differential to go from the h21 vee to the id vee independent of which classes are in thesame position of the two vees The easy way to accomplish this is by giving tags to each of the two vees

insert = 〈integer〉If there are multiple classes in the same position this option allows you to insert classes later into earlierpositions This is intended to help you put logically related classes next to each other If the integer ispositive it inserts the class in the specified position and if the integer is negative it counts backwardsfrom the end Providing 0 is the same as omitting the option entirely Values larger in absolute valuethan the total number of classes are truncated Consider

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

14

DeclareSseqGroup tower class(00)DoUntilOutOfBounds

class(lastxlasty+1)structline

beginsseqdata[ name = insert-example y range = 04 class pattern = linear ]tower(02)tower(03)tower(01)endsseqdataqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 1 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 3 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -3 ](00)endsseqpage

offset = (〈x offset〉〈y offset〉)By default a class uses the offset specified by class pattern Occasionally this is undesirable In thiscase you can specify the offset for a particular class by hand For example if the sum of two classes ishit by a differential it looks better for the class replacing them to be centered

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = offset examplexscale = 07Adams gradingclass placement transform = scale = 18 ]

class(01)class(02)class(02)draw(01)--(02)class(10)d2(10bdquo1)replacetargetd2(10bdquo2)endsseqdataprintpage[name = offset example page=2]printpage[name = offset example page=3]beginsseqpage[name = offset example page=3]classoptions[offset = (00)](02)endsseqpage

tooltip = 〈text〉This key generates a ldquotooltiprdquo over the given class That is if you hover your mouse over it a littlewindow will popup with the tooltip text This is particularly useful to give the coordinates or names ofclasses in large charts where it may be hard to tell from looking at the picture what position the classis in or there may not be room to supply names to classesThe tooltip is made using the pdftooltip command from the pdfcomment package The pdfcommentpackage generates two extra auxiliary files so it is not included by default In order to use thetooltip option you have to use the tooltips package option (eg load spectralsequences with

15

usepackage[tooltips]spectralsequences) This cannot handle math but it will print math ex-pressions into TEX input form Not all pdf viewers will display the tooltip correctly If this concernsyou the command sseqtooltip is used to produce the tooltip and you can redefine it as any othercommand that takes sseqtooltip〈text〉〈tooltip text〉 and produces a tooltip For instance on thisstack exchange post there is code that supposedly produces tooltips that work with Evince I havenot tested whether it works by itself or whether it works with my package but you could You couldpotentially figure out how to get math to work in tooltips too ndash if you find a satisfactory method pleaselet me knowAnyways herersquos an example

0 1

0

1

beginsseqpage[classes = tooltip = (xcoordycoord)]class(00)class(01)class(10)class(11)endsseqpage

Therersquos another example at the beginning of the section on the class stack

page = 〈page〉--〈page max 〉generation = 〈generation〉--〈generation max 〉

These options only work in classoptions The page option gives a range of pages for which theoptions apply to If only one page is specified it is the minimum page and the option applies to alllarger pages

1 2 4 beginsseqdata[ name = page_example no axestitle = page title style = yshift = -05cm ]

class(00)classoptions[page = 2 -- 3 fill blue](00)endsseqdata

printpage[ name = page_example page = 1 ] qquadprintpage[ name = page_example page = 2 ] qquadprintpage[ name = page_example page = 4 ]

A ldquogenerationrdquo of a class is the interval from one call of class or replaceclass to the page onwhich it next supports or is hit by a differential By default the classoptions command adds optionsonly to the most recent generation of the class in a sseqdata environment or on the generationappropriate to the current page in a sseqpage environment Using the generation option allows youto provide a single generation or range of generations of the class that the options should apply to Thefirst generation is generation 0 and the most recent generation is generation -1 Larger negative valuescount backwards

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

16

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 8: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

doptions[〈options〉]〈page〉(〈source coordinate〉)(〈target coordinate〉)This command adds options to an existing differential just like classoptions except for differentialsIts syntax is identical to that of d

kill〈page〉[〈coord〉]This command sets the indicated coordinate to die on the indicated page but does not establish a targetfor the differential This is useful if you want to draw your own differential using tikz (see getdtarget)or if you are not drawing the class on the other side of the differential for clutter reasons As usual ifno coordinate is provided the default argument is lastclass

structline[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command creates a structure line from 〈source coordinate〉 to 〈target coordinate〉 The source andtarget coordinates are either of the form (〈x 〉〈y〉〈n〉) or (〈class name〉) If there are multiple classesat (x y) then 〈n〉 specifies which of the classes at (x y) the structure line starts and ends at ndash if n ispositive then it counts from the first class in that position if n is negative it counts backwards fromthe most recent You can also use a tag for n If the 〈target coordinate〉 is omitted then lastclass isused so that structline(sourcecoord) connects the most recent class to the specified coordinateIf both coordinates are omitted then lastclass and lastclass1 are used and so structline withno arguments at all will connect the two most recent classesIf the source or target of a structure line is hit by a differential then on subsequent pages the structureline disappearsIf the source or target has had multiple generations (ie they got hit and you used replaceclass)then the structline will only appear starting on the first page where the current generation of boththe source and target are present If this is undesirable you can use the page option to change it

DeclareSseqGrouptower class(00)foreach y in 15

class(0y)structline

class(02)structline(01-1)structline(03-1)

beginsseqdata[ name = structline example

classes = circle fill Adams grading no axesyscale = 128 ]

class(11) class(12)class(23) class(23) class(25)tower[classes = blue](00)tower[struct lines = dashedorange](10)tower[struct lines = red](20)d2(112)endsseqdataprintpage[ name = structline example page = 2 ] quadprintpage[ name = structline example page = 3 ]

structlineoptions[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command adds options to an existing structure line just like classoptions except for structurelines Its syntax is identical to structline

circleclasses[〈options〉](〈source coordinate〉)(〈target coordinate〉)This command is a lot like structline except that it puts a circle around the classes instead of connect-ing them with a line It might take a certain amount of fiddling with options to get circleclasses toproduce good results There is no circleclassesoptions command because it doesnrsquot seem necessaryand (more importantly) I didnrsquot feel like making one Maybe someday Irsquoll put one in

8

drawpathnodeclip

Any code that would work in a tikzpicture environment will also work unchanged in a sseqdataor sseqpage environment with a few minor differences This is a very flexible way to add arbitrarybackground or foreground features to the spectral sequence

0 1 2

0

1

2

Consider thisdifferential

0 1 2

0

1

2

This isthe source

This isthe target

0 1 2

0

1

2

Now itrsquos gone

beginsseqdata[ name = tikz example Adams grading math nodes = falsetikz primitives = blue font = tiny lt- circle classes = tikz primitive stylex range = 02 x axis extend end = 2em ]

class(00)class(10)class(02)d2(10)endsseqdatabeginsseqpage[ name = tikz example ]circleclasses[ name path = myellipse inner sep = 3pt ellipse ratio = 16 ] (10) (02)path[ name path = myline ] (13125) -- (061)draw[ name intersections = of = myellipse and myline ]

(intersection-1) to (13125) node[ right text width = 16cm ] Consider this differentialendsseqpage qquadbeginsseqpage[ name = tikz example ]draw[ xshift = 1 ] (00) to (0602) node[ right text width = 11cm ] This is the sourcedraw[ yshift = 2 ] (00) to (0602) node[ right text width = 11cm ] This is the targetendsseqpage qquadbeginsseqpage[ page = 3 name = tikz example ]circleclasses[ inner sep = 3pt ellipse ratio = 16 ] (10)(02)node[ right font = tiny ] at (1212) Now itrsquos goneendsseqpage

4 Options for the main commands

41 Universal options

The following options work with all of the drawing commands in this package including class d andstructline their friends replaceclass classoptions doptions and structlines as well as withTikZ primitives

xshift = 〈integer〉yshift = 〈integer〉

Shifts by integer values are the only coordinate changes that are allowed to be applied to class dstructline their relatives or to a scope environment that contains any of these commands Theseshift commands help with reusing code For instance

9

0 1 2 3

0

1

2

beginsseqpage[ cohomological Serre grading yscale = 045 ]foreach x in 01 foreach y in 01

beginscope[ xshift = x yshift = y ]class(20)class(01)d2(01)endscope

endsseqpage

This code segment is very useful so spectralsequences has the command NewSseqGroup which tomake code like this more convenient The following code produces the same output as above

NewSseqGroupexamplegroup class(20)class(01)d2(01)

beginsseqpageexamplegroup(00)examplegroup(01)examplegroup(10)examplegroup(11)endsseqpage

A word of warning the behavior of xshift in spectralsequences is incompatible with the normalbehavior of xshift in TikZ For some reason saying xshift = 1 in TikZ does not shift the coordinate(00) to the coordinate (10) ndash instead it shifts by 1pt In spectralsequences saying xshift = 1moves the coordinate (00) to the coordinate (10) This includes TikZ primitives saying draw[xshift = 1 ] (00) -- (10) inside a sseqdata or sseqpage environment is the same as sayingdraw(10) -- (20) despite the fact that this is not the case in the tikzpicture environment

ColorsThese come from the LATEX color package via TikZ so see the color package documentation for moreinformation

beginsseqpage[ classes = fillinner sep = 04emno axes scale = 13 ]

class[red](00)class[blue](10)class[green](20)class[cyan](01)class[magenta](11)class[yellow](21)class[blue50red](02) a 50-50 blend of blue and redclass[green30yellow](12) 30 green 70 yellowclass[blue50black](22)endsseqpage

〈text〉〈options〉Specify a label for a class a differential or a structure line This uses the TikZ quotes syntax Ifthe label text includes an equal sign or comma you need to enclose the entire label in braces egclass[x = y](00) The options include anything you might pass as an option to a TikZ nodeincluding arbitrary coordinate transforms colors opacity options shapes fill draw etc The behavioris a little different depending on whether you use it on a class or on a differential or structure lineFor a class the 〈text〉 is placed in the position inside the node by default ndash in effect the 〈text〉 becomesthe label text of the node (so saying class[label text](00) causes a similar effect to sayingnode at (00) label text) There are other position options such as left above left etcwhich cause the label text to be placed in a separate node positioned appropriately If the placement isabove left etc then any option that you may pass to a TikZ node will also work for the label includinggeneral coordinate transformations If the placement is ldquoinsiderdquo then the only relevant 〈options〉 arethose that alter the appearance of text such as opacity and color

10

a a a

b

b

a beginsseqpage[ classes = minimum width = width(a) + 05em no axes ]class[a](00)class[a red](10)class[a black red](20)class[b above](01)class[b below right yshift = 01cm ](11)class[a above right = 1em ](21)endsseqpage

You can adjust the default behavior of class labels using the labels style option or its relativesclass labels inner class labels or outer class labels Note that it is also possible to givea label to a node this way although the behavior is slightly different In particular the label defaultsto the above position instead of going in the node text by default Also this wonrsquot respect the variouslabel style options like labels etc

a beginsseqpage[ no axes ]class(00)class(20)node[circle fill a] at (10) endsseqpage

pin = 〈style〉The pin key makes spectralsequences draw a line connecting the label to the relevant class whichcan provide necessary clarification in dense diagrams The pin key itself can take options whichadjust the way that the line is drawn

0

0

1

xy

beginsseqpageclass(00)class[xy above xshift = -4pt pin = red ](00)class(00)class(01)structlineendsseqpage

For either a structline or a class the label normally goes on the right side of the edge The specialoption rsquo makes it go in the opposite position from the default I imitated the label handling in thetikzcd package so if you use tikzcd this should be familiar

0 1

0

1

2

aa bb

middot2middot2

beginsseqpage[ Adams grading yscale = 063 ]class(00)class(01)class(02)structline[arsquo blue](00)(01)class(10)class(11)structline[b](10)(11)d[ cdot 2 pos = 07 yshift = -5pt ] 2 (10)endsseqpage

You can use the style options labels edge labels differential labels and struct line labelsto adjust the styling of edge labels For instance if you would prefer for the labels to default to the lefthand side of the edge rather than the right hand side you could say edge labels = auto = leftYou can also use quotes to label edges drawn with TikZ primitives

hi

beginsseqpage[ yscale = 058 no axes ]class(00)class(11)draw (10) to[hirsquo pos = 07 yshift = -05em ] (01)endsseqpage

11

description

The description key stolen from tikzcd places the label on top of the edge In order to makethis option work correctly if the background coolor is not the default white you must informspectralsequences about this using the key background color = 〈color〉 In this document thebackground color is called graphicbackground

aa aprimeb

aprimeb

cc

beginsseqpage[ no axes background color = graphicbackground ]foreach x in 012 foreach y in 01

class(xy)structline[a red](00)(01)structline[arsquorsquobluebyshift = 1em](10)(11)structline[c description](20)(21)endsseqpage

42 Options for class

Because the main job of the class command is to print a TikZ node on the appropriate pages of thespectral sequence most options that would work for a TikZ node also work for the commands classreplaceclass and classoptions Here are a few that you might care about

A TikZ shapeIf you give the name of a TikZ shape the class node will be of that shape The standard TikZ shapesare circle and rectangle spectralsequences defines two new shapes

circlen = 〈n〉This draws n concentric circles Itrsquos intended for indicating a Zpn summand For large values ofn the result isnrsquot all that appealing

beginsseqpage[ no axes ]class[circlen = 2](00)class[circlen = 2fill](10)class[circlen = 3](01)class[circlen = 4](11)endsseqpage

newellipseellipse ratio = 〈ratio〉

This shape is used for circleclasses Itrsquos a variant on the ellipse shape that gives more controlover the ellipsersquos aspect ratio

There are many more TikZ shapes in the shapes library which you can load using the commandusetikzlibraryshapes The following are some examples

beginsseqpage[ no axes classes = inner sep = 04em class placement transform = scale = 18 yscale = 163 ]

class(00)class[isosceles triangle](20)class[rectangle](10)class[diamond](01)class[semicircle](11)class[regular polygon regular polygon sides = 5](22)class[regular polygon regular polygon sides = 6](22)class[regular polygon regular polygon sides = 7](22)class[regular polygon regular polygon sides = 8](22)endsseqpage

See the TikZ manual for more information

12

minimum width = 〈dimension〉minimum height = 〈dimension〉minimum size = 〈dimension〉inner sep = 〈dimension〉outer sep = 〈dimension〉

These options control the size of a node This is typically useful to make the size of nodes consistentindependent of the size of their label text For instance

ab

a

ab

a

beginsseqdata[ name = minimum width example no axes yscale = 08 ]class[ab](00)class[a](01)class(02)endsseqdataprintpage[ name = minimum width example ]printpage[ name = minimum width examplechange classes = blue minimum width = width(ab) + 05em ]

name = 〈node name〉The class command makes a TikZ node on appropriate pages You can refer to this node using TikZcommands by using its coordinates Using the name option you can give the node a name which youcan use to refer to the class Using names creates more readable code The show name option can beused to display the names of classes You can modify the names of classes systematically using theoptions class name prefix class name postfix and class name handlerNamed classes are immune to coordinate transformations For example in the following code xshiftdoes not apply to the nodes specified by (id) and (eta) but does apply to the coordinate specified by(11)

0 1 2

0

1

1

η beginsseqpage[classes = show name=above ]class[name = 1](00)class[name = eta](11)class(21)structline[xshift = 1] (1) (eta)structline[xshift = 1blue] (1) (11)endsseqpage

show name = 〈label options〉This option is like saying class name〈label options〉 if the class has a name and does nothing ifthe class has no name If the class has multiple names only the most recent is used This is particularlyuseful with class styles For instance by saying this page classes = show name = above youcan display names of all of the sources and targets of differentials on each page

0 1

0

1

2

3

a

x

0 1

0

1

2

3b

2x

beginsseqdata[name = show name examplethis page classes = show name = above right pin

]class[ name = a ](02)class[ name = b ](03)class[ name = x ](10)d2(x)(a)replacesource[name=2x]d3(x)(b)endsseqdata

printpage[ name = show name example page = 2]

printpage[ name = show name example page = 3]

tag = 〈tag〉

13

This key adds a tag to the current class Tags are used for identifying which of multiple classes in thesame position you are referring to They are useful when you have groups of related classes and want afamily of differentials connecting them For instance

0 1 2 3 4 5

0

1

2

3

4

5

DeclareSseqGrouptower class(00)foreach i in 111

class(0i)structline(0i-1-1)(0i-1)

NewSseqGrouphvee

tower(00)foreach i in 111

class(ii)structline(i-1i-1-1)(ii-1)

beginsseqpage[ degree = -11 yscale = 11

x range = 05 y range = 05 ]tower(30)hvee[ tag = id ](00)hvee[ tag = h21 ](42)foreach n in 05

d2(4+n2+nh21id)endsseqpage

We want each differential to go from the h21 vee to the id vee independent of which classes are in thesame position of the two vees The easy way to accomplish this is by giving tags to each of the two vees

insert = 〈integer〉If there are multiple classes in the same position this option allows you to insert classes later into earlierpositions This is intended to help you put logically related classes next to each other If the integer ispositive it inserts the class in the specified position and if the integer is negative it counts backwardsfrom the end Providing 0 is the same as omitting the option entirely Values larger in absolute valuethan the total number of classes are truncated Consider

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

14

DeclareSseqGroup tower class(00)DoUntilOutOfBounds

class(lastxlasty+1)structline

beginsseqdata[ name = insert-example y range = 04 class pattern = linear ]tower(02)tower(03)tower(01)endsseqdataqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 1 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 3 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -3 ](00)endsseqpage

offset = (〈x offset〉〈y offset〉)By default a class uses the offset specified by class pattern Occasionally this is undesirable In thiscase you can specify the offset for a particular class by hand For example if the sum of two classes ishit by a differential it looks better for the class replacing them to be centered

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = offset examplexscale = 07Adams gradingclass placement transform = scale = 18 ]

class(01)class(02)class(02)draw(01)--(02)class(10)d2(10bdquo1)replacetargetd2(10bdquo2)endsseqdataprintpage[name = offset example page=2]printpage[name = offset example page=3]beginsseqpage[name = offset example page=3]classoptions[offset = (00)](02)endsseqpage

tooltip = 〈text〉This key generates a ldquotooltiprdquo over the given class That is if you hover your mouse over it a littlewindow will popup with the tooltip text This is particularly useful to give the coordinates or names ofclasses in large charts where it may be hard to tell from looking at the picture what position the classis in or there may not be room to supply names to classesThe tooltip is made using the pdftooltip command from the pdfcomment package The pdfcommentpackage generates two extra auxiliary files so it is not included by default In order to use thetooltip option you have to use the tooltips package option (eg load spectralsequences with

15

usepackage[tooltips]spectralsequences) This cannot handle math but it will print math ex-pressions into TEX input form Not all pdf viewers will display the tooltip correctly If this concernsyou the command sseqtooltip is used to produce the tooltip and you can redefine it as any othercommand that takes sseqtooltip〈text〉〈tooltip text〉 and produces a tooltip For instance on thisstack exchange post there is code that supposedly produces tooltips that work with Evince I havenot tested whether it works by itself or whether it works with my package but you could You couldpotentially figure out how to get math to work in tooltips too ndash if you find a satisfactory method pleaselet me knowAnyways herersquos an example

0 1

0

1

beginsseqpage[classes = tooltip = (xcoordycoord)]class(00)class(01)class(10)class(11)endsseqpage

Therersquos another example at the beginning of the section on the class stack

page = 〈page〉--〈page max 〉generation = 〈generation〉--〈generation max 〉

These options only work in classoptions The page option gives a range of pages for which theoptions apply to If only one page is specified it is the minimum page and the option applies to alllarger pages

1 2 4 beginsseqdata[ name = page_example no axestitle = page title style = yshift = -05cm ]

class(00)classoptions[page = 2 -- 3 fill blue](00)endsseqdata

printpage[ name = page_example page = 1 ] qquadprintpage[ name = page_example page = 2 ] qquadprintpage[ name = page_example page = 4 ]

A ldquogenerationrdquo of a class is the interval from one call of class or replaceclass to the page onwhich it next supports or is hit by a differential By default the classoptions command adds optionsonly to the most recent generation of the class in a sseqdata environment or on the generationappropriate to the current page in a sseqpage environment Using the generation option allows youto provide a single generation or range of generations of the class that the options should apply to Thefirst generation is generation 0 and the most recent generation is generation -1 Larger negative valuescount backwards

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

16

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 9: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

drawpathnodeclip

Any code that would work in a tikzpicture environment will also work unchanged in a sseqdataor sseqpage environment with a few minor differences This is a very flexible way to add arbitrarybackground or foreground features to the spectral sequence

0 1 2

0

1

2

Consider thisdifferential

0 1 2

0

1

2

This isthe source

This isthe target

0 1 2

0

1

2

Now itrsquos gone

beginsseqdata[ name = tikz example Adams grading math nodes = falsetikz primitives = blue font = tiny lt- circle classes = tikz primitive stylex range = 02 x axis extend end = 2em ]

class(00)class(10)class(02)d2(10)endsseqdatabeginsseqpage[ name = tikz example ]circleclasses[ name path = myellipse inner sep = 3pt ellipse ratio = 16 ] (10) (02)path[ name path = myline ] (13125) -- (061)draw[ name intersections = of = myellipse and myline ]

(intersection-1) to (13125) node[ right text width = 16cm ] Consider this differentialendsseqpage qquadbeginsseqpage[ name = tikz example ]draw[ xshift = 1 ] (00) to (0602) node[ right text width = 11cm ] This is the sourcedraw[ yshift = 2 ] (00) to (0602) node[ right text width = 11cm ] This is the targetendsseqpage qquadbeginsseqpage[ page = 3 name = tikz example ]circleclasses[ inner sep = 3pt ellipse ratio = 16 ] (10)(02)node[ right font = tiny ] at (1212) Now itrsquos goneendsseqpage

4 Options for the main commands

41 Universal options

The following options work with all of the drawing commands in this package including class d andstructline their friends replaceclass classoptions doptions and structlines as well as withTikZ primitives

xshift = 〈integer〉yshift = 〈integer〉

Shifts by integer values are the only coordinate changes that are allowed to be applied to class dstructline their relatives or to a scope environment that contains any of these commands Theseshift commands help with reusing code For instance

9

0 1 2 3

0

1

2

beginsseqpage[ cohomological Serre grading yscale = 045 ]foreach x in 01 foreach y in 01

beginscope[ xshift = x yshift = y ]class(20)class(01)d2(01)endscope

endsseqpage

This code segment is very useful so spectralsequences has the command NewSseqGroup which tomake code like this more convenient The following code produces the same output as above

NewSseqGroupexamplegroup class(20)class(01)d2(01)

beginsseqpageexamplegroup(00)examplegroup(01)examplegroup(10)examplegroup(11)endsseqpage

A word of warning the behavior of xshift in spectralsequences is incompatible with the normalbehavior of xshift in TikZ For some reason saying xshift = 1 in TikZ does not shift the coordinate(00) to the coordinate (10) ndash instead it shifts by 1pt In spectralsequences saying xshift = 1moves the coordinate (00) to the coordinate (10) This includes TikZ primitives saying draw[xshift = 1 ] (00) -- (10) inside a sseqdata or sseqpage environment is the same as sayingdraw(10) -- (20) despite the fact that this is not the case in the tikzpicture environment

ColorsThese come from the LATEX color package via TikZ so see the color package documentation for moreinformation

beginsseqpage[ classes = fillinner sep = 04emno axes scale = 13 ]

class[red](00)class[blue](10)class[green](20)class[cyan](01)class[magenta](11)class[yellow](21)class[blue50red](02) a 50-50 blend of blue and redclass[green30yellow](12) 30 green 70 yellowclass[blue50black](22)endsseqpage

〈text〉〈options〉Specify a label for a class a differential or a structure line This uses the TikZ quotes syntax Ifthe label text includes an equal sign or comma you need to enclose the entire label in braces egclass[x = y](00) The options include anything you might pass as an option to a TikZ nodeincluding arbitrary coordinate transforms colors opacity options shapes fill draw etc The behavioris a little different depending on whether you use it on a class or on a differential or structure lineFor a class the 〈text〉 is placed in the position inside the node by default ndash in effect the 〈text〉 becomesthe label text of the node (so saying class[label text](00) causes a similar effect to sayingnode at (00) label text) There are other position options such as left above left etcwhich cause the label text to be placed in a separate node positioned appropriately If the placement isabove left etc then any option that you may pass to a TikZ node will also work for the label includinggeneral coordinate transformations If the placement is ldquoinsiderdquo then the only relevant 〈options〉 arethose that alter the appearance of text such as opacity and color

10

a a a

b

b

a beginsseqpage[ classes = minimum width = width(a) + 05em no axes ]class[a](00)class[a red](10)class[a black red](20)class[b above](01)class[b below right yshift = 01cm ](11)class[a above right = 1em ](21)endsseqpage

You can adjust the default behavior of class labels using the labels style option or its relativesclass labels inner class labels or outer class labels Note that it is also possible to givea label to a node this way although the behavior is slightly different In particular the label defaultsto the above position instead of going in the node text by default Also this wonrsquot respect the variouslabel style options like labels etc

a beginsseqpage[ no axes ]class(00)class(20)node[circle fill a] at (10) endsseqpage

pin = 〈style〉The pin key makes spectralsequences draw a line connecting the label to the relevant class whichcan provide necessary clarification in dense diagrams The pin key itself can take options whichadjust the way that the line is drawn

0

0

1

xy

beginsseqpageclass(00)class[xy above xshift = -4pt pin = red ](00)class(00)class(01)structlineendsseqpage

For either a structline or a class the label normally goes on the right side of the edge The specialoption rsquo makes it go in the opposite position from the default I imitated the label handling in thetikzcd package so if you use tikzcd this should be familiar

0 1

0

1

2

aa bb

middot2middot2

beginsseqpage[ Adams grading yscale = 063 ]class(00)class(01)class(02)structline[arsquo blue](00)(01)class(10)class(11)structline[b](10)(11)d[ cdot 2 pos = 07 yshift = -5pt ] 2 (10)endsseqpage

You can use the style options labels edge labels differential labels and struct line labelsto adjust the styling of edge labels For instance if you would prefer for the labels to default to the lefthand side of the edge rather than the right hand side you could say edge labels = auto = leftYou can also use quotes to label edges drawn with TikZ primitives

hi

beginsseqpage[ yscale = 058 no axes ]class(00)class(11)draw (10) to[hirsquo pos = 07 yshift = -05em ] (01)endsseqpage

11

description

The description key stolen from tikzcd places the label on top of the edge In order to makethis option work correctly if the background coolor is not the default white you must informspectralsequences about this using the key background color = 〈color〉 In this document thebackground color is called graphicbackground

aa aprimeb

aprimeb

cc

beginsseqpage[ no axes background color = graphicbackground ]foreach x in 012 foreach y in 01

class(xy)structline[a red](00)(01)structline[arsquorsquobluebyshift = 1em](10)(11)structline[c description](20)(21)endsseqpage

42 Options for class

Because the main job of the class command is to print a TikZ node on the appropriate pages of thespectral sequence most options that would work for a TikZ node also work for the commands classreplaceclass and classoptions Here are a few that you might care about

A TikZ shapeIf you give the name of a TikZ shape the class node will be of that shape The standard TikZ shapesare circle and rectangle spectralsequences defines two new shapes

circlen = 〈n〉This draws n concentric circles Itrsquos intended for indicating a Zpn summand For large values ofn the result isnrsquot all that appealing

beginsseqpage[ no axes ]class[circlen = 2](00)class[circlen = 2fill](10)class[circlen = 3](01)class[circlen = 4](11)endsseqpage

newellipseellipse ratio = 〈ratio〉

This shape is used for circleclasses Itrsquos a variant on the ellipse shape that gives more controlover the ellipsersquos aspect ratio

There are many more TikZ shapes in the shapes library which you can load using the commandusetikzlibraryshapes The following are some examples

beginsseqpage[ no axes classes = inner sep = 04em class placement transform = scale = 18 yscale = 163 ]

class(00)class[isosceles triangle](20)class[rectangle](10)class[diamond](01)class[semicircle](11)class[regular polygon regular polygon sides = 5](22)class[regular polygon regular polygon sides = 6](22)class[regular polygon regular polygon sides = 7](22)class[regular polygon regular polygon sides = 8](22)endsseqpage

See the TikZ manual for more information

12

minimum width = 〈dimension〉minimum height = 〈dimension〉minimum size = 〈dimension〉inner sep = 〈dimension〉outer sep = 〈dimension〉

These options control the size of a node This is typically useful to make the size of nodes consistentindependent of the size of their label text For instance

ab

a

ab

a

beginsseqdata[ name = minimum width example no axes yscale = 08 ]class[ab](00)class[a](01)class(02)endsseqdataprintpage[ name = minimum width example ]printpage[ name = minimum width examplechange classes = blue minimum width = width(ab) + 05em ]

name = 〈node name〉The class command makes a TikZ node on appropriate pages You can refer to this node using TikZcommands by using its coordinates Using the name option you can give the node a name which youcan use to refer to the class Using names creates more readable code The show name option can beused to display the names of classes You can modify the names of classes systematically using theoptions class name prefix class name postfix and class name handlerNamed classes are immune to coordinate transformations For example in the following code xshiftdoes not apply to the nodes specified by (id) and (eta) but does apply to the coordinate specified by(11)

0 1 2

0

1

1

η beginsseqpage[classes = show name=above ]class[name = 1](00)class[name = eta](11)class(21)structline[xshift = 1] (1) (eta)structline[xshift = 1blue] (1) (11)endsseqpage

show name = 〈label options〉This option is like saying class name〈label options〉 if the class has a name and does nothing ifthe class has no name If the class has multiple names only the most recent is used This is particularlyuseful with class styles For instance by saying this page classes = show name = above youcan display names of all of the sources and targets of differentials on each page

0 1

0

1

2

3

a

x

0 1

0

1

2

3b

2x

beginsseqdata[name = show name examplethis page classes = show name = above right pin

]class[ name = a ](02)class[ name = b ](03)class[ name = x ](10)d2(x)(a)replacesource[name=2x]d3(x)(b)endsseqdata

printpage[ name = show name example page = 2]

printpage[ name = show name example page = 3]

tag = 〈tag〉

13

This key adds a tag to the current class Tags are used for identifying which of multiple classes in thesame position you are referring to They are useful when you have groups of related classes and want afamily of differentials connecting them For instance

0 1 2 3 4 5

0

1

2

3

4

5

DeclareSseqGrouptower class(00)foreach i in 111

class(0i)structline(0i-1-1)(0i-1)

NewSseqGrouphvee

tower(00)foreach i in 111

class(ii)structline(i-1i-1-1)(ii-1)

beginsseqpage[ degree = -11 yscale = 11

x range = 05 y range = 05 ]tower(30)hvee[ tag = id ](00)hvee[ tag = h21 ](42)foreach n in 05

d2(4+n2+nh21id)endsseqpage

We want each differential to go from the h21 vee to the id vee independent of which classes are in thesame position of the two vees The easy way to accomplish this is by giving tags to each of the two vees

insert = 〈integer〉If there are multiple classes in the same position this option allows you to insert classes later into earlierpositions This is intended to help you put logically related classes next to each other If the integer ispositive it inserts the class in the specified position and if the integer is negative it counts backwardsfrom the end Providing 0 is the same as omitting the option entirely Values larger in absolute valuethan the total number of classes are truncated Consider

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

14

DeclareSseqGroup tower class(00)DoUntilOutOfBounds

class(lastxlasty+1)structline

beginsseqdata[ name = insert-example y range = 04 class pattern = linear ]tower(02)tower(03)tower(01)endsseqdataqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 1 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 3 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -3 ](00)endsseqpage

offset = (〈x offset〉〈y offset〉)By default a class uses the offset specified by class pattern Occasionally this is undesirable In thiscase you can specify the offset for a particular class by hand For example if the sum of two classes ishit by a differential it looks better for the class replacing them to be centered

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = offset examplexscale = 07Adams gradingclass placement transform = scale = 18 ]

class(01)class(02)class(02)draw(01)--(02)class(10)d2(10bdquo1)replacetargetd2(10bdquo2)endsseqdataprintpage[name = offset example page=2]printpage[name = offset example page=3]beginsseqpage[name = offset example page=3]classoptions[offset = (00)](02)endsseqpage

tooltip = 〈text〉This key generates a ldquotooltiprdquo over the given class That is if you hover your mouse over it a littlewindow will popup with the tooltip text This is particularly useful to give the coordinates or names ofclasses in large charts where it may be hard to tell from looking at the picture what position the classis in or there may not be room to supply names to classesThe tooltip is made using the pdftooltip command from the pdfcomment package The pdfcommentpackage generates two extra auxiliary files so it is not included by default In order to use thetooltip option you have to use the tooltips package option (eg load spectralsequences with

15

usepackage[tooltips]spectralsequences) This cannot handle math but it will print math ex-pressions into TEX input form Not all pdf viewers will display the tooltip correctly If this concernsyou the command sseqtooltip is used to produce the tooltip and you can redefine it as any othercommand that takes sseqtooltip〈text〉〈tooltip text〉 and produces a tooltip For instance on thisstack exchange post there is code that supposedly produces tooltips that work with Evince I havenot tested whether it works by itself or whether it works with my package but you could You couldpotentially figure out how to get math to work in tooltips too ndash if you find a satisfactory method pleaselet me knowAnyways herersquos an example

0 1

0

1

beginsseqpage[classes = tooltip = (xcoordycoord)]class(00)class(01)class(10)class(11)endsseqpage

Therersquos another example at the beginning of the section on the class stack

page = 〈page〉--〈page max 〉generation = 〈generation〉--〈generation max 〉

These options only work in classoptions The page option gives a range of pages for which theoptions apply to If only one page is specified it is the minimum page and the option applies to alllarger pages

1 2 4 beginsseqdata[ name = page_example no axestitle = page title style = yshift = -05cm ]

class(00)classoptions[page = 2 -- 3 fill blue](00)endsseqdata

printpage[ name = page_example page = 1 ] qquadprintpage[ name = page_example page = 2 ] qquadprintpage[ name = page_example page = 4 ]

A ldquogenerationrdquo of a class is the interval from one call of class or replaceclass to the page onwhich it next supports or is hit by a differential By default the classoptions command adds optionsonly to the most recent generation of the class in a sseqdata environment or on the generationappropriate to the current page in a sseqpage environment Using the generation option allows youto provide a single generation or range of generations of the class that the options should apply to Thefirst generation is generation 0 and the most recent generation is generation -1 Larger negative valuescount backwards

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

16

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 10: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

0 1 2 3

0

1

2

beginsseqpage[ cohomological Serre grading yscale = 045 ]foreach x in 01 foreach y in 01

beginscope[ xshift = x yshift = y ]class(20)class(01)d2(01)endscope

endsseqpage

This code segment is very useful so spectralsequences has the command NewSseqGroup which tomake code like this more convenient The following code produces the same output as above

NewSseqGroupexamplegroup class(20)class(01)d2(01)

beginsseqpageexamplegroup(00)examplegroup(01)examplegroup(10)examplegroup(11)endsseqpage

A word of warning the behavior of xshift in spectralsequences is incompatible with the normalbehavior of xshift in TikZ For some reason saying xshift = 1 in TikZ does not shift the coordinate(00) to the coordinate (10) ndash instead it shifts by 1pt In spectralsequences saying xshift = 1moves the coordinate (00) to the coordinate (10) This includes TikZ primitives saying draw[xshift = 1 ] (00) -- (10) inside a sseqdata or sseqpage environment is the same as sayingdraw(10) -- (20) despite the fact that this is not the case in the tikzpicture environment

ColorsThese come from the LATEX color package via TikZ so see the color package documentation for moreinformation

beginsseqpage[ classes = fillinner sep = 04emno axes scale = 13 ]

class[red](00)class[blue](10)class[green](20)class[cyan](01)class[magenta](11)class[yellow](21)class[blue50red](02) a 50-50 blend of blue and redclass[green30yellow](12) 30 green 70 yellowclass[blue50black](22)endsseqpage

〈text〉〈options〉Specify a label for a class a differential or a structure line This uses the TikZ quotes syntax Ifthe label text includes an equal sign or comma you need to enclose the entire label in braces egclass[x = y](00) The options include anything you might pass as an option to a TikZ nodeincluding arbitrary coordinate transforms colors opacity options shapes fill draw etc The behavioris a little different depending on whether you use it on a class or on a differential or structure lineFor a class the 〈text〉 is placed in the position inside the node by default ndash in effect the 〈text〉 becomesthe label text of the node (so saying class[label text](00) causes a similar effect to sayingnode at (00) label text) There are other position options such as left above left etcwhich cause the label text to be placed in a separate node positioned appropriately If the placement isabove left etc then any option that you may pass to a TikZ node will also work for the label includinggeneral coordinate transformations If the placement is ldquoinsiderdquo then the only relevant 〈options〉 arethose that alter the appearance of text such as opacity and color

10

a a a

b

b

a beginsseqpage[ classes = minimum width = width(a) + 05em no axes ]class[a](00)class[a red](10)class[a black red](20)class[b above](01)class[b below right yshift = 01cm ](11)class[a above right = 1em ](21)endsseqpage

You can adjust the default behavior of class labels using the labels style option or its relativesclass labels inner class labels or outer class labels Note that it is also possible to givea label to a node this way although the behavior is slightly different In particular the label defaultsto the above position instead of going in the node text by default Also this wonrsquot respect the variouslabel style options like labels etc

a beginsseqpage[ no axes ]class(00)class(20)node[circle fill a] at (10) endsseqpage

pin = 〈style〉The pin key makes spectralsequences draw a line connecting the label to the relevant class whichcan provide necessary clarification in dense diagrams The pin key itself can take options whichadjust the way that the line is drawn

0

0

1

xy

beginsseqpageclass(00)class[xy above xshift = -4pt pin = red ](00)class(00)class(01)structlineendsseqpage

For either a structline or a class the label normally goes on the right side of the edge The specialoption rsquo makes it go in the opposite position from the default I imitated the label handling in thetikzcd package so if you use tikzcd this should be familiar

0 1

0

1

2

aa bb

middot2middot2

beginsseqpage[ Adams grading yscale = 063 ]class(00)class(01)class(02)structline[arsquo blue](00)(01)class(10)class(11)structline[b](10)(11)d[ cdot 2 pos = 07 yshift = -5pt ] 2 (10)endsseqpage

You can use the style options labels edge labels differential labels and struct line labelsto adjust the styling of edge labels For instance if you would prefer for the labels to default to the lefthand side of the edge rather than the right hand side you could say edge labels = auto = leftYou can also use quotes to label edges drawn with TikZ primitives

hi

beginsseqpage[ yscale = 058 no axes ]class(00)class(11)draw (10) to[hirsquo pos = 07 yshift = -05em ] (01)endsseqpage

11

description

The description key stolen from tikzcd places the label on top of the edge In order to makethis option work correctly if the background coolor is not the default white you must informspectralsequences about this using the key background color = 〈color〉 In this document thebackground color is called graphicbackground

aa aprimeb

aprimeb

cc

beginsseqpage[ no axes background color = graphicbackground ]foreach x in 012 foreach y in 01

class(xy)structline[a red](00)(01)structline[arsquorsquobluebyshift = 1em](10)(11)structline[c description](20)(21)endsseqpage

42 Options for class

Because the main job of the class command is to print a TikZ node on the appropriate pages of thespectral sequence most options that would work for a TikZ node also work for the commands classreplaceclass and classoptions Here are a few that you might care about

A TikZ shapeIf you give the name of a TikZ shape the class node will be of that shape The standard TikZ shapesare circle and rectangle spectralsequences defines two new shapes

circlen = 〈n〉This draws n concentric circles Itrsquos intended for indicating a Zpn summand For large values ofn the result isnrsquot all that appealing

beginsseqpage[ no axes ]class[circlen = 2](00)class[circlen = 2fill](10)class[circlen = 3](01)class[circlen = 4](11)endsseqpage

newellipseellipse ratio = 〈ratio〉

This shape is used for circleclasses Itrsquos a variant on the ellipse shape that gives more controlover the ellipsersquos aspect ratio

There are many more TikZ shapes in the shapes library which you can load using the commandusetikzlibraryshapes The following are some examples

beginsseqpage[ no axes classes = inner sep = 04em class placement transform = scale = 18 yscale = 163 ]

class(00)class[isosceles triangle](20)class[rectangle](10)class[diamond](01)class[semicircle](11)class[regular polygon regular polygon sides = 5](22)class[regular polygon regular polygon sides = 6](22)class[regular polygon regular polygon sides = 7](22)class[regular polygon regular polygon sides = 8](22)endsseqpage

See the TikZ manual for more information

12

minimum width = 〈dimension〉minimum height = 〈dimension〉minimum size = 〈dimension〉inner sep = 〈dimension〉outer sep = 〈dimension〉

These options control the size of a node This is typically useful to make the size of nodes consistentindependent of the size of their label text For instance

ab

a

ab

a

beginsseqdata[ name = minimum width example no axes yscale = 08 ]class[ab](00)class[a](01)class(02)endsseqdataprintpage[ name = minimum width example ]printpage[ name = minimum width examplechange classes = blue minimum width = width(ab) + 05em ]

name = 〈node name〉The class command makes a TikZ node on appropriate pages You can refer to this node using TikZcommands by using its coordinates Using the name option you can give the node a name which youcan use to refer to the class Using names creates more readable code The show name option can beused to display the names of classes You can modify the names of classes systematically using theoptions class name prefix class name postfix and class name handlerNamed classes are immune to coordinate transformations For example in the following code xshiftdoes not apply to the nodes specified by (id) and (eta) but does apply to the coordinate specified by(11)

0 1 2

0

1

1

η beginsseqpage[classes = show name=above ]class[name = 1](00)class[name = eta](11)class(21)structline[xshift = 1] (1) (eta)structline[xshift = 1blue] (1) (11)endsseqpage

show name = 〈label options〉This option is like saying class name〈label options〉 if the class has a name and does nothing ifthe class has no name If the class has multiple names only the most recent is used This is particularlyuseful with class styles For instance by saying this page classes = show name = above youcan display names of all of the sources and targets of differentials on each page

0 1

0

1

2

3

a

x

0 1

0

1

2

3b

2x

beginsseqdata[name = show name examplethis page classes = show name = above right pin

]class[ name = a ](02)class[ name = b ](03)class[ name = x ](10)d2(x)(a)replacesource[name=2x]d3(x)(b)endsseqdata

printpage[ name = show name example page = 2]

printpage[ name = show name example page = 3]

tag = 〈tag〉

13

This key adds a tag to the current class Tags are used for identifying which of multiple classes in thesame position you are referring to They are useful when you have groups of related classes and want afamily of differentials connecting them For instance

0 1 2 3 4 5

0

1

2

3

4

5

DeclareSseqGrouptower class(00)foreach i in 111

class(0i)structline(0i-1-1)(0i-1)

NewSseqGrouphvee

tower(00)foreach i in 111

class(ii)structline(i-1i-1-1)(ii-1)

beginsseqpage[ degree = -11 yscale = 11

x range = 05 y range = 05 ]tower(30)hvee[ tag = id ](00)hvee[ tag = h21 ](42)foreach n in 05

d2(4+n2+nh21id)endsseqpage

We want each differential to go from the h21 vee to the id vee independent of which classes are in thesame position of the two vees The easy way to accomplish this is by giving tags to each of the two vees

insert = 〈integer〉If there are multiple classes in the same position this option allows you to insert classes later into earlierpositions This is intended to help you put logically related classes next to each other If the integer ispositive it inserts the class in the specified position and if the integer is negative it counts backwardsfrom the end Providing 0 is the same as omitting the option entirely Values larger in absolute valuethan the total number of classes are truncated Consider

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

14

DeclareSseqGroup tower class(00)DoUntilOutOfBounds

class(lastxlasty+1)structline

beginsseqdata[ name = insert-example y range = 04 class pattern = linear ]tower(02)tower(03)tower(01)endsseqdataqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 1 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 3 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -3 ](00)endsseqpage

offset = (〈x offset〉〈y offset〉)By default a class uses the offset specified by class pattern Occasionally this is undesirable In thiscase you can specify the offset for a particular class by hand For example if the sum of two classes ishit by a differential it looks better for the class replacing them to be centered

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = offset examplexscale = 07Adams gradingclass placement transform = scale = 18 ]

class(01)class(02)class(02)draw(01)--(02)class(10)d2(10bdquo1)replacetargetd2(10bdquo2)endsseqdataprintpage[name = offset example page=2]printpage[name = offset example page=3]beginsseqpage[name = offset example page=3]classoptions[offset = (00)](02)endsseqpage

tooltip = 〈text〉This key generates a ldquotooltiprdquo over the given class That is if you hover your mouse over it a littlewindow will popup with the tooltip text This is particularly useful to give the coordinates or names ofclasses in large charts where it may be hard to tell from looking at the picture what position the classis in or there may not be room to supply names to classesThe tooltip is made using the pdftooltip command from the pdfcomment package The pdfcommentpackage generates two extra auxiliary files so it is not included by default In order to use thetooltip option you have to use the tooltips package option (eg load spectralsequences with

15

usepackage[tooltips]spectralsequences) This cannot handle math but it will print math ex-pressions into TEX input form Not all pdf viewers will display the tooltip correctly If this concernsyou the command sseqtooltip is used to produce the tooltip and you can redefine it as any othercommand that takes sseqtooltip〈text〉〈tooltip text〉 and produces a tooltip For instance on thisstack exchange post there is code that supposedly produces tooltips that work with Evince I havenot tested whether it works by itself or whether it works with my package but you could You couldpotentially figure out how to get math to work in tooltips too ndash if you find a satisfactory method pleaselet me knowAnyways herersquos an example

0 1

0

1

beginsseqpage[classes = tooltip = (xcoordycoord)]class(00)class(01)class(10)class(11)endsseqpage

Therersquos another example at the beginning of the section on the class stack

page = 〈page〉--〈page max 〉generation = 〈generation〉--〈generation max 〉

These options only work in classoptions The page option gives a range of pages for which theoptions apply to If only one page is specified it is the minimum page and the option applies to alllarger pages

1 2 4 beginsseqdata[ name = page_example no axestitle = page title style = yshift = -05cm ]

class(00)classoptions[page = 2 -- 3 fill blue](00)endsseqdata

printpage[ name = page_example page = 1 ] qquadprintpage[ name = page_example page = 2 ] qquadprintpage[ name = page_example page = 4 ]

A ldquogenerationrdquo of a class is the interval from one call of class or replaceclass to the page onwhich it next supports or is hit by a differential By default the classoptions command adds optionsonly to the most recent generation of the class in a sseqdata environment or on the generationappropriate to the current page in a sseqpage environment Using the generation option allows youto provide a single generation or range of generations of the class that the options should apply to Thefirst generation is generation 0 and the most recent generation is generation -1 Larger negative valuescount backwards

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

16

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 11: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

a a a

b

b

a beginsseqpage[ classes = minimum width = width(a) + 05em no axes ]class[a](00)class[a red](10)class[a black red](20)class[b above](01)class[b below right yshift = 01cm ](11)class[a above right = 1em ](21)endsseqpage

You can adjust the default behavior of class labels using the labels style option or its relativesclass labels inner class labels or outer class labels Note that it is also possible to givea label to a node this way although the behavior is slightly different In particular the label defaultsto the above position instead of going in the node text by default Also this wonrsquot respect the variouslabel style options like labels etc

a beginsseqpage[ no axes ]class(00)class(20)node[circle fill a] at (10) endsseqpage

pin = 〈style〉The pin key makes spectralsequences draw a line connecting the label to the relevant class whichcan provide necessary clarification in dense diagrams The pin key itself can take options whichadjust the way that the line is drawn

0

0

1

xy

beginsseqpageclass(00)class[xy above xshift = -4pt pin = red ](00)class(00)class(01)structlineendsseqpage

For either a structline or a class the label normally goes on the right side of the edge The specialoption rsquo makes it go in the opposite position from the default I imitated the label handling in thetikzcd package so if you use tikzcd this should be familiar

0 1

0

1

2

aa bb

middot2middot2

beginsseqpage[ Adams grading yscale = 063 ]class(00)class(01)class(02)structline[arsquo blue](00)(01)class(10)class(11)structline[b](10)(11)d[ cdot 2 pos = 07 yshift = -5pt ] 2 (10)endsseqpage

You can use the style options labels edge labels differential labels and struct line labelsto adjust the styling of edge labels For instance if you would prefer for the labels to default to the lefthand side of the edge rather than the right hand side you could say edge labels = auto = leftYou can also use quotes to label edges drawn with TikZ primitives

hi

beginsseqpage[ yscale = 058 no axes ]class(00)class(11)draw (10) to[hirsquo pos = 07 yshift = -05em ] (01)endsseqpage

11

description

The description key stolen from tikzcd places the label on top of the edge In order to makethis option work correctly if the background coolor is not the default white you must informspectralsequences about this using the key background color = 〈color〉 In this document thebackground color is called graphicbackground

aa aprimeb

aprimeb

cc

beginsseqpage[ no axes background color = graphicbackground ]foreach x in 012 foreach y in 01

class(xy)structline[a red](00)(01)structline[arsquorsquobluebyshift = 1em](10)(11)structline[c description](20)(21)endsseqpage

42 Options for class

Because the main job of the class command is to print a TikZ node on the appropriate pages of thespectral sequence most options that would work for a TikZ node also work for the commands classreplaceclass and classoptions Here are a few that you might care about

A TikZ shapeIf you give the name of a TikZ shape the class node will be of that shape The standard TikZ shapesare circle and rectangle spectralsequences defines two new shapes

circlen = 〈n〉This draws n concentric circles Itrsquos intended for indicating a Zpn summand For large values ofn the result isnrsquot all that appealing

beginsseqpage[ no axes ]class[circlen = 2](00)class[circlen = 2fill](10)class[circlen = 3](01)class[circlen = 4](11)endsseqpage

newellipseellipse ratio = 〈ratio〉

This shape is used for circleclasses Itrsquos a variant on the ellipse shape that gives more controlover the ellipsersquos aspect ratio

There are many more TikZ shapes in the shapes library which you can load using the commandusetikzlibraryshapes The following are some examples

beginsseqpage[ no axes classes = inner sep = 04em class placement transform = scale = 18 yscale = 163 ]

class(00)class[isosceles triangle](20)class[rectangle](10)class[diamond](01)class[semicircle](11)class[regular polygon regular polygon sides = 5](22)class[regular polygon regular polygon sides = 6](22)class[regular polygon regular polygon sides = 7](22)class[regular polygon regular polygon sides = 8](22)endsseqpage

See the TikZ manual for more information

12

minimum width = 〈dimension〉minimum height = 〈dimension〉minimum size = 〈dimension〉inner sep = 〈dimension〉outer sep = 〈dimension〉

These options control the size of a node This is typically useful to make the size of nodes consistentindependent of the size of their label text For instance

ab

a

ab

a

beginsseqdata[ name = minimum width example no axes yscale = 08 ]class[ab](00)class[a](01)class(02)endsseqdataprintpage[ name = minimum width example ]printpage[ name = minimum width examplechange classes = blue minimum width = width(ab) + 05em ]

name = 〈node name〉The class command makes a TikZ node on appropriate pages You can refer to this node using TikZcommands by using its coordinates Using the name option you can give the node a name which youcan use to refer to the class Using names creates more readable code The show name option can beused to display the names of classes You can modify the names of classes systematically using theoptions class name prefix class name postfix and class name handlerNamed classes are immune to coordinate transformations For example in the following code xshiftdoes not apply to the nodes specified by (id) and (eta) but does apply to the coordinate specified by(11)

0 1 2

0

1

1

η beginsseqpage[classes = show name=above ]class[name = 1](00)class[name = eta](11)class(21)structline[xshift = 1] (1) (eta)structline[xshift = 1blue] (1) (11)endsseqpage

show name = 〈label options〉This option is like saying class name〈label options〉 if the class has a name and does nothing ifthe class has no name If the class has multiple names only the most recent is used This is particularlyuseful with class styles For instance by saying this page classes = show name = above youcan display names of all of the sources and targets of differentials on each page

0 1

0

1

2

3

a

x

0 1

0

1

2

3b

2x

beginsseqdata[name = show name examplethis page classes = show name = above right pin

]class[ name = a ](02)class[ name = b ](03)class[ name = x ](10)d2(x)(a)replacesource[name=2x]d3(x)(b)endsseqdata

printpage[ name = show name example page = 2]

printpage[ name = show name example page = 3]

tag = 〈tag〉

13

This key adds a tag to the current class Tags are used for identifying which of multiple classes in thesame position you are referring to They are useful when you have groups of related classes and want afamily of differentials connecting them For instance

0 1 2 3 4 5

0

1

2

3

4

5

DeclareSseqGrouptower class(00)foreach i in 111

class(0i)structline(0i-1-1)(0i-1)

NewSseqGrouphvee

tower(00)foreach i in 111

class(ii)structline(i-1i-1-1)(ii-1)

beginsseqpage[ degree = -11 yscale = 11

x range = 05 y range = 05 ]tower(30)hvee[ tag = id ](00)hvee[ tag = h21 ](42)foreach n in 05

d2(4+n2+nh21id)endsseqpage

We want each differential to go from the h21 vee to the id vee independent of which classes are in thesame position of the two vees The easy way to accomplish this is by giving tags to each of the two vees

insert = 〈integer〉If there are multiple classes in the same position this option allows you to insert classes later into earlierpositions This is intended to help you put logically related classes next to each other If the integer ispositive it inserts the class in the specified position and if the integer is negative it counts backwardsfrom the end Providing 0 is the same as omitting the option entirely Values larger in absolute valuethan the total number of classes are truncated Consider

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

14

DeclareSseqGroup tower class(00)DoUntilOutOfBounds

class(lastxlasty+1)structline

beginsseqdata[ name = insert-example y range = 04 class pattern = linear ]tower(02)tower(03)tower(01)endsseqdataqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 1 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 3 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -3 ](00)endsseqpage

offset = (〈x offset〉〈y offset〉)By default a class uses the offset specified by class pattern Occasionally this is undesirable In thiscase you can specify the offset for a particular class by hand For example if the sum of two classes ishit by a differential it looks better for the class replacing them to be centered

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = offset examplexscale = 07Adams gradingclass placement transform = scale = 18 ]

class(01)class(02)class(02)draw(01)--(02)class(10)d2(10bdquo1)replacetargetd2(10bdquo2)endsseqdataprintpage[name = offset example page=2]printpage[name = offset example page=3]beginsseqpage[name = offset example page=3]classoptions[offset = (00)](02)endsseqpage

tooltip = 〈text〉This key generates a ldquotooltiprdquo over the given class That is if you hover your mouse over it a littlewindow will popup with the tooltip text This is particularly useful to give the coordinates or names ofclasses in large charts where it may be hard to tell from looking at the picture what position the classis in or there may not be room to supply names to classesThe tooltip is made using the pdftooltip command from the pdfcomment package The pdfcommentpackage generates two extra auxiliary files so it is not included by default In order to use thetooltip option you have to use the tooltips package option (eg load spectralsequences with

15

usepackage[tooltips]spectralsequences) This cannot handle math but it will print math ex-pressions into TEX input form Not all pdf viewers will display the tooltip correctly If this concernsyou the command sseqtooltip is used to produce the tooltip and you can redefine it as any othercommand that takes sseqtooltip〈text〉〈tooltip text〉 and produces a tooltip For instance on thisstack exchange post there is code that supposedly produces tooltips that work with Evince I havenot tested whether it works by itself or whether it works with my package but you could You couldpotentially figure out how to get math to work in tooltips too ndash if you find a satisfactory method pleaselet me knowAnyways herersquos an example

0 1

0

1

beginsseqpage[classes = tooltip = (xcoordycoord)]class(00)class(01)class(10)class(11)endsseqpage

Therersquos another example at the beginning of the section on the class stack

page = 〈page〉--〈page max 〉generation = 〈generation〉--〈generation max 〉

These options only work in classoptions The page option gives a range of pages for which theoptions apply to If only one page is specified it is the minimum page and the option applies to alllarger pages

1 2 4 beginsseqdata[ name = page_example no axestitle = page title style = yshift = -05cm ]

class(00)classoptions[page = 2 -- 3 fill blue](00)endsseqdata

printpage[ name = page_example page = 1 ] qquadprintpage[ name = page_example page = 2 ] qquadprintpage[ name = page_example page = 4 ]

A ldquogenerationrdquo of a class is the interval from one call of class or replaceclass to the page onwhich it next supports or is hit by a differential By default the classoptions command adds optionsonly to the most recent generation of the class in a sseqdata environment or on the generationappropriate to the current page in a sseqpage environment Using the generation option allows youto provide a single generation or range of generations of the class that the options should apply to Thefirst generation is generation 0 and the most recent generation is generation -1 Larger negative valuescount backwards

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

16

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 12: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

description

The description key stolen from tikzcd places the label on top of the edge In order to makethis option work correctly if the background coolor is not the default white you must informspectralsequences about this using the key background color = 〈color〉 In this document thebackground color is called graphicbackground

aa aprimeb

aprimeb

cc

beginsseqpage[ no axes background color = graphicbackground ]foreach x in 012 foreach y in 01

class(xy)structline[a red](00)(01)structline[arsquorsquobluebyshift = 1em](10)(11)structline[c description](20)(21)endsseqpage

42 Options for class

Because the main job of the class command is to print a TikZ node on the appropriate pages of thespectral sequence most options that would work for a TikZ node also work for the commands classreplaceclass and classoptions Here are a few that you might care about

A TikZ shapeIf you give the name of a TikZ shape the class node will be of that shape The standard TikZ shapesare circle and rectangle spectralsequences defines two new shapes

circlen = 〈n〉This draws n concentric circles Itrsquos intended for indicating a Zpn summand For large values ofn the result isnrsquot all that appealing

beginsseqpage[ no axes ]class[circlen = 2](00)class[circlen = 2fill](10)class[circlen = 3](01)class[circlen = 4](11)endsseqpage

newellipseellipse ratio = 〈ratio〉

This shape is used for circleclasses Itrsquos a variant on the ellipse shape that gives more controlover the ellipsersquos aspect ratio

There are many more TikZ shapes in the shapes library which you can load using the commandusetikzlibraryshapes The following are some examples

beginsseqpage[ no axes classes = inner sep = 04em class placement transform = scale = 18 yscale = 163 ]

class(00)class[isosceles triangle](20)class[rectangle](10)class[diamond](01)class[semicircle](11)class[regular polygon regular polygon sides = 5](22)class[regular polygon regular polygon sides = 6](22)class[regular polygon regular polygon sides = 7](22)class[regular polygon regular polygon sides = 8](22)endsseqpage

See the TikZ manual for more information

12

minimum width = 〈dimension〉minimum height = 〈dimension〉minimum size = 〈dimension〉inner sep = 〈dimension〉outer sep = 〈dimension〉

These options control the size of a node This is typically useful to make the size of nodes consistentindependent of the size of their label text For instance

ab

a

ab

a

beginsseqdata[ name = minimum width example no axes yscale = 08 ]class[ab](00)class[a](01)class(02)endsseqdataprintpage[ name = minimum width example ]printpage[ name = minimum width examplechange classes = blue minimum width = width(ab) + 05em ]

name = 〈node name〉The class command makes a TikZ node on appropriate pages You can refer to this node using TikZcommands by using its coordinates Using the name option you can give the node a name which youcan use to refer to the class Using names creates more readable code The show name option can beused to display the names of classes You can modify the names of classes systematically using theoptions class name prefix class name postfix and class name handlerNamed classes are immune to coordinate transformations For example in the following code xshiftdoes not apply to the nodes specified by (id) and (eta) but does apply to the coordinate specified by(11)

0 1 2

0

1

1

η beginsseqpage[classes = show name=above ]class[name = 1](00)class[name = eta](11)class(21)structline[xshift = 1] (1) (eta)structline[xshift = 1blue] (1) (11)endsseqpage

show name = 〈label options〉This option is like saying class name〈label options〉 if the class has a name and does nothing ifthe class has no name If the class has multiple names only the most recent is used This is particularlyuseful with class styles For instance by saying this page classes = show name = above youcan display names of all of the sources and targets of differentials on each page

0 1

0

1

2

3

a

x

0 1

0

1

2

3b

2x

beginsseqdata[name = show name examplethis page classes = show name = above right pin

]class[ name = a ](02)class[ name = b ](03)class[ name = x ](10)d2(x)(a)replacesource[name=2x]d3(x)(b)endsseqdata

printpage[ name = show name example page = 2]

printpage[ name = show name example page = 3]

tag = 〈tag〉

13

This key adds a tag to the current class Tags are used for identifying which of multiple classes in thesame position you are referring to They are useful when you have groups of related classes and want afamily of differentials connecting them For instance

0 1 2 3 4 5

0

1

2

3

4

5

DeclareSseqGrouptower class(00)foreach i in 111

class(0i)structline(0i-1-1)(0i-1)

NewSseqGrouphvee

tower(00)foreach i in 111

class(ii)structline(i-1i-1-1)(ii-1)

beginsseqpage[ degree = -11 yscale = 11

x range = 05 y range = 05 ]tower(30)hvee[ tag = id ](00)hvee[ tag = h21 ](42)foreach n in 05

d2(4+n2+nh21id)endsseqpage

We want each differential to go from the h21 vee to the id vee independent of which classes are in thesame position of the two vees The easy way to accomplish this is by giving tags to each of the two vees

insert = 〈integer〉If there are multiple classes in the same position this option allows you to insert classes later into earlierpositions This is intended to help you put logically related classes next to each other If the integer ispositive it inserts the class in the specified position and if the integer is negative it counts backwardsfrom the end Providing 0 is the same as omitting the option entirely Values larger in absolute valuethan the total number of classes are truncated Consider

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

14

DeclareSseqGroup tower class(00)DoUntilOutOfBounds

class(lastxlasty+1)structline

beginsseqdata[ name = insert-example y range = 04 class pattern = linear ]tower(02)tower(03)tower(01)endsseqdataqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 1 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 3 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -3 ](00)endsseqpage

offset = (〈x offset〉〈y offset〉)By default a class uses the offset specified by class pattern Occasionally this is undesirable In thiscase you can specify the offset for a particular class by hand For example if the sum of two classes ishit by a differential it looks better for the class replacing them to be centered

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = offset examplexscale = 07Adams gradingclass placement transform = scale = 18 ]

class(01)class(02)class(02)draw(01)--(02)class(10)d2(10bdquo1)replacetargetd2(10bdquo2)endsseqdataprintpage[name = offset example page=2]printpage[name = offset example page=3]beginsseqpage[name = offset example page=3]classoptions[offset = (00)](02)endsseqpage

tooltip = 〈text〉This key generates a ldquotooltiprdquo over the given class That is if you hover your mouse over it a littlewindow will popup with the tooltip text This is particularly useful to give the coordinates or names ofclasses in large charts where it may be hard to tell from looking at the picture what position the classis in or there may not be room to supply names to classesThe tooltip is made using the pdftooltip command from the pdfcomment package The pdfcommentpackage generates two extra auxiliary files so it is not included by default In order to use thetooltip option you have to use the tooltips package option (eg load spectralsequences with

15

usepackage[tooltips]spectralsequences) This cannot handle math but it will print math ex-pressions into TEX input form Not all pdf viewers will display the tooltip correctly If this concernsyou the command sseqtooltip is used to produce the tooltip and you can redefine it as any othercommand that takes sseqtooltip〈text〉〈tooltip text〉 and produces a tooltip For instance on thisstack exchange post there is code that supposedly produces tooltips that work with Evince I havenot tested whether it works by itself or whether it works with my package but you could You couldpotentially figure out how to get math to work in tooltips too ndash if you find a satisfactory method pleaselet me knowAnyways herersquos an example

0 1

0

1

beginsseqpage[classes = tooltip = (xcoordycoord)]class(00)class(01)class(10)class(11)endsseqpage

Therersquos another example at the beginning of the section on the class stack

page = 〈page〉--〈page max 〉generation = 〈generation〉--〈generation max 〉

These options only work in classoptions The page option gives a range of pages for which theoptions apply to If only one page is specified it is the minimum page and the option applies to alllarger pages

1 2 4 beginsseqdata[ name = page_example no axestitle = page title style = yshift = -05cm ]

class(00)classoptions[page = 2 -- 3 fill blue](00)endsseqdata

printpage[ name = page_example page = 1 ] qquadprintpage[ name = page_example page = 2 ] qquadprintpage[ name = page_example page = 4 ]

A ldquogenerationrdquo of a class is the interval from one call of class or replaceclass to the page onwhich it next supports or is hit by a differential By default the classoptions command adds optionsonly to the most recent generation of the class in a sseqdata environment or on the generationappropriate to the current page in a sseqpage environment Using the generation option allows youto provide a single generation or range of generations of the class that the options should apply to Thefirst generation is generation 0 and the most recent generation is generation -1 Larger negative valuescount backwards

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

16

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 13: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

minimum width = 〈dimension〉minimum height = 〈dimension〉minimum size = 〈dimension〉inner sep = 〈dimension〉outer sep = 〈dimension〉

These options control the size of a node This is typically useful to make the size of nodes consistentindependent of the size of their label text For instance

ab

a

ab

a

beginsseqdata[ name = minimum width example no axes yscale = 08 ]class[ab](00)class[a](01)class(02)endsseqdataprintpage[ name = minimum width example ]printpage[ name = minimum width examplechange classes = blue minimum width = width(ab) + 05em ]

name = 〈node name〉The class command makes a TikZ node on appropriate pages You can refer to this node using TikZcommands by using its coordinates Using the name option you can give the node a name which youcan use to refer to the class Using names creates more readable code The show name option can beused to display the names of classes You can modify the names of classes systematically using theoptions class name prefix class name postfix and class name handlerNamed classes are immune to coordinate transformations For example in the following code xshiftdoes not apply to the nodes specified by (id) and (eta) but does apply to the coordinate specified by(11)

0 1 2

0

1

1

η beginsseqpage[classes = show name=above ]class[name = 1](00)class[name = eta](11)class(21)structline[xshift = 1] (1) (eta)structline[xshift = 1blue] (1) (11)endsseqpage

show name = 〈label options〉This option is like saying class name〈label options〉 if the class has a name and does nothing ifthe class has no name If the class has multiple names only the most recent is used This is particularlyuseful with class styles For instance by saying this page classes = show name = above youcan display names of all of the sources and targets of differentials on each page

0 1

0

1

2

3

a

x

0 1

0

1

2

3b

2x

beginsseqdata[name = show name examplethis page classes = show name = above right pin

]class[ name = a ](02)class[ name = b ](03)class[ name = x ](10)d2(x)(a)replacesource[name=2x]d3(x)(b)endsseqdata

printpage[ name = show name example page = 2]

printpage[ name = show name example page = 3]

tag = 〈tag〉

13

This key adds a tag to the current class Tags are used for identifying which of multiple classes in thesame position you are referring to They are useful when you have groups of related classes and want afamily of differentials connecting them For instance

0 1 2 3 4 5

0

1

2

3

4

5

DeclareSseqGrouptower class(00)foreach i in 111

class(0i)structline(0i-1-1)(0i-1)

NewSseqGrouphvee

tower(00)foreach i in 111

class(ii)structline(i-1i-1-1)(ii-1)

beginsseqpage[ degree = -11 yscale = 11

x range = 05 y range = 05 ]tower(30)hvee[ tag = id ](00)hvee[ tag = h21 ](42)foreach n in 05

d2(4+n2+nh21id)endsseqpage

We want each differential to go from the h21 vee to the id vee independent of which classes are in thesame position of the two vees The easy way to accomplish this is by giving tags to each of the two vees

insert = 〈integer〉If there are multiple classes in the same position this option allows you to insert classes later into earlierpositions This is intended to help you put logically related classes next to each other If the integer ispositive it inserts the class in the specified position and if the integer is negative it counts backwardsfrom the end Providing 0 is the same as omitting the option entirely Values larger in absolute valuethan the total number of classes are truncated Consider

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

14

DeclareSseqGroup tower class(00)DoUntilOutOfBounds

class(lastxlasty+1)structline

beginsseqdata[ name = insert-example y range = 04 class pattern = linear ]tower(02)tower(03)tower(01)endsseqdataqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 1 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 3 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -3 ](00)endsseqpage

offset = (〈x offset〉〈y offset〉)By default a class uses the offset specified by class pattern Occasionally this is undesirable In thiscase you can specify the offset for a particular class by hand For example if the sum of two classes ishit by a differential it looks better for the class replacing them to be centered

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = offset examplexscale = 07Adams gradingclass placement transform = scale = 18 ]

class(01)class(02)class(02)draw(01)--(02)class(10)d2(10bdquo1)replacetargetd2(10bdquo2)endsseqdataprintpage[name = offset example page=2]printpage[name = offset example page=3]beginsseqpage[name = offset example page=3]classoptions[offset = (00)](02)endsseqpage

tooltip = 〈text〉This key generates a ldquotooltiprdquo over the given class That is if you hover your mouse over it a littlewindow will popup with the tooltip text This is particularly useful to give the coordinates or names ofclasses in large charts where it may be hard to tell from looking at the picture what position the classis in or there may not be room to supply names to classesThe tooltip is made using the pdftooltip command from the pdfcomment package The pdfcommentpackage generates two extra auxiliary files so it is not included by default In order to use thetooltip option you have to use the tooltips package option (eg load spectralsequences with

15

usepackage[tooltips]spectralsequences) This cannot handle math but it will print math ex-pressions into TEX input form Not all pdf viewers will display the tooltip correctly If this concernsyou the command sseqtooltip is used to produce the tooltip and you can redefine it as any othercommand that takes sseqtooltip〈text〉〈tooltip text〉 and produces a tooltip For instance on thisstack exchange post there is code that supposedly produces tooltips that work with Evince I havenot tested whether it works by itself or whether it works with my package but you could You couldpotentially figure out how to get math to work in tooltips too ndash if you find a satisfactory method pleaselet me knowAnyways herersquos an example

0 1

0

1

beginsseqpage[classes = tooltip = (xcoordycoord)]class(00)class(01)class(10)class(11)endsseqpage

Therersquos another example at the beginning of the section on the class stack

page = 〈page〉--〈page max 〉generation = 〈generation〉--〈generation max 〉

These options only work in classoptions The page option gives a range of pages for which theoptions apply to If only one page is specified it is the minimum page and the option applies to alllarger pages

1 2 4 beginsseqdata[ name = page_example no axestitle = page title style = yshift = -05cm ]

class(00)classoptions[page = 2 -- 3 fill blue](00)endsseqdata

printpage[ name = page_example page = 1 ] qquadprintpage[ name = page_example page = 2 ] qquadprintpage[ name = page_example page = 4 ]

A ldquogenerationrdquo of a class is the interval from one call of class or replaceclass to the page onwhich it next supports or is hit by a differential By default the classoptions command adds optionsonly to the most recent generation of the class in a sseqdata environment or on the generationappropriate to the current page in a sseqpage environment Using the generation option allows youto provide a single generation or range of generations of the class that the options should apply to Thefirst generation is generation 0 and the most recent generation is generation -1 Larger negative valuescount backwards

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

16

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 14: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

This key adds a tag to the current class Tags are used for identifying which of multiple classes in thesame position you are referring to They are useful when you have groups of related classes and want afamily of differentials connecting them For instance

0 1 2 3 4 5

0

1

2

3

4

5

DeclareSseqGrouptower class(00)foreach i in 111

class(0i)structline(0i-1-1)(0i-1)

NewSseqGrouphvee

tower(00)foreach i in 111

class(ii)structline(i-1i-1-1)(ii-1)

beginsseqpage[ degree = -11 yscale = 11

x range = 05 y range = 05 ]tower(30)hvee[ tag = id ](00)hvee[ tag = h21 ](42)foreach n in 05

d2(4+n2+nh21id)endsseqpage

We want each differential to go from the h21 vee to the id vee independent of which classes are in thesame position of the two vees The easy way to accomplish this is by giving tags to each of the two vees

insert = 〈integer〉If there are multiple classes in the same position this option allows you to insert classes later into earlierpositions This is intended to help you put logically related classes next to each other If the integer ispositive it inserts the class in the specified position and if the integer is negative it counts backwardsfrom the end Providing 0 is the same as omitting the option entirely Values larger in absolute valuethan the total number of classes are truncated Consider

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

0

0

1

2

3

4

14

DeclareSseqGroup tower class(00)DoUntilOutOfBounds

class(lastxlasty+1)structline

beginsseqdata[ name = insert-example y range = 04 class pattern = linear ]tower(02)tower(03)tower(01)endsseqdataqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 1 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 3 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -3 ](00)endsseqpage

offset = (〈x offset〉〈y offset〉)By default a class uses the offset specified by class pattern Occasionally this is undesirable In thiscase you can specify the offset for a particular class by hand For example if the sum of two classes ishit by a differential it looks better for the class replacing them to be centered

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = offset examplexscale = 07Adams gradingclass placement transform = scale = 18 ]

class(01)class(02)class(02)draw(01)--(02)class(10)d2(10bdquo1)replacetargetd2(10bdquo2)endsseqdataprintpage[name = offset example page=2]printpage[name = offset example page=3]beginsseqpage[name = offset example page=3]classoptions[offset = (00)](02)endsseqpage

tooltip = 〈text〉This key generates a ldquotooltiprdquo over the given class That is if you hover your mouse over it a littlewindow will popup with the tooltip text This is particularly useful to give the coordinates or names ofclasses in large charts where it may be hard to tell from looking at the picture what position the classis in or there may not be room to supply names to classesThe tooltip is made using the pdftooltip command from the pdfcomment package The pdfcommentpackage generates two extra auxiliary files so it is not included by default In order to use thetooltip option you have to use the tooltips package option (eg load spectralsequences with

15

usepackage[tooltips]spectralsequences) This cannot handle math but it will print math ex-pressions into TEX input form Not all pdf viewers will display the tooltip correctly If this concernsyou the command sseqtooltip is used to produce the tooltip and you can redefine it as any othercommand that takes sseqtooltip〈text〉〈tooltip text〉 and produces a tooltip For instance on thisstack exchange post there is code that supposedly produces tooltips that work with Evince I havenot tested whether it works by itself or whether it works with my package but you could You couldpotentially figure out how to get math to work in tooltips too ndash if you find a satisfactory method pleaselet me knowAnyways herersquos an example

0 1

0

1

beginsseqpage[classes = tooltip = (xcoordycoord)]class(00)class(01)class(10)class(11)endsseqpage

Therersquos another example at the beginning of the section on the class stack

page = 〈page〉--〈page max 〉generation = 〈generation〉--〈generation max 〉

These options only work in classoptions The page option gives a range of pages for which theoptions apply to If only one page is specified it is the minimum page and the option applies to alllarger pages

1 2 4 beginsseqdata[ name = page_example no axestitle = page title style = yshift = -05cm ]

class(00)classoptions[page = 2 -- 3 fill blue](00)endsseqdata

printpage[ name = page_example page = 1 ] qquadprintpage[ name = page_example page = 2 ] qquadprintpage[ name = page_example page = 4 ]

A ldquogenerationrdquo of a class is the interval from one call of class or replaceclass to the page onwhich it next supports or is hit by a differential By default the classoptions command adds optionsonly to the most recent generation of the class in a sseqdata environment or on the generationappropriate to the current page in a sseqpage environment Using the generation option allows youto provide a single generation or range of generations of the class that the options should apply to Thefirst generation is generation 0 and the most recent generation is generation -1 Larger negative valuescount backwards

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

16

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 15: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

DeclareSseqGroup tower class(00)DoUntilOutOfBounds

class(lastxlasty+1)structline

beginsseqdata[ name = insert-example y range = 04 class pattern = linear ]tower(02)tower(03)tower(01)endsseqdataqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 1 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = 3 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -2 ](00)endsseqpageqquadbeginsseqpage[ name = insert-example ]tower[ red classes = insert = -3 ](00)endsseqpage

offset = (〈x offset〉〈y offset〉)By default a class uses the offset specified by class pattern Occasionally this is undesirable In thiscase you can specify the offset for a particular class by hand For example if the sum of two classes ishit by a differential it looks better for the class replacing them to be centered

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

beginsseqdata[ name = offset examplexscale = 07Adams gradingclass placement transform = scale = 18 ]

class(01)class(02)class(02)draw(01)--(02)class(10)d2(10bdquo1)replacetargetd2(10bdquo2)endsseqdataprintpage[name = offset example page=2]printpage[name = offset example page=3]beginsseqpage[name = offset example page=3]classoptions[offset = (00)](02)endsseqpage

tooltip = 〈text〉This key generates a ldquotooltiprdquo over the given class That is if you hover your mouse over it a littlewindow will popup with the tooltip text This is particularly useful to give the coordinates or names ofclasses in large charts where it may be hard to tell from looking at the picture what position the classis in or there may not be room to supply names to classesThe tooltip is made using the pdftooltip command from the pdfcomment package The pdfcommentpackage generates two extra auxiliary files so it is not included by default In order to use thetooltip option you have to use the tooltips package option (eg load spectralsequences with

15

usepackage[tooltips]spectralsequences) This cannot handle math but it will print math ex-pressions into TEX input form Not all pdf viewers will display the tooltip correctly If this concernsyou the command sseqtooltip is used to produce the tooltip and you can redefine it as any othercommand that takes sseqtooltip〈text〉〈tooltip text〉 and produces a tooltip For instance on thisstack exchange post there is code that supposedly produces tooltips that work with Evince I havenot tested whether it works by itself or whether it works with my package but you could You couldpotentially figure out how to get math to work in tooltips too ndash if you find a satisfactory method pleaselet me knowAnyways herersquos an example

0 1

0

1

beginsseqpage[classes = tooltip = (xcoordycoord)]class(00)class(01)class(10)class(11)endsseqpage

Therersquos another example at the beginning of the section on the class stack

page = 〈page〉--〈page max 〉generation = 〈generation〉--〈generation max 〉

These options only work in classoptions The page option gives a range of pages for which theoptions apply to If only one page is specified it is the minimum page and the option applies to alllarger pages

1 2 4 beginsseqdata[ name = page_example no axestitle = page title style = yshift = -05cm ]

class(00)classoptions[page = 2 -- 3 fill blue](00)endsseqdata

printpage[ name = page_example page = 1 ] qquadprintpage[ name = page_example page = 2 ] qquadprintpage[ name = page_example page = 4 ]

A ldquogenerationrdquo of a class is the interval from one call of class or replaceclass to the page onwhich it next supports or is hit by a differential By default the classoptions command adds optionsonly to the most recent generation of the class in a sseqdata environment or on the generationappropriate to the current page in a sseqpage environment Using the generation option allows youto provide a single generation or range of generations of the class that the options should apply to Thefirst generation is generation 0 and the most recent generation is generation -1 Larger negative valuescount backwards

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

16

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 16: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

usepackage[tooltips]spectralsequences) This cannot handle math but it will print math ex-pressions into TEX input form Not all pdf viewers will display the tooltip correctly If this concernsyou the command sseqtooltip is used to produce the tooltip and you can redefine it as any othercommand that takes sseqtooltip〈text〉〈tooltip text〉 and produces a tooltip For instance on thisstack exchange post there is code that supposedly produces tooltips that work with Evince I havenot tested whether it works by itself or whether it works with my package but you could You couldpotentially figure out how to get math to work in tooltips too ndash if you find a satisfactory method pleaselet me knowAnyways herersquos an example

0 1

0

1

beginsseqpage[classes = tooltip = (xcoordycoord)]class(00)class(01)class(10)class(11)endsseqpage

Therersquos another example at the beginning of the section on the class stack

page = 〈page〉--〈page max 〉generation = 〈generation〉--〈generation max 〉

These options only work in classoptions The page option gives a range of pages for which theoptions apply to If only one page is specified it is the minimum page and the option applies to alllarger pages

1 2 4 beginsseqdata[ name = page_example no axestitle = page title style = yshift = -05cm ]

class(00)classoptions[page = 2 -- 3 fill blue](00)endsseqdata

printpage[ name = page_example page = 1 ] qquadprintpage[ name = page_example page = 2 ] qquadprintpage[ name = page_example page = 4 ]

A ldquogenerationrdquo of a class is the interval from one call of class or replaceclass to the page onwhich it next supports or is hit by a differential By default the classoptions command adds optionsonly to the most recent generation of the class in a sseqdata environment or on the generationappropriate to the current page in a sseqpage environment Using the generation option allows youto provide a single generation or range of generations of the class that the options should apply to Thefirst generation is generation 0 and the most recent generation is generation -1 Larger negative valuescount backwards

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

16

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 17: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

beginsseqdata[ name = page_example2 Adams grading xscale = 06 yscale = 05 ]class(02)class(10)d2(10)replacesourceclass(03)d3(10)replacesourceclassoptions[fill red](10) (a) applies to most recent (last) generationendsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) not styledquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (b) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) so class is blue from (b)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is not styledprintpage[ name = page_example2 page = 3 ] quad

generation 2 of (10) class is red from (a)printpage[ name = page_example2 page = 4 ]

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

beginsseqdata[ name = page_example2 Adams grading update existing ] (c) applies to all generations overwrites (b) and (a)classoptions[fill red generation = 0 ndashndash -1](10)endsseqdata

printpage[ name = page_example2 page = 1 ] generation 0 of (10) so class is redquadbeginsseqpage[ name = page_example2 page = 1 keep changes ]classoptions[fill blue](10) (d) applies to the generation present on page 1 that is generation 0endsseqpage quad

generation 0 of (10) class is blue from (d)printpage[ name = page_example2 page = 2 ] quad

generation 1 of (10) class is red from (c)printpage[ name = page_example2 page = 3 ]quadprintpage[ name = page_example2 page = 4 ] generation 2 of (10) class is red from (c)

xcoordycoord

These commands represent the x and y coordinate of the current class when used in class options Theonly use I have for them is in the tooltip option but maybe there is some other purpose for them

43 Options for d and structline

Because the main job of the d and structline commands is to print an edge on the appropriate pages ofthe spectral sequence most TikZ options that you could apply to a TikZ ldquotordquo operator (as in draw (x1y1)to (x2y2)) can be applied to both d and structline Some such options are as follows

17

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 18: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

source anchor = 〈anchor〉target anchor = 〈anchor〉

Because you canrsquot use the normal TikZ mechanism for specifying the source and target anchors spec-tralsequences has these two keys for d and structline

beginsseqpage[ no axes yscale = 124 ]foreach x in 01 foreach y in 01

class(xy)structline(00)(01)structline[ source anchor = north west target anchor = -30 ](10)(11)endsseqpage

shorten gt = 〈distance〉shorten lt = 〈distance〉

These behave exactly like the corresponding options from TikZ shortening the end and beginning ofthe edge respectively Note that you can lengthen the edge by shortening by a negative amount

Dash patternsSee the TikZ manual for a complete explanation of the dash pattern related options Some examples

aa aa

beginsseqpage[ no axes yscale = 16 ]foreach x in 012 foreach y in 01

class(xy)structline[densely dotted](00)(01)structline[dashed red a](10)(11)structline[dash dot red a black](20)(21)endsseqpage

bend left = 〈angle〉bend right = 〈angle〉in = 〈anchor〉out = 〈anchor〉

beginsseqpage[no axesyscale = 16]foreach x in 012 foreach y in 01

class(xy)structline[bend left = 20](00)(01)structline[bend right = 20](10)(11)structline[in = 20 out = north](20)(21)endsseqpage

page = 〈page〉--〈page max 〉This key is only for structline and structlineoptions By default the structline commandonly adds a structure line starting on the page where the most recent generation of the source or targetis born

18

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 19: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage exampletitle = page yscale = 053 ]

class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline(10)(11)endsseqdataprintpage[name = structpage examplepage = 3]qquadprintpage[name = structpage examplepage = 4]

By specifying a page number you can adjust which page the structline starts on

1

0 1

0

1

2

3

4

2

0 1

0

1

2

3

4

3

0 1

0

1

2

3

4

4

0 1

0

1

2

3

4

beginsseqdata[ name = structpage example2 title = page yscale = 05 ]class(02)class(04)class(10)class(11)d2(10)(02) replacesourced3(11)(04) replacesourcestructline[page = 2](10)(11)endsseqdataprintpage[ name = structpage example2 page = 1 ]qquadprintpage[ name = structpage example2 page = 2 ]qquadprintpage[ name = structpage example2 page = 3 ]qquadprintpage[ name = structpage example2 page = 4 ]

Similarly for structlineoptions you can specify a minimum page on which to apply the options ora range of pages

44 Options for circleclass

fit = 〈coordinates or nodes〉The circleclasses command uses the TikZ fitting library Sometimes itrsquos desirable to make the re-sulting node fit extra things for example a label It doesnrsquot necessarily end up looking great though

19

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 20: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

0 1

0

1

2

xxx

x

beginsseqpage[ Adams grading axes gap = 07cm ]class(02)class(10) Fit in the label x and also a symmetric invisible label to maintain symmetryd[xname = x xrsquoname = xrsquo opacity = 0]2(10)circleclasses[fit = (x)(xrsquo) rounded rectangle](10)(02)endsseqpage

rounded rectangle

You can put a shape as an option and it will change the shape of the node drawn by circleclassesAny shape will do but I think that an ellipse or rounded rectangle are the only particularly ap-pealing options

ellipse ratio = 〈ratio〉 (initially 12)By default the shape drawn by circleclasses is a ldquonewelipserdquo which is a custom defined shape thatrespects the option elipse ratio which roughly controls how long and skinny versus short and fat theellipse is If you find that the ellipse is too long try a larger value of this option and conversely if itrsquostoo fat try a smaller value If no value is satisfactory try out the rounded rectangle shape (This isstolen from the following stack exchange answer httpstexstackexchangecoma24621)

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

See the corresponding entry in the TikZ primitives section

page = 〈page〉--〈page max 〉By default the ellipse will be drawn on the same set of pages that a structure line between the twoclasses would be drawn on This specifies a range of pages for the ellipse to be drawn Note that unlikewith structure lines you can instruct circleclasses to draw the shape even on pages where one orboth of the classes that it is fitting are dead

45 Options for TikZ primitives

background

This key instructs spectralsequences to put the current TikZ primitive in the background The waythat the spectral sequence is printed is as follows

bull The title axes axes ticks and axes labels are printed (the appropriate steps are skipped whenthe no title no axes no ticks or no labels keys are used or if no title or axes labels areprovided)

bull The TikZ background paths are printed

bull The clipping is inserted (unless the no clip key is used)

bull All foreground elements (classes differentials structure lines and normal TikZ paths) are printed

In particular this means that foreground TikZ paths can be clipped by the standard clipping butbackground paths that are outside of the clipping expand the size of the TikZ picture

20

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 21: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

not clippedclipped

beginsseqpage[ no ticks yscale = 09 math nodes = false ]class(00)class(11)beginscope[background]draw(0101)--(1111)endscopenode[background] at (05-1) not clippednode at (05-04) clippedendsseqpage

Here is an example where TikZ labels with the background key are used to add labels and a grid Notethat this styling is easier to make using the title x label y label and grid options

0 1 2 3

0

1

2

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

beginsseqdata[ name = tikz background example cohomological Serre grading classes = fill ]beginscope[background]node at (xmax2ymax+12) textupPage pagenode at (xmax2-17) H^(B)node[rotate = 90] at (-15ymax2) H^(F)draw[step = 1cm gray very thin] (xmin-05ymin-05) grid (xmax+04ymax+05)endscopeclass(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example page = 2]printpage[name = tikz background example page = 3]

For this particular use case itrsquos probably better to use title x label and y label

Page 2

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

Page 3

Hlowast(B)

Hlowast (F)

0 1 2 3

0

1

2

21

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 22: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

beginsseqdata[ name = tikz background example2 cohomological Serre grading classes = fillgrid = go title = Page page x label = $H^(B)$ y label = $H^(F)$ ]

class(00)class(30)class(02)class(32)d3(02)endsseqdataprintpage[name = tikz background example2 page = 2]printpage[name = tikz background example2 page = 3]

But if you need more flexible labeling yoursquoll likely want to use tikz primitives with background Seeexample_KF3tex for an instance where this key is usefulOne useful tip is that you can ensure consistent bounding boxes between different diagrams usingpath[background] (smallest x smallest y) ndash (largest x largest y)

not aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

aligned

0 1 2

0

1

2

Hi

0 1 2

0

1

2

beginsseqdata[ name = boundingboxex x range = 02 y range = 02 scale = 05 ]endsseqdataprintpage[ name = boundingboxex title = not aligned ]quadprintpage[ name = boundingboxex x label = Hi ]qquadbeginsseqpage[ name = boundingboxex keep changes title = aligned ]path[background] (xminymin-4) -- (xmaxymax+2)endsseqpagequadprintpage[ name = boundingboxex x label = Hi title = ]

page constraint = 〈predicate〉page constraint or = 〈predicate〉

This places a constraint on the pages in which the TikZ primitive is printed This predicate should looksomething like (page lt= 4) ampamp (page gt= 3) The predicate is anded together with any previouspredicates so that you can use this as an option for a scope and again for the individual TikZprimitive

isalive(〈coordinate〉)isalive(〈coordinate 1 〉)middot middot middot(〈coordinate n〉)

This command can only be used with page constraint Saying

page constraint = (〈x 〉〈y〉[〈index 〉])

will print the TikZ primitive only on pages where the specified class is alive Saying

page constraint = isalive(metacoordinate 1) middot middot middot (〈coordinate n〉)

is equivalent to

page constraint = isalive(〈coordinate 1 〉) ampamp middot middot middot ampamp isalive(〈coordinate n〉)

Writingdraw[page constraint = isalive(10)(22)](10)--(22)

is the same as structline(10)(22) except that you canrsquot later use structlineoptions onit (and it wonrsquot have the struct lines style applied)

22

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 23: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

class stylepermanent cycle styletransient cycle stylethis page class styledifferential stylestruct line style

These classes apply the styling of the corresponding element to your TikZ commands

beginsseqpage[ differentials = blue yscale = 065 no axes ]class(02)class(10) This will be styled as if it were a differentialdraw[differential style] (10) -- (02)endsseqpage

See getdtarget for a more natural example

5 Miscellaneous Commands

51 Settings

sseqset〈keys〉The sseqset command is for adjusting the global options for all spectral sequences in the cur-rent scope or for applying options to the rest of the current spectral sequence For instance ifmost of the spectral sequences in the current document are going to be Adams graded you can saysseqsetAdams grading and all future spectral sequences in the current scope will have Adamsgrading (unless you specify a different grading explicitly) As another example sseqsetno axeswill suppress axes from spectral sequences in the current scope Note that defaults only apply tonew sseqdata environments or to unnamed sseqpage environments they wonrsquot apply to existingspectral sequencesYou can also use sseqset to create styles to be used in spectral sequences

global sseq style = 〈keys〉

global sseq append style = 〈keys〉

sseq style = 〈keys〉

sseq append style = 〈keys〉These handlers create reusable styles to be used in spectral sequences If this style is a set ofglobal options then use the global sseq style handler whereas if it is supposed to be appliedto individual features (classes differentials structure lines circle classes and tikz primitives) thenuse the sseq style handler

Page 0

0 1 2 3 4

0

1

2

sseqsetmysseqglobal sseq style =

Adams grading title = Page pagex range = 04 y range = 02xscale = 05 yscale = 135

htwostructsseq style = gray thin

beginsseqpage[ mysseq ]class(00) class(01) class(02) class(03)class(31) class(32) class(33)structline(00)(01) structline(01)(02)structline(02)(03)structline(31)(32) structline(32)(33)structline[htwostruct](00)(31)structline[htwostruct](01)(32)structline[htwostruct](02)(33)endsseqpage

23

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 24: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

SseqErrorToWarning〈error-name〉Turns the error with the given name into a warning An error message will start by sayingspectralsequences error error-name This is the name you need to put into this command

beginquiet〈environment contents〉

endquiet

This environment quiets error messages that occur inside of it spectralsequences is pretty good aterror recovery and so most of commands will fail gracefully and do nothing if their preconditions arenrsquotmet If there are any parsing errors in the body of the quiet environment prepare to see low levelinternal error messages You might also run into bugs in spectralsequences ndash the error recovery codehasnrsquot been that carefully tested If you do get low level error messages remember to comment out thequiet environment before trying to debugThis is particularly useful for code reuse commands Sometimes there is a source of long differentials thatonly applies to classes that havenrsquot already supported shorter differentials Sometimes there should bea structure line if a certain class exists but it might not exist In these cases the quiet environmentwill help you out See also DrawIfValidDifferential which is a variant of d that behaves as if itwere inside a quiet environment

52 Code reuse commands

foreach

This command is from TikZ and works in pretty much the same way in spectralsequences thoughwith slightly better variants The foreach command is very flexible and has a lot of variants Thebasic usage is foreach x in 〈xmin〉〈xmax 〉 〈loop body〉 which will execute 〈loop body〉with x set to each value between 〈xmin〉 and 〈xmax 〉 inclusive If you want a step greater than 1 tryforeach x in 〈xmin〉〈xmin〉+〈xstep〉〈xmax 〉 〈loop body〉If you need to do multiple loops with a common body you can just stack the foreach commands

0 2 4 6

0

1

2

3

beginsseqpage[ xscale = 05 x tick step = 2 ]foreach x in 026foreach y in 03

class(xy)endsseqpage

You can also loop through tuples for instance

0 1

0

1a b

c d

beginsseqpage[ xscale = 05 ]foreach xylabel in 01a11b00c10d

class[label above](xy)endsseqpage

See the last example for normalize monomial for a better example of this usageThere are tons of other things you can do with foreach though I havenrsquot yet found need for them incombination with spectralsequences See the TikZ manual for more details

24

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 25: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

Do〈iterations〉〈loop body〉DoUntilOutOfBounds〈loop body〉DoUntilOutOfBoundsThenNMore〈extra iterations〉〈loop body〉iteration

The one use case that foreach doesnrsquot cover all that well is if you want the loop to always re-peat until the features you are drawing go off the page This is what DoUntilOutOfBounds andDoUntilOutOfBoundsThenNMore are for These help ensure that if you change the range of your chartinfinite families will automatically be drawn correctly without the need to adjust a bunch of loop boundsThe purpose of DoUntilOutOfBoundsThenNMore is for towers that are receiving a differential If yourspectral sequence is Adams graded and a tower is receiving a dr differential from another tower youshould use DoUntilOutOfBoundsThenNMorer

0 2 4 6 8 10

0

1

2

3

4

5

6

beginsseqpage[Adams grading classes = fillx range = 010 y range = 06x tick step = 2xscale = 03yscale = 07run off differentials = -gt

]class(00)DoUntilOutOfBoundsThenNMore3

class(lastx+1lasty+1)structline

class(40)d3DoUntilOutOfBounds

class(lastx+1lasty+1)structlined3

endsseqpage

You can also nest DoUntilOutOfBounds reasonably

0 2 4 6

0

2

4

6

beginsseqpage[x range = 06 y range = 06tick step = 2scale = 06

]class(00)DoUntilOutOfBounds

class(lastx+1lasty+1)structlineDoUntilOutOfBounds

class(lastxlasty+1)structline

endsseqpage

One important difference between foreach and the Do family of commands is that Do has no effecton the stack This is in order to ensure that they nest properlyNote that if you are using these commands and you are planning to draw several pictures of the chartwith restricted range you need to specify a range for the sseqdata that contains all of the rangesof pages that you want to draw If you then want to set a smaller default range specify the smallerrange the first time you use sseqpage or printpage to draw the spectral sequence and include thekeep changes keyThe Do command is less general than foreach the purpose is to provide a syntax for stack-basedlooping that is similar to DoUntilOutOfBounds but with a fixed range So Don〈loop body〉 repeats〈loop body〉 n times The assumption is that the loop body draws something relative to the position ofthe lastclassIf you need to know how many iterations one of these three commands has gone through this is storedin the variable iteration

25

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 26: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

NewSseqCommand〈command〉〈argspec〉〈body〉DeclareSseqCommand〈command〉〈argspec〉〈body〉

The xparse package provides these very powerful commands for defining macros They are used internallyto the spectralsequences package to define class d etc To help you create variants of thesecommands I will record here the argument specifications for each of them See the xparse manual for abetter explanation and more informationTo make a command like class you can use the argument specification Or() The argument typeO〈default〉 stands for a bracket delimited optional argument with default value 〈default〉 In this casewersquove specified the default to be empty r() stands for a ldquorequiredrdquo argument delimited by ( and ) Inthe command definition access the optional argument with 1 and the coordinate with 2

1 = key = value 2 = xy

1 = 2 = 123

DeclareDocumentCommanddemo O r() 1 = textcolorpurple1

2 = textcolorpurple2 hboxdemo[key = value](xy)bigskiphboxdemo(123)

If you want to separate out the coordinates into different arguments you can use Ou(uu) Theargument type u stands for ldquountilrdquo and scans up until the next instance of the given character Soin this case 1 is of argument type O which is an option list 2 corresponds to the u( which is athrow-away argument then 3 corresponds to u and contains the x coordinate and 4 correspondsto u) and contains the y coordinate Note however that this will not match balanced parentheticalexpressions

1 = hi 3 = x 4 = y

1 = 3 = 1 4 = 2

1 = 3 = (1+1)2 4 = 2

1 = 3 = 1 4 = (1+1 2)

DeclareDocumentCommanddemo O u( u u) 1 = textcolorpurple1

3 = textcolorpurple34 = textcolorpurple4

hboxdemo[hi](xy)bigskiphboxdemo(12)bigskiphboxdemo((1+1)22)bigskiphboxdemo(1(1+1)2) uh-oh -- 2) is left off

You can specify an optional argument delimited by parentheses using d() Use the commandsIfNoValueTF IfNoValueT and IfNoValueF to test whether the user provided a value

1 = hi 2 = xy

1 = options 2 = no value

1 = 2 = 12

1 = 2 = no value

DeclareDocumentCommanddemo O d() 1 = textcolorpurple12 = textcolorpurple

IfNoValueTF2no value2 hboxdemo[hi](xy)bigskiphboxdemo[options]bigskiphboxdemo(12)bigskiphboxdemo

An example where this is actually useful

0 1 2

0

1

2

3

DeclareSseqCommandetaclass O d() IfNoValueF2 pushstack(2) class[1] (lastx+1 lasty+1)structline

beginsseqpage[ classes = fill yscale = 055 ]class(00)class(01)etaclassetaclassetaclass[blue](00)etaclassendsseqpage

The structline and changeclasses commands have argument specification Or()r()

26

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 27: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

1 = hi 2 = xy 3 = xrsquoyrsquo

1 = 2 = xy2 3 = xrsquoyrsquo-1

DeclareDocumentCommanddemo O r() r() 1 = textcolorpurple1

2 = textcolorpurple23 = textcolorpurple3

hboxdemo[hi](xy)(xrsquoyrsquo)bigskiphboxdemo(xy2)(xrsquoyrsquo-1)

NewSseqGroup〈command〉〈argspec〉〈body〉DeclareSseqGroup〈command〉〈argspec〉〈body〉

These are similar to NewSseqCommand and DeclareSseqCommand except that the commands definedtake an optional square bracket delimited options list followed by an optional parenthesis delimited(xy) pair and wraps the body of the code in beginscope[xshift = 〈xcoord〉 yshift = 〈ycoord〉options] For instance

0 1

0

1

2

3

4

DeclareSseqGrouptower m class(00)foreach n in 11

class(0n)structline(0n-1)(0n)

beginsseqpagetower[orange]4tower(11)2endsseqpage

Here we define a command which takes an options list a coordinate and a single mandatory argumentThe options are applied to all the classes and structlines the coordinate shifts the origin and themandatory argument is the length of the tower

SseqCopyPage〈command〉〈spectral sequence name〉〈page〉This defines 〈command〉 to print all of the classes and structlines on page 〈page〉 of the spectral sequencenamed 〈spectral sequence name〉 throwing out differentials and tikz primitives The resulting commandhas syntax as if you had used DeclareSseqGroup with no extra arguments ndash that is it takes an optionaloptions list which are passed to a scope and an optional coordinate pair

53 Families

spectralsequences has a concept of ldquoclass familiesrdquo that can be drawn or suppressed as a group and thatcan have styling options applied to them as a group

SseqNewFamily〈family name〉This makes a new family with name 〈family name〉 The effect of this is to define global options 〈familyname〉 style which apply options to all classes in the family draw 〈family name〉 which causes thefamily to be drawn and no 〈family name〉 which suppresses the family (drawing is the default behaviorof course) It also defines an option 〈family name〉 which puts a feature into the family ndash so it can beused as an option to any of the normal commands like class d structline etc and to a scope

27

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 28: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

with image of J

0 1 2 3 4 5 6 7 8 9

0

1

2

3

4

α1

α22α3

16

α44

β22

β2

without image of J

2 3 4 5 6 7 8 9

0

1

2

3

4

β22

β2

SseqNewFamilyimJbeginsseqdata[

name=ANSS-S_2 Adams gradingclass labels = below label distance = -1ptclass placement transform = rotate = 90 scale = 2differentials = bluex range = 09 y range = 04xscale = 07 grid = go

] Image of J classesbeginscope[imJ]class[rectanglefillinner sep=3pt](00)DoUntilOutOfBoundsThenNMore3etaclassclassoptions[alpha_1 above left](11)class[alpha_22 circlen = 2](31)structline(00) structline[dashed](33)class[alpha_3](51) d3relaxDoUntilOutOfBounds etaclass d3 class[alpha_44 rectangle 16 font = tiny inside inner sep = 1pt](71)DoUntilOutOfBoundsThenNMore3etaclassendscope

Other classesclass[beta_22 below right=-4pt insert = 1](62)structline(31)class[beta_2 left](82)etaclassstructline(622) This is a nuendsseqdata

printpage[ name = ANSS-S_2 title = with image of J imJ style = purple]

printpage[ name = ANSS-S_2 no imJ x range=29 title = without image of J]

54 Utilities

SseqParseInt〈macro〉〈integer expression〉Stores the result of evaluating an integer expression into 〈macro〉 An integer expression consists of +- parentheses and macros that expand to more of the same The exact rules regarding what is avalid expression are pretty much what you would expect Note that juxtaposition is a syntax error notmultiplication so 2(1+1) is invalid you must say 2(1+1)

SseqIfEmptyTF〈expression〉〈true code〉〈false code〉SseqIfEmptyT〈expression〉〈true code〉SseqIfEmptyF〈expression〉〈false code〉

This tests if an expression is the empty expression This is mainly useful for giving systematic labels to

28

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 29: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

things

IfExistsTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfExistsT〈page〉(〈coordinate〉)〈true code〉IfExistsF〈page〉(〈coordinate〉)〈false code〉

Test whether a class of the given description exists The description can be any valid coordinateincluding a named coordinate If the coordinate is not valid this will return false

IfAliveTF〈page〉(〈coordinate〉)〈true code〉〈false code〉IfAliveT〈page〉(〈coordinate〉)〈true code〉IfAliveF〈page〉(〈coordinate〉)〈false code〉

Test whether a class is alive on the given page If the class doesnrsquot exist this will return false

IfOutOfBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfOutOfBoundsT(〈coordinate〉)〈true code〉IfOutOfBoundsF(〈coordinate〉)〈false code〉IfInBoundsTF(〈coordinate〉)〈true code〉〈false code〉IfInBoundsT(〈coordinate〉)〈true code〉IfInBoundsF(〈coordinate〉)〈false code〉

Test whether a class is in bounds or out of bounds If no such class exists returns false

IfValidDifferentialTF〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false code〉IfValidDifferentialT〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉IfValidDifferentialF〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferentialTF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉〈false

code〉DrawIfValidDifferentialT[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈true code〉DrawIfValidDifferentialF[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉DrawIfValidDifferential[〈options〉]〈page〉(〈coordinate〉)(〈target coordinate〉)〈false code〉

Test whether a differential is valid There are many possible reasons for a differential to not be validndash the source or target class could not exist the target could not be in the correct grading etc Ifany error would be generated if you supplied the same arguments to d this tests false Other-wise this tests true The command DrawIfValidDifferental draws the differential if it is validwhereas DrawIfValidDifferentalT draws the differential and executes the true code if it is validDrawIfValidDifferentalF draws the differential or executes false code if it isnrsquot valid etc

SseqNormalizeMonomial

This command simplifies a monomial by combining like variables and removing bases that are raisedto the 0th power removing exponents of 1 removing 1rsquos and replacing the empty monomial with 1The variables are sorted by first occurrence use SseqNormalizeMonomialSetVariables to set a dif-ferent sort order It outputs its result into result This command is specifically meant to be usedas a value for class label handler or class name handler See the example in the documenta-tion for class label handler for a realistic example The exponents must be integers or else it willmisbehave

1 x2y x42SseqNormalizeMonomialx^0y^0 $result$ quadSseqNormalizeMonomialx^3yx^-1z^0 $result$ quadSseqNormalizeMonomial1x_2^2x^2_2 $result$

SseqNormalizeMonomialSetVariables

This command takes an undelimited list sets up SseqNormalizeMonomial to sort the variables in theinput in the specified order This is useful for consistency and particularly important for when you useit to name classes For example

29

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 30: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

ab bx1 abx1x2x3 We always want a first then b then x_1 then x_2 then x_3SseqNormalizeMonomialSetVariablesabx_1x_2x_3SseqNormalizeMonomialba $result$ quadSseqNormalizeMonomialbx_1 $result$ quadSseqNormalizeMonomialabx_2x_3x_1 $result$

SseqAHSSNameHandler

This command expects an argument of the form 〈monomial〉[〈integer expression〉] and defines resultto be m[n] where m is the result of applying SseqNormalizeMonomial to the monomial and n is theresult of evaluation the integer expression plus any yshift that is present This is intended for usewith in drawing Atiyah Hirzebruch spectral sequences See class name handler for an example of thecalculation of KOlowastRP 8

55 Coordinate parsers and related

parsecoordinate〈macro〉(〈coordinate〉)This command parses the coordinate and puts the triple (xyn) into 〈macro〉 It also puts thecomponents of the coordinate into macros for instance if 〈macro〉 is coord then xcoord will containthe x coordinate ycoord will contain the y coordinate and ncoord will contain the index Thecoordinate can be anything that would be valid to use in a differential or structure line this is themacro that is used internally to handle coordinates

getdtarget〈macro〉〈page〉(〈source coordinate〉)Sets 〈macro〉 equal to the coordinates of the target position of a length 〈page〉 differential starting at〈source coordinate〉 This helps to make commands that draw fancy differentials

parsedifferential〈page〉(〈differential coordinate〉)(〈differential target〉)This has the same weird syntax of d except that you are required to put braces around the page(if it has multiple digits) and you are required to provide at least one coordinate (you have to sayparsedifferential2(lastclass) for instance) This command is similar in effect to saying bothparsecoordinatesource〈source coordinate〉 and parsecoordinatetarget〈target coordinate〉 butit handles determination of the target coordinate for youFor instance consider the following example suggested by Catherine Ray

0 1

0

1

2

0 1

0

1

2

0 1

0

1

2

30

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 31: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

O U( r() is the arg-spec for d O U( r() mm looks like d with one extra mandatory argumentsNewSseqCommandtwods O U( r() d() m

parsedifferential2(3)(4) Store the target position in targetnameclasssource(sourcecoordnsource) give names to the three classesnameclasstarget1(targetcoordntarget)nameclasstarget2(targetcoord5)

circleclasses[ differential style name path = circ

1 page = 2ndash2 ](target1)(target2) Circle the classes use differential style

record source and targets as hitkill2(source) kill2(target1) kill2(target2)

path(target1)--(target2)

coordinate[midway](midpt) put a coordinate in the center of the two classespath[name path = lin] (source) -- (midpt) save path from start to midpoint

draw line in differential style from start to intersection point of circ and lindraw[ differential style 1 page constraint= page == 2

name intersections = of = circ and lin ](source) -- (intersection-1)

beginsseqdata[ name = cathex Adams grading differentials = blue ]class(02)class(02)class(10)class(10)twods2(10-11)2endsseqdataprintpage[ name = cathex page = 1 ]qquadprintpage[ name = cathex page = 2 ]qquadprintpage[ name = cathex page = 3 ]

nameclass〈name〉(〈coordinate〉)The nameclass command gives a name to a class Itrsquos similar to saying doptions[name = 〈name〉]but faster Itrsquos also similar to saying pushstack(〈coordinate〉) Giving temporary names to coordinatesthat you are going to use repeatedly makes the code easier to read and is faster (though this only mattersin very large charts) See getdtarget for an example

tagclass〈tag〉(〈coordinate〉)The tagclass command gives a tag to a class Itrsquos similar to saying doptions[tag = 〈name〉] butfaster See example_tmfmaysstex for a use case for this

gettag〈macro〉(〈coordinate〉)The gettag command finds the most recent tag applied to the coordinate and stores it intocmdargmacro This is useful for connecting groups of nodes For example consider the follow-ing code inspired by example_tmfmaysstex

31

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 32: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

0 3 6

0

1

2

3

4

5

6

DeclareSseqCommand tower O beginscope[1]foreachi in 17

class(lastxlasty+1)structline

endscoperestorestack

DeclareSseqCommand htwotower O d()

IfNoValueF2pushstack(2)

beginscope[1]gettagthetag(lastclass)class(lastx+3lasty+1)structline[gray]savestackforeachi in 17

class(lastxlasty+1)structlinestructline[gray](lastx-3lasty-1thetag)

restorestackendscope

beginsseqpage[ y range = 06 x tick step = 3

xscale=06 yscale=13 ]class(02) class(03) class(32)class[tag = h_0^i](00)tower[tag = h_0^i]class(02) class(01)

htwotower[tag = h_2 h_0^i](00)htwotower[tag = h_2 h_0^i]endsseqpage

56 The class stack

The class stack is a linked list of the classes in the order that they are produced that spectralsequencesmaintains Irsquove only recently implemented this feature so it is more liable to change in the future than otherthings Whenever you use the class function the class you added is pushed onto the stack Herersquos anexample that demonstrates basic usage

The following commands are used to access the stack

lastx〈n〉lasty〈n〉lastclass〈n〉

The commands lastx and lasty evaluate to the x and y position respectively of the nth class onthe stack If n = 0 you can leave it off The command lastclass evaluates to the coordinate of themost recent class on the stack This is useful for writing turtle-style code

32

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 33: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand etaclass class(lastx+1lasty+1)structline

DeclareSseqCommand divtwoclass

class(lastxlasty-1)structline

beginsseqpageclass(00)savestackforeach y in 15

class(0y)structline

restorestacketaclassetaclassetaclassdivtwoclassdivtwoclassendsseqpage

You can use lastx and lasty in other contexts than in the body of a spectralsequences commandmost notably inside SseqParseInt (they also go fine inside pgfmathparse if you need it or one of itssiblings) For instance consider the following tower command

0 1 2 3

0

1

2

3

4

5

DeclareSseqCommand tower savestackSseqParseIntnumclassesymax-lasty0foreach n in 1numclasses

class(lastxlasty+1)structline

restorestack

beginsseqpage[y range = 05]class(00)towerclass(13)towerclass(32)towerendsseqpage

pushstack(〈coordinate〉)This adds a class to the top of the stack The coordinate is specified using the same syntax as acoordinate for structline or replaceclass

savestackrestorestack

This saves and reverts the stack Saves nest Most frequently you will want to use these at the startand end of a command

6 Styles

The spectralsequences package has a large number of styles which control the appearance of specific compo-nents (eg classes differentials or structure lines) of a spectral sequence Each style has two correspondingkeys classes and change classes Saying classes = 〈keys〉 adds the keys to the list of options used

33

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 34: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

to style every future class whereas change classes = 〈keys〉 only makes sense in a sseqpage environ-ment and temporarily overwrites the list of options Note that change classes only applies to classes thatexisted before the current page and that even with the keep changes option the change classes optionsare local to the current page Compare

change new classes

0 1

0

1

change old classes

0 1

0

1

beginsseqdata[ name = style example ]class(00)class(11)endsseqdatabeginsseqpage[ name = style example

classes = fill blue title = change new classes ]

class(01)class(10)endsseqpagequadbeginsseqpage[ name = style example

change classes = fill blue title = change old classes ]

class(01)class(10)endsseqpage

You can modify these styles outside of a spectral sequence or inside it using sseqset you can modify themas options to the sseqdata and sseqpage environments or you can modify them as arguments to thescope environment

In cases where the same drawing feature is affected by multiple of these styles the more specific style takesprecedence For instance for a class that is the source or target of a differential on the current page theprecedence order from lowest to highest goes sseq style class style transient cycle style thispage cycle style and then any options from scopes in the order they appear and any local options (theoptions that come right with the class eg class[local options](xy)) If you donrsquot want the optionsto your scopes to override more specific styles use sseq

everythingis orange

0

0

1

only structureline is orange

0

0

1

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = everything is orange ]

beginscope[orange]class(00) class(01)structline(00)(01)endscopeendsseqpage

beginsseqpage[ classes = blue fill title style = align = center text width = 24cm title = only structure line is orange ]

beginscope[ sseq = orange ]class(00) class(01)structline(00)(01)endscopeendsseqpage

Throughout ldquoclassrdquo and ldquocyclerdquo are synonyms

sseqs = 〈keys〉change sseqs = 〈keys〉sseq = 〈keys〉change sseq = 〈keys〉

This passes options to all features in all future spectral sequences in the current scope Note that formany global options you can set a default directly by saying sseqsetkey = 〈value〉 and this is insome cases preferable

34

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 35: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

0 1

0

1

2

0 1 2

0

1

2

Applies to both of the following sseqssseqset sseqs = blue scale = 05 beginsseqpageforeach x in 01foreach y in 012

class(xy)endsseqpagebeginsseqpage[ Adams grading classes = fill ]foreach x in 012foreach y in 012

class(xy)d2(10)d2(20)endsseqpage

classes = 〈keys〉cycles = 〈keys〉change classes = 〈keys〉change cycles = 〈keys〉

0 2

0

2

beginsseqpage[ classes = blue fill minimum width = 05em scale = 05 x tick step = 2 y tick step = 2 ]

class(00)class(22)endsseqpage

permanent classes = 〈keys〉permanent cycles = 〈keys〉change permanent classes = 〈keys〉change permanent cycles = 〈keys〉

These options change the appearance of all permanent cycles (eg those classes which never support orare hit by a differential) For instance we can circle the permanent cycles automatically In the followingexample note that because permanent cycles is more specific than classes the permanent cycles =draw command takes precedence over the classes = draw = none command and the permanentcycle nodes are drawn

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none permanent cycles = draw ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

transient classes = 〈keys〉transient cycles = 〈keys〉change transient classes = 〈keys〉change transient cycles = 〈keys〉

These options change the appearance of all transient cycles (eg those classes which eventually supportor are hit by a differential) Again this takes precedence over the classes option

35

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 36: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

0 1 2

0

1

Z

Z

Z

Zbeginsseqpage[ cohomological Serre grading

classes = draw = none transient cycles = red ]

foreach x in 02 foreach y in 01 class[mathbbZ](xy)

d2(01)endsseqpage

this page classes = 〈keys〉this page cycles = 〈keys〉change this page classes = 〈keys〉change this page cycles = 〈keys〉

These options change the appearance of all cycles which support or are hit by a differential on this pageAny class that is hit on the current page is also a transient cycle and so this page classes takesprecedence over transient cycles

0 1 2

0

1

2

3

0 1 2

0

1

2

3

beginsseqdata[ name = this page cycles example Adams gradingtransient cycles = red fill this page cycles = blue ]

class(00)class(02) class(10)class(13) class(20)d2(10) d3(20)endsseqdataprintpage[ name = this page cycles example page = 2 ] qquadprintpage[ name = this page cycles example page = 3 ]

edges = 〈keys〉differentials = 〈keys〉struct lines = 〈keys〉change edges = 〈keys〉change differentials = 〈keys〉change struct lines = 〈keys〉

The edges key applies to both differentials and structure lines The differentials and struct lineskeys both take precedence over edges

this page struct lines = 〈keys〉change this page struct lines = 〈keys〉

This style applies to structure lines whose source or target is hit on the current page It takes precedenceover struct lines

tikz primitives = 〈keys〉change tikz primitives = 〈keys〉

Applies to all TikZ primitives

36

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 37: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

labels = 〈keys〉change labels = 〈keys〉

This style applies to labels on classes differentials and structure lines All the more specific label stylestake precedence over it

class labels = 〈keys〉inner class labels = 〈keys〉outer class labels = 〈keys〉change class labels = 〈keys〉change inner class labels = 〈keys〉change outer class labels = 〈keys〉

Inner class labels specifically applies to class labels that are inside the node outer class labels specificallyapplies to ones outside it

ab

a c

beginsseqpage[ no axes classes = inner sep = 1pt label distance = 2ptouter class labels = red inner class labels = blue ]

class[a b above](00)class[a c right](10)endsseqpage

edge labels = 〈keys〉differential labels = 〈keys〉struct line labels = 〈keys〉change edge labels = 〈keys〉change differential labels = 〈keys〉change struct line labels = 〈keys〉

61 Style-like options

The options are not styles but can be modified in the same set of places (namely anywhere)

label distance = 〈dimension〉This sets the default distance from a class to an outer label There are also variants like above labeldistance corresponding to above below left right above left above right below left andbelow right

a

b

c

c

beginsseqpage[ label distance = 03emright label distance = 0emno axes yscale = 125 ]

class[a above](00)class[b above right](01)class[c right](10)class[c right = 1em](11)endsseqpage

run off = 〈start tip〉ndash〈end tip〉run off struct lines = 〈start tip〉ndash〈end tip〉 (initially ndash)run off differentials = 〈start tip〉ndash〈end tip〉 (initially ndash)

Change the default behavior of run off edges for either all edges just structure lines or just differentialsrespectively Local arrowhead options override thisIf an edge runs off the edge of the clipping spectralsequences automatically add an arrowhead toindicate that the edge continues This option controls which arrow head is added if the start or end ofan edge runs off the page

37

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 38: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

0 1 2

0

1

2

beginsseqpage[ x range = 02 y range = 02draw orphan edges run off = gt-stealth ]

class(00)class(30) class(03)structline(00)(30)structline[red](00)(03)structline[blue](30)(03)endsseqpage

class label handler = 〈function〉The value of class label handler is a function that is applied to all labels before displaying themIt should put its output into result This is intended to help with code reusability Because thesehandlers may crash or have annoying side-effects on some input you may want to toggle the valueof this command on and off To turn this off for the rest of the current spectral sequence you cansay sseqsetclass label handler = You can also use the class label handler key in ascopeThe main function spectralsequences provides for use here is SseqNormalizeMonomial1 Thismakes it convenient to translate expressions with polynomial labels You can write your own handlers ifyour TEX programming skills are sufficient Let me know if there are any other functions that you wanthere and if you implement them yourself please send me your implementation Here is an example ofa function that evaluates an arithmetic expression

0 1

0

1

2

21

beginsseqpage[class label handler = SseqParseIntresult1

]class[1+1](00)class[1+2(1+3(4-1))](11)endsseqpage

Herersquos an example using SseqNormalizeMonomial

0 1 2 3

0

1

2

3

1

α

y

αy

y2

αy2

y3

αy3

α2y2

α3y2

y3α2

α3y3

α2

α3

yα2

α3y

NewSseqGroup test m class[11](00)class[alpha1](01)class[y1](10)class[alpha y1](11)

beginsseqpage[

class label handler = SseqNormalizeMonomial1 classes = draw = none class labels = font = small ]

testtest[red](20)y^2test[orange](22)alpha^2y^2test[blue](02)alpha^2endsseqpage

Here is another example which demonstrates a useful idiom for drawing Serre spectral sequences Fora more complete example see example_KF3ntex Note the use of braces in Sq^1iota_2 Withoutbraces SseqNormalizeMonomial will simplify Sq^1xSq^2x into S2q3x2 which is obviously undesirableso the correct way to input this is Sq^1xSq^2x Unfortunately foreach strips a pair of bracesfrom its arguments so you need to put two pairs of braces

38

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 39: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

0 1 2 3 4

0

1

2

3

4

1

α

x

αx

x2

ι2

αι2

xι2

αxι2

x2ι2

Sq1ι2

αSq1ι2

xSq1ι2

αxSq1ι2

x2Sq1ι2

ι22

αι22

xι22

αxι22

x2ι22

beginsseqpage[xscale = 14classes = draw = none class label handler = SseqNormalizeMonomial1 ]

foreach xxlabel in 01 2iota_2 3Sq^1iota_2 4iota_2^2

foreach yylabel in 01 1alpha 2x 3alpha x 4x^2

class[ylabelxlabel] (xy)

endsseqpage

class name handler = 〈function〉The value of class name handler is a function that is applied to all names before using them It shouldput its output into result The main functions intended for use here are SseqAHSSNameHandler andSseqNormalizeMonomial though you can make your own This is applied both when you namethe class as in class[name=a](metacoordinate) and when you refer to a class by name as instructline(a)(b) One advantage if you are using SseqNormalizeMonomial is that you can ensurethat xy and yx refer to the same class

0 1

0

1

xy

xy2SseqNormalizeMonomialSetVariablesxybeginsseqpage[ class name handler = SseqNormalizeMonomial

classes = show name = rightpin ]class[name = xy](00)class[name = yxy](01)class(10)structline(yx)(yyx)endsseqpage

The next page is an example drawing the Atiyah Hirzebruch spectral sequence computing KOlowastRP 8

class name prefix = 〈prefix 〉class name postfix = 〈postfix 〉

These keys add respectively a prefix or a postfix to all names of all classes in the scope This is appliedboth when you name the class as in class[name=a](metacoordinate) and when you refer to aclass by name as in structline(a)(b) The prefix and postfix are added to the command before theclass name handler is applied so if you say name=〈the name〉 then the name actually given to theclass is the value of result after saying classnamehander〈name prefix 〉〈the name〉〈name postfix 〉

7 Global Options

These options can only be set at the beginning of a sseqdata or sseqpage environment When it makessense you can also set a default value using sseqset Generally these options either modify the plot styleor the logic for the spectral sequence

name = 〈sseq name〉This option must be used with the sseqdata environment where it indicates the name of the spectralsequence which will be used with the sseqpage environment or printpage command to draw thespectral sequence The name used in a sseqdata environment must be new unless the environment isused with the update existing key in which case the sseqdata environment will add to the existing

39

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 40: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

An AHSS using class name handler = SseqAHSSNameHandler

AHSS for KOlowastRP 8

minus8 minus4 0 4 8

0

1

2

3

4

5

6

minus8 minus4 0 4 8

0

1

2

3

4

5

6

NewSseqCommand KOstar mbeginscope[ xshift = -1 xshift = 8b yshift = 1 ]

class[rectangle name = b^b[0]](00)class[name = b^b e[0]](10) structlineclass[name = b^b e^2[0]](20) structlineclass[rectangle fill = none name = b^b u[0]](40)

endscopeNewSseqCommand KOpcell m

d1(b^b[1]) replacetargetd1(b^b u[1]) replacetargetstructline(b^b[1+1])(b^b e[1+1])structline[page = 2 dashed](b^b e[1])(b^b e^2[1+1])structline[page = 2 dashed](b^b e^2[1])(b^b u[1+1])

NewSseqCommand KOetacell m

DrawIfValidDifferential2(b^b[1])d2(b^b e[1])DrawIfValidDifferential3(b^b e^2[1])

beginsseqdata[ name = KO^RP^8 Adams grading class name handler = SseqAHSSNameHandler

classes = fill x range = -810 xscale = 07 yscale = 05 x tick step = 4 ]foreach b in -22

foreach n in 06KOstarnforeach n in 135KOpcellnforeach n in 23KOetacellnstructline[dashed](b^be^2[2])(b^bu[4])structline[dashed](b^b[4])(b^be[5])

endsseqdataprintpage[ name = KO^RP^8 title = AHSS for $KO^mathbbRP^8$ ] vskip6ptprintpage[ name = KO^RP^8 page = 6 ]

40

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 41: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

spectral sequence It is optional when used with sseqpage and if included the name given must bethe name of an existing spectral sequence

page = 〈page number〉ndash〈page max 〉 (initially 0)This key is for sseqpage and printpage It specifies which page of the spectral sequence is to beprinted On page r all classes that are not hit by differentials on pages less than r will be printed aswell as all structlines whose source and target classes are both printed on page r and all differentialsof length exactly r The special value page = 0 prints all classes differentials and structure linesIf you use this key with a range then all differentials in that range of lengths will be drawn The largernumber only changes which differentials are drawn If you use 0 for the 〈page max 〉 then all differentialslonger than 〈page number〉 will be drawn

degree = 〈x degree〉〈y degree〉cohomological Serre gradinghomological Serre gradingAdams grading

Specifies the degree of differentials The 〈x degree〉 and 〈y degree〉 should both be mathematical expres-sions in one variable 1 that evaluate to integers on any input They specify the x and y displacementof a page 1 differential In practice they will be linear expressions with 1 coefficient 1 -1 or 0The degree option must be given before placing any differentials It can be specified at the begin-ning of the sseqdata environment at the beginning of the sseqpage environment if it is beingused as a standalone page or as a default by saying sseqsetdegree = 〈x degree〉〈y degree〉 orsseqsetAdams grading outside of the sseqdata and spectralsequences environmentsYou can make a named grading convention by saying sseqsetmy gradingsseq grading = 〈xdegree〉〈y degree〉 Then later passing my grading to a spectral sequence is equivalent to sayingdegree = 〈x degree〉〈y degree〉 The following grading conventions exist by default

0 1 2

0

1

equivalent to degree = 11-1beginsseqpage[ cohomological Serre grading ]class(01)class(20)d2(01)endsseqpage

0 1 2

0

1

equivalent to degree = -11-1beginsseqpage[ homological Serre grading ]class(01)class(20)d2(20)endsseqpage

0 1

0

1

2

equivalent to degree = -11beginsseqpage[ Adams grading ]class(02)class(10)d2(10)endsseqpage

41

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 42: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

strict degreelax degree

If the degree is strict then LATEXwill throw an error if you try to specify a differential that doesnrsquot havethe proper grading The degree is strict by default

beginsseqdata[ name = laxdegree Adams grading ]class(02)class(10)d3(10)(02) Error differential does not respect grading

Target should be in position (03) but instead it is (02)endsseqdata

0 1

0

1

2

beginsseqdata[ name = laxdegree Adams grading lax degree yscale = 06 ]class(02)class(10)d3(10)(02) No error because degree checking is offendsseqdataprintpage[ name = laxdegree page = 3 ]

update existing

This key is only for the sseqdata environment It specifies that the current sseqdata environmentis adding data to an existing spectral sequence If you donrsquot pass this key then giving a sseqdataenvironment the same name as a different sseqdata environment will cause an error This is intendedto help you avoid accidentally reusing the same name

keep changes = 〈boolean〉 (default true)(initially false)This option is only for the sseqpage environment and only works when a name is provided Thisoption specifies that all of the commands in the current sseqpage environment should be carriedforward to future pages of the same named spectral sequence For example

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

0 1

0

1

2

3

42

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 43: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

beginsseqdata[ name = keep changes example Adams grading y range = 03 ]class(00)class(10)endsseqdata

beginsseqpage[ name = keep changes example sseq = orange ]class(02)class(12)classoptions[orange](10)d2(10)endsseqpage qquad

printpage[ name = keep changes example page = 2 ] qquad

beginsseqpage[ name = keep changes example sseq = blue keep changes ]class(03)class(13)classoptions[blue](10)d3(10)endsseqpage qquad

printpage[ name = keep changes example page = 3 ]

Note that the orange classes and differential do not persist because the keep changes option is not setin the first sseqpage environment but the blue classes and differential do since the keep changesoption is set in the second sseqpage environment

no differentialsdraw differentials

The option no differentials suppresses all of the differentials on the current page whereasdraw differentials causes the page appropriate differentials to be drawn This is useful for ex-plaining how the computation of a spectral sequence goes or if you want to display one of the edges ofthe spectral sequence like in example_KF3ntex

no struct linesdraw struct lines

The option no struct lines suppresses all of the structure lines on the current page whereas theoption draw struct lines causes the page appropriate structure lines to be drawn

no orphan edgesdraw orphan edges

An edge is an ldquoorphanrdquo if both its source and target lie off the page By default these are drawnbut with the option no orphan edges they are not If the option no orphan edges has been setdraw orphan edges undoes it

0 1 2

0

1

2

0 1 2

0

1

2

beginsseqdata[name = orphan edges examplecohomological Serre gradingx range = 02 y range = 02 ]

class(03) class(31)d3(03)class(21) class(40)d2(21)endsseqdataprintpage[ name = orphan edges example ]quadprintpage[ name = orphan edges example

no orphan edges ]

class pattern = 〈class pattern name〉 (initially standard)This key specifies the arrangement of multiple classes at the same coordinate The default value isstandard

43

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 44: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

beginsseqdata[ name = class pattern example no axes ymirror ]class(00)class(10) class(10)class(01) class(01) class(01)class(11) class(11) class(11) class(11)class(02) class(02) class(02) class(02) class(02)class(12) class(12) class(12) class(12) class(12) class(12)endsseqdata

printpage[ name = class pattern example class pattern = standard ]printpage[ name = class pattern example change classes = blue

class pattern = linear class placement transform = rotate = 45 ]

You can add new class patterns using sseqnewclasspattern

sseqnewclasspattern〈class pattern name〉〈offsets〉Creates a new class pattern For example the linear class pattern is created using the com-mand

sseqnewclasspatternlinear(00)(-0130)(0130)(-020)(00)(020)(-030)(-010)(010)(030)(-040)(-020)(00)(020)(040)(-050)(-030)(-010)(010)(030)(050)

For instance the third row indicates that if there are three classes at the position (xy) theyshould be printed at (x-02y) (xy) and (x+02y) You can give as many rows as you likespectralsequences will throw an error if there are more classes in any position than the maximumnumber that your class pattern can handle ndash for instance the linear class pattern can handle upto six classes based on this definition

class placement transform = 〈transform keys〉add class placement transform = 〈transform keys〉

The option class placement transform allows the user to specify a TikZ coordinate transform to ad-just the relative position of multiple nodes in the same (x y) position The class placement transformkey overrides the previous value of transformations the add class placement transform just addsthe new transformation to the end of the list This coordinate transform can only involve rotation andscaling no translation Specifying a scaling factor helps if the nodes are too large and overlap In somecases a rotation makes it easier to see which class is the target of a differential

0 1

0

1

Z

Z2 Z3beginsseqpage[ class placement transform = xscale = 15

class pattern = linearclasses = draw = none xscale = 2 x axis extend end = 07cm ]

class[mathbbZ](00)class[mathbbZ2](11)class[mathbbZ3](11)endsseqpage

0 1 2 3

0

1

2

beginsseqpage[ class placement transform = rotate = 40 cohomological Serre grading scale = 065classes = fill differentials = blue ]

class(00)class(02)class(02)class[red](30)class[green](30)class[blue](30)

d3(0212)d3(02-1-1)draw[-gtred](301)--(00)endsseqpage

With multiple large class labels the best option is to arrange the classes vertically

44

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 45: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

7 8

0

1

2

ι3βι3

P 1ι3

ι2ι3βι3

ι2P1ι3

(βι3)2

P 1βι3

βP 1ι3

ι2(βι3)2

ι2P1βι3

ι2βP1ι3

beginsseqpage[ classes = draw = none xscale = 2 yscale=155class pattern = linearclass placement transform = scale = 15 rotate = 90 right clip padding = 20pt top clip padding = 20ptx axis gap = 30pt y axis gap = 20pt ]

class[iota_3betaiota_3](70)class[P^1iota_3](70)

class[iota_2iota_3betaiota_3](72)class[iota_2P^1iota_3](72)

class[(betaiota_3)^2](80)class[P^1betaiota_3](80)class[beta P^1iota_3](80)

class[iota_2(betaiota_3)^2](82)class[iota_2P^1betaiota_3](82)class[iota_2beta P^1iota_3](82)endsseqpage

math nodes = 〈boolean〉 (default true)(initially true)This key instructs spectralsequences to put all labels in math mode automatically

71 Global coordinate transformations

Of the normal TikZ coordinate transformations only the following can be applied to a spectralsequenceschart

scale = 〈factor〉xscale = 〈factor〉yscale = 〈factor〉xmirrorymirror

Scale the chart by 〈factor〉 Under normal circumstances you can tell TikZ to mirror a chart by sayingfor instance xscale = -1 but spectralsequences needs to be aware that the chart has been mirroredin order to draw the axes correctly Thus if you want to mirror a spectral sequence use the xmirrorand ymirror options as appropriate

rotate = 〈angle〉It probably wonrsquot look great if you pick an angle that isnrsquot a multiple of 90 degrees

72 Plot options and axes style

x range = 〈x min〉〈x max 〉y range = 〈y min〉〈y max 〉

These options set the x range (respectively y range) to be a specific interval By default if no rangeis specified then the range is chosen to fit all the classes If an x range is specified but no y rangethen the y range is chosen to fit all the classes that lie inside the specified x range and vice versa Thevalues must be integers ndash if you want to extend the x axis a noninteger amount try using x axis startextend or x axis end extend

grid = 〈grid type〉grid color = 〈color〉grid step = 〈positive integer〉x grid step = 〈positive integer〉

45

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 46: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

y grid step = 〈positive integer〉Makes spectralsequences draw a grid The grid types and a significant part of the code that producesthem were stolen from the sseq package

chess

0 1 2 3

0

1

2

3

crossword

0 1 2 3

0

1

2

3

go

0 1 2 3

0

1

2

3

0 1 2 3

0

1

2

3

beginsseqdata[ name = grid example scale = 08 ]class(00)class(30)class(21)class(21)class(12)class(12)class(12)class(03)class(33)endsseqdatahboxprintpage[ name = grid example grid = chess title=chess ]qquadprintpage[ name = grid example grid = crossword title=crossword ]vskip20pthboxprintpage[ name = grid example grid = go title=go ]qquadprintpage[ name = grid example grid = none ]

It is possible to make your own grid type by defining the command sseqgridyourgridname to drawa gridIt is a known problem that acrobat reader displays grids very dark and thick This is caused by theenhance thin lines ldquofeaturerdquo of Acrobat reader You can turn it off globally by going into the acrobatreader preferences window and unchecking the ldquoEnhance thin linesrdquo checkbox in the ldquoRenderingrdquo sectionUnfortunately there is no way to instruct Acrobat Reader to not apply this feature to a particulardocument This has apparently been annoying graphic designers for over a decadeThe grid color option changes the color of the grid the default value is gray The grid step keys changethe grid step

title = 〈text〉

46

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 47: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

title style = 〈keys〉x label = 〈text〉y label = 〈text〉x label style = 〈keys〉y label style = 〈keys〉label style = 〈keys〉

This make chart labels

An example

x axis label

yax

islabe

l

0 1 2

0

1

2

beginsseqpage[ title = An example yscale = 05x label = x axis label y label = y axis label label style = blue font = small x label style = yshift = 5pt ]

class(00)class(22)endsseqpage

Note that if you make multiple versions of the same chart and some of the charts have labels and othersdonrsquot they might not align the way you want An easy solution to this is to use path[background](min x min y) ndash (max x max y) where the coordinates are below and to the left respectivelyabove and to the right of everything else drawn in any picture This makes the bounding boxes for allof the pictures the same size so that they line up even if the exact collection of things drawn changesSee the example at the end of the background key for an illustration of this

no titledraw titleno x labelno y labelno labelsdraw x labeldraw y labeldraw labels

Suppress or unsuppress the title x label y label or both x and y labels respectively

no x ticksno y ticksno ticksdraw x ticksdraw y ticksdraw ticks

Suppress axes ticks (the numbers next to the axes) Only matters if axes are drawn You can makeyour own ticks using TikZ inside a scope environment with the background key For instanceyou might want to label the axes as 0 n 2n You can achieve this as follows (you can also usex tick handler)

0

1

2

0 n 2n 3n

beginsseqpage[ no x ticks x range = 03 ]beginscope[ background ]

node at (0ymin - 1) 0 vphantom is fragile so we have to throw in an extra protectnode at (1ymin - 1) protectvphantom2n

foreach n in 2 xmaxnode at (nymin - 1) n n

endscopeclass(00)class(32)endsseqpage

47

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 48: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

x tick step = 〈positive integer〉 (initially 1)y tick step = 〈positive integer〉 (initially 1)tick step = 〈positive integer〉 (initially 1)

Sets the interval between labels

x tick offset = 〈integer〉 (initially 0)y tick offset = 〈integer〉 (initially 0)tick offset = 〈integer〉 (initially 0)

Sets the label offset ndash by default the ticks will always be the set of numbers that are 0 mod 〈tick step〉Change it so that the ticks are the set of numbers that are 〈tick offset〉 mod 〈tick step〉

x major tick step = 〈nonnegative integer〉 (initially 0)y major tick step = 〈nonnegative integer〉 (initially 0)major tick step = 〈nonnegative integer〉x minor tick step = 〈nonnegative integer〉 (initially 0)y minor tick step = 〈nonnegative integer〉 (initially 0)minor tick step = 〈nonnegative integer〉

If these are nonzero they control the placement of tick marks on the axes The value 0 prevents tickmarks from being drawn Uses x tick offset as an offset

0 5 10

0

5

10beginsseqpage[

tick step = 5major tick step = 5minor tick step = 1scale = 04axes type = frame

]class(00)class(1010)endsseqpage

x tick style = 〈keys〉y tick style = 〈keys〉tick style = 〈keys〉

Change the tick style

0 1 2

0

1

beginsseqpage[ tick style = blue font = tiny ]class(00) class(21)endsseqpage

x tick handler = 〈function〉 (initially 1)y tick handler = 〈function〉 (initially 1)tick handler = 〈function〉 (initially 1)

The value for x tick handler should be a function that takes in the current x value and outputs theappropriate tick Correspondingly with y tick handler The tick handler key sets both

48

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 49: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

0 n 2n 3n 4n

0

1

2

beginsseqpage[ x range = 04 yscale = 178x tick handler =

ifnum1 = 0relax0

elseifnum1 = 1relax

vphantom is fragile so we protect itprotectvphantom2n

else1n

fifi

]class(00)class(42)endsseqpage

73 Layout

x axis type = 〈type〉 (initially border)y axis type = 〈type〉 (initially border)axes type = 〈type〉 (initially border)no x axisno y axisno axes

The 〈type〉 is either border center frame or none no axes is a shorthand for axes type=none Theborder type is the default and puts the axes on the bottom and left of the picture The center typeby default places the axes to pass through (0 0) this can be modified using the x axis origin andy axis origin keys See example_KRAHSStex and example_KUHFPSStex for examples where this isused The frame type draws a frame around the entire chart

0 1 2 3

0

1

2beginsseqpage[ axes type = frame ]class(00)class(32)endsseqpage

x axis origin = 〈x value〉 (initially 0)y axis origin = 〈y value〉 (initially 0)

If you use axes type = center these keys change the position of the axes Otherwise they are ignored

x axis gap = 〈dimension〉 (initially 05cm)y axis gap = 〈dimension〉 (initially 05cm)axes gap = 〈dimension〉 (initially 05cm)

x tick gap = 〈dimension〉 (initially 05cm)y tick gap = 〈dimension〉 (initially 05cm)

x axis extend start = 〈dimension〉 (initially 05cm)y axis extend start = 〈dimension〉 (initially 05cm)x axis extend end = 〈dimension〉 (initially 05cm)y axis extend end = 〈dimension〉 (initially 05cm)x axis tail = 〈dimension〉 (initially 09cm)y axis tail = 〈dimension〉 (initially 09cm)

49

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 50: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

x axis clip padding = 〈dimension〉 (initially 01cm)y axis clip padding = 〈dimension〉 (initially 01cm)

right clip padding = 〈dimension〉 (initially 01cm)left clip padding = 〈dimension〉 (initially 01cm)top clip padding = 〈dimension〉 (initially 01cm)bottom clip padding = 〈dimension〉 (initially 01cm)

custom clip = 〈clip path〉Give a custom clipping The clipping specified must be in the form of a valid TikZ path for instanceclip (00) rectangle (1010) This clipping is also applied to any grid and is used to drawellipses on appropriate differentials or structure lines that go out of bounds and to determine whethera differential or structure line is an ldquoorphanrdquo It is not applied to any background elements which isimportant because these are often used for axes labels and such that should lie outside of the clippingregion Weird things can happen with out of range edges if you provide an oddly shaped path

clip = 〈boolean〉 (default true)(initially true)If this is false the spectral sequence chart wonrsquot be clipped Irsquom not really sure why you would wantthat but there might be some use case Setting this to be false is not fully supported and itrsquos possiblethat weird things will happen with some of the edges that go out of range

rotate labels = 〈boolean〉 (default true)(initially false)If you use rotate = 90 but also want the labels rotated (so that the whole chart is sideways) use thiskey

50

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 51: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

Axis type border layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

right clippadding

top clippadding

x axistail

y axistail

x axisextend end

y axisextend end

x tick gap

y tick gap

x axis gap

y axis gap

Axes type frame layout

0 1 2 3 4 5

0

1

2

3

4

5

x axisclip padding

y axisclip padding

x axisclip padding

y axisclip padding

x tick gap

y tick gap

x axis gap

y axis gap

y axis gap

x axis gap

51

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout
Page 52: The Spectral Sequences Package - ibibliomirrors.ibiblio.org/CTAN/graphics/pgf/contrib/spectralsequences/ma… · 1 Introduction Thespectralsequences packageconsistsoftwomainenvironments–the{sseqdata}environment,which

Axes type center layout

minus3 minus2 minus1 0 1 2 3

minus3

minus2

minus1

0

1

2

3

x tick gap

y tick gap

left clippadding

right clippadding

top clippadding

bottom clippadding

x axisextend end

y axisextend end

x axisextend start

y axisextend start

52

  • Introduction
    • Installation
    • Memory Constraints
    • A warning about fragile macros
      • Package Options and Environments
      • The Main Commands
      • Options for the main commands
        • Universal options
        • Options for class
        • Options for d and structline
        • Options for circleclass
        • Options for TikZ primitives
          • Miscellaneous Commands
            • Settings
            • Code reuse commands
            • Families
            • Utilities
            • Coordinate parsers and related
            • The class stack
              • Styles
                • Style-like options
                  • Global Options
                    • Global coordinate transformations
                    • Plot options and axes style
                    • Layout