TransWikia.com

Equation, Onehalfspacing and Underfull vbox

TeX - LaTeX Asked on December 13, 2020

I have a problem with an “onehalfspacing document”. Whenever I use an math environment in this document, latex notify “Underfull vbox (badness 10000) has occurred while output is active []”. I think there is a problem with another spacing between the text and the math environment different to onehalfspacing.
Exists there a global solution for the hole document to fix these vbox-problems?

I know that raggedbottom prevents, that latex stretchs the text to the pagebottom. But then I have gaps at the pagebottoms.

Here ist a MWE (where the problem occurs, but not so dramatically than in other situations):

documentclass{scrbook}
usepackage{setspace}
onehalfspacing
AfterTOCHead{singlespacing}
KOMAoptions{DIV=current}
usepackage{amsmath}
recalctypearea
%raggedbottom

%Some text:
 newcommand{sometext}{Aureh eurhg urg uhre uh uig iugh iugril giuzz geiu griugrq u gru grilu 
 geluig igru iuegg iu eh iuu gru grilu geluig igru iuehg uh uig iugh iugr geiu griugrq u gru grilu gel
 uig igru iuegg iu gruhg rg uhg ug r gr
}

begin{document}
hallo
begin{equation*}
 K(y,varepsilon)subseteq k(y,varepsilon)subseteq K(y,pvarepsilon).
end{equation*}
% Some random text:
sometextsometextsometextsometextsometextsometextsometextsometext
sometextsometextsometextsometextsometextsometextsometextsometext
end{document}

One Answer

I think the problem Is solved.

  1. As Ruixi Zhang suggested, we have to add KOMAoptions{DIV=current} after onehalfspacing to recalculate the textarea. Then the number of lines and the textarea fits together again. But this doesnt solve the vBox-problems with the math environments.

  2. The Problem with the math environments ist rather usepackage{setspace} than onehalfspacing. usepackage{setspace} redefine the command setdisplayskipstretch. As a result usepackage{setspace} takes some of latex's flexbility about the math environments (To see this in my MWE, delete onehalfspacingand add usepackage{showframe}(and more text). Than use see, flushbottom isnt working.). For explanation see Ben Mares' answer in Equations and Double Spacing. Therefore I set setdisplayskipstretch back to default by usepackage{setspace}setdisplayskipstretch{}. This solved the vBox-problems with the math environments. I don't know if that entails other problems, but so far everything works quite well.

Answered by Tobi on December 13, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP