http://blog.sina.com.cn/s/blog_821b37de0102y3xa.html 这个网址提供的也很好
转:https://blog.csdn.net/Rained_99/article/details/79389189
LaTeX在编译时总会遇到各种各样的问题,今天遇到问题如题所示,解决方法如下:
LaTeX表格代码:
\begin{table}[htbp]
\center
\caption{ Example}
\begin{tabular}{lll}
\hline
Example& Example& Example\
\hline
S1& Example&Example \
S2& Example&ExampleExampleExampleExampleExample \
\hline
end{tabular}
end{table}
(1)若表格过宽,则(更像 调整整个表格)
begin{table}[htbp]
\center
\caption{ Example}
\resizebox{\textwidth}{12mm}{ %12可随机设置,调整到适合自己的大小为止
<span class=“hljs-keyword”>begin{tabular}{lll}
\hline
Example& Example& Example\
\hline
S1& Example&Example \
S2& Example&ExampleExampleExampleExampleExample \
\hline
<span class=“hljs-keyword”>end{tabular}}%注意这里还有一个半括号
<span class=“hljs-keyword”>end{table}
(2)若表格过窄,则 (更像调整单元格)
begin{table}[htbp]
\center
\caption{ Example}
\setlength{\tabcolsep}{7mm}{%7可随机设置,调整到适合自己的大小为止
begin{tabular}{lll}
\hline
Example& Example& Example\
\hline
S1& Example&Example \
S2& Example&ExampleExampleExampleExampleExample \
\hline
end{tabular}}%注意这里还有一个半括号
end{table}