0

Simple task: book-class document, 12pt font size, 6x9 page size. With the default book settings (I don't really know what's the default line spacing in book-class document) the document is typeset perfectly with no warnings. But it returns only 37 lines on page and a quiet wide line spacing for my needs. I'd prefer more lines (maybe 42) without changing the font size or the margins. The only way I see it done is by reducing the default line spacing that (to my liking) is too wide.
I tried all the methods suggested here Line spacing in book document class

but no matter what value I put in the text looks ugly and the code returns a lot of underfull \vbox (badness) warnings. \linespread{} doesn't seem to have an ability to decrease the line spacing, only to increase.
So what's the right (and simple) way to set a value (other than the default one) for the document's line spacing? In my case to decrease it. And preferably only for the \mainmatter so the title and all the pages before the \mainmatter won't get affected. Here's the MWE.

% !TEX TS-program = LuaLaTeX
\documentclass[12pt,twoside,openany]{book}
\pagestyle{plain}
\usepackage[english, russian]{babel}
\usepackage{fontspec}
\setmainfont{EB Garamond}[
]
\usepackage{microtype}
\usepackage[shortcuts]{extdash}
\usepackage[pagewise]{lineno}
\linenumbers 
\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}{\vfil\penalty500\vfilneg\centering\normalfont\large}{\thepart.}{4ex}{\LARGE\centering}
\titlespacing*{\part}{0ex}{2ex plus 2ex minus 1ex}{0ex} 
\titleclass{\chapter}{straight}
\titleformat{\chapter}{\vfil\penalty500\vfilneg\centering\normalfont\large}{\thechapter.}{4ex}{\large\centering}
\titlespacing*{\chapter} {0ex}{6ex plus 4ex minus 1ex}{2ex} 

\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-24]
\chapter{CHAPTER TWO}
\begin{center}
    \includegraphics[height=35ex,keepaspectratio]{example-image-b}
  \end{center} 
\lipsum[1-24]
\chapter{CHAPTER THREE}
\begin{center}
    \includegraphics[height=35ex,keepaspectratio]{example-image-b}
  \end{center} 
\lipsum[1-24]  
\end{document}

1 Answer 1

1

Page 2 has only text, so the page is filled by lines, starting \topskip from the top and then extending for n \baselineskip. So you require

\textheight=\topkip + n\baselineskip

for some n. That is what the heightrounded option of geometry does, but if you change baselineskip later you need to re-do the calculation.

For a quick test you can set things right after \begin{document}

\begin{document} 
\setlength\baselineskip{13pt}
\setlength\textheight{\dimexpr\topskip+40\baselineskip}

For example gives no warnings and 41 lines (you could decrease \topskip, or squeeze \baselineskip even more)

enter image description here

For a more complete fix don't set after begin document, modify \normalsize. size12.clo has

\renewcommand\normalsize{%
   \@setfontsize\normalsize\@xiipt{14.5}%
   \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
   \belowdisplayskip \abovedisplayskip
   \let\@listi\@listI}

so \renewcommand to have \@setfontsize\normalsize\@xiipt{13} You may also want to reduce some of the other spaces, to match.

5
  • Wow! Whenever I see David Carlisle, I'm happy to learn from the best. \setlength\baselineskip{12pt} \setlength\textheight{\dimexpr\topskip+41\baselineskip} gives 42 lines though if you could hint me on the correlation of those two numbers, I'd be happy even more. As for the modifying \normalsize, adding your code to preamble returns an error, so where to put it properly to get it work? Please either add it to my MWE or point me to some manuals to read about all those displayskips so I could knowingly modify them to my needs.
    – tryingout
    Commented Nov 5, 2022 at 16:03
  • @tryingout you get n+1 lines from \topskp+n\baselineskip if you have \topskip you only get one line per page, that is \topskp+0\baselineskip so every \baselineskip you add allows one more line. You need \makeatletter...\makeatother around the redefinition because of the @ names. 12pt/12pt is extremely tight spacing and likely to fail if you have accented letters or any kind of supercripts in the text. The skips are the spaces around math displays there are no technical reasons to change them but if aiming for a tighter look with less white space you may want to reduce them Commented Nov 5, 2022 at 16:20
  • I'll use {14pt}... \topskp+39 to get 40 lines and stay on the safe side with all possible characters' variation. Ans as the skips are mostly for math (and I don't have any math in my fiction book), I don't think I need to dig into that. Your simple code does the job. Thanks!
    – tryingout
    Commented Nov 5, 2022 at 16:39
  • @tryingout no math! disaster, who's going to read a book with no math? :-) Commented Nov 5, 2022 at 16:44
  • I hope there are hordes of such fools :-)
    – tryingout
    Commented Nov 5, 2022 at 16:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .