为什么我没有在这里收到“ \hbox 过满”的警告?

为什么我没有在这里收到“ \hbox 过满”的警告?

我已经发布了一个答案这个问题但 Zarko 正确地指出我的解决方案不适合文本宽度。

使用起来非常清晰\usepackage{showframe},但我的日志中却没有任何内容Overfull \hbox...,为什么?

\documentclass[12pt,a4paper,twoside]{report}
\usepackage{amsmath, amssymb}
\usepackage{tikz}
\usetikzlibrary{arrows, tikzmark, calc}
\usepackage{showframe}
\begin{document}
    \begin{table}
        \centering
        \bgroup
        \def\arraystretch{2.0}
        \begin{tabular}{|c|c|c|}
            \hline
            $\mu \in Y$& Condition applied on $\delta(\mu)$  & Implication upon lifting \\ \hline
            $-4$ & $\bigg(\dfrac{13\cdot1789}{q}=-1\bigg)$  & $n \not\equiv k-4 \pmod{2k}$  \\ \hline
            $-3$ & $\bigg(\dfrac{5\cdot29}{q}=-1\bigg)$  & $n \not\equiv k-3 \pmod{2k}$  \\ \hline
            $-2$ & - & - \tikzmark{here} \\ \hline
            $-1$ & $\bigg(\dfrac{5\cdot29}{q}=-1\bigg)$  & $n \not\equiv k-1 \pmod{2k}$  \\ \hline
            $0$ & $\bigg(\dfrac{13\cdot1789}{q}=-1\bigg)$  & $n \not\equiv k \pmod{2k}$  \\ \hline
            $3$ & $\bigg(\dfrac{5333\cdot97324757}{q}=-1\bigg)$  & $n \not\equiv k+3 \pmod{2k}$  \\ \hline
        \end{tabular}
        \egroup
        \caption{Conditions following from pushing up modulus.\label{condition}}
    \end{table}

\begin{tikzpicture}[overlay,remember picture]
\node at ($(pic cs:here)+(2.7,0.1)$) {$\rightarrow$};
\node[draw, rounded corners, align=left] at ($(pic cs:here)+(5,0.2)$) {%
    Refer Theorem \dots \\ in Section \dots \\ of Chapter 5
    };
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案1

overlay选项意味着tikzpicture,或者至少它的边界框将具有零大小,因此就 TeX 而言,它不会在边缘突出。但是,图片绘制命令作为低级指令传递给引擎。它们只是不由 TeX 段落排版算法处理。如果图片是内联的,实际上,图片将被其后的文本覆盖。此键还可以提供给各个绘制命令,以从边界框计算中排除。当提供给 TikZ 图片时,所有内容都会继承此键。

引用手册,这是该密钥描述的第一段overlay

此选项主要用于引用其他图片中的节点时,但您也可以在其他情况下使用它。此选项的效果是,在计算当前图片的边界框时,不会考虑当前范围内的所有内容。

(来自第 17.13.1 节引用不同图片中的节点,第 248 页。版本 3.0.1a 手册,日期为 2015 年 8 月 29 日。)


顺便说一句,请注意,我认为\bgroup/\egroup不是必需的,table环境形成一个群体,所以arraystretch无论如何它对于这个表来说都是本地的。


顺便说一句,如果您将所有东西都放在 里面tikzpicture,而不放[overlay,remember picture],那么您的盒子就会满满的。

\documentclass[12pt,a4paper,twoside]{report}
\usepackage{amsmath, amssymb}
\usepackage{tikz}
\usetikzlibrary{arrows, tikzmark, calc}
\usepackage{showframe}
\begin{document}
\begin{table}
  \centering
  \begin{tikzpicture}
     \node [inner sep=0pt] (tab) {%
        \def\arraystretch{2.0}
        \begin{tabular}{|c|c|c|}
            \hline
            $\mu \in Y$& Condition applied on $\delta(\mu)$  & Implication upon lifting \\ \hline
            $-4$ & $\bigg(\dfrac{13\cdot1789}{q}=-1\bigg)$  & $n \not\equiv k-4 \pmod{2k}$  \\ \hline
            $-3$ & $\bigg(\dfrac{5\cdot29}{q}=-1\bigg)$  & $n \not\equiv k-3 \pmod{2k}$  \\ \hline
            $-2$ & - & - \\ \hline
            $-1$ & $\bigg(\dfrac{5\cdot29}{q}=-1\bigg)$  & $n \not\equiv k-1 \pmod{2k}$  \\ \hline
            $0$ & $\bigg(\dfrac{13\cdot1789}{q}=-1\bigg)$  & $n \not\equiv k \pmod{2k}$  \\ \hline
            $3$ & $\bigg(\dfrac{5333\cdot97324757}{q}=-1\bigg)$  & $n \not\equiv k+3 \pmod{2k}$  \\ \hline
        \end{tabular}};
      \node [right=3mm] (arrow) at (tab.east) {$\rightarrow$};
      \node[draw, rounded corners, align=left,right=3mm] at (arrow.east) {%
         Refer Theorem \dots \\ in Section \dots \\ of Chapter 5
         };
\end{tikzpicture}
\caption{Conditions following from pushing up modulus.\label{condition}}
\end{table}
\end{document}

相关内容