3

I am trying to fit a long table within the page margins. I tryied to follow the suggestions provided to other users on the same topic, but nothing seems to work. Any help would be more than appreciated. Here the text I have implemented:

\documentclass[12pt,twoside,a4paper]{book} 
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{subcaption}
\usepackage{amsmath}
\usepackage{epstopdf}
\usepackage{cleveref}
\usepackage[nottoc]{tocbibind}
\usepackage{mathptmx}
\usepackage{longtable}
\usepackage{tabularx}
\usepackage{array, multirow, makecell}
\usepackage{gensymb}
\setcellgapes{1pt}
\makegapedcells
\usepackage[table]{xcolor}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
\usepackage{mathtools}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\usepackage{ltablex}
\usepackage{caption}
\captionsetup{font=small}
\usepackage{setspace}
\onehalfspacing
\usepackage{natbib}
\graphicspath{{./ImmaginiTesi/}}
\DeclareGraphicsExtensions{.pdf,.jpeg,.png,.jpg}
\usepackage{setspace}
\AtBeginDocument{%
 \abovedisplayskip=10pt
 \abovedisplayshortskip=10pt
 \belowdisplayskip=10pt
 \belowdisplayshortskip=10pt
}
\allowdisplaybreaks

\begin{document}

\setlength\LTcapwidth{\textwidth}
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\begin{longtable}{@{\extracolsep{\fill}}*{8}{c}@{}}
\caption{Take-off performances and flight data of an A320-200 for engine-boosted take-off and electromagnetic launch}\\
\hline\hline
\multicolumn{8}{c}{\textbf{Aircraft mission}} \\
\multicolumn{2}{l}{\textbf{Parameter}} & \multicolumn{2}{c}{\textbf{A320 certification}} & \multicolumn{2}{c}{\textbf{EML same MTOW}} & \multicolumn{2}{c}{\textbf{EML same range}}\\
\multicolumn{2}{l}{Maximum Take-Off Weight} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} \\
\multicolumn{2}{l}{Payload} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} \\
\multicolumn{2}{l}{Fuel} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1}\\
\multicolumn{2}{l}{Range} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1}\\
\hline
\multicolumn{8}{c}{\textbf{Take-off performance}} \\
\multicolumn{2}{l}{\textbf{Parameter}} & \multicolumn{2}{c}{\textbf{Engine Take-off}} & \multicolumn{2}{c}{\textbf{EML take-off}} & & \\
\multicolumn{2}{l}{Climb out gradient} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
\multicolumn{2}{l}{Maximum lift coefficient} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
\multicolumn{2}{l}{Aerodynamic efficiency} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
\multicolumn{2}{l}{Flap deflection} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
\multicolumn{2}{l}{Stall Speed} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
\multicolumn{2}{l}{Rotation speed} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
\multicolumn{2}{l}{Lift-off speed} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
\multicolumn{2}{l}{Safety Screen Speed} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
\multicolumn{2}{l}{Take-off run time} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
\multicolumn{2}{l}{Take-off airborne time} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
\multicolumn{2}{l}{Take-off run distance} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
\multicolumn{2}{l}{Take-off airborne distance} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
\multicolumn{2}{l}{Take-off distance} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
\multicolumn{2}{l}{Balanced field length} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
\multicolumn{2}{l}{Take-off field length} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
\hline
\multicolumn{8}{c}{\textbf{Take-off history of conventional A320}} \\
\textbf{Parameter} & \textbf{Altitude} & \textbf{Weight} & \textbf{Fuel} & \textbf{Mach} & \textbf{Speed} & \textbf{Fuel flow} & \textbf{Thrust} \\
\multicolumn{1}{l}{Starting Condition} & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\multicolumn{1}{l}{Full Throttle to LOF} & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\multicolumn{1}{l}{Safety Screen} & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\multicolumn{1}{l}{Climb out phase} & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\hline
\multicolumn{8}{c}{\textbf{Take-off history with EML}} \\
\textbf{Parameter} & \textbf{Altitude} & \textbf{Weight} & \textbf{Fuel} & \textbf{Mach} & \textbf{Speed} & \textbf{Fuel flow} & \textbf{Thrust} \\
\multicolumn{1}{l}{Starting Condition} & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\multicolumn{1}{l}{Idle} & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\multicolumn{1}{l}{Full throttle} to LOF & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\multicolumn{1}{l}{Safety Screen} & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\multicolumn{1}{l}{Climb out phase} & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\hline
\multicolumn{8}{c}{\textbf{Flight Profile of conventional A320}} \\
\multicolumn{1}{l}{\textbf{Parameter}} & \textbf{Fuel} & \textbf{Time} & \textbf{Mass} & \textbf{Distance} \\
\multicolumn{1}{l}{Taxi out} & 1 & 1 & 1 & 1 & & & \\
\multicolumn{1}{l}{Take-off} & 1 & 1 & 1 & 1 & & & \\
\multicolumn{1}{l}{Climb} & 1 & 1 & 1 & 1 & & & \\
\multicolumn{1}{l}{Cruise} & 1 & 1 & 1 & 1 & & & \\
\multicolumn{1}{l}{Descent} & 1 & 1 & 1 & 1 & & & \\
\multicolumn{1}{l}{Landing} & 1 & 1 & 1 & 1 & & & \\
\multicolumn{1}{l}{Taxi-in} & 1 & 1 & 1 & 1 & & & \\
\hline
\multicolumn{8}{c}{\textbf{Flight Profile with EML}} \\
\multicolumn{1}{l}{\textbf{Parameter}} & \textbf{Fuel} & \textbf{Time} & \textbf{Mass} & \textbf{Distance} \\
\multicolumn{1}{l}{Taxi out} & 1 & 1 & 1 & 1 & & & \\
\multicolumn{1}{l}{Take-off} & 1 & 1 & 1 & 1 & & & \\
\multicolumn{1}{l}{Climb} & 1 & 1 & 1 & 1 & & & \\
\multicolumn{1}{l}{Cruise} & 1 & 1 & 1 & 1 & & & \\
\multicolumn{1}{l}{Descent} & 1 & 1 & 1 & 1 & & & \\
\multicolumn{1}{l}{Landing} & 1 & 1 & 1 & 1 & & & \\
\multicolumn{1}{l}{Taxi-in} & 1 & 1 & 1 & 1 & & & \\
\hline\hline
\label{table:Friction}
\end{longtable}

\end{document}
3
  • Welcome! Why do you use \multicolumn for almost every cell?
    – cfr
    May 2, 2016 at 22:10
  • 2
    all your cells are l or c so as in a normal tabular there is no line breaking and each column is as wide as the widest entry. If that is wider than the page latex is prevented from doing anything about it. May 2, 2016 at 22:16
  • Just a comment aside: needless to load amsmath if you load mathtools. Similarly, ltablex loads both longtable and tabularx.
    – Bernard
    May 3, 2016 at 0:06

1 Answer 1

2

This solution uses geometry to get more sensible page margins, booktabs for nicer rules, makecell to rotate some headers and ensure consistent formatting.

As it is, I think the information could be presented much more usefully and concisely. Perhaps not all figures are 1 in your real data, but that is likely to affect the layout of the table, too, unless they are all (thin) integers. You should want to use siunitx in that case. See the manual for details.

Personally, I think this does not lend itself to being a single table. It really doesn't make sense and it would be better, I think, to split the table into its distinct tables. If you split the table into 4, you could combine tables 5 & 6 and 7 & 8, which share common column headings.

Here, for whatever it is worth, is an all-in-one solution. Like most one-size-fits-all solutions, it is really a one-size-fits-none-very-well answer.

\documentclass[12pt,twoside,a4paper]{book}
\usepackage{mathptmx}
\usepackage{mathtools}
\usepackage{geometry}
\usepackage{array,rotating,makecell,booktabs,longtable}
\usepackage{caption}
\captionsetup{font=small}
\usepackage{setspace}
\onehalfspacing
\setcellgapes{1pt}
\makegapedcells
\AtBeginDocument{%
 \abovedisplayskip=10pt
 \abovedisplayshortskip=10pt
 \belowdisplayskip=10pt
 \belowdisplayshortskip=10pt
}
\allowdisplaybreaks
\begin{document}
\setlength\LTcapwidth{\textwidth}
\renewcommand\theadfont{\bfseries}
\renewcommand\theadgape{}
\settowidth\rotheadsize{\theadfont Fuel Flow}
\renewcommand\theadalign{cb}
\renewcommand\rotheadgape{}
\begin{longtable}{l*{7}{c}}
  \caption{Take-off performances and flight data of an A320-200 for engine-boosted take-off and electromagnetic launch}\\
  \toprule
  \endfirsthead
  \toprule
  \endhead
  \bottomrule
  \endfoot
  \multicolumn{8}{c}{\thead{Aircraft mission}} \\
  \multicolumn{2}{l}{\multirowthead{2}[][l]{Parameter}} & \multicolumn{2}{c}{\multirowthead{2}{A320\\certification}} & \multicolumn{2}{c}{\multirowthead{2}{EML\\same MTOW}} & \multicolumn{2}{c}{\multirowthead{2}{EML\\same range}}\\
  \midrule
  \multicolumn{2}{l}{Maximum Take-Off Weight} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} \\
  \multicolumn{2}{l}{Payload} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} \\
  \multicolumn{2}{l}{Fuel} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1}\\
  \multicolumn{2}{l}{Range} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1}\\
  \midrule
  \multicolumn{8}{c}{\thead{Take-off performance}} \\
  \multicolumn{2}{l}{\theadfont Parameter} & \multicolumn{2}{c}{\thead{Engine Take-off}} & \multicolumn{2}{c}{\thead{EML take-off}} & & \\
  \midrule
  \multicolumn{2}{l}{Climb out gradient} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
  \multicolumn{2}{l}{Maximum lift coefficient} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
  \multicolumn{2}{l}{Aerodynamic efficiency} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
  \multicolumn{2}{l}{Flap deflection} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
  \multicolumn{2}{l}{Stall Speed} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
  \multicolumn{2}{l}{Rotation speed} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
  \multicolumn{2}{l}{Lift-off speed} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
  \multicolumn{2}{l}{Safety Screen Speed} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
  \multicolumn{2}{l}{Take-off run time} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
  \multicolumn{2}{l}{Take-off airborne time} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
  \multicolumn{2}{l}{Take-off run distance} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
  \multicolumn{2}{l}{Take-off airborne distance} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
  \multicolumn{2}{l}{Take-off distance} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
  \multicolumn{2}{l}{Balanced field length} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
  \multicolumn{2}{l}{Take-off field length} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{1} & & \\
  \pagebreak
  \multicolumn{8}{c}{\thead{Take-off history of conventional A320}} \\
  \theadfont Parameter & \rothead{Altitude} & \rothead{Weight} & \rothead{Fuel} & \rothead{Mach} & \rothead{Speed} & \rothead{Fuel flow} & \rothead{Thrust} \\
  \midrule
  Starting Condition & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  Full Throttle to LOF & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  Safety Screen & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  Climb out phase & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  \midrule
  \multicolumn{8}{c}{\thead{Take-off history with EML}} \\
  \theadfont Parameter & \rothead{Altitude} & \rothead{Weight} & \rothead{Fuel} & \rothead{Mach} & \rothead{Speed} & \rothead{Fuel flow} & \rothead{Thrust} \\
  \midrule
  Starting Condition & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  Idle & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  Full throttle to LOF & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  Safety Screen & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  Climb out phase & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  \midrule
  \multicolumn{8}{c}{\thead{Flight Profile of conventional A320}} \\
  \theadfont Parameter & \rothead{Fuel} & \rothead{Time} & \rothead{Mass} & \rothead{Distance} \\
  \midrule
  Taxi out & 1 & 1 & 1 & 1 & & & \\
  Take-off & 1 & 1 & 1 & 1 & & & \\
  Climb & 1 & 1 & 1 & 1 & & & \\
  Cruise & 1 & 1 & 1 & 1 & & & \\
  Descent & 1 & 1 & 1 & 1 & & & \\
  Landing & 1 & 1 & 1 & 1 & & & \\
  Taxi-in & 1 & 1 & 1 & 1 & & & \\
  \multicolumn{8}{c}{\thead{Flight Profile with EML}} \\
  \theadfont Parameter & \rothead{Fuel} & \rothead{Time} & \rothead{Mass} & \rothead{Distance} \\
  \midrule
  Taxi out & 1 & 1 & 1 & 1 & & & \\
  Take-off & 1 & 1 & 1 & 1 & & & \\
  Climb & 1 & 1 & 1 & 1 & & & \\
  Cruise & 1 & 1 & 1 & 1 & & & \\
  Descent & 1 & 1 & 1 & 1 & & & \\
  Landing & 1 & 1 & 1 & 1 & & & \\
  Taxi-in & 1 & 1 & 1 & 1 & & &
  \label{table:Friction}
\end{longtable}
\end{document}

one-size-fits-none-very-well

EDIT

Here's what it might look like splitting up the table. (longtable isn't really needed here, of course, but I kept it for the proof-of-concept.) This is actually more concise - the tables fit on 2 pages rather than 3. (I only showed the first 2 above, but the final part of the table is on a third page there.)

If you wanted, you could use tabularx to keep all tables at a standard width, though I think that has downsides in terms of the sparseness of some tables in comparison with others.

different-sizes-for-different-data

\documentclass[12pt,twoside,a4paper]{book}
\usepackage{mathptmx}
\usepackage{mathtools}
\usepackage{geometry}
\usepackage{array,rotating,makecell,booktabs,longtable}
\usepackage{caption}
\captionsetup{font=small}
\usepackage{setspace}
\onehalfspacing
\setcellgapes{1pt}
\makegapedcells
\AtBeginDocument{%
 \abovedisplayskip=10pt
 \abovedisplayshortskip=10pt
 \belowdisplayskip=10pt
 \belowdisplayshortskip=10pt
}
\allowdisplaybreaks
\begin{document}
\setlength\LTcapwidth{\textwidth}
\renewcommand\theadfont{\bfseries}
\renewcommand\theadgape{}
\settowidth\rotheadsize{\theadfont Fuel Flow}
\renewcommand\theadalign{cb}
\renewcommand\rotheadgape{}
\begin{longtable}{l*{3}{c}}
  \caption{Take-off performances and flight data of an A320-200 for engine-boosted take-off and electromagnetic launch}\\
  \multicolumn{4}{l}{\theadfont Aircraft mission} \\
  \toprule
  \endfirsthead
  \toprule
  \endhead
  \bottomrule
  \endfoot
   & \multicolumn{1}{c}{\multirowthead{2}{A320\\certification}} & \multicolumn{1}{c}{\multirowthead{2}{EML\\same MTOW}} & \multicolumn{1}{c}{\multirowthead{2}{EML\\same range}}\\
  \midrule
  Maximum Take-Off Weight & 1 & 1 & 1 \\
  Payload & 1 & 1 & 1 \\
  Fuel & 1 & 1 & 1\\
  Range & 1 & 1 & 1
  \label{table:Friction}
\end{longtable}
\begin{longtable}{l*{2}{c}}
  \multicolumn{3}{l}{\theadfont Take-off performance} \\
  \toprule
  \endhead
  \bottomrule
  \endfoot
   & \thead{Engine Take-off} & \thead{EML take-off}  \\
  \midrule
  Climb out gradient & 1 & 1  \\
  Maximum lift coefficient & 1 & 1  \\
  Aerodynamic efficiency & 1 & 1  \\
  Flap deflection & 1 & 1  \\
  Stall Speed & 1 & 1  \\
  Rotation speed & 1 & 1  \\
  Lift-off speed & 1 & 1  \\
  Safety Screen Speed & 1 & 1  \\
  Take-off run time & 1 & 1  \\
  Take-off airborne time & 1 & 1  \\
  Take-off run distance & 1 & 1  \\
  Take-off airborne distance & 1 & 1  \\
  Take-off distance & 1 & 1  \\
  Balanced field length & 1 & 1  \\
  Take-off field length & 1 & 1
\end{longtable}
\begin{longtable}{l*{7}{c}}
  \multicolumn{8}{l}{\theadfont Take-off history} \\
  \toprule
   & \rothead{Altitude} & \rothead{Weight} & \rothead{Fuel} & \rothead{Mach} & \rothead{Speed} & \rothead{Fuel flow} & \rothead{Thrust} \\
  \midrule
  \endhead
  \bottomrule
  \endfoot
  \multicolumn{8}{l}{\theadfont Conventional A320} \\
  Starting Condition & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  Full Throttle to LOF & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  Safety Screen & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  Climb out phase & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  \multicolumn{8}{l}{\theadfont With EML} \\
  Starting Condition & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  Idle & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  Full throttle to LOF & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  Safety Screen & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
  Climb out phase & 1 & 1 & 1 & 1 & 1 & 1 & 1 
\end{longtable}
\settowidth\rotheadsize{\theadfont Distance}
\begin{longtable}{l*{4}{c}l*{4}{c}}
  \multicolumn{10}{l}{\theadfont Flight Profile} \\
  \toprule
   & \rothead{Fuel} & \rothead{Time} & \rothead{Mass} & \rothead{Distance}  && \rothead{Fuel} & \rothead{Time} & \rothead{Mass} & \rothead{Distance} \\
  \midrule
  \endhead
  \bottomrule
  \endfoot
  \multicolumn{5}{l}{\theadfont Conventional A320} &  \multicolumn{5}{l}{\theadfont With EML} \\
  Taxi out & 1 & 1 & 1 & 1 & Taxi out & 1 & 1 & 1 & 1  \\
  Take-off & 1 & 1 & 1 & 1 & Take-off & 1 & 1 & 1 & 1  \\
  Climb & 1 & 1 & 1 & 1 & Climb & 1 & 1 & 1 & 1  \\
  Cruise & 1 & 1 & 1 & 1 & Cruise & 1 & 1 & 1 & 1  \\
  Descent & 1 & 1 & 1 & 1 & Descent & 1 & 1 & 1 & 1  \\
  Landing & 1 & 1 & 1 & 1 & Landing & 1 & 1 & 1 & 1  \\
  Taxi-in & 1 & 1 & 1 & 1 & Taxi-in & 1 & 1 & 1 & 1
\end{longtable}
\end{document}

You must log in to answer this question.

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