# Book Layout in Latex

My question relates to writing novels and other text-centric books using LaTex. I have investigated the possibility of using grid layout techniques in LaTex with no luck.

In a two-sided book document, is it possible to obtain the same number of lines per page? The problem right now is that the completed text ends up with say 60 lines of text on one page and the facing page has 61 lines of text. My objective is to obtain an even distribution of text on pages of text with the exception of a chapter end which may have half a page of text.

Many thanks, Mike

• all non-first and non-last pages should have the same number of lines as long as there is no stretch in the \parskip. to get the first page of a chapter to set on the grid it is necessary for the title setting to occupy a space that is an exact multiple of the \baselineskip plus \topskip. – barbara beeton Dec 12 '15 at 23:34
• If you are using the code from your question tex.stackexchange.com/q/269154/43317 your settings of \parskip to 2pt could be the reason. In that case a different number of paragraphs on a page could result in a differnt number of lines on a page. – esdd Jan 1 '16 at 20:00

LaTeX will always space lines at a fixed \baselineskip apart unless you add content within the line that is larger than the baseline spacing, which is unusual in a novel-like text.

So if you are getting an uneven number of lines then you are adding unequal amounts of space. The most likely culprit is \parskip spacing between paragraphs, by default this is "stretch" which you don't want, it should be a fixed number of \baselineskip typically 0pt or perhaps \baselineskip.

Most of the issues that make it difficult to maintain baselines on a grid in TeX relate to constructs that are unlikely to occur in a novel, specifically displayed math equations and floating figures.

Floating figures in latex will, by default add stretch space but that is easily fixed if needed, ensuring that text following a displayed equation re-aligns with the grid can be "interesting".

So as always it would have been much easier to give specific help if the question had had reproducible code showing the uneven lines. If you were to add such an example I'd update the question to show how to avoid the problem in that case.

• One thing that immediately springs to mind that can throw novel-like text is the presence of a scene break, which can either be a single blank line or a centred decoration (e.g. an asterism) with a blank line above and below. In that case, the scene break command would need to take up a fixed number of \baselineskip, but then again, glue in a scene break can help reduce widows/orphans. – Nicola Talbot Dec 13 '15 at 12:39
• Thank you all for your input and useful comments. I will need to try out your suggestions and will report back on progress. Mike – Mike Dec 13 '15 at 19:11

In novel-like books a simple way could be use the grid package and set the number of lines and baseline in the options, for example:

\usepackage[baseline=18pt,lines=33]{grid}


MWE:

\documentclass[a4paper,twoside,openany]{book}
\usepackage[showframe]{geometry} % to show margins
\usepackage[baseline=18pt,lines=33]{grid}
\usepackage{lineno} % to show line numbers
\usepackage{lipsum} % to show dummy text
\begin{document}
\linenumbers % show line numbers
\lipsum[1-50] % dummy text
\end{document}