如何固定并保留页面中的表格?

如何固定并保留页面中的表格?
\begin{table}[ht]
\centering
%\footnotesize
%\tabcolsep
%\arraycolsep
%\node (table) [inner sep=0pt]{
%\footnotesize
\caption{Potential of nanotechnology applications in petroleum industry}
\renewcommand{\arraystretch}{2}
\begin{tabular}{p{0.7\textwidth}|p{0.2\textwidth}|p{0.2\textwidth}|p{0.2\textwidth}|p{0.2\textwidth}}  
%\textbf{\hline Objective & Area}\\
\hline \bfseries Objective & \bfseries Area \\ 
\hline  Improved success ratio of exploration by improving data gathering, recognizing shallow hazards and avoiding dry holes.& Exploration \\ 
\hline Improved performance and reliability in drilling, tubular goods and rotating parts by improving the strength and endurance of the material pH (4-5\% in dispersion) & Drilling \\ 
\hline  Production assurance in diagnostics, monitoring surveillance and management strategies&Production  \\ 
\hline  Corrosion management for surface and subsurface & Production \\ 
\hline  Corrosion management for surface and subsurface & Facilities \\ 
\hline  Refining and petrochemical technologies& Downstream  \\ 
\hline Enhanced oil and gas recovery through reservoir property modification, gas and water injection modification. & Reservoir \\ 
\hline
\label{potofnan}
\end{tabular}
\end{table}

我无法将该表格包含在 A4 页面上。有人可以帮我解决这个问题吗?

答案1

您的环境设置tabular有点令人困惑:标题定义了五列的格式,但环境主体仅使用两列。

我建议您将 改为tabulartabularx让表格占据文本块的整个宽度,并省略所有垂直线和大部分水平线。并且,通过替换\renewcommand{\arraystretch}{2}\setlength\extrarowheight{1ex}表格最终将占用更少的页面空间,让您更有机会让表格适合目标页面。

在此处输入图片描述

\documentclass[a4paper]{article}
\usepackage{tabularx, % for tabularx environment
            ragged2e, % for \RaggedRight macro
            booktabs, % for \toprule, \midrule, \bottomrule macros
            caption}  % for better spacing below caption
\newcolumntype{Y}{>{\RaggedRight}X}

\begin{document}
\begin{table}[ht]
\setlength\extrarowheight{1ex} % extra vertical whitespace between rows
\caption{Potential of nanotechnology applications in petroleum industry} 
\label{potofnan}
\begin{tabularx}{\textwidth}{ @{} Y l @{} }  
\toprule
Objective & Area \\ 
\midrule
Improved success ratio of exploration by improving data gathering, 
    recognizing shallow hazards and avoiding dry holes & Exploration \\ 
Improved performance and reliability in drilling, tubular goods and 
    rotating parts by improving the strength and endurance of the material 
    pH (4--5\% in dispersion) & Drilling \\ 
Production assurance in diagnostics, monitoring surveillance and management 
    strategies & Production  \\   
Corrosion management for surface and subsurface & Production \\   
Corrosion management for surface and subsurface & Facilities \\   
Refining and petrochemical technologies & Downstream  \\ 
Enhanced oil and gas recovery through reservoir property modification, gas 
    and water injection modification & Reservoir \\ 
\bottomrule
\end{tabularx}
\end{table}
\end{document}

相关内容