tkz ダイアグラムが vbox の不具合を引き起こす

tkz ダイアグラムが vbox の不具合を引き起こす

以下の vbox の不具合を止めるにはどうしたらよいでしょうか。不具合は、図のスケールを 0.3cm にした場合にのみ止まりますが、図をそれほど小さくしたくはありません。WME には表示されないことはわかっていますが、完全なドキュメントでは、これが影響を受ける唯一の図です。

    \documentclass[12pt, a4paper, twoside, openright,fleqn, leqno, draft, ]{book}

    \usepackage{tkz-euclide}            %Tkz-Euclide diagrams
    \usepackage{amsmath,amsthm,amssymb,cancel}                  %Math packages

    %Diagram environment
    \newenvironment{diagram}
    {%
    \par\addvspace{0pt}%
    \centering
    \stepcounter{CountDiag}
    \tkzSetUpCompass[lenth=1cm]
    \begin{tikzpicture}
    }{%
    \end{tikzpicture}\par
    \vspace{-20pt}
    Diagram~\theCountDiag\par
    \addvspace{0pt}
    }
%    \newcounter{CountDiag}\counterwithin*{CountDiag}.   {section}%
    \newcounter{CountDiag}\counterwithin*{CountDiag}{section}%

    \newcommand{\Tri}[8]{%%
    \tkzDefPoint(0,0){#1}%
    \tkzDefPoint({#2,#3}){#4}%
    \tkzDefPoint({#5,#6}){#7}%
    \tkzDrawPolygon[fill=#8](#1,#4,#7)%
    \tkzLabelPoint[left](#1){$#1$}% 
    \tkzLabelPoint[below](#4){$#4$}%
    \tkzLabelPoint[above](#7){$#7$}%
    \tkzDrawPoints(#1,#4,#7)%
    }

    \begin{document}

    \begin{diagram}[scale=0.7]
    \Tri{B}{3}{0}{C}{1.5}{3}{A}{none}
        \tkzDefPointOnLine[pos=2](A,B)          \tkzGetPoint{E}
        \tkzDefPointOnLine[pos=2](A,C)          \tkzGetPoint{D}
        \tkzDefPointOnLine[pos=1.5](A,B)            \tkzGetPoint{F}
        \tkzDefPointOnLine[pos=1.5](A,C)            \tkzGetPoint{G} 
         \tkzDrawPolygon(A,B,C)
         \tkzDrawSegment(A,E)
         \tkzDrawSegment(A,D)
        \tkzLabelPoints[left](E)
        \tkzLabelPoints[right](D)
        \tkzLabelPoints[left](F)
        \tkzLabelPoints[right](G)
        \tkzMarkSegment[mark=|](A,C)
        \tkzMarkSegment[mark=|](A,B)
        \tkzMarkAngle[size=0.5](A,C,B)
        \tkzMarkAngle[size=0.5](C,B,A)
        \tkzDrawPoints[fill=gray](A,B,C,D,E,F,G)
         \tkzDrawSegment[dashed](C,F)
     \end{tikzpicture}
    \hspace{0.3cm}
    \begin{tikzpicture}[scale=0.7]
       \Tri{B}{3}{0}{C}{1.5}{3}{A}{none}
       \tkzDefPointOnLine[pos=2](A,B)           \tkzGetPoint{E}
    \tkzDefPointOnLine[pos=2](A,C)      \tkzGetPoint{D}
        \tkzDefPointOnLine[pos=1.5](A,B)            \tkzGetPoint{F}
        \tkzDefPointOnLine[pos=1.5](A,C)            \tkzGetPoint{G} 
        \tkzDrawPolygon(A,B,C)
        \tkzDrawSegment(A,E)
        \tkzDrawSegment(A,D)
        \tkzLabelPoints[left](E)
        \tkzLabelPoints[right](D)
        \tkzLabelPoints[left](F)
        \tkzLabelPoints[right](G)       
        \tkzMarkSegment[mark=|](A,C)
        \tkzMarkSegment[mark=|](A,B)
        \tkzMarkAngle[size=0.5](A,C,B)
        \tkzMarkAngle[size=0.5](C,B,A)
        \tkzDrawSegment[dashed](B,G)
        \tkzDrawPoints[fill=gray](A,B,C,D,E,F,G)
    \end{tikzpicture}
    \hspace{0.3cm}
    \begin{tikzpicture}[scale=0.7]
       \Tri{B}{3}{0}{C}{1.5}{3}{A}{none}
          \tkzDefPointOnLine[pos=2](A,B)            \tkzGetPoint{E}
        \tkzDefPointOnLine[pos=2](A,C)          \tkzGetPoint{D}
        \tkzDefPointOnLine[pos=1.5](A,B)            \tkzGetPoint{F}
        \tkzDefPointOnLine[pos=1.5](A,C)            \tkzGetPoint{G} 
        \tkzDrawPolygon(A,B,C)
        \tkzDrawSegment(A,E)
        \tkzDrawSegment(A,D)
        \tkzLabelPoints[left](E)
        \tkzLabelPoints[right](D)
        \tkzLabelPoints[left](F)
        \tkzLabelPoints[right](G)       
        \tkzMarkSegment[mark=|](A,C)
        \tkzMarkSegment[mark=|](A,B)
        \tkzMarkAngle[size=0.5](A,C,B)
        \tkzMarkAngle[size=0.5](C,B,A)
        \tkzDrawSegment[dashed](B,G)
          \tkzDrawSegment[dashed](C,F)
        \tkzDrawPoints[fill=gray](A,B,C,D,E,F,G)
    \end{diagram}
    \end{document}

コードが長くて申し訳ありませんが、主に図表に関するものです。

スクリーンショット:

結果

答え1

示されているコードには、アンダーフル vbox はありませんが、アンダーフルなページを生成するページ分割に参加する可能性があります。(\rule{5pt}{4cm}重要なのは図の垂直サイズだけなので、すべての tikz を に置き換えて例を簡略化することもできます。)

問題の例は

ここに画像の説明を入力してください

\documentclass[12pt, a4paper, twoside, openright,fleqn, leqno, draft, ]{book}

    \usepackage{tkz-euclide}            %Tkz-Euclide diagrams
    \usepackage{amsmath,amsthm,amssymb,cancel}                  %Math packages

    %Diagram environment
    \newenvironment{diagram}
    {%
    \par\addvspace{0pt}%
    \centering
    \stepcounter{CountDiag}
    \tkzSetUpCompass[lenth=1cm]
    \begin{tikzpicture}
    }{%
    \end{tikzpicture}\par
    \vspace{-20pt}
    Diagram~\theCountDiag\par
    \addvspace{0pt}
    }
%    \newcounter{CountDiag}\counterwithin*{CountDiag}.   {section}%
    \newcounter{CountDiag}\counterwithin*{CountDiag}{section}%

    \newcommand{\Tri}[8]{%%
    \tkzDefPoint(0,0){#1}%
    \tkzDefPoint({#2,#3}){#4}%
    \tkzDefPoint({#5,#6}){#7}%
    \tkzDrawPolygon[fill=#8](#1,#4,#7)%
    \tkzLabelPoint[left](#1){$#1$}% 
    \tkzLabelPoint[below](#4){$#4$}%
    \tkzLabelPoint[above](#7){$#7$}%
    \tkzDrawPoints(#1,#4,#7)%
    }

    \begin{document}

    \begin{diagram}[scale=0.7]
    \Tri{B}{3}{0}{C}{1.5}{3}{A}{none}
        \tkzDefPointOnLine[pos=2](A,B)          \tkzGetPoint{E}
        \tkzDefPointOnLine[pos=2](A,C)          \tkzGetPoint{D}
        \tkzDefPointOnLine[pos=1.5](A,B)            \tkzGetPoint{F}
        \tkzDefPointOnLine[pos=1.5](A,C)            \tkzGetPoint{G} 
         \tkzDrawPolygon(A,B,C)
         \tkzDrawSegment(A,E)
         \tkzDrawSegment(A,D)
        \tkzLabelPoints[left](E)
        \tkzLabelPoints[right](D)
        \tkzLabelPoints[left](F)
        \tkzLabelPoints[right](G)
        \tkzMarkSegment[mark=|](A,C)
        \tkzMarkSegment[mark=|](A,B)
        \tkzMarkAngle[size=0.5](A,C,B)
        \tkzMarkAngle[size=0.5](C,B,A)
        \tkzDrawPoints[fill=gray](A,B,C,D,E,F,G)
         \tkzDrawSegment[dashed](C,F)
     \end{tikzpicture}
    \hspace{0.3cm}
    \begin{tikzpicture}[scale=0.7]
       \Tri{B}{3}{0}{C}{1.5}{3}{A}{none}
       \tkzDefPointOnLine[pos=2](A,B)           \tkzGetPoint{E}
    \tkzDefPointOnLine[pos=2](A,C)      \tkzGetPoint{D}
        \tkzDefPointOnLine[pos=1.5](A,B)            \tkzGetPoint{F}
        \tkzDefPointOnLine[pos=1.5](A,C)            \tkzGetPoint{G} 
        \tkzDrawPolygon(A,B,C)
        \tkzDrawSegment(A,E)
        \tkzDrawSegment(A,D)
        \tkzLabelPoints[left](E)
        \tkzLabelPoints[right](D)
        \tkzLabelPoints[left](F)
        \tkzLabelPoints[right](G)       
        \tkzMarkSegment[mark=|](A,C)
        \tkzMarkSegment[mark=|](A,B)
        \tkzMarkAngle[size=0.5](A,C,B)
        \tkzMarkAngle[size=0.5](C,B,A)
        \tkzDrawSegment[dashed](B,G)
        \tkzDrawPoints[fill=gray](A,B,C,D,E,F,G)
    \end{tikzpicture}
    \hspace{0.3cm}
    \begin{tikzpicture}[scale=0.7]
       \Tri{B}{3}{0}{C}{1.5}{3}{A}{none}
          \tkzDefPointOnLine[pos=2](A,B)            \tkzGetPoint{E}
        \tkzDefPointOnLine[pos=2](A,C)          \tkzGetPoint{D}
        \tkzDefPointOnLine[pos=1.5](A,B)            \tkzGetPoint{F}
        \tkzDefPointOnLine[pos=1.5](A,C)            \tkzGetPoint{G} 
        \tkzDrawPolygon(A,B,C)
        \tkzDrawSegment(A,E)
        \tkzDrawSegment(A,D)
        \tkzLabelPoints[left](E)
        \tkzLabelPoints[right](D)
        \tkzLabelPoints[left](F)
        \tkzLabelPoints[right](G)       
        \tkzMarkSegment[mark=|](A,C)
        \tkzMarkSegment[mark=|](A,B)
        \tkzMarkAngle[size=0.5](A,C,B)
        \tkzMarkAngle[size=0.5](C,B,A)
        \tkzDrawSegment[dashed](B,G)
          \tkzDrawSegment[dashed](C,F)
        \tkzDrawPoints[fill=gray](A,B,C,D,E,F,G)
    \end{diagram}


    \section{aaaaaa}
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    \section{aaaaaa}
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    \section{aaaaaa}
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx    xxxx xxxx
    \end{document}

生成する

Underfull \vbox (badness 4108) has occurred while \output is active

bookクラスのデフォルトですが\flushbottom、セクション見出しの直後に改ページを入れることはできないため、セクション 0.3 全体を次のページに移動する必要があり、余白を過度に広げずにページ 1 の下部に到達するための柔軟な接着剤またはテキストが不足しているため、警告が表示されます。

スペースを埋めるためにさらにテキストを書いたり、\vfill図の後に追加してより多くの空白を確保したり、\clearpageセクション 3 の前に使用してページを短くしたりすることができます。

関連情報