在页面上容纳非常宽的表格

在页面上容纳非常宽的表格

我正在表格中显示比较。如下面的 LaTeX 代码所示,我在第二列、第二行中指定的信息有点长。当我编译代码时,表格中的信息没有完全显示出来。信息也没有跨行拆分。

我的问题是,如何将第二行第二列的信息完整显示而不丢失它。

\begin{table}[h]
\caption{Performance After Post Filtering} % title name of the table
\centering % centering table
\begin{tabular}{l c c rrrrrrr} % creating 10 columns
\hline\hline % inserting double-line

&InsecureRFComm &RFComm 
\\ [0.5ex]
\hline % inserts single-line
% Entering 1st row
&RFComm Socket &RFComm Socket\\[-1ex]
\raisebox{1.5ex}{BT-Socket Type} 
% Entering 2nd row
&No authenticated link key Socket &Authenticated link key\\[-1ex]
\raisebox{1.5ex}{Communication channel} 
% Entering 3rd row
& &soft & 1 & $-1$ & 1 & 1 & $-1$ & $-1$ & 1 \\[-1ex]
\raisebox{1.5ex}{Remote Device} \\
\raisebox{1.5ex}{For BT-Serial Port} \\
\raisebox{1.5ex}{For Peer-Peer Apps} \\
\raisebox{1.5ex}{Initiating The Outgoing Connection} \\

% [1ex] adds vertical space
\hline % inserts single-line
\end{tabular}
\label{tab:PPer}
\end{table}

答案1

为了响应 OP 提供示例的请求,我首先在这里展示如何将 包装tabular在 中\makebox以提供居中(尽管尺寸过大)的表格。

\documentclass{article}
\usepackage{lipsum}
\begin{document}
\begin{table}[h]
\caption{Performance After Post Filtering} % title name of the table
\centering % centering table
\makebox[\textwidth]{\begin{tabular}{l c c rrrrrrr} % creating 10 columns
\hline\hline % inserting double-line

&InsecureRFComm &RFComm 
\\ [0.5ex]
\hline % inserts single-line
% Entering 1st row
&RFComm Socket &RFComm Socket\\[-1ex]
\raisebox{1.5ex}{BT-Socket Type} 
% Entering 2nd row
&No authenticated link key Socket &Authenticated link key\\[-1ex]
\raisebox{1.5ex}{Communication channel} 
% Entering 3rd row
& &soft & 1 & $-1$ & 1 & 1 & $-1$ & $-1$ & 1 \\[-1ex]
\raisebox{1.5ex}{Remote Device} \\
\raisebox{1.5ex}{For BT-Serial Port} \\
\raisebox{1.5ex}{For Peer-Peer Apps} \\
\raisebox{1.5ex}{Initiating The Outgoing Connection} \\

% [1ex] adds vertical space
\hline % inserts single-line
\end{tabular}}
\label{tab:PPer}
\end{table}
\lipsum[1]
\end{document}

在此处输入图片描述

至于景观替代方案,有以下pdflscape套餐:

\documentclass{article}
\usepackage{lipsum,pdflscape}
\begin{document}
\begin{landscape}
\begin{table}[p]
\caption{Performance After Post Filtering} % title name of the table
\centering % centering table
\makebox[\textwidth]{\begin{tabular}{l c c rrrrrrr} % creating 10 columns
\hline\hline % inserting double-line

&InsecureRFComm &RFComm 
\\ [0.5ex]
\hline % inserts single-line
% Entering 1st row
&RFComm Socket &RFComm Socket\\[-1ex]
\raisebox{1.5ex}{BT-Socket Type} 
% Entering 2nd row
&No authenticated link key Socket &Authenticated link key\\[-1ex]
\raisebox{1.5ex}{Communication channel} 
% Entering 3rd row
& &soft & 1 & $-1$ & 1 & 1 & $-1$ & $-1$ & 1 \\[-1ex]
\raisebox{1.5ex}{Remote Device} \\
\raisebox{1.5ex}{For BT-Serial Port} \\
\raisebox{1.5ex}{For Peer-Peer Apps} \\
\raisebox{1.5ex}{Initiating The Outgoing Connection} \\

% [1ex] adds vertical space
\hline % inserts single-line
\end{tabular}}
\label{tab:PPer}
\end{table}
\end{landscape}
\lipsum[1]
\end{document}

在此处输入图片描述

相关内容