LaTex表格過寬或過窄問題

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}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章