Forum Bugs

lines per page variation

jim_albright
I have section heads with margin top of 9pt
I expect 31 printed lines per page.

pg 26, 36

When I have 3 section heads I get 32 lines.
I get similar problem with stanza breaks where there is 9pt margin top also.

pg 18, 29

The page setup is
@page {
marks: crop cross ;
size: 3.5in 5.25in portrait;
font-family: "Charis SIL";
font-size: 8pt;
line-height: 9pt;
/* set font for whole project 8 on 9*/
background-color: grey;
@footnotes
{
border-top: thin solid black;
padding: 0.3em 0;
margin-top: 0.6pc;
margin-left: 2pc;
}
}

@page :first {
margin: 2pc 1pc 1pc 1pc;
@top-center
{ content: normal}
@bottom-center
{ content: normal}
}

@page :left {
margin: 36pt 2pc 36pt 3pc;
@top-left {
margin: 9pt 0pt 0 0pt;
content: string(stringBookName, last) " " string(stringChapterNumber, start)
}
@bottom-left {
content: counter(page);
margin: 0 0 18pt 0 ;
}
}

/*

42 lines 5.25 inches * 72pt to inch – 378pt/9 pt/lines -- height
4 lines 36 pt top
4 lines 36 pt bottom
1 lines 9 pt top margin
2 lines 18 pt bottom margin
----
31 lines

*/

@page :right {
margin: 36pt 3pc 36pt 2pc;
@top-right
{margin: 9pt 0pt 0 0pt;
content: string(stringBookName, last) " " string(stringChapterNumber, last)
}
@bottom-right {
content: counter(page);
margin: 0 0 18pt 0 ;
}
}

My first guess way that I was using both pc and pt for measures so I change all of the top and bottom margins to pt. No change.

My second guess was that I had a stanza break element by itself and somehow that was wrong so I added Stanza_Break as a class for paragraphs that needed space above as in poetry. No change.

My third guess was that this was a known issue that had been fixed. Since you just put up a new version I upgraded. No change.

My fourth guess is that this is a rounding error so I tried changing the top margin to 9.001 and 8.999. No change.

.Stanza_Break { display:block;
margin: 9pt 0 0 0 ;
margin: 9.001pt 0 0 0 ;
margin: 8.999pt 0 0 0 ;
}
all the same

Next try was to change bottom page margin from 36pt to 34pt to 40pt. Just trying something different.
Now I am running out of ideas.

What is your guess? I’ve added the colors so I can see what is happening.

Changing Stanza_Break

.Stanza_Break { display:block;
margin: 9.001pt 0 0 0 ;
margin: 8.999pt 0 0 0 ;
margin: 9pt 0 0 0 ;
margin: 0pt 0 0 0 ;

}
Solves the problem but then I have no stanza breaks.



Usually I find a solution pretty easily so this time I must be doing something stupid that I am overlooking. Thanks for your help. CSS and HTM attached.


Jim Albright


Jim Albright
Wycliffe Bible Translators

  1. Kuna-USX 1 column ragged Prince.css21.0 kB
    CSS
  2. prokuna04.htm268.8 kB
    HTM
dauwhe
It looks like the line height is actually around 9.6pt; I think you commented out all the line-height: 9pt in the CSS, and so it defaults to 120% of font size.

I find it really helpful to open a PDF in Acrobat and use the layout grid to "fake" the kind of guidelines you have in page layout programs.

In the screen shot you see it stays on the 9.6pt baseline grid until the stanza break, and then is off by a bit after that.

Dave
  1. Screen Shot 2015-10-14 at 5.45.44 PM.png88.2 kB
jim_albright
I added the following p css. I don't see any change. Thank you for looking at it. It is supposed to be 8 on 9pt. I thought just having it on the page would take care of it. Thanks for the great screen shot. I may need to invest in that program.




p {
font-size: 8pt;
line-height: 9pt;
}


@page {
marks: crop cross ;
size: 3.5in 5.25in portrait;
font-family: "Charis SIL";
font-size: 8pt;
line-height: 9pt;

Jim Albright
Wycliffe Bible Translators

Edited by jim_albright

jim_albright
This may be it after all. It makes logical sense. Trying to find my graphics ruler now. Looks like that is it. Thank you very much.

Jim Albright
Wycliffe Bible Translators

Edited by jim_albright

jim_albright
So I should set font and line-height on body but also need it on page for the headers and footers.

Jim Albright
Wycliffe Bible Translators