1

I am new to LaTeX and I've been learning a lot in the last 4 months. Unfortunately I have recently encounter a problem with a large table, that I am trying to fit within a page, and I can't find a solution. It really starts to get frustrating.

The problem is that the table does not fit in the space between the bottom of the title and the bottom of the page.

Even reducing the table size, does not fit in the first page.

It only works if I remove \sidewaystable and only use \adjustbox with rotation to 90, but then the caption does not appear anymore. I included the earlier code commented.

Can someone help me out please.

I would really appreciate your help.

Thank you.

\newpage

\section{Quadro Resumo dos Meios Aéreos Usados no ANPC}
    \begin{sidewaystable}
    \caption{ANPC Meios Aéreos}
    \label{tab:anpcmeiosaereos}
    \begin{adjustbox}{max totalheight = \textwidth, max width = .55\textheight,keepaspectratio,rotate=0,center}
    % \begin{adjustbox}{width=\textheight,totalheight=240pt,keepaspectratio,rotate=90,center}
    \begin{tabular}{|m{2.5cm}|c|c|c|c|c|c|c|c|c|}
    \hline
    \textbf{Modelo} &   AS 350 Ecureil  &   Bell 205    &   Bell 212    &   Kamov Ka-32 &   Dromader    &   Airtractor 802F &   Airtractor Fireboss &   Canadair 215    &   Canadair 415 \\ 
    \hline
    \textbf{Tipo}   &   Helicóptero Ligeiro &   Helicóptero Médio   &   Helicóptero Médio   &   Helicóptero Pesado  &   Avião Ligeiro   &   Avião Médio &   Avião Médio &   Avião Pesado    &   Avião Pesado \\ 
    \hline
    \textbf{Velocidade Cruzeiro}    &   225 km/h    &   180 km/h    &   195 km/h    &   185 km/h    &   237 km/h    &   240 km/h    &   230 km/h    &   240 km/h    &   333 km/h     \\ 
    \hline
    \textbf{Velocidade Operação}    & \multicolumn{4}{c|}{108 km/h} & 180 km/h  &   \multicolumn{4}{c|}{215 km/h}   \\ 
    \hline
    T\textbf{empo Útil de Operação}               & \multicolumn{3}{c|}{1h30m}                                        & 1h40m              & 1h30m         & 2h00m           & 3h30m               & 3h00m        & 4h00m        \\ 
    \hline
    \textbf{Cap. Água}                            & 900 l               & \multicolumn{2}{c|}{1200 l}                 & 4000 l             & 2200 l        & 3300 l          & 3100 l              & 5350 l       & 6140 l       \\ 
    \hline
    \textbf{Tripulação}                           & 1 piloto / 5 pax    & \multicolumn{2}{c|}{1 ou 2 pilotos / 9 pax} & 2 pilotos / 9 pax  & \multicolumn{3}{c|}{1 piloto}                         & 2 pilotos    & 2 pilotos    \\ 
    \hline
    \textbf{Tempo Descolagem}                     & 10 min              & \multicolumn{2}{c|}{15 min}                 & 25 min             & 10 min        & 15 min          & 15 min              & 30 min       & N.A.         \\ 
    \hline
    \textbf{Tempo Médio de Abastecimento de Água} & \multicolumn{3}{c|}{40 seg}                                       & 30 seg             & \multicolumn{2}{c|}{10 min}     & 15 seg              & 10 seg       & 12 seg       \\ 
    \hline
    \textbf{Tempo de Reabastecimento Combustível} & \multicolumn{7}{c|}{30 min}                                                                                                                    & 60 min       & N.A.         \\ 
    \hline
    \textbf{Compri. Pista}                        & \multicolumn{4}{c|}{N.A.}                                                              & 475 m         & 750 m           & 800 m               & \multicolumn{2}{c|}{1200 m} \\ 
    \hline
    \end{tabular}
    \end{adjustbox}
    \end{sidewaystable}

First image.

Description.

3
  • Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – Fran
    Commented May 18, 2017 at 4:44
  • You should not use adjustbox for table, as it often makes a table unreadable. The sidewaystable environment creates a newpage, so it can't do what you want. Try with the landscape environment, from the lscape package.
    – Bernard
    Commented May 18, 2017 at 8:46
  • @Fran The document class is a custom one. It is part of a template that is given by the University.
    – Focha
    Commented May 18, 2017 at 14:44

1 Answer 1

0

This solution uses adjustbox to rotate the tabular as well as shrink it.

The hard part was getting the caption above (rotated) rather then beside the tabular. First I measured the width of the tabular (using lrbox) then created a minipage for the caption (captions like being inside minipages).

\documentclass{article}
\usepackage{adjustbox}
\usepackage{caption}
\usepackage{array}

\newsavebox{\tempbox}

\begin{document}

\section{Quadro Resumo dos Meios Aéreos Usados no ANPC}

    \begin{lrbox}{\tempbox}% measure width of tabular
    \begin{tabular}{|m{2.5cm}|c|c|c|c|c|c|c|c|c|}
    \hline
    \textbf{Modelo} &   AS 350 Ecureil  &   Bell 205    &   Bell 212    &   Kamov Ka-32 &   Dromader    &   Airtractor 802F &   Airtractor Fireboss &   Canadair 215    &   Canadair 415 \\ 
    \hline
    \textbf{Tipo}   &   Helicóptero Ligeiro &   Helicóptero Médio   &   Helicóptero Médio   &   Helicóptero Pesado  &   Avião Ligeiro   &   Avião Médio &   Avião Médio &   Avião Pesado    &   Avião Pesado \\ 
    \hline
    \textbf{Velocidade Cruzeiro}    &   225 km/h    &   180 km/h    &   195 km/h    &   185 km/h    &   237 km/h    &   240 km/h    &   230 km/h    &   240 km/h    &   333 km/h     \\ 
    \hline
    \textbf{Velocidade Operação}    & \multicolumn{4}{c|}{108 km/h} & 180 km/h  &   \multicolumn{4}{c|}{215 km/h}   \\ 
    \hline
    T\textbf{empo Útil de Operação}               & \multicolumn{3}{c|}{1h30m}                                        & 1h40m              & 1h30m         & 2h00m           & 3h30m               & 3h00m        & 4h00m        \\ 
    \hline
    \textbf{Cap. Água}                            & 900 l               & \multicolumn{2}{c|}{1200 l}                 & 4000 l             & 2200 l        & 3300 l          & 3100 l              & 5350 l       & 6140 l       \\ 
    \hline
    \textbf{Tripulação}                           & 1 piloto / 5 pax    & \multicolumn{2}{c|}{1 ou 2 pilotos / 9 pax} & 2 pilotos / 9 pax  & \multicolumn{3}{c|}{1 piloto}                         & 2 pilotos    & 2 pilotos    \\ 
    \hline
    \textbf{Tempo Descolagem}                     & 10 min              & \multicolumn{2}{c|}{15 min}                 & 25 min             & 10 min        & 15 min          & 15 min              & 30 min       & N.A.         \\ 
    \hline
    \textbf{Tempo Médio de Abastecimento de Água} & \multicolumn{3}{c|}{40 seg}                                       & 30 seg             & \multicolumn{2}{c|}{10 min}     & 15 seg              & 10 seg       & 12 seg       \\ 
    \hline
    \textbf{Tempo de Reabastecimento Combustível} & \multicolumn{7}{c|}{30 min}                                                                                                                    & 60 min       & N.A.         \\ 
    \hline
    \textbf{Compri. Pista}                        & \multicolumn{4}{c|}{N.A.}                                                              & 475 m         & 750 m           & 800 m               & \multicolumn{2}{c|}{1200 m} \\ 
    \hline
    \end{tabular}
    \end{lrbox}

    \begin{adjustbox}{max totalheight = \textwidth, max width = .9\textheight,keepaspectratio,rotate=90,center}
    \begin{minipage}{\wd\tempbox}
    \captionof{table}{ANPC Meios Aéreos}
    \label{tab:anpcmeiosaereos}
    \usebox{\tempbox}
    \end{minipage}
    \end{adjustbox}

\end{document}

Just for fun I reformatted it as two tabulars and shrunk it by changing the font size and the separation between columns.

\documentclass{article}
\usepackage{adjustbox}
\usepackage{caption}
\usepackage{array}
\usepackage{showframe}% debugging tool

\newcolumntype{M}{>{\raggedright\bfseries}m{2.5cm}<{}}

\begin{document}

\section{Quadro Resumo dos Meios Aéreos Usados no ANPC}

    \begin{minipage}{\textwidth}
    \tiny
    \tabcolsep=.4em
    \def\arraystretch{1.2}%
    \begin{tabular}{|M|c|c|c|c|c|}
    \hline
    Modelo &   AS 350 Ecureil  &   Bell 205    &   Bell 212    &   Kamov Ka-32 &   Dromader  \\ 
    \hline
    Tipo  &   Helicóptero Ligeiro &   Helicóptero Médio   &   Helicóptero Médio   &   Helicóptero Pesado \\ 
    \hline
    Velocidade Cruzeiro    &   225 km/h    &   180 km/h    &   195 km/h    &   185 km/h    &   237 km/h  \\ 
    \hline
    Velocidade Operação    & \multicolumn{4}{c|}{108 km/h} & 180 km/h   \\ 
    \hline
    Tempo Útil de Operação               & \multicolumn{3}{c|}{1h30m}                                        & 1h40m              & 1h30m    \\ 
    \hline
    Cap. Água                            & 900 l               & \multicolumn{2}{c|}{1200 l}                 & 4000 l             & 2200 l    \\ 
    \hline
    Tripulação                           & 1 piloto / 5 pax    & \multicolumn{2}{c|}{1 ou 2 pilotos / 9 pax} & 2 pilotos / 9 pax  & 1 piloto  \\ 
    \hline
    Tempo Descolagem                     & 10 min              & \multicolumn{2}{c|}{15 min}                 & 25 min             & 10 min  \\ 
    \hline
    Tempo Médio de Abastecimento de Água & \multicolumn{3}{c|}{40 seg}                                       & 30 seg             & 10 min  \\ 
    \hline
    Tempo de Reabastecimento Combustível & \multicolumn{5}{c|}{30 min} \\ 
    \hline
    Compri. Pista                        & \multicolumn{4}{c|}{N.A.}                                                              & 475 m  \\ 
    \hline
    \end{tabular}

    \medskip
    \begin{tabular}{|M|c|c|c|c|}
    \hline
    Modelo &   Airtractor 802F &   Airtractor Fireboss &   Canadair 215    &   Canadair 415 \\ 
    \hline
    Tipo   &   Avião Ligeiro   &   Avião Médio         &   Avião Médio     &   Avião Pesado  \\ 
    \hline
    Velocidade Cruzeiro    &   240 km/h    &   230 km/h    &   240 km/h    &   333 km/h     \\ 
    \hline
    Velocidade Operação    &   \multicolumn{4}{c|}{215 km/h}   \\ 
    \hline
    Tempo Útil de Operação               & 2h00m           & 3h30m               & 3h00m        & 4h00m        \\ 
    \hline
    Cap. Água                            & 3300 l          & 3100 l              & 5350 l       & 6140 l       \\ 
    \hline
    Tripulação                           & \multicolumn{2}{c|}{1 piloto}                         & 2 pilotos    & 2 pilotos    \\ 
    \hline
    Tempo Descolagem                     & 15 min          & 15 min              & 30 min       & N.A.         \\ 
    \hline
    Tempo Médio de Abastecimento de Água & 10 min    & 15 seg              & 10 seg       & 12 seg       \\ 
    \hline
    Tempo de Reabastecimento Combustível & \multicolumn{2}{c|}{30 min}     & 60 min       & N.A.         \\ 
    \hline
    Compri. Pista                        & 750 m           & 800 m               & \multicolumn{2}{c|}{1200 m} \\ 
    \hline
    \end{tabular}
    \captionof{table}{ANPC Meios Aéreos}
    \label{tab:anpcmeiosaereos}
    \end{minipage}
\end{document}
1
  • This definitely worked. I don't fully understand what you did, but I'll try to find some documentation on it. Thank you a lot. @John Kormylo
    – Focha
    Commented May 18, 2017 at 14:50

You must log in to answer this question.

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