溢出 hbox 太寬

溢出 hbox 太寬
Overfull \hbox (13.50009pt too wide) in paragraph at lines 149-157.

149 \begin{tabular}{rl}
151  Basic Knowledge:& \textsc{C}, \textsc{Python}, \textsc{html}, ubuntu, \\&
152 {\fb \LaTeX}\setmainfont[SmallCapsFont=Fontin-SmallCaps.otf]{Fontin.otf}\\
152 Intermediate Knowledge:& \textsc{Fritzing, EAGLE}, Embedded C, Excel, Word, PowerPoint, 154 MATLAB\\
155 & and Simulink\\


156\end{tabular}

答案1

消除各種(可能不相關的)字體材料,您的程式碼是

\begin{tabular}{rl}
Basic Knowledge:       & \textsc{C}, \textsc{Python}, \textsc{html}, ubuntu, \\
                       & \LaTeX\\
Intermediate Knowledge:& \textsc{Fritzing, EAGLE}, Embedded C, Excel, Word,
                         PowerPoint, MATLAB\\
                       & and Simulink\\
\end{tabular}

這裡有很多問題。從根本上來說,你只是在第二列中有太多文字:你需要使用columtypep並為其設定寬度,或者(更好)使用tabularx並讓LaTeX找到合適的寬度。完成此操作後,您將不需要嘗試自己斷行(就像使用“和 Simulink”一樣),這是我們旨在避免的佈局決策。

就像是

\documentclass{article}
\usepackage{tabularx}
\begin{document}
\noindent
\begin{tabularx}{\textwidth}{rX}
Basic Knowledge:       & C, \textsc{Python}, \textsc{html}, ubuntu, \LaTeX\\
Intermediate Knowledge:& \textsc{Fritzing}, EAGLE, Embedded C, Excel, Word,
                          PowerPoint, MATLAB and Simulink
\end{tabularx}

\end{document}

然而,更根本的是,表格可能並不是呈現此類資訊的正確方式。這實際上是一個描述列表,這樣呈現會更明智。enumitem如果您對標準格式不滿意,您可以隨時使用類似的套件來調整其外觀。

相關內容