# ConTeXt: Different number of lines per page

While typesetting a novel with ConTeXt I keep running into some strange problem:

Using the setup pasted below, every page has 34 lines of text. However, for an unknown reason, some pages only have 33 lines, which is not acceptable for a doublesided layout. I need the exact same number of lines for every single page of my document.

Now I am not using any graphics, tables or other fancy stuff that could affect the number and position of the lines. Actually, I am not even using sections or paragrafs, different font sizes or anything like that. It's just one monolithic block of text.

So is there any way to make ConTeXt put out pages with a constant number of lines?

My markup so far:

\definepapersize[book][width=120mm,height=190mm]
\setuppapersize[book]

\usemodule[simplefonts][size=10pt]
\setmainfont[EB Garamond 12][expansion=quality,protrusion=quality]

\setupalign [hanging]

\starttext

\setuppagenumbering[alternative=doublesided,location=]
\setupfootertexts [][pagenumber]

\setupinterlinespace[1.15]

% A lot of Text here ...

\stoptext

• \setuplayout[grid=yes]will enable grid typesetting. This way you will have the exact same number of lines on every page and on the exact same position, i.e. front and backside of a sheet will overlay perfectly. – Henri Menke Oct 26 '16 at 17:16
• Great, that's exactly what I was looking for, thanks! Is there any way to adjust the line spacing or the number of lines per page? Because \setupinterlinespace doesn't seem to work when using \setuplayout[grid=yes]. – lysigk Oct 26 '16 at 17:34
• To increase the line spacing use \setupinterlinespace[line=<DIMENSION>]. – Wolfgang Schuster Oct 26 '16 at 18:30

As proposed in the comments, you could use grid typesetting which will force every line to be aligned on the baseline grid. This way the page will always have the same number of lines.

I’d also use the EB Garamond typescript shipped with ConTeXt instead of loading it by hand via simplefonts. This way ConTeXt will also select the correct optical sizes for you.

\definepapersize[book][width=120mm,height=190mm]
\setuppapersize[book]

\setuplayout
[
backspace=16mm,
width=88mm,
topspace=12mm,
footerdistance=0mm,
footer=9mm,
height=168mm,
grid=yes,
]

\definefontfeature
[default][default]
[expansion=quality,
protrusion=quality]
\setupbodyfont[ebgaramond,10pt]
\setupalign[hz,hanging]
\setupinterlinespace[line=3.5ex]

\setuppagenumbering[alternative=doublesided,location=]
\setupfootertexts[][pagenumber]

\starttext

\dorecurse{100}{\input knuth}

\stoptext