
Hello For some reason I'm having a lot of trouble getting the page to include precisely 40 lines of text (10.5 Baskerville with an interline depth of 12 points). On an experimental file with 6 full-depth pages and no footnotes, I find that the first three have 39 lines and the second three have the desired 40 lines. You will see from the code below that I have been tinkering a lot, but it ought to be a simple matter! Can someone let me know what I should be doing? Here's the code (and I have to desert my desk now till this afternoon so am not in a hurry for an answer!): \definepapersize[OUPoctavo][width=136mm, height=214mm]%should be 216! \setuppapersize[OUPoctavo][A4] % paper size, printed on A4 \definelayout[GHIL] [edge=48pt, edgedistance=6pt, margin=72pt, margindistance=6pt, topspace=48pt, header=12pt, headerdistance=3pt, textheight=480pt,%should be 480pt, height=522.6275pt, width=24pc, footerdistance=6pt, footer=12pt, % lines=40%this messes up position on the A4 page location=middle, marking=on, horoffset=0pt, veroffset=0pt, paper=OUPoctavo] \setuplayout[GHIL] Best wishes John *🇪🇺 * Слава Україні! * 🇺🇦* http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free.www.avg.com http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Am 23.06.25 um 11:19 schrieb John Was:
Hello
For some reason I'm having a lot of trouble getting the page to include precisely 40 lines of text (10.5 Baskerville with an interline depth of 12 points). On an experimental file with 6 full-depth pages and no footnotes, I find that the first three have 39 lines and the second three have the desired 40 lines. You will see from the code below that I have been tinkering a lot, but it ought to be a simple matter! Can someone let me know what I should be doing?
Here's the code (and I have to desert my desk now till this afternoon so am not in a hurry for an answer!):
Use EITHER
height=522.6275pt,
OR
%lines=40%this messes up position on the A4 page
As I said, you’re using too many settings, some interfere. And if you want a fixed number of lines, grid setting makes sense. (Hint: \showgrid) Hraban

Thanks Hraban. I actually started out with just one setting for the
height, but have been adding more to see if I could achieve what ought to
be a very simple result by changing some of the others Nothing has worked
so far, even when I vary the choice of what to switch on and off. The most
intriguing is:
height=522.6275pt
with which I have been tinkering endlessly. I don't really see why I need
this at all since it should be automatically calculated from the other
settings, but it does make a difference, though in an unexpected way. If I
make just a minute alteration (plus or minus) I can achieve 39 lines or 41
lines, but never 40, on the first few pages. There is no logical reason I
can think of in any case why three pages should be correct and three
incorrect, but I'll keep at it until it comes right.
I had already found \showgrid but I can't use grid setting throughout the
books I am intending to set with ConTexT since a typical page will consist
at least of main text with 12 points between the lines and footnotes with 9
points between the lines, and often also extended quotations with 11 points
between the lines. But I will need to ensure that all pages come to the
same depth.
Oh well, back to the drawing board!
Best wishes
John *🇪🇺 * Слава Україні!
* 🇺🇦*
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
Virus-free.www.avg.com
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Mon, 23 Jun 2025 at 11:57, Henning Hraban Ramm
Am 23.06.25 um 11:19 schrieb John Was:
Hello
For some reason I'm having a lot of trouble getting the page to include precisely 40 lines of text (10.5 Baskerville with an interline depth of 12 points). On an experimental file with 6 full-depth pages and no footnotes, I find that the first three have 39 lines and the second three have the desired 40 lines. You will see from the code below that I have been tinkering a lot, but it ought to be a simple matter! Can someone let me know what I should be doing?
Here's the code (and I have to desert my desk now till this afternoon so am not in a hurry for an answer!):
Use
EITHER
height=522.6275pt,
OR
%lines=40%this messes up position on the A4 page
As I said, you’re using too many settings, some interfere.
And if you want a fixed number of lines, grid setting makes sense. (Hint: \showgrid)
Hraban
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net
___________________________________________________________________________________

Am 23.06.25 um 14:56 schrieb John Was:
Thanks Hraban. I actually started out with just one setting for the height, but have been adding more to see if I could achieve what ought to be a very simple result by changing some of the others Nothing has worked so far, even when I vary the choice of what to switch on and off. The most intriguing is:
height=522.6275pt
with which I have been tinkering endlessly. I don't really see why I need this at all since it should be automatically calculated from the other settings, but it does make a difference, though in an unexpected way. If I make just a minute alteration (plus or minus) I can achieve 39 lines or 41 lines, but never 40, on the first few pages. There is no logical reason I can think of in any case why three pages should be correct and three incorrect, but I'll keep at it until it comes right.
I had already found \showgrid but I can't use grid setting throughout the books I am intending to set with ConTexT since a typical page will consist at least of main text with 12 points between the lines and footnotes with 9 points between the lines, and often also extended quotations with 11 points between the lines. But I will need to ensure that all pages come to the same depth.
The "lines" setting always works with the current bodyfontsize and isn’t suited for changing font sizes (i.e. changing interlinespacing). That you can’t seem to achieve exactly 40 lines is probably due to some paragraph breaking penalties. It makes no sense to set "height" or anything else in nanometer accuracy. Just in case: – height includes header and footer and their distances - it’s not possible to define \textheight directly – width is just the line width without margins - you can also just define margings, header and footer and set height and width to "fit". Generally I got the impression that you’re trying to use ConTeXt with a plain TeX mindset. That works only if you know ConTeXt in depth as well as TeX. (If you try to tune a computer with a soldering iron, you need to know it very well…) I can’t help you on that level, I’m just a longtime user with a media designer’s mindset. Hraban

Thanks for that Hraban.
I guess after more than 30 years of typesetting academic books and journals
in plain TeX (of whatever variety) it's hard not to think in plain TeX
terms, but I will acquire more expertise in ConTexT as time goes by.
I appreciate, of course, that the nano-setting of the height parameter is
never going to be the way forward, but this started when I noticed that a
very slight alteration (of a few points) made the difference between 39 and
41 lines on the first full page of text, while no whole number resulted in
40 lines - hence the repeated addition of tiny amounts to see if the magic
value would emerge that simply sets 40 lines of 12pt text on every page.
Nothing so far has allowed this to happen.
I did immediately think about paragraph penalties (none of which I have set
up myself), but there are no widows (unacceptable) or orphans (perfectly
acceptable to those who read old books!) that could be generating this
curious effect. The one page that is consistently a line short can't be
improved by plain TeX's \looseness command, but I expect ConTexT has an
equivalent that does work - I do use it regularly, in particular to reduce
the gap between text and footnotes to as near to an optimal 6 points as I
can manage.
Best wishes
John *🇪🇺 * Слава Україні!
* 🇺🇦*
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
Virus-free.www.avg.com
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Mon, 23 Jun 2025 at 15:39, Henning Hraban Ramm
Am 23.06.25 um 14:56 schrieb John Was:
Thanks Hraban. I actually started out with just one setting for the height, but have been adding more to see if I could achieve what ought to be a very simple result by changing some of the others Nothing has worked so far, even when I vary the choice of what to switch on and off. The most intriguing is:
height=522.6275pt
with which I have been tinkering endlessly. I don't really see why I need this at all since it should be automatically calculated from the other settings, but it does make a difference, though in an unexpected way. If I make just a minute alteration (plus or minus) I can achieve 39 lines or 41 lines, but never 40, on the first few pages. There is no logical reason I can think of in any case why three pages should be correct and three incorrect, but I'll keep at it until it comes right.
I had already found \showgrid but I can't use grid setting throughout the books I am intending to set with ConTexT since a typical page will consist at least of main text with 12 points between the lines and footnotes with 9 points between the lines, and often also extended quotations with 11 points between the lines. But I will need to ensure that all pages come to the same depth.
The "lines" setting always works with the current bodyfontsize and isn’t suited for changing font sizes (i.e. changing interlinespacing). That you can’t seem to achieve exactly 40 lines is probably due to some paragraph breaking penalties.
It makes no sense to set "height" or anything else in nanometer accuracy.
Just in case: – height includes header and footer and their distances - it’s not possible to define \textheight directly – width is just the line width without margins - you can also just define margings, header and footer and set height and width to "fit".
Generally I got the impression that you’re trying to use ConTeXt with a plain TeX mindset. That works only if you know ConTeXt in depth as well as TeX. (If you try to tune a computer with a soldering iron, you need to know it very well…) I can’t help you on that level, I’m just a longtime user with a media designer’s mindset.
Hraban
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net
___________________________________________________________________________________

Am 23.06.2025 um 17:25 schrieb John Was:
Thanks for that Hraban.
I guess after more than 30 years of typesetting academic books and journals in plain TeX (of whatever variety) it's hard not to think in plain TeX terms, but I will acquire more expertise in ConTexT as time goes by.
1. it's written ConTeXt (but nobody cares when you write Context). 2. A layout it simple when you don't try to whatever key you can find in the manual and hope to get something acceptable as a result. The following example shows the basic steps for a custom layout (the initial \setuplayout is only for the example to start with a full page).
I appreciate, of course, that the nano-setting of the height parameter is never going to be the way forward, but this started when I noticed that a very slight alteration (of a few points) made the difference between 39 and 41 lines on the first full page of text, while no whole number resulted in 40 lines - hence the repeated addition of tiny amounts to see if the magic value would emerge that simply sets 40 lines of 12pt text on every page. Nothing so far has allowed this to happen.
When you have a fixed number of lines you have to set the interlinespace to a fixed value because by default Context uses a font dependant distance, e.g. \setupinterlinespace[line=15pt] can help. Wolfgang
participants (3)
-
Henning Hraban Ramm
-
John Was
-
Wolfgang Schuster