1

Problems:

  • Increasing table width to 100%
  • Centering table header word (i.e. criteria)
  • Repeating table captions on every page

Questions:

  1. How do I increase table width to 100%?
  2. How do I center the word criteria so it falls exactly in the center of the letters A to L?
  3. Is it possible to make so captions are printed out below the table for each page?

Minimal Working Example (MWE):

\documentclass[12pt]{article}

\usepackage{multirow}
\usepackage{longtable}
\usepackage{tabularx}
\usepackage{ctable}
\usepackage{hyphenat}
\usepackage{xfrac}

\begin{document}

\setlength\extrarowheight{4pt}

\begin{longtable}{cccccccccccccc}
\caption{Table caption here}\label{chap1:tab1}

\endfirsthead
\multicolumn{14}{c}{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\
\multicolumn{14}{c}{}\\
\hline
\endhead
\hline \multicolumn{14}{r}{\textit{Continued on next page}} \\
\endfoot
\hline
\endlastfoot

\toprule
   \multicolumn{12}{c}{\textbf{Criteria}} \\
\midrule
   \textbf{Solutions} & A & B & C & D & E & F & G & H & I & J & K & L \\
\midrule
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
\end{longtable}

\begin{tabularx}{\linewidth}{*{3}X}
    \fontsize{8}{11}\selectfont 
    \textbf{A:} Caption 1\newline 
    \textbf{B:} Caption 2\newline 
    \textbf{C:} Caption 3\newline 
    \textbf{D:} Caption 4\newline 
    \textbf{E:} Caption 5 & 
    \fontsize{8}{11}\selectfont 
    \textbf{F:} Caption 6\newline 
    \textbf{G:} Caption 7\newline 
    \textbf{H:} Caption 8\newline 
    \textbf{I:} Caption 9 & 
    \fontsize{8}{11}\selectfont 
    \textbf{J:} Caption 10\newline 
    \textbf{K:} Caption 11\newline 
    \textbf{L:} Caption 12\\
\end{tabularx}

\end{document}
1

I have solved 1 and 2. For 3, I am confused and think that that won't be a nice idea. However, you may add custom text along side continued on next page.

\documentclass[12pt]{article}
\usepackage{tabularx,longtable,booktabs}
%\usepackage{ctable}       %% don't use this



\begin{document}

\setlength\extrarowheight{4pt}

\begin{longtable}{@{\extracolsep{\fill}}ccccccccccccc}
\caption{Table caption here}\label{chap1:tab1}
\endfirsthead
\multicolumn{13}{c}{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\
\hline
\endhead
\hline \multicolumn{13}{r}{\textit{Continued on next page}} \\
\endfoot
\hline
\endlastfoot

\toprule
 &  \multicolumn{12}{c}{\textbf{Criteria}} \\
\midrule
   \textbf{Solutions} & A & B & C & D & E & F & G & H & I & J & K & L \\
\midrule
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
%------------------------------------------------------------------------------------
Testing & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$ & $\bullet$
%------------------------------------------------------------------------------------
\\
\end{longtable}
\begin{tabularx}{\linewidth}{*{3}X}
    \fontsize{8}{11}\selectfont
    \textbf{A:} Caption 1\newline
    \textbf{B:} Caption 2\newline
    \textbf{C:} Caption 3\newline
    \textbf{D:} Caption 4\newline
    \textbf{E:} Caption 5 &
    \fontsize{8}{11}\selectfont
    \textbf{F:} Caption 6\newline
    \textbf{G:} Caption 7\newline
    \textbf{H:} Caption 8\newline
    \textbf{I:} Caption 9 &
    \fontsize{8}{11}\selectfont
    \textbf{J:} Caption 10\newline
    \textbf{K:} Caption 11\newline
    \textbf{L:} Caption 12\\
\end{tabularx}

\end{document}

enter image description here

  • You are right, it wouldn't look good at all. Thank you for your time, highly appreciated! – kexxcream Apr 7 '15 at 13:20

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.