[sword-devel] Pre-verse div and headings

DM Smith dmsmith at crosswire.org
Mon Jan 21 15:04:07 MST 2013


On Jan 21, 2013, at 12:52 PM, "Troy A. Griffitts" <scribe at crosswire.org> wrote:

> On 01/21/2013 05:52 PM, DM Smith wrote:
>> On Jan 21, 2013, at 10:07 AM, "Troy A. Griffitts" <scribe at crosswire.org> wrote:
>> 
>>> OK, to clear this up technically.
>>> 
>>> setIntros() turns on and off the versification extra 'slots':
>>> 
>>> TSTMT BK CH:0 - chapter intro
>>> TSTMT BK 0:0 - book intro
>>> TSTMT 0 0:0 - testament intro
>>> 0 0 0:0 - module intro
>> As noted, not all these are handled by osis2mod, but only book and chapter intros. Someday, I'd like direction to add module and testament intros.
>> 
>>> This has nothing to do with filtering tagged content (In the engine)
>>> __________________________________________
>>> 
>>> setGlobalOption("Headings", "On"|"Off")

Well, Karl's post clears up why this works. From my best recollection the material in verse 0 is not marked as pre-verse. The headings filter does not filter verse 0. So the app has to.

>>> 
>>> This will tell the filter set to turn on/off showing anything considered a section heading.  This used to only be pre-verse titles (e.g., "The Sermon On The Mount")-- as DM has pointed out. (Relatively) Recent changes have expanded this to be any content 'pre-verse'-- not just stuff in a <title> tag.
>> This is a problem. It should not toggle the entire pre-verse div, but only the titles (title element and its content) and other text (presumably non-canonical) contained in it. It should not filter the structural tags. The filtering of those structural tags is the problem mentioned in the thread "Vertical Whitespace."
> 
> What do you envision in the inter-verse material which should be displayed?  Newlines?

Yes. Exactly. In the "Vertical Whitespace" post, I outlined how they should be displayed.

>  Is this the only thing that prevents toggling preverse material based on the "Headings" option?

I'm not sure what you mean by "prevents." I think that for Bibles, the only text between verses that should be displayed regardless of the toggle are titles marked canonical="true".

But I don't mind if titles and introductory material is handled by cooperating toggles.


> 
> I'm not arguing one way or another (yet).  I'm just interested. The previous "purpose" for the "preverse" material concept was to isolate material which should be shown when a verse is being viewed in context, but which needs to be shown before the verse marker. There are many use cases for this need.  One is:
> 
> When the verse is being shown stand-along (e.g., in a search results list) this material is (typically) not shown by a frontend.

Right.

The corollary of this is when verses are shown one per line. This is asking for much of the structural formatting to be ignored. Not sure how much should be kept.


> 
> Another is:
> 
> Many users which to turn this material off when reading in context.

Yes. Part of the context is paragraphing. Part of the context is proper indentation of poetry (or what has been formatted as such). Most paragraphing and poetry markup is between verses.

> 
> Until recently, the only thing in this space was section headings., so turning on and off pre-verse material based on section headings made sense.

Right.

> 
> What kinds of things would you still want to be shown when sections headings are turned off?

New lines and also indents (for poetry based on the level (?) attribute.) So both vertical and horizontal whitespace.

Again, I don't mind if intros are handled independently from titles.

> 
>>> I can see conceptually how these can easily get blurred.  It was much easier to see the difference when "Headings" was limited to titles like "The Sermon On The Mount".  I don't like seeing these when I am reading through the text.  They are sometimes like "spoilers" in a movie, e.g., "The Death of King Saul"  I usually turn these off when I am reading.  On the other hand, when I am flipping through my printed Bible, I value these to help orient me to about where I am.  Intros were seen as lengthy book or chapter introductions frequent in printed study Bibles.  Now that "pre-verse" material can be lengthier than simply a section heading, it does blur the lines a little.
>> I'm still confused. When verse 0 is requested (regardless of what type of intro it is), Peter notes that it is affected by the headings render filter. I'm pretty sure that the material in it is not marked pre-verse.
> Material in the intro slots of the versification are not affected by setGlobalOption("Headings", "On"|"Off").
> Let me say it differently: the fact that material is in an intro slot in the versification has no bearing on how the "Heading" option filters work.  This materal might all be marked by something the "Headings" filters will remove (right or wrong), but it does not remove them based on them being in a 0 slot.
> 
> 
>> 
>> It seems to me that verse 0 is always non-canonical and should be toggled by a "not canonical" render filter.
> 
> Renaming a feature from "Toggle Section Headings" to "Toggle Non-canonical" might make more sense to us, and indeed may do exactly what the user intends, but will they understand the feature title?  Should we keep the feature title the same but act as "Toggle Non-canonical"?  Hmmm.  Maybe, but might there be other stuff the user wants to see that's non-canonical?  Footnotes? x-refs, "Intros" :)  Just thinking out loud right now.

Footnotes are clearly not canonical and they have their own toggle.

I think the same is true for x-refs.

And we have a toggle for headings. But it is really not a headings toggle today. It is a pre-verse toggle. Which was the only expected place for headings.

But no toggle for intro. Unless it is also part of the headings toggle (as Karl says is done w/in Xiphos, not the engine.)

There is another headings scenario that others have brought up. The title that splits a verse. I think that there have been some sightings in the wild.

In this scenario we have something like the following (indentation and newlines for clarity). I've also included section introductions which one might find in a study Bible:
	<verse osisID="Book.x.y" sID="Book.x.y"/>
		First part of the verse text.
</div> <!-- end of prior section -->
<div type="section" canonical="true">
	<title>Section title</title>
	<div type="intro" canonical="false">
		<p>First paragraph of section introduction</p>
		<p>Second paragraph of section introduction</p>
	</div>
		Second part of verse text.
	<verse eID="Book.x.y"/>
	... many more verses ...
</div> <!-- end of this section that splits the Book.x.y verse-->

I think this happens because the "publisher" who put in the section divisions doesn't fully agree with the versification they are using.

Together in His Service,
	DM

> 
> 
> Troy
> 
> 
> 
>>> Anyway, just wanted to technical state the difference between the two mechanisms.
>>> 
>>> Troy
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On 01/21/2013 03:23 PM, Peter von Kaehne wrote:
>>>>> Von: DM Smith <dmsmith at crosswire.org>
>>>>> In the past, I've viewed the "headings" toggle as a toggle for
>>>>> non-canonical material. But the discussion on the other thread has me wondering
>>>>> whether intros (non-canonical) information is handled by it.
>>>>> 
>>>> That is exactly what I said - the headline toggle switches on everything, intros and the like.
>>>> 
>>>> Now Troy says this is not how it should be and how the engine is handling it, but fact is that it does so. On all modules I have tried out where I know there is intro material.
>>>> 
>>>> Now, my question - is there something very simple we module makers do wrong? Or is there some major and overarching misunderstanding between engine design, osis2mod and module makers?
>>>> 
>>>> FWIW, usfm2osis.pl (and presumably usfm2osis.py) do not produce a verse or chapter 0 div but produce div type intro or something similar.
>>>> 
>>>> Peter
>>>> 
>>>> _______________________________________________
>>>> sword-devel mailing list: sword-devel at crosswire.org
>>>> http://www.crosswire.org/mailman/listinfo/sword-devel
>>>> Instructions to unsubscribe/change your settings at above page
>>> 
>>> _______________________________________________
>>> sword-devel mailing list: sword-devel at crosswire.org
>>> http://www.crosswire.org/mailman/listinfo/sword-devel
>>> Instructions to unsubscribe/change your settings at above page
>> 
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
> 
> 
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list