
book
というわけで、比較的シンプルにコード化されたドキュメントがあります。
これをコンパイルしようとすると、たくさんのUnderfull \vbox (badness 10000) has occurred while \output is active
警告が表示されます (ただし、提供されている MWE には 1 つしかありません)。 の構造はbook
単純で、見出しとテキストだけです。
たとえば、ページはパート番号、章番号、テキストで始まります (はい、パート番号と章番号の間に画像があり、章番号とテキストは コマンドで追加されています\includegraphics
)。しかし、それらの画像を削除しても、警告がポップアップし、さらに多くの警告が表示されます。
以前は、テキストの一番下の行がフレームの上にぶら下がってしまう問題がありましたが、本のheightrounded
を追加することで解決しました。クラスはデフォルトで、テキストを文字通りフレームの一番下にフラッシュするために使用する と理解しています。そこで、多くの人が提案したように使用してみましたが、警告の発生は解決しましたが、別の問題が発生しました。今では、一部のページで、一番下の行のベースラインがフレームの上にぶら下がっており、時にはほぼ 1 行の高さになることもあります (残念ながら、MWE ではそれほど目立ちませんが、ページ 1 ではまだ確認できます)。 私の文書は比較的シンプルなコードなので、なぜこのような警告が表示されるのか不思議です 。しかし、これは見出し (部品番号と章番号、おそらく画像も) の間隔の取り方に何らかの関連があることに気づきました。およびコマンドをすべて削除してテキストのみにすると、警告は消えます。これはパッケージと関係があるのでしょうか。文書で使用されている はすべてそのまま残しておいたので、そのうちの 1 つが問題であれば簡単に見つけることができます。 追伸: これらの警告は気にしないでください。私の文書には表示されていません。が使用されている場合にのみ表示されます。geometry
book
\flushbottom
\raggedbottom
\part
\chapter
titlesec
packages
Overfull \hbox
\lipsum
% !TEX TS-program = LuaLaTeX
\documentclass[11pt,twoside,openany]{book}
\pagestyle{plain}
\usepackage[english, russian]{babel}
\usepackage{fontspec}
\setmainfont{EB Garamond}[
]
\usepackage{microtype}
\usepackage[shortcuts]{extdash}
\usepackage[pagewise]{lineno}
\usepackage[
paperwidth=6in,
paperheight=9in,
inner=13mm,
top=15mm,
outer=20mm,
bottom=24mm, showframe,
heightrounded,
]{geometry}
\usepackage{lettrine}
\setcounter{DefaultLines}{3}
\renewcommand{\DefaultLoversize}{0.1}
\renewcommand{\DefaultLraise}{0}
\renewcommand{\LettrineTextFont}{}
\setlength{\DefaultFindent}{\fontdimen2\font}
\usepackage{lipsum}
\setlength{\parskip}{0pt}
\usepackage{graphicx}
\usepackage[dvipsnames]{xcolor}
\usepackage[pages=some]{background}
\usepackage{fancyhdr}
\fancyhf{}
\renewcommand{\headrulewidth}{0ex}
\fancyfoot[LE,RO]{\thepage}
\pagestyle{fancy}
\fancypagestyle{plain}{%
\fancyhf{}%
\renewcommand{\headrulewidth}{0ex}%
\fancyhf[lef,rof]{\thepage}%
}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{\par}{}{}
\makeatother
%\raggedbottom % If used, it messes up the bottom line the way that its baseline hangs above the frame on some pages
\usepackage{titlesec}
\titleclass{\part}{top}
\titleformat{\part}{\centering\normalfont\large}{\thepart.}{4ex}{\LARGE\centering}
\titlespacing*{\part}{0ex}{2ex}{0ex}
\titleclass{\chapter}{straight}
\titleformat{\chapter}{\centering\normalfont\large}{\thechapter.}{4ex}{\large\centering}
\titlespacing*{\chapter} {0ex}{6ex}{02ex}
\setcounter{secnumdepth}{0}
\usepackage{tocloft}
\begin{document}
\pagestyle{plain}
\pagenumbering{gobble}
\addtocounter{page}{0}
\begin{titlepage}
\centering
{\large TITLE\par}
\vfill
\title{SOME TITLE}
\author{SOME AUTHOR}
\date{}
\end{titlepage}
\clearpage
\frontmatter
\mainmatter
\pagenumbering{arabic}
\part{PART ONE}
\begin{center}
\includegraphics[height=15ex,keepaspectratio]{example-image-a}
\end{center}
\chapter{CHAPTER ONE}
\begin{center}
\includegraphics[height=35ex,keepaspectratio]{example-image-b}
\end{center}
\lipsum[1-12]
\chapter{CHAPTER TWO}
\begin{center}
\includegraphics[height=35ex,keepaspectratio]{example-image-b}
\end{center}
\lipsum[1-12]
\chapter{CHAPTER THREE}
\begin{center}
\includegraphics[height=35ex,keepaspectratio]{example-image-b}
\end{center}
\lipsum[1-12]
\end{document}
答え1
フラッシュボトムを実現するために、見出しにはある程度の柔軟性が必要です。
多分
\titlespacing*{\chapter} {0ex}{6ex plus 4ex minus 1ex}{2ex}
しかし、第 3 章の前のページからの不足警告は、通常のページを削除したが、見出しと画像が収まらず、ページを埋めるための糊がないために発生します。章の前のページを短くするには\clearpage
、次のように追加するとよいかもしれません。\filbreak
\titleformat{\chapter}{\filbreak\centering\normalfont\large}{\thechapter.}{4ex}{\large\centering}