1

I managed to create a landscape table but the problem it doesn't fit in the text width as shown below. Any idea to solve this problem. My code is provided below.

enter image description here

\begin{landscape}
  \begin{table*}[htbp]
  \centering
          \begin{threeparttable}
  \caption{My Results}
    \begin{tabular}{rrrrrrrrrrrr}
    \toprule
    \textbf{FF} & \textbf{} & \textbf{} & \textbf{AA} & \textbf{BB} & \textbf{CC} & \textbf{DD} & \textbf{FF} & \textbf{GG} & \textbf{HH} & \textbf{II} & \textbf{JJJJ} \\
    \midrule
    \textbf{Ccccccccccc} & \multirow{2}[2]{*}{\textbf{aaaaa aaaaa}} & \multirow{2}[2]{*}{\textbf{aa aa aaaaaa}} & \multirow{2}[2]{*}{\textbf{aaa}} & \textbf{aaaa} & \textbf{aa +} & \textbf{aa +} & \multirow{2}[2]{*}{\textbf{aaa}} & \multirow{2}[2]{*}{\textbf{aaaa aaaaa}} & \textbf{aa +} & \textbf{aa +} & \multirow{2}[2]{*}{\textbf{aaa}} \\
    \textbf{aaaaaaaaaa} &       &       &       & \textbf{aaaaa} & \textbf{a-aaaaa} & \textbf{a-aaaaa} &       &       & \textbf{a-aaaaa} & \textbf{a-aaaaa} &  \\
    \midrule
    \textbf{aaaaaaaa} & \textbf{0000} & \textbf{1111} & 22222 & 333333 & 444444 & 5555  & 66666 & 77777 & 88888 & 99999 & 10100 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\\\
    \textbf{aaaaaaaa} & \textbf{0000} & \textbf{1111} & 22222 & 333333 & 444444 & 5555  & 66666 & 77777 & 88888 & 99999 & 10100 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
    \textbf{aaaaaaaa} & \textbf{0000} & \textbf{1111} & 22222 & 333333 & 444444 & 5555  & 66666 & 77777 & 88888 & 99999 & 10100 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
    \textbf{aaaaaaaa} & \textbf{0000} & \textbf{1111} & 22222 & 333333 & 444444 & 5555  & 66666 & 77777 & 88888 & 99999 & 10100 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
    \midrule
    Aaaaaaa &    & \textbf{0000} & \textbf{11} & \multicolumn{1}{c}{\textbf{22}} & \multicolumn{1}{c}{\textbf{33}} & \multicolumn{1}{c}{\textbf{44}} & \multicolumn{1}{c}{\textbf{55}} & \multicolumn{1}{c}{\textbf{66}} & \multicolumn{1}{c}{\textbf{77}} & \multicolumn{1}{c}{\textbf{88}} & \multicolumn{1}{c}{\textbf{99}} \\
    \bottomrule
    \end{tabular}%
  \label{tab:addlabel}%
\end{threeparttable}
\end{table*}
\end{landscape}
  • \tiny or \small or whatever size fits ? – David Carlisle Jul 30 '15 at 13:49
  • yup, I don't mind if the font is decreased a little bit as long as the whole table fits in the page – SMH Jul 30 '15 at 13:50
  • so just use that then, after \begin{table*} – David Carlisle Jul 30 '15 at 13:51
  • What's the paper size, how wide are the margins, and what font and font size you you use? – Mico Jul 30 '15 at 13:53
  • @DavidCarlisle it gave me a fatal error – SMH Jul 30 '15 at 13:56
1

Only with reducing text size a little (\small) and reasonably shrinking space between columns (\renewcommand{\tabcolsep}{4pt}), both changes are relatively unnoticeable.

enter image description here

\documentclass[12pt]{report}
\usepackage{threeparttable,booktabs,multirow,lscape}
\usepackage[letterpaper,margin=1in]{geometry} 
\begin{document}

\renewcommand{\tabcolsep}{4pt}
\begin{landscape}
  \begin{table*}[htbp]
  \centering\small
          \begin{threeparttable}
  \caption{My Results}
    \begin{tabular}{rrrrrrrrrrrr}
    \toprule
    \textbf{FF} & \textbf{} & \textbf{} & \textbf{AA} & \textbf{BB} & \textbf{CC} & \textbf{DD} & \textbf{FF} & \textbf{GG} & \textbf{HH} & \textbf{II} & \textbf{JJJJ} \\
    \midrule
    \textbf{Ccccccccccc} & \multirow{2}[2]{*}{\textbf{aaaaa aaaaa}} & \multirow{2}[2]{*}{\textbf{aa aa aaaaaa}} & \multirow{2}[2]{*}{\textbf{aaa}} & \textbf{aaaa} & \textbf{aa +} & \textbf{aa +} & \multirow{2}[2]{*}{\textbf{aaa}} & \multirow{2}[2]{*}{\textbf{aaaa aaaaa}} & \textbf{aa +} & \textbf{aa +} & \multirow{2}[2]{*}{\textbf{aaa}} \\
    \textbf{aaaaaaaaaa} &       &       &       & \textbf{aaaaa} & \textbf{a-aaaaa} & \textbf{a-aaaaa} &       &       & \textbf{a-aaaaa} & \textbf{a-aaaaa} &  \\
    \midrule
    \textbf{aaaaaaaa} & \textbf{0000} & \textbf{1111} & 22222 & 333333 & 444444 & 5555  & 66666 & 77777 & 88888 & 99999 & 10100 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\\\
    \textbf{aaaaaaaa} & \textbf{0000} & \textbf{1111} & 22222 & 333333 & 444444 & 5555  & 66666 & 77777 & 88888 & 99999 & 10100 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
    \textbf{aaaaaaaa} & \textbf{0000} & \textbf{1111} & 22222 & 333333 & 444444 & 5555  & 66666 & 77777 & 88888 & 99999 & 10100 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
    \textbf{aaaaaaaa} & \textbf{0000} & \textbf{1111} & 22222 & 333333 & 444444 & 5555  & 66666 & 77777 & 88888 & 99999 & 10100 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
          & 000   & \textbf{1111} & 22222 & 33333 & 44444 & 55555  & 66666 & 77777 & 88888 & 99999 & 10.10 \\
    \midrule
    Aaaaaaa &    & \textbf{0000} & \textbf{11} & \multicolumn{1}{c}{\textbf{22}} & \multicolumn{1}{c}{\textbf{33}} & \multicolumn{1}{c}{\textbf{44}} & \multicolumn{1}{c}{\textbf{55}} & \multicolumn{1}{c}{\textbf{66}} & \multicolumn{1}{c}{\textbf{77}} & \multicolumn{1}{c}{\textbf{88}} & \multicolumn{1}{c}{\textbf{99}} \\
    \bottomrule
    \end{tabular}%
  \label{tab:addlabel}%
\end{threeparttable}
\end{table*}
\end{landscape}
\end{document}
  • Thanks for your answer but it gave me this error: !pdfTeX error: miktex-pdftex.exe (file ecrm1095): Font ecrm1095 at 600 not found ==> Fatal error occurred, no output PDF file produced! Could you please help me in that? – SMH Jul 31 '15 at 0:55
  • @SMH Try adding this in preamble: \usepackage{lmodern}. Do you still get the error? Also, do you run the example separately, or you inserted it in a bigger document? – AboAmmar Jul 31 '15 at 8: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.