我有一张桌子,我想让它看起来更小一些以节省一些空间。我可以将它放在什么环境中以将整个表格缩小一小部分?
问问题
152699 次
4 回答
42
使用\resizebox
:
\resizebox{3cm}{!}{
\begin{something}
something
\end{something}
}
!
告诉 LaTeX 保持纵横比。您还可以通过在此处给出一个值来不同地缩放 y 方向。
于 2011-01-26T20:29:03.457 回答
3
缩放包含文本的元素确实不是一个好主意(有关更多信息,请参阅https://tex.stackexchange.com/questions/425453/why-not-scale-elements-that-c ontain-text )因此这里有另外两种方法如何减小表的大小:
- 减少列间空间
\addtolength{\tabcolsep}{-1pt}
- 手动选择较小的字体大小,例如使用字体命令
\small
或进行更精细的控制\fontsize{9.5pt}{10.25pt}\selectfont
\documentclass{article}
\usepackage{lipsum}
\begin{document}
Reducing the inter column spacing a bit:
\begin{table}[htbp]
\addtolength{\tabcolsep}{-1pt}
\begin{tabular}{lll}
\hline
some text some text & some text some text & some text some text some text\\
\hline
\end{tabular}
\end{table}
\lipsum[2]
Smaller font size:
\begin{table}[htbp]
\small
\begin{tabular}{lll}
\hline
some text some som text & some text some text & some text some text some text\\
\hline
\end{tabular}
\end{table}
\end{document}
于 2019-05-08T09:02:42.503 回答
-1
\begin{table}[tch]
\caption{foo}
\begin{tabular}{lll}
\hline
\footnotesize{
foo&foo&foo\\
foo&doo&fofo\\
}\\\hline
\end{tabular}
\label{foo}
\end{table}
于 2011-01-30T15:10:26.990 回答
-1
这是一个例子:
\begin{table}[h!]
\resizebox{6cm}{!}
{
% here is the table content.
}
%\caption{Versiones a comparar.}
\end{table}
于 2019-05-07T18:10:25.967 回答