![调整表格宽度为列宽](https://linux22.com/image/305851/%E8%B0%83%E6%95%B4%E8%A1%A8%E6%A0%BC%E5%AE%BD%E5%BA%A6%E4%B8%BA%E5%88%97%E5%AE%BD.png)
我正在尝试使表格更宽,我已经制作了一个带有文本宽度的调整框,但什么也没发生......有人可以帮帮我吗?
我的代码:
\begin{table}[htbp]
\centering
\caption{Three different Noise Levels}
\begin{adjustbox}{max width=\textwidth}
\begin{tabular}{ccc}
\hline
\textbf{V output}\textbf{} & & \textbf{SNR Level} \\
\hline
From & To & \\
\hline
-inf & 0 & Low \\
0 & 20 & Medium \\
20 & inf & High \\
\hline
\end{tabular}%
\end{adjustbox}
\label{tab:addlabel}%
\end{table}%
输出:
答案1
您可以使用tabularx
跨越整体的\columnwidth
而不是tabular
。
平均能量损失
\documentclass[twocolumn]{article}
\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\begin{document}
\noindent x\hrulefill x
\begin{table}[htbp]
\centering
\caption{Three different Noise Levels}
\begin{tabularx}{\columnwidth}{YcY}
\hline
\textbf{V output}\textbf{} & & \textbf{SNR Level} \\
\hline
From & To & \\
\hline
-inf & 0 & Low \\
0 & 20 & Medium \\
20 & inf & High \\
\hline
\end{tabularx}%
\label{tab:addlabel}%
\end{table}%
\end{document}