在图形环境中包含表格

在图形环境中包含表格

为了缩小图形和表格之间的垂直空间,我想将表格放在图形环境内。可以吗?

%!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}

平均能量损失

答案1

以下是我在评论中描述的内容。

其他细微的变化包括\centering而不是center环境;\sffamily而不是;后面的\sf小部分,可以进行调整以适应; 以及一个而不是 的选项,因为对我来说,垂直居中图形似乎更好。\vspace\caption[p]figure[t]

%!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}

在此处输入图片描述

答案2

浮动页中浮动元素之间的间距由长度参数 控制\@fpsep,默认值为10pt plus 2fil;LaTeX 还为上下间距设置了\@fptop和,默认值为。这意味着在浮动页中,两个浮动元素之间的间距将是顶部和底部空白的两倍,再加上 10pt。\@fpbot0pt plus 1fil

您可以通过重置来更改此行为\@fpsep

请注意,还建议对您的输入进行其他更改。选项demographicx适用于此示例。

\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}

在此处输入图片描述

但是,如果您的表格只是为了解释图形,请将其放在相同的figure环境中:

\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}

并没有什么法则规定tabular要进入什么环境table\includegraphics它们figure只是要排版的对象而已。

相关内容