Forum How do I...?

getting Psalm number correct

jim_albright
I attached screen shot of the end of Psalm 5 and start of Psalm 6.

As you can see Psalm 6 is correct but the end of Psalm 5 says it is Psalm 6 in the header.

The problem I am having is getting the heading to display correctly. First I tried setting the chapter number with a string set when you hit a new chapter. The problem with this when the chapter starts at the top of the page the new chapter number has not triggered the change yet so when you use

content: string(stringBookName, last) " " string(stringChapterNumber, start)
the /start/ assumes the exit from previous page and gives you the wrong chapter number.

To fix this I tried adding another element just before the chapter number.

.next_chapter {
string-set: stringChapterNumber content();
display: inline;
font-size: 0pt;
line-height: 0;
font-color: red;
background: lime;
page-break-before: avoid;
margin:0;
padding:0;
/*display: none; this turns off the string set */
}

Now the exit value is the next chapter number. The right hand page looks for

content: string(stringBookName, last) " " string(stringChapterNumber, last)
which then sets wrong chapter number


The goal is to say the content of left page header is chapter number of the top content and
the content of the right page header is the chapter number of the bottom content.


Any suggestions? I have control of the content so I can add an additional element if needed.

Jim Albright
Wycliffe Bible Translators

  1. Psalm 5.PNG48.8 kB
    end of Psalm 5
  2. Psalm 6.PNG48.2 kB
    start of chapter 6