2

I have a table with a lot of data. I want it all on the same page and the only way to do that was to make it into three columns. I was able to do that using the multicol package along with the supertabular package. I have one problem though. On the bottom of the first two columns there is no horizontal line (See first image). I tried the \hline command but it just put a horizontal line above the first line in the next column (see second image) and leaves the bottom of the first two columns the same.

I am open to any ideas even if it means making the table a completely different way. Thanks!

\documentclass[12pt]{article}

\usepackage{amsmath}
\usepackage{supertabular}
\usepackage{multicol}
\usepackage[margin=1in,headheight=15pt]{geometry}

\newcount\n
\n=0
\def\tablebody{}
\makeatletter
\loop\ifnum\n<100
        \advance\n by1
        \protected@edef\tablebody{\tablebody
                \textbf{\number\n.}& shortText
                \tabularnewline
        }
\repeat

\makeatletter
\let\mcnewpage=\newpage
\newcommand{\TrickSupertabularIntoMulticols}{%
  \renewcommand\newpage{%
    \if@firstcolumn
      \hrule width\linewidth height0pt
      \columnbreak
    \else
      \mcnewpage
    \fi
  }%
}
\makeatother

\newcommand{\vgtwokspace}{V$_{\text{G2K}}$ }
\newcommand{\vgtwok}{V$_{\text{G2K}}$}

\begin{document}

\vspace*{8cm} %To place the start of the table at the same spot as my document

\begin{multicols*}{3}
\TrickSupertabularIntoMulticols
\tablehead{\hline\vgtwokspace & $\delta$\vgtwok & $I_{A}$& $\delta I_{A}$\\\hline}

\begin{supertabular}{|c|c|c|c|}
\centering
    1     & 0.006 & 0     & 0.01 \\
    2     & 0.02  & 0     & 0.01 \\
    3     & 0.025 & 0     & 0.01 \\
    4     & 0.03  & 0     & 0.01 \\
    5     & 0.035 & 0     & 0.01 \\
    6     & 0.04  & 0     & 0.01 \\
    7     & 0.045 & 0     & 0.01 \\
    8     & 0.05  & 0     & 0.01 \\
    9     & 0.055 & 0     & 0.01 \\
    10    & 0.06  & 0     & 0.01 \\
    11    & 0.065 & 0     & 0.01 \\
    12    & 0.07  & 0     & 0.01 \\
    13.06 & 0.0753 & 0     & 0.01 \\
    14.04 & 0.0802 & 3     & 0.025 \\
    14.99 & 0.08495 & 9     & 0.055 \\
    15.92 & 0.0896 & 17    & 0.095 \\
    17.06 & 0.0953 & 27    & 0.235 \\
    17.95 & 0.09975 & 36    & 0.28 \\
    19.12 & 0.1056 & 47    & 0.335 \\
    20    & 0.2   & 55    & 0.375 \\
    21    & 0.205 & 62    & 0.41 \\
    22.1  & 0.2105 & 67    & 0.435 \\
    22.8  & 0.214 & 68    & 0.44 \\
    23.9  & 0.2195 & 66    & 0.43 \\
    25.1  & 0.2255 & 62    & 0.41 \\
    25.9  & 0.2295 & 60    & 0.4 \\
    27    & 0.235 & 64    & 0.42 \\
    28    & 0.24  & 77    & 0.485 \\
    29    & 0.245 & 95    & 0.575 \\
    30.1  & 0.2505 & 115   & 0.675 \\
    31    & 0.255 & 129   & 0.745 \\
    32    & 0.26  & 138   & 0.79 \\
    33    & 0.265 & 140   & 0.8 \\
    34    & 0.27  & 133   & 0.765 \\
    35.1  & 0.2755 & 117   & 0.685 \\
    35.9  & 0.2795 & 101   & 0.605 \\
    37.1  & 0.2855 & 77    & 0.485 \\
    38    & 0.29  & 70    & 0.45 \\
    39    & 0.295 & 85    & 0.525 \\
    40    & 0.3   & 120   & 0.7 \\
    41.1  & 0.3055 & 165   & 0.925 \\
    42    & 0.31  & 200   & 2 \\
    43    & 0.315 & 222   & 2.11 \\
    44    & 0.32  & 227   & 2.135 \\
    45    & 0.325 & 214   & 2.07 \\
    46.1  & 0.3305 & 179   & 0.995 \\
    47    & 0.335 & 139   & 0.795 \\
    48    & 0.34  & 99    & 0.595 \\
    49    & 0.345 & 72    & 0.46 \\
    50    & 0.35  & 80    & 0.5 \\
    51    & 0.355 & 129   & 0.745 \\
    52    & 0.36  & 203   & 2.015 \\
    53    & 0.365 & 280   & 2.4 \\
    54    & 0.37  & 333   & 2.665 \\
    55    & 0.375 & 355   & 2.775 \\
    56    & 0.38  & 354   & 2.77 \\
    57    & 0.385 & 322   & 2.61 \\
    58    & 0.39  & 258   & 2.29 \\
    59.1  & 0.3955 & 185   & 1.025 \\
    60    & 0.4   & 124   & 0.72 \\
    61    & 0.405 & 95    & 0.575 \\
    61.9  & 0.4095 & 132   & 0.76 \\
    62.9  & 0.4145 & 244   & 2.22 \\
    64    & 0.42  & 396   & 2.98 \\
    65    & 0.425 & 523   & 3.615 \\\hline
\end{supertabular}
\end{multicols*}

\end{document}

enter image description here

enter image description here

2

Package supertabular beside \tablehead{...} and \tablefirsthead{...}, which contain stuff to be repeated on each new page (or column) also define \tabletail{...} and \tablelasttail{...}.

In your case you just add\tabletail{\hsline} after \tablehead definition in your table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.