0
\begin{table}
\centering
\begin{center}
\begin{tabular}{p{1.25in}ddd}
\toprule
\multicolumn{1}{C{0.2in}}{Degree} & \multicolumn{1}{C{1.5in}}{$H^*(K(\Z_2,n+1);\Z_2)$} & \multicolumn{1}{C{1.5in}}{$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{tabular}

\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}

\end{center}
\label{default}
\end{table}

enter image description here

I have two questions:

  • How I do make the elements in the two right columns align to the left rather than to the right?
  • The table is too big to fit the page - you can see the page number 29 at the bottom of the table. How could I resize or scale it to fit the page?
2
  • 1
    If you want left alignment, use l, not d which is out of place here. Please, make the example compilable.
    – egreg
    Commented Aug 8, 2016 at 9:00
  • 1
    Off'-topic: Since you're providing the instruction \centering, the center environment isn't needed -- get rid of it.
    – Mico
    Commented Aug 8, 2016 at 9:24

1 Answer 1

4

Like this:

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .