Closed tjcouch-sil closed 2 years ago
Hello @tjcouch-sil ,
I've been reviewing this report. Before discussing further, I would like to point to the USFM documentation - specifically concerning USFM markup for 'Extended Study Bible Content'. You will see that \ip
is intended to be supported throughout the scripture body text area for the purpose of adding division or section introductions.
The Paratext stylesheet has limitations in terms of how well it can be used to test the position and sequence of markers. The differences you see between usfm.sty and usfm_sb.sty are the effort to support the additional \e..
markers for study Bible content, and to allow more flexibility for some markers like \ip
, and additional columns for tables, etc.
Ok, thank you for clarifying! It is helpful to know that usfm_sb.sty
does intend to allow ip
anywhere in a chapter. That helps me to understand the issue at hand a little better, and that feels consistent with the overall styles design.
I do still believe we have a hierarchy problem of some sort. It seems important for complex content including various markers like p
to be able to be under ip
s. However, this issue is still occurring where an ip
is absorbing the rest of the content in the chapter after it and invalidating any ranked markers under it that are not allowed in an ip
but are allowed in a chapter (see my screenshot of Paratext in the issue report where the p
markers are valid but the q
markers are not).
It seems like the style standard may need to have a way to designate when ip
should end and the Scripture begin again. I suppose a couple of suggestions within existing properties come to mind:
ip
to 4 to match p
and q
and other things so that more markers can follow ip
and end the ip
instead of coming under it or being invalid. Then I suppose some or all current Rank 6 and 5 markers (there are 30 of them, I believe) would need to be listed in ip
's OccursUnder
so that we don't invalidate ip
anywhere. That would mean ip
would be under those markers above it, though, which would change how it worksip
in the OccursUnder
list of other Ranked markers less than 6 that could be Scripture like q
so that all Scripture can be under an ip
. That would of course mean any Scripture can be under an ip
in the hierarchy, which does not seem rightDo you have any thoughts on how to move forward or how I can understand better what the style is supposed to indicate in this situation?
Should I change the title of the issue report to describe the real issue more accurately? Maybe something like "usfm_sb.sty - ip doesn't end in the middle of a chapter once Scripture begins again" or something.
Thank you for your time!
In a study Bible, \ip
can exist anywhere within a chapter, but usually would be added after a section heading.
In the usfm_sb.sty
stylesheet, I propose that we remove \Rank
from \ip
.
@klassenjm Thank you very much for looking into this and thinking carefully about these issues! Yes, it does appear that removing rank from ip works well to allow ip anywhere in a chapter. I appreciate your thoughtfulness regarding this clean and simple solution.
Relevant Concepts
ip
underid
to add introductory information to a book before a chapter startsusfm_sb.sty
, you can addip
underc
(but not inusfm.sty
)ip
underc
is that it allows you to putip
at the end of a chapter to add introductory material for the following chapterusfm_sb.sty
, you can addp
s (and 13 other Ranked markers likem
,qa
,b
, etc.) underip
, likely to allow adding more complex introductory material at the end of a chapter (but not inusfm.sty
)p
is ranked and its rank is equal to or less thanip
's rank. Inusfm.sty
, there are no markers that have rank and can occur underip
. You can use the regex string\\OccursUnder.*ip.*\n\\Rank
to investigateq
(and a number of other Rank 4 markers likeq3
,sp
,d
, etc.) under anip
but only underc
in eitherusft.sty
orusfm_sb.sty
, maybe to indicate that you are not supposed to put anip
in the middle of a chapter as not everything that can be in a chapter is allowed underip
Problems
ip
only occurs afterid
and before a chapter or at the end of a chapter, so you can put anip
in the middle of a chapter if you wantip
, so if those markers occur within the chapter after you put anip
, those markers are flagged invalid. However, the issue in this case is really with theip
, not with the subsequent ranked markers, so we should see theip
flagged invalid insteadip
can only be at the end of a chapter and thought about it so anip
can occur within a chapter (since this is currently possible), there is no way to end anip
ip
in the middle of a chapter, the subsequent Scripture text will all incorrectly be under theip
instead of outside of itProblems Visualized
You can add
p
andq
underc
:But the
OccursUnder
differences showed above indicate that, inusfm_sb.sty
, you can add one or morep
s under anip
under ac
. Since you can addp
underip
,p
checks to make sure its rank is equal to or lower than the first marker underip
which is either nothing or anotherp
. Sincep
's Rank 4 is equal top
's Rank 4, you can add anotherp
underip
after ap
here:However, in
usfm_sb.sty
, you cannot add aq
under anip
like you can add ap
under anip
. Since you cannot addq
underip
,q
tries to add itself underc
.q
checks to make sure its rank is equal to or lower than the first marker underc
which isip
. Sinceip
's Rank 6 is greater thanq
's Rank 4, you cannot add aq
underc
here. This document is invalid:In the following screenshot from Paratext, on the left is a base Scripture text using
usfm.sty
, and on the right is a test Scripture Study Bible usingusfm_sb.sty
containing an addedip
within a chapter. Addingip
within the chapter is valid with currentusfm_sb.sty
rules. However, it caused the subsequentp
s from the base Scripture text to be under theip
and the subsequentq
s to be invalid because they cannot go under theip
sinceip
is not inq
'sOccursUnder
or close theip
since they have a lower rank:Possible solutions
p
and other ranked markers not able to occur underip
, which improperly removes the ability to add complex introductory material for a subsequent chapter at the end of a chapterq
and maybe all other ranked markers less than 6 able to occur underip
, which unfortunately enables the problem of actual Scripture text being incorrectly underip
q
and other disallowed ranked markers would suggest looking to see if they're under anip
, which doesn't really make sense considering the problem is theip
and not ranked markers that do not opt into being able to occur underip
ip
so it can't be in the middle of a chapter so thatip
can be appropriately deemed invalid under certain conditionsip
is not in an allowed position