Skip to main content
improve table part of MWE
Source Link
Zarko
  • 317.5k
  • 25
  • 190
  • 399

enter image description hereenter image description here

It seems that you really enjoy to torches people who are willing to help here ...Your code snippet without preamble, without newcommands\newcommands you use ... isn't very helpful, so the following MWE is based on guessing, how you actually generate provided picture:

\documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,tikzmark} \usepackage\newcolumntype{booktabs,tabularxR}{>{\raggedleft\arraybackslash}X} \newcommand\Sq{\mathrm{Sq}} \usepackage{showframe} \begin{document} \begin{table} \centering \begin{tabularx}{\textwidth}{l*l>{2\setlength\hsize{0.4\hsize}$}R<{$} >{\raggedleft\arraybackslash$\setlength\hsize{0.2\hsize}X<}X >{\setlength\hsize{0.4\hsize}$}R<{$} } \toprule \multicolumn{1}{c}{Degree} & \multicolumn{12}{c}{$H^*(K(Z_2,n+1);Z_2)$}   & \multicolumn{1}{c}{$H^*H^*(K(Z,n);Z_2)$}  \\ \midrule n & &  \iota_n  && \\ n+1 & \iota_{n+1} \tikzmark{a1} & &&  \\ n+2 & \Sq^1\iota_{n+1} \tikzmark{a2} &  && \tikzmark{b1} \Sq^2\iota_n  \\ &&\\ \addlinespace[1em] n+3 & \Sq^2\iota_{n+1} &  && \tikzmark{b2} \Sq^3\iota_n  \\   & \Sq^2\Sq^1\iota_{n+1} &  && \\ &&\\ \addlinespace[1em] n+4 & \Sq^3\iota_{n+1} &  && \Sq^4\iota_n  \\ & \Sq^2\Sq^1\iota_{n+1} \tikzmark{a3} & &&  \\ &&\\ \addlinespace[1em] n+5 & \Sq^4\iota_{n+1} \tikzmark{a4} &  && \tikzmark{b3} \Sq^5\iota_n  \\   & \Sq^3\Sq^1\iota_{n+1} &  && \\ &&\\ \addlinespace[1em] n+6 & \Sq^5\iota_{n+1} \tikzmark{a5} &  && \Sq^6\iota_{n+1}  \\   & \Sq^4\Sq^1\iota_{n+1} \tikzmark{a6} & && \tikzmark{b4} \Sq^4\Sq^2\iota_n  \\ &&\\ \addlinespace[1em] n+7 & \Sq^6\iota_{n+1} \tikzmark{a7} &  && \Sq^7\iota_n  \\   & \Sq^5\Sq^1\iota_{n+1} &  && \tikzmark{b5} \Sq^5\Sq^2\iota_n  \\   & \Sq4\Sq^2\iota_{n+1} & &&  \\ &&\\ \addlinespace[1em] n+8 & \Sq^7\iota_{n+1} \tikzmark{a8} &  && \Sq^8\iota_n  \\   & \Sq^6\Sq^1\iota_{n+1} \tikzmark{a9} &  && \tikzmark{b6} \Sq^6\Sq^2\iota_n  \\   & \Sq^5\Sq^2\iota_{n+1} &  && \\   & \Sq^4\Sq^2\Sq^1\iota_{n+1} \tikzmark{a10} &&&  \\ &&\\ \addlinespace[1em] n+9 & \Sq^8\iota_{n+1} \tikzmark{a11} &  && \tikzmark{b7} \Sq^9\iota_n  \\   & \Sq^7\Sq^1\iota_{n+1} \tikzmark{a12} & && \tikzmark{b8} \Sq^7\Sq^2\iota_n  \\   & \Sq^6\Sq^2\iota_{n+1} &  && \tikzmark{b9} \Sq^6\Sq^3\iota_n  \\   & \Sq^5\Sq^2\Sq^1\iota_{n+1} & &&  \\ &&\\ \addlinespace[1em] n+10 & \Sq^{9}\iota_{n+1} &  && \Sq^{10}\iota_n  \\   & \Sq^8\Sq^1\iota_{n+1} &  && \tikzmark{b10} \Sq^8\Sq^2\iota_n \\   & \Sq^7\Sq^2\iota_{n+1} &  && \tikzmark{b11} \Sq^7\Sq^3\iota_n \\   & \Sq^6\Sq^3\iota_{n+1} & &&  \\   & \Sq^6\Sq^2\Sq^1\iota_{n+1} & &&  \\ \bottomrule \end{tabularx} \begin{tikzpicture}[overlay, remember picture, shorten >=5pt, shorten <=5pt] \foreach \i/\j [count=\j from 0] in {1/1, 2/2...,12} 3/3, {  4/4, 5/5, 6/5, 7/6,\ifnum\i<6 \draw 8/7,[->] 9/8,(pic 10/9,cs:a\i) 11/10,-- 12/11}(pic cs:b\i);   \else \draw [->] (pic cs:a\i) -- (pic cs:b\j);  \fi } \end{tikzpicture} \label{default} \end{table} \end{document} 

Edit (1): I also improve TikZ code. Now is more consistent and concise.

Edit (2): After re-inspection of table code redesign a table. With added empty dummy column is obtained better centering columns heads.

enter image description here

It seems that you really enjoy to torches people who are willing to help here ... code snippet without preamble, without newcommands you use ... so the following MWE is based on guessing, how you actually generate provided picture:

\documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,tikzmark} \usepackage{booktabs,tabularx} \newcommand\Sq{\mathrm{Sq}} \usepackage{showframe} \begin{document} \begin{table} \centering \begin{tabularx}{\textwidth}{l*{2}{>{\raggedleft\arraybackslash$}X<{$}}} \toprule \multicolumn{1}{c}{Degree} & \multicolumn{1}{c}{$H^*(K(Z_2,n+1);Z_2)$} & \multicolumn{1}{c}{$H^*(K(Z,n);Z_2)$} \\ \midrule n & & \iota_n \\ n+1 & \iota_{n+1} \tikzmark{a1} & \\ n+2 & \Sq^1\iota_{n+1} \tikzmark{a2} & \tikzmark{b1} \Sq^2\iota_n \\ &&\\ n+3 & \Sq^2\iota_{n+1} & \tikzmark{b2} \Sq^3\iota_n \\ & \Sq^2\Sq^1\iota_{n+1} & \\ &&\\ n+4 & \Sq^3\iota_{n+1} & \Sq^4\iota_n \\ & \Sq^2\Sq^1\iota_{n+1} \tikzmark{a3} & \\ &&\\ n+5 & \Sq^4\iota_{n+1} \tikzmark{a4} & \tikzmark{b3} \Sq^5\iota_n \\ & \Sq^3\Sq^1\iota_{n+1} & \\ &&\\ n+6 & \Sq^5\iota_{n+1} \tikzmark{a5} & \Sq^6\iota_{n+1} \\ & \Sq^4\Sq^1\iota_{n+1} \tikzmark{a6} & \tikzmark{b4} \Sq^4\Sq^2\iota_n \\ &&\\ n+7 & \Sq^6\iota_{n+1} \tikzmark{a7} & \Sq^7\iota_n \\ & \Sq^5\Sq^1\iota_{n+1} & \tikzmark{b5} \Sq^5\Sq^2\iota_n \\ & \Sq4\Sq^2\iota_{n+1} & \\ &&\\ n+8 & \Sq^7\iota_{n+1} \tikzmark{a8} & \Sq^8\iota_n \\ & \Sq^6\Sq^1\iota_{n+1} \tikzmark{a9} & \tikzmark{b6} \Sq^6\Sq^2\iota_n \\ & \Sq^5\Sq^2\iota_{n+1} & \\ & \Sq^4\Sq^2\Sq^1\iota_{n+1} \tikzmark{a10} & \\ &&\\ n+9 & \Sq^8\iota_{n+1} \tikzmark{a11} & \tikzmark{b7} \Sq^9\iota_n \\ & \Sq^7\Sq^1\iota_{n+1} \tikzmark{a12} & \tikzmark{b8} \Sq^7\Sq^2\iota_n \\ & \Sq^6\Sq^2\iota_{n+1} & \tikzmark{b9} \Sq^6\Sq^3\iota_n \\ & \Sq^5\Sq^2\Sq^1\iota_{n+1} & \\ &&\\ n+10 & \Sq^{9}\iota_{n+1} & \Sq^{10}\iota_n \\ & \Sq^8\Sq^1\iota_{n+1} & \tikzmark{b10} \Sq^8\Sq^2\iota_n \\ & \Sq^7\Sq^2\iota_{n+1} & \tikzmark{b11} \Sq^7\Sq^3\iota_n \\ & \Sq^6\Sq^3\iota_{n+1} & \\ & \Sq^6\Sq^2\Sq^1\iota_{n+1} & \\ \bottomrule \end{tabularx} \begin{tikzpicture}[overlay, remember picture, shorten >=5pt, shorten <=5pt] \foreach \i/\j in {1/1, 2/2, 3/3, 4/4, 5/5, 6/5, 7/6, 8/7, 9/8, 10/9, 11/10, 12/11} \draw [->] (pic cs:a\i) -- (pic cs:b\j); \end{tikzpicture} \label{default} \end{table} \end{document} 

Edit: I also improve TikZ code. Now is more consistent and concise.

enter image description here

Your code snippet without preamble, without \newcommands you use ... isn't very helpful, so the following MWE is based on guessing, how you actually generate provided picture:

\documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,tikzmark} \newcolumntype{R}{>{\raggedleft\arraybackslash}X} \newcommand\Sq{\mathrm{Sq}} \usepackage{showframe} \begin{document} \begin{table} \centering \begin{tabularx}{\textwidth}{l>{\setlength\hsize{0.4\hsize}$}R<{$} >{\setlength\hsize{0.2\hsize}}X >{\setlength\hsize{0.4\hsize}$}R<{$} } \toprule \multicolumn{1}{c}{Degree} & \multicolumn{2}{c}{$H^*(K(Z_2,n+1);Z_2)$}   & H^*(K(Z,n);Z_2)  \\ \midrule n &  \iota_n  && \\ n+1 & \iota_{n+1} \tikzmark{a1}  &&  \\ n+2 & \Sq^1\iota_{n+1} \tikzmark{a2}   && \tikzmark{b1} \Sq^2\iota_n  \\  \addlinespace[1em] n+3 & \Sq^2\iota_{n+1}   && \tikzmark{b2} \Sq^3\iota_n  \\   & \Sq^2\Sq^1\iota_{n+1}   && \\  \addlinespace[1em] n+4 & \Sq^3\iota_{n+1}   && \Sq^4\iota_n  \\ & \Sq^2\Sq^1\iota_{n+1} \tikzmark{a3}  &&  \\  \addlinespace[1em] n+5 & \Sq^4\iota_{n+1} \tikzmark{a4}   && \tikzmark{b3} \Sq^5\iota_n  \\   & \Sq^3\Sq^1\iota_{n+1}   && \\  \addlinespace[1em] n+6 & \Sq^5\iota_{n+1} \tikzmark{a5}   && \Sq^6\iota_{n+1}  \\   & \Sq^4\Sq^1\iota_{n+1} \tikzmark{a6}  && \tikzmark{b4} \Sq^4\Sq^2\iota_n  \\  \addlinespace[1em] n+7 & \Sq^6\iota_{n+1} \tikzmark{a7}   && \Sq^7\iota_n  \\   & \Sq^5\Sq^1\iota_{n+1}   && \tikzmark{b5} \Sq^5\Sq^2\iota_n  \\   & \Sq4\Sq^2\iota_{n+1}  &&  \\  \addlinespace[1em] n+8 & \Sq^7\iota_{n+1} \tikzmark{a8}   && \Sq^8\iota_n  \\   & \Sq^6\Sq^1\iota_{n+1} \tikzmark{a9}   && \tikzmark{b6} \Sq^6\Sq^2\iota_n  \\   & \Sq^5\Sq^2\iota_{n+1}   && \\   & \Sq^4\Sq^2\Sq^1\iota_{n+1} \tikzmark{a10} &&  \\  \addlinespace[1em] n+9 & \Sq^8\iota_{n+1} \tikzmark{a11}   && \tikzmark{b7} \Sq^9\iota_n  \\   & \Sq^7\Sq^1\iota_{n+1} \tikzmark{a12} && \tikzmark{b8} \Sq^7\Sq^2\iota_n  \\   & \Sq^6\Sq^2\iota_{n+1}   && \tikzmark{b9} \Sq^6\Sq^3\iota_n  \\   & \Sq^5\Sq^2\Sq^1\iota_{n+1}  &&  \\  \addlinespace[1em] n+10 & \Sq^{9}\iota_{n+1}   && \Sq^{10}\iota_n  \\   & \Sq^8\Sq^1\iota_{n+1}   && \tikzmark{b10} \Sq^8\Sq^2\iota_n \\   & \Sq^7\Sq^2\iota_{n+1}   && \tikzmark{b11} \Sq^7\Sq^3\iota_n \\   & \Sq^6\Sq^3\iota_{n+1}  &&  \\   & \Sq^6\Sq^2\Sq^1\iota_{n+1}  &&  \\ \bottomrule \end{tabularx} \begin{tikzpicture}[overlay, remember picture, shorten >=5pt, shorten <=5pt] \foreach \i [count=\j from 0] in {1,...,12}  {  \ifnum\i<6 \draw [->] (pic cs:a\i) -- (pic cs:b\i);   \else \draw [->] (pic cs:a\i) -- (pic cs:b\j);  \fi } \end{tikzpicture} \label{default} \end{table} \end{document} 

Edit (1): I also improve TikZ code. Now is more consistent and concise.

Edit (2): After re-inspection of table code redesign a table. With added empty dummy column is obtained better centering columns heads.

correct tikz code
Source Link
Zarko
  • 317.5k
  • 25
  • 190
  • 399
\documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,tikzmark} \usepackage{booktabs,tabularx} \newcommand\Sq{\mathrm{Sq}} \usepackage{showframe} \begin{document} \begin{table} \centering \begin{tabularx}{\textwidth}{l*{2}{>{\raggedleft\arraybackslash$}X<{$}}} \toprule \multicolumn{1}{c}{Degree} & \multicolumn{1}{c}{$H^*(K(Z_2,n+1);Z_2)$} & \multicolumn{1}{c}{$H^*(K(Z,n);Z_2)$} \\ \midrule n & & \iota_n \\ n+1 & \iota_{n+1} \tikzmark{a1} & \\ n+2 & \Sq^1\iota_{n+1} \tikzmark{a2} & \tikzmark{b1} \Sq^2\iota_n \\ &&\\ n+3 & \Sq^2\iota_{n+1} & \tikzmark{b2} \Sq^3\iota_n \\ & \Sq^2\Sq^1\iota_{n+1} & \\ &&\\ n+4 & \Sq^3\iota_{n+1} & \Sq^4\iota_n \\ & \Sq^2\Sq^1\iota_{n+1} \tikzmark{a3} & \\ &&\\ n+5 & \Sq^4\iota_{n+1} \tikzmark{a4} & \tikzmark{b3} \Sq^5\iota_n \\ & \Sq^3\Sq^1\iota_{n+1} & \\ &&\\ n+6 & \Sq^5\iota_{n+1} \tikzmark{a5} & \Sq^6\iota_{n+1} \\ & \Sq^4\Sq^1\iota_{n+1} \tikzmark{a6} & \tikzmark{b4} \Sq^4\Sq^2\iota_n \\ &&\\ n+7 & \Sq^6\iota_{n+1} \tikzmark{a7} & \Sq^7\iota_n \\ & \Sq^5\Sq^1\iota_{n+1} & \tikzmark{b5} \Sq^5\Sq^2\iota_n \\ & \Sq4\Sq^2\iota_{n+1} & \\ &&\\ n+8 & \Sq^7\iota_{n+1} \tikzmark{a8} & \Sq^8\iota_n \\ & \Sq^6\Sq^1\iota_{n+1} \tikzmark{a9} & \tikzmark{b6} \Sq^6\Sq^2\iota_n \\ & \Sq^5\Sq^2\iota_{n+1} & \\ & \Sq^4\Sq^2\Sq^1\iota_{n+1} \tikzmark{a10} & \\ &&\\ n+9 & \Sq^8\iota_{n+1} \tikzmark{a11} & \tikzmark{b7} \Sq^9\iota_n \\ & \Sq^7\Sq^1\iota_{n+1} \tikzmark{a12} & \tikzmark{b8} \Sq^7\Sq^2\iota_n \\ & \Sq^6\Sq^2\iota_{n+1} & \tikzmark{b9} \Sq^6\Sq^3\iota_n \\ & \Sq^5\Sq^2\Sq^1\iota_{n+1} & \\ &&\\ n+10 & \Sq^{9}\iota_{n+1} & \Sq^{10}\iota_n \\ & \Sq^8\Sq^1\iota_{n+1} & \tikzmark{b10} \Sq^8\Sq^2\iota_n \\ & \Sq^7\Sq^2\iota_{n+1} & \tikzmark{b11} \Sq^7\Sq^3\iota_n \\ & \Sq^6\Sq^3\iota_{n+1} & \\ & \Sq^6\Sq^2\Sq^1\iota_{n+1} & \\ \bottomrule \end{tabularx} \begin{tikzpicture}[overlay, remember picture, yshift=.1\baselineskip, xshift=.1, shorten >=5pt, shorten <=0pt] \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a1}) -- ({pic cs:b1});  \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a2}) -- ({pic cs:b2});  \draw [->]shorten ([yshift=0pt>=5pt, xshift=5pt]{pic cs:a3}) -- ({picshorten cs:b3});<=5pt]  \draw [->] ([yshift=0pt, xshift=5pt]{pic\foreach cs:a4})\i/\j --in ({pic cs:b4}); \draw [->] ([yshift=0pt1/1, xshift=5pt]{pic cs:a5}) -- ({pic cs:b5}); \draw [->] ([yshift=0pt2/2, xshift=5pt]{pic cs:a6}) -- ({pic cs:b5}); \draw [->] ([yshift=0pt3/3, xshift=5pt]{pic cs:a7}) -- ({pic cs:b6});  \draw [->] ([yshift=0pt4/4, xshift=5pt]{pic cs:a8}) -- ({pic cs:b7}); \draw [->] ([yshift=0pt5/5, xshift=5pt]{pic cs:a9}) -- ({pic cs:b8}); \draw [->] ([yshift=0pt6/5, xshift=5pt]{pic cs:a10}) -- ({pic cs:b9}); \draw [->] ([yshift=0pt7/6, xshift=5pt]{pic8/7, cs:a11})9/8, --10/9, ({pic11/10, cs:b1012/11}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a12}a\i) -- ({pic cs:b11}b\j); \end{tikzpicture}   \label{default} \end{table} \end{document} 

For now I didn't bother with yourEdit: I also improve TikZ code. On the first sight its looks awfulNow is more consistent and concise.

\documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,tikzmark} \usepackage{booktabs,tabularx} \newcommand\Sq{\mathrm{Sq}} \usepackage{showframe} \begin{document} \begin{table} \centering \begin{tabularx}{\textwidth}{l*{2}{>{\raggedleft\arraybackslash$}X<{$}}} \toprule \multicolumn{1}{c}{Degree} & \multicolumn{1}{c}{$H^*(K(Z_2,n+1);Z_2)$} & \multicolumn{1}{c}{$H^*(K(Z,n);Z_2)$} \\ \midrule n & & \iota_n \\ n+1 & \iota_{n+1} \tikzmark{a1} & \\ n+2 & \Sq^1\iota_{n+1} \tikzmark{a2} & \tikzmark{b1} \Sq^2\iota_n \\ &&\\ n+3 & \Sq^2\iota_{n+1} & \tikzmark{b2} \Sq^3\iota_n \\ & \Sq^2\Sq^1\iota_{n+1} & \\ &&\\ n+4 & \Sq^3\iota_{n+1} & \Sq^4\iota_n \\ & \Sq^2\Sq^1\iota_{n+1} \tikzmark{a3} & \\ &&\\ n+5 & \Sq^4\iota_{n+1} \tikzmark{a4} & \tikzmark{b3} \Sq^5\iota_n \\ & \Sq^3\Sq^1\iota_{n+1} & \\ &&\\ n+6 & \Sq^5\iota_{n+1} \tikzmark{a5} & \Sq^6\iota_{n+1} \\ & \Sq^4\Sq^1\iota_{n+1} \tikzmark{a6} & \tikzmark{b4} \Sq^4\Sq^2\iota_n \\ &&\\ n+7 & \Sq^6\iota_{n+1} \tikzmark{a7} & \Sq^7\iota_n \\ & \Sq^5\Sq^1\iota_{n+1} & \tikzmark{b5} \Sq^5\Sq^2\iota_n \\ & \Sq4\Sq^2\iota_{n+1} & \\ &&\\ n+8 & \Sq^7\iota_{n+1} \tikzmark{a8} & \Sq^8\iota_n \\ & \Sq^6\Sq^1\iota_{n+1} \tikzmark{a9} & \tikzmark{b6} \Sq^6\Sq^2\iota_n \\ & \Sq^5\Sq^2\iota_{n+1} & \\ & \Sq^4\Sq^2\Sq^1\iota_{n+1} \tikzmark{a10} & \\ &&\\ n+9 & \Sq^8\iota_{n+1} \tikzmark{a11} & \tikzmark{b7} \Sq^9\iota_n \\ & \Sq^7\Sq^1\iota_{n+1} \tikzmark{a12} & \tikzmark{b8} \Sq^7\Sq^2\iota_n \\ & \Sq^6\Sq^2\iota_{n+1} & \tikzmark{b9} \Sq^6\Sq^3\iota_n \\ & \Sq^5\Sq^2\Sq^1\iota_{n+1} & \\ &&\\ n+10 & \Sq^{9}\iota_{n+1} & \Sq^{10}\iota_n \\ & \Sq^8\Sq^1\iota_{n+1} & \tikzmark{b10} \Sq^8\Sq^2\iota_n \\ & \Sq^7\Sq^2\iota_{n+1} & \tikzmark{b11} \Sq^7\Sq^3\iota_n \\ & \Sq^6\Sq^3\iota_{n+1} & \\ & \Sq^6\Sq^2\Sq^1\iota_{n+1} & \\ \bottomrule \end{tabularx} \begin{tikzpicture}[overlay, remember picture, yshift=.1\baselineskip, xshift=.1, shorten >=5pt, shorten <=0pt] \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a1}) -- ({pic cs:b1});  \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a2}) -- ({pic cs:b2});  \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a3}) -- ({pic cs:b3});  \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a4}) -- ({pic cs:b4}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a5}) -- ({pic cs:b5}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a6}) -- ({pic cs:b5}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a7}) -- ({pic cs:b6});  \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a8}) -- ({pic cs:b7}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a9}) -- ({pic cs:b8}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a10}) -- ({pic cs:b9}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a11}) -- ({pic cs:b10}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a12}) -- ({pic cs:b11}); \end{tikzpicture} \label{default} \end{table} \end{document} 

For now I didn't bother with your TikZ code. On the first sight its looks awful.

\documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,tikzmark} \usepackage{booktabs,tabularx} \newcommand\Sq{\mathrm{Sq}} \usepackage{showframe} \begin{document} \begin{table} \centering \begin{tabularx}{\textwidth}{l*{2}{>{\raggedleft\arraybackslash$}X<{$}}} \toprule \multicolumn{1}{c}{Degree} & \multicolumn{1}{c}{$H^*(K(Z_2,n+1);Z_2)$} & \multicolumn{1}{c}{$H^*(K(Z,n);Z_2)$} \\ \midrule n & & \iota_n \\ n+1 & \iota_{n+1} \tikzmark{a1} & \\ n+2 & \Sq^1\iota_{n+1} \tikzmark{a2} & \tikzmark{b1} \Sq^2\iota_n \\ &&\\ n+3 & \Sq^2\iota_{n+1} & \tikzmark{b2} \Sq^3\iota_n \\ & \Sq^2\Sq^1\iota_{n+1} & \\ &&\\ n+4 & \Sq^3\iota_{n+1} & \Sq^4\iota_n \\ & \Sq^2\Sq^1\iota_{n+1} \tikzmark{a3} & \\ &&\\ n+5 & \Sq^4\iota_{n+1} \tikzmark{a4} & \tikzmark{b3} \Sq^5\iota_n \\ & \Sq^3\Sq^1\iota_{n+1} & \\ &&\\ n+6 & \Sq^5\iota_{n+1} \tikzmark{a5} & \Sq^6\iota_{n+1} \\ & \Sq^4\Sq^1\iota_{n+1} \tikzmark{a6} & \tikzmark{b4} \Sq^4\Sq^2\iota_n \\ &&\\ n+7 & \Sq^6\iota_{n+1} \tikzmark{a7} & \Sq^7\iota_n \\ & \Sq^5\Sq^1\iota_{n+1} & \tikzmark{b5} \Sq^5\Sq^2\iota_n \\ & \Sq4\Sq^2\iota_{n+1} & \\ &&\\ n+8 & \Sq^7\iota_{n+1} \tikzmark{a8} & \Sq^8\iota_n \\ & \Sq^6\Sq^1\iota_{n+1} \tikzmark{a9} & \tikzmark{b6} \Sq^6\Sq^2\iota_n \\ & \Sq^5\Sq^2\iota_{n+1} & \\ & \Sq^4\Sq^2\Sq^1\iota_{n+1} \tikzmark{a10} & \\ &&\\ n+9 & \Sq^8\iota_{n+1} \tikzmark{a11} & \tikzmark{b7} \Sq^9\iota_n \\ & \Sq^7\Sq^1\iota_{n+1} \tikzmark{a12} & \tikzmark{b8} \Sq^7\Sq^2\iota_n \\ & \Sq^6\Sq^2\iota_{n+1} & \tikzmark{b9} \Sq^6\Sq^3\iota_n \\ & \Sq^5\Sq^2\Sq^1\iota_{n+1} & \\ &&\\ n+10 & \Sq^{9}\iota_{n+1} & \Sq^{10}\iota_n \\ & \Sq^8\Sq^1\iota_{n+1} & \tikzmark{b10} \Sq^8\Sq^2\iota_n \\ & \Sq^7\Sq^2\iota_{n+1} & \tikzmark{b11} \Sq^7\Sq^3\iota_n \\ & \Sq^6\Sq^3\iota_{n+1} & \\ & \Sq^6\Sq^2\Sq^1\iota_{n+1} & \\ \bottomrule \end{tabularx} \begin{tikzpicture}[overlay, remember picture, shorten >=5pt, shorten <=5pt] \foreach \i/\j in {1/1, 2/2, 3/3, 4/4, 5/5, 6/5, 7/6, 8/7, 9/8, 10/9, 11/10, 12/11} \draw [->] (pic cs:a\i) -- (pic cs:b\j); \end{tikzpicture}   \label{default} \end{table} \end{document} 

Edit: I also improve TikZ code. Now is more consistent and concise.

Source Link
Zarko
  • 317.5k
  • 25
  • 190
  • 399

Like this:

enter image description here

It seems that you really enjoy to torches people who are willing to help here ... code snippet without preamble, without newcommands you use ... so the following MWE is based on guessing, how you actually generate provided picture:

\documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,tikzmark} \usepackage{booktabs,tabularx} \newcommand\Sq{\mathrm{Sq}} \usepackage{showframe} \begin{document} \begin{table} \centering \begin{tabularx}{\textwidth}{l*{2}{>{\raggedleft\arraybackslash$}X<{$}}} \toprule \multicolumn{1}{c}{Degree} & \multicolumn{1}{c}{$H^*(K(Z_2,n+1);Z_2)$} & \multicolumn{1}{c}{$H^*(K(Z,n);Z_2)$} \\ \midrule n & & \iota_n \\ n+1 & \iota_{n+1} \tikzmark{a1} & \\ n+2 & \Sq^1\iota_{n+1} \tikzmark{a2} & \tikzmark{b1} \Sq^2\iota_n \\ &&\\ n+3 & \Sq^2\iota_{n+1} & \tikzmark{b2} \Sq^3\iota_n \\ & \Sq^2\Sq^1\iota_{n+1} & \\ &&\\ n+4 & \Sq^3\iota_{n+1} & \Sq^4\iota_n \\ & \Sq^2\Sq^1\iota_{n+1} \tikzmark{a3} & \\ &&\\ n+5 & \Sq^4\iota_{n+1} \tikzmark{a4} & \tikzmark{b3} \Sq^5\iota_n \\ & \Sq^3\Sq^1\iota_{n+1} & \\ &&\\ n+6 & \Sq^5\iota_{n+1} \tikzmark{a5} & \Sq^6\iota_{n+1} \\ & \Sq^4\Sq^1\iota_{n+1} \tikzmark{a6} & \tikzmark{b4} \Sq^4\Sq^2\iota_n \\ &&\\ n+7 & \Sq^6\iota_{n+1} \tikzmark{a7} & \Sq^7\iota_n \\ & \Sq^5\Sq^1\iota_{n+1} & \tikzmark{b5} \Sq^5\Sq^2\iota_n \\ & \Sq4\Sq^2\iota_{n+1} & \\ &&\\ n+8 & \Sq^7\iota_{n+1} \tikzmark{a8} & \Sq^8\iota_n \\ & \Sq^6\Sq^1\iota_{n+1} \tikzmark{a9} & \tikzmark{b6} \Sq^6\Sq^2\iota_n \\ & \Sq^5\Sq^2\iota_{n+1} & \\ & \Sq^4\Sq^2\Sq^1\iota_{n+1} \tikzmark{a10} & \\ &&\\ n+9 & \Sq^8\iota_{n+1} \tikzmark{a11} & \tikzmark{b7} \Sq^9\iota_n \\ & \Sq^7\Sq^1\iota_{n+1} \tikzmark{a12} & \tikzmark{b8} \Sq^7\Sq^2\iota_n \\ & \Sq^6\Sq^2\iota_{n+1} & \tikzmark{b9} \Sq^6\Sq^3\iota_n \\ & \Sq^5\Sq^2\Sq^1\iota_{n+1} & \\ &&\\ n+10 & \Sq^{9}\iota_{n+1} & \Sq^{10}\iota_n \\ & \Sq^8\Sq^1\iota_{n+1} & \tikzmark{b10} \Sq^8\Sq^2\iota_n \\ & \Sq^7\Sq^2\iota_{n+1} & \tikzmark{b11} \Sq^7\Sq^3\iota_n \\ & \Sq^6\Sq^3\iota_{n+1} & \\ & \Sq^6\Sq^2\Sq^1\iota_{n+1} & \\ \bottomrule \end{tabularx} \begin{tikzpicture}[overlay, remember picture, yshift=.1\baselineskip, xshift=.1, shorten >=5pt, shorten <=0pt] \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a1}) -- ({pic cs:b1}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a2}) -- ({pic cs:b2}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a3}) -- ({pic cs:b3}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a4}) -- ({pic cs:b4}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a5}) -- ({pic cs:b5}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a6}) -- ({pic cs:b5}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a7}) -- ({pic cs:b6}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a8}) -- ({pic cs:b7}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a9}) -- ({pic cs:b8}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a10}) -- ({pic cs:b9}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a11}) -- ({pic cs:b10}); \draw [->] ([yshift=0pt, xshift=5pt]{pic cs:a12}) -- ({pic cs:b11}); \end{tikzpicture} \label{default} \end{table} \end{document} 

For now I didn't bother with your TikZ code. On the first sight its looks awful.