4

In order to close the vertical space between this figure and table, I'd like to place the table inside the figure environment. Is that possible?

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[12pt,twoside]{article}

% PACKAGES

\usepackage[a4paper,showframe]{geometry}
\usepackage{graphicx} % Allows pdf, jpg, png, & tif.
\usepackage{fontspec}
\usepackage[no-sscript]{xltxtra}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{Linux Libertine O}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Linux Biolinum O}
\setmonofont[Scale=MatchLowercase]{Linux Libertine Mono O}
\usepackage{fancyhdr} % Fancy Header package.
\usepackage{xcolor}

% PAGE GEOMETRY

\setlength{\columnsep}{8 mm}
\textwidth = 6.8 in
\textheight = 9 in
\oddsidemargin = 0 mm
\evensidemargin = -15 mm

% CHANGE COLOR OF SHOWFRAME (PAGE GUIDES)

\colorlet{showframe}{cyan}
\makeatletter
\let\org@Gm@pageframes\Gm@pageframes
\renewcommand*{\Gm@pageframes}{%
  \begingroup
    \color{showframe}%
    \org@Gm@pageframes
  \endgroup
}
\makeatother

% HEADER / FOOTER

\pagestyle{fancy}
\lhead{\bf AS332 F1/M1/B1 Flight Manual} %
\chead{} %
\rhead{\bf 1 June 2014} %
\lfoot{} %
\cfoot{\thepage} %
\rfoot{} %

% BEGIN

\begin{document} % ==============================================================

% RUNTIME TWEAKS

\renewcommand{\headrulewidth}{0pt} % Removes rule below header.

% FULL PAGE FIGURE:  INSTRUMENT SUBPANEL (F1-1)

\begin{figure}[t]
\begin{center}
\includegraphics[width=0.8\textwidth]{instrument_subpanel_f1-1.png}
\caption{Instrument Subpanel (F1-1)}
\label{fig:instsubf11}
\end{center}
\end{figure}

\begin{table}\small\sf
\begin{center}
\begin{tabular}{rl}
1 & windscreen washing pushbuttons\\
2 & emergency battery monitoring and control panel\\
3 & LH windscreen and LH pitot de-icing control switches and indicator lights\\
4 & aural warning control switches\\
5 & windscreen wiper control switch\\
6 & engine 1 monitoring panel and engine vent switch\\
7 & overspeed test pushbutton and associated lights\\
8 & engine 2 monitoring panel and engine vent switch\\
9 & RH windscreen and RH pitot de-icing control switches and indicator lights\\
10 & power calculator test button
\end{tabular}
\end{center}
\end{table}

\clearpage\newpage

\end{document}

MWE

  • Rather than putting the tabular into a table, you could include it as part of the figure. That way, it won't float away. – Steven B. Segletes Mar 12 '14 at 18:48
  • @Steven: I thought of that, then failed at that, but I will try again. – commonhare Mar 12 '14 at 18:50
  • 1
    Include only the tabular inside the figure underneath your \includegraphics. You don't need a table environment to include a tabular; the tabular can stand on its own. – Werner Mar 12 '14 at 18:52
  • Okay, worked great. Do you think this is a useful exchange for others? – commonhare Mar 12 '14 at 18:52
  • as long as the table doesn't have a separate caption that should go into a list of tables, there should be no problem including it directly in the figure environment. – barbara beeton Mar 12 '14 at 19:05
3

Here's what I describe in my comment.

Other minor changes included \centering instead of the center environment; \sffamily instead of \sf; a small \vspace after the \caption, which can be tuned to suit; and a [p] option to figure rather than [t], since vertically centering the figure seems nicer to me.

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[12pt,twoside]{article}

% PACKAGES

\usepackage[a4paper,showframe]{geometry}
\usepackage[demo]{graphicx} % Allows pdf, jpg, png, & tif.
%\usepackage{fontspec}
%\usepackage[no-sscript]{xltxtra}
%\defaultfontfeatures{Mapping=tex-text}
%\setromanfont[Mapping=tex-text]{Linux Libertine O}
%\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Linux Biolinum O}
%\setmonofont[Scale=MatchLowercase]{Linux Libertine Mono O}
\usepackage{fancyhdr} % Fancy Header package.
\usepackage{xcolor}

% PAGE GEOMETRY

\setlength{\columnsep}{8 mm}
\textwidth = 6.8 in
\textheight = 9 in
\oddsidemargin = 0 mm
\evensidemargin = -15 mm

% CHANGE COLOR OF SHOWFRAME (PAGE GUIDES)

\colorlet{showframe}{cyan}
\makeatletter
\let\org@Gm@pageframes\Gm@pageframes
\renewcommand*{\Gm@pageframes}{%
  \begingroup
    \color{showframe}%
    \org@Gm@pageframes
  \endgroup
}
\makeatother

% HEADER / FOOTER

\pagestyle{fancy}
\lhead{\bf AS332 F1/M1/B1 Flight Manual} %
\chead{} %
\rhead{\bf 1 June 2014} %
\lfoot{} %
\cfoot{\thepage} %
\rfoot{} %

% BEGIN

\begin{document} % ==============================================================

% RUNTIME TWEAKS

\renewcommand{\headrulewidth}{0pt} % Removes rule below header.

% FULL PAGE FIGURE:  INSTRUMENT SUBPANEL (F1-1)

\begin{figure}[p]
\centering
\includegraphics[width=0.8\textwidth]{instrument_subpanel_f1-1.png}
\caption{Instrument Subpanel (F1-1)\label{fig:instsubf11}}
\vspace{1cm}
\small\sffamily
\begin{tabular}{rl}
1 & windscreen washing pushbuttons\\
2 & emergency battery monitoring and control panel\\
3 & LH windscreen and LH pitot de-icing control switches and indicator lights\\
4 & aural warning control switches\\
5 & windscreen wiper control switch\\
6 & engine 1 monitoring panel and engine vent switch\\
7 & overspeed test pushbutton and associated lights\\
8 & engine 2 monitoring panel and engine vent switch\\
9 & RH windscreen and RH pitot de-icing control switches and indicator lights\\
10 & power calculator test button
\end{tabular}
\end{figure}
\clearpage\newpage
\end{document}

enter image description here

3

The separation between floats in a float page is regulated by the length parameter \@fpsep, which has a default value of 10pt plus 2fil; LaTeX has also \@fptop and \@fpbot for the space above and below, which have a default value of 0pt plus 1fil. This means that in a float page the space between the two floats will be twice the white space at top and bottom, plus 10pt.

You can change this behavior by resetting \@fpsep.

Please, note also other recommended changes to your input. The demo option to graphicx is just for this example.

\documentclass[12pt,twoside]{article}

% PACKAGES

\usepackage[demo]{graphicx} % Allows pdf, jpg, png, & tif.
\usepackage[a4paper,showframe]{geometry}
\usepackage{fontspec}
\usepackage{fancyhdr} % Fancy Header package.
\usepackage{xcolor}

\setmainfont[Ligatures=TeX]{Linux Libertine O}
\setsansfont[Scale=MatchLowercase,Ligatures=TeX]{Linux Biolinum O}
\setmonofont[Scale=MatchLowercase]{Linux Libertine Mono O}

% PAGE GEOMETRY

\geometry{
  columnsep=8mm,
  textwidth = 6.8in,
  textheight = 9in,
  headheight=14.5pt,
}

\makeatletter
\setlength\@fpsep{10pt plus 0.5fil}
\makeatother

% CHANGE COLOR OF SHOWFRAME (PAGE GUIDES)

\colorlet{showframe}{cyan}
\makeatletter
\let\org@Gm@pageframes\Gm@pageframes
\renewcommand*{\Gm@pageframes}{%
  \begingroup
    \color{showframe}%
    \org@Gm@pageframes
  \endgroup
}
\makeatother

% HEADER / FOOTER

\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{\bfseries AS332 F1/M1/B1 Flight Manual}
\fancyhead[R]{\bfseries 1 June 2014}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0pt} % Removes rule below header.


\begin{document}

\begin{figure}[p] % just [p
\centering
\includegraphics[width=0.8\textwidth]{instrument_subpanel_f1-1.png}
\caption{Instrument Subpanel (F1-1)}
\label{fig:instsubf11}
\end{figure}

\begin{table}[p]
\centering\small\sffamily
\begin{tabular}{rl}
1 & windscreen washing pushbuttons\\
2 & emergency battery monitoring and control panel\\
3 & LH windscreen and LH pitot de-icing control switches and indicator lights\\
4 & aural warning control switches\\
5 & windscreen wiper control switch\\
6 & engine 1 monitoring panel and engine vent switch\\
7 & overspeed test pushbutton and associated lights\\
8 & engine 2 monitoring panel and engine vent switch\\
9 & RH windscreen and RH pitot de-icing control switches and indicator lights\\
10 & power calculator test button
\end{tabular}
\end{table}

\clearpage

\end{document}

enter image description here

However, if your table is just for explaining the figure, put it in the same figure environment:

\begin{figure}[p] % just [p
\centering
\includegraphics[width=0.8\textwidth]{instrument_subpanel_f1-1.png}
\caption{Instrument Subpanel (F1-1)}
\label{fig:instsubf11}

\bigskip

\small\sffamily
\begin{tabular}{rl}
1 & windscreen washing pushbuttons\\
2 & emergency battery monitoring and control panel\\
3 & LH windscreen and LH pitot de-icing control switches and indicator lights\\
4 & aural warning control switches\\
5 & windscreen wiper control switch\\
6 & engine 1 monitoring panel and engine vent switch\\
7 & overspeed test pushbutton and associated lights\\
8 & engine 2 monitoring panel and engine vent switch\\
9 & RH windscreen and RH pitot de-icing control switches and indicator lights\\
10 & power calculator test button
\end{tabular}
\end{figure}

There is no law that prescribes tabular environment to go in table and \includegraphics in figure. They are just objects to be typeset.

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.