summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/spectralsequences/examples/hatcher.tex
blob: ff079110c4b0618eae7ad853fc0fc3f061564f59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
%%
%% Package: spectralsequences v1.1.0
%% Author: Hood Chatham
%% Email: hood@mit.edu
%% Date: 2017-08-02
%% License: Latex Project Public License
%%
%% File: example_hatcher.tex
%%
%%    This comes from Hatcher's spectral sequences book. I think it's a good demonstration of the flexibility of sseqpages.
%%    Thanks to Antonio Ruiz for suggesting it.
%%

\documentclass{spectralsequence-example}
\usepackage{amssymb}
\def\Z{\mathbb{Z}}

\begin{document}
\sseqset{
    0/.sseq style={"0",draw=none},
    homological Serre grading,
    classes={draw=none,inner sep=0.2em},
    %tick gap=0.7em,
}
\begin{sseqdata}[
    name=hatcherex1,
    permanent cycles={draw,minimum width={width("$Z_2$")+0.85em}},
    yscale=0.6,
    axes gap=0.5cm,
    tick gap=1em,
]
\begin{scope}[background,opacity=0.1]
\foreach \n in {1,3,...,9}{
    \fill(-1.3,\n-0.5)--(-1.3,\n+0.5)--(0,\n+0.5)--(\n+0.5,0)--(\n+0.5,-2)--(\n-0.5,-2)--(\n-0.5,0)--(0,\n-0.5)--cycle;
}
\end{scope}

\class["\Z"](0,0)
\foreach\x in {1,3,...,9}{
    \class["\Z_2"](\x,0)
}
\foreach \x in {2,4,...,8}{
    \class[0](\x,0)
}
\foreach\y in {1,3,...,9}{
    \pgfmathparse{9-\y}
    \let\xmax\pgfmathresult
    \foreach\x in {0,...,\xmax}{
        \class["\Z_2"](\x,\y)
    }
}

\foreach \y in {2,4,...,8}{
    \pgfmathparse{9-\y}
    \let\xmax\pgfmathresult
    \foreach\x in {0,...,\xmax}{
        \class[0](\x,\y)
    }
}

\foreach \x in {3,5,...,9}{
    \d2(\x,0)
}

\d3(4,1)
\d3(6,1)
\d3(8,1)
\d3(4,3)
\d3(6,3)
\d3(4,5)
\end{sseqdata}
\printpage[name=hatcherex1,page=0]

\vskip30pt

\begin{sseqdata}[
    name=hatcherex2,
    yscale=0.6,
    x axis gap=0.3cm,
]

\begin{scope}[background,opacity=0.1]
\foreach \n in {1,3,...,9}{
    \fill(-1.3,\n-0.5)--(-1.3,\n+0.7)--(0,\n+0.7)--(\n+0.5,0)--(\n+0.5,-2)--(\n-0.5,-2)--(\n-0.5,0)--(0,\n-0.5)--cycle;
}
\end{scope}


\foreach\x in {0,2,...,8}{
    \class["\Z"](\x,0)
}
\foreach \x in {1,3,...,9}{
    \class[0](\x,0)
}
\foreach\y in {1,3,...,9}{
    \pgfmathparse{9-\y}
    \let\xmax\pgfmathresult
    \foreach\x in {0,...,\xmax}{
        \pgfmathparse{int(mod(\x,2))}
        \ifnum\pgfmathresult=0\relax
            \class["\Z_2"](\x,\y)
        \else
            \class[0](\x,\y)
        \fi
    }
}

\d2(2,0)
\foreach \x in {4,6,...,8}{
    \foreach\r in {2,4,...,\x}{
        \d\r(\x,0)
        \replaceclass["\Z"](\x,0)
    }
}

\foreach \y in {2,4,...,8}{
    \pgfmathparse{9-\y}
    \let\xmax\pgfmathresult
    \foreach\x in {0,...,\xmax}{
        \class[0](\x,\y)
    }
}

\end{sseqdata}
\printpage[name=hatcherex2,page=0]
\end{document}