![如何找到溢出 \hbox 太宽的错误代码](https://linux22.com/image/317674/%E5%A6%82%E4%BD%95%E6%89%BE%E5%88%B0%E6%BA%A2%E5%87%BA%20%5Chbox%20%E5%A4%AA%E5%AE%BD%E7%9A%84%E9%94%99%E8%AF%AF%E4%BB%A3%E7%A0%81.png)
我的代码中出现许多 overfull \hbox(4 pt) too wide 警告。但是当我单击警告时,它指向主 tex 文件的第一行,这是一条注释。并且有许多这样的警告指向同一条注释。由于它没有指向有警告的行,我无法编辑代码。你们能就此提供意见吗?
文档类命令如下:-
\documentclass[SectionMethod, ListStyleI]{TAMUthesis}
其中一个警告的日志文件描述是:-
[]|
\hbox(0.0+0.0)x430.0074, glue set - 1.0
.\glue 3.0 plus 1.5 minus 1.0
.\glue 3.0 plus 1.5 minus 1.0
.\vbox(0.0+0.0)x430.0074
..\hbox(0.0+0.0)x430.0074
...\hbox(0.0+0.0)x0.0, glue set - 430.00739fil
....\vbox(0.0+0.0)x430.0074
.....\hbox(0.0+0.0)x430.0074, glue set 215.0037fil []
....\glue 0.0 plus 1.0fil minus 1.0fil
...\glue 0.0 plus 1.0fill
...\vbox(0.0+0.0)x430.0074
....\hbox(0.0+0.0)x430.0074, glue set 215.0037fil
.....\glue(\leftskip) 0.0 plus 1.0fil
.....\hbox(0.0+0.0)x0.0
.....\penalty 10000
.....\glue(\parfillskip) 0.0
.....\glue(\rightskip) 0.0 plus 1.0fil
...\glue 0.0 plus 1.0fill
...\hbox(0.0+0.0)x0.0, glue set - 430.00739fil
....\glue 0.0 plus 1.0fil minus 1.0fil
....\vbox(0.0+0.0)x430.0074
.....\hbox(0.0+0.0)x430.0074, glue set 430.00739fil []
..\rule(0.0+0.0)x430.0074
..\glue 0.0
.\rule(*+*)x5.0
示例代码如下:
\documentclass{article}
\begin{document}
\section{Subheading requirements}
This is the second-order subheadings in this document.\\
\begin{itemize}
\item Vertical spacing above and below each subheading needs to be consistent for each
level
\item Vertical spacing within a subheading with more than one line needs to be the same
\end{itemize}
First-order subheadings, which are section in this document, must be included in the Table of Contents, which is implemented in this TAMUthesis.\\
\subsection{Test Subsection In This Chapter}
A chirp is a signal whose frequency increases or decreases with time.
\begin{equation}\label{Equ. 3.1}
f(t)=f_0+k\cdot t
\end{equation}
$f_0$ is the starting frequency for sweeping in chirp. Its corresponding time domain
function for a cosine linear chirp is;
\end{document}
答案1
此draft
选项 (所有标准类别均能理解,因此基于它们的类别也能理解,而且 Koma 文类和 也能理解memoir
) 在大多数溢出的类别旁边添加一个黑色矩形\hbox
。
有时,在特殊情况下,这种情况不会发生:例如,它可能发生在表格中。尽管如此,该方法通常对于直观地找到坏框非常有效。
所以你可以尝试
\documentclass[SectionMethod,ListStyleI,draft]{TAMUthesis}
如果由于类未定义或继承选项而不起作用,则添加
\setlength{\overfullrule}{5pt}
文件序言部分的内容应产生同样的效果。