> On Jul 9, 2025, at 10:35 AM, Karl Kleinpaste <k...@kleinpaste.org> wrote:
> 
> On 7/9/25 10:01 AM, DM Smith wrote:
>> These have to be enable with setIntros(true). I’m not sure which frontends 
>> support these intros.
> 
> Xiphos does, but for only book and chapter, obtained as 0:0 and [1-n]:0.
> 
> It has no awareness of module or testament intros. How are these accessed in 
> terms of a verse key? B & C are obvious as "0" elements, but where do the 
> other intro elements fit? Visually, should a testament intro be presented 
> ahead of Genesis and Matthew, or should separate views be provided?

I think you can either parse the string literals I gave earlier, e.g. “[ Module 
Heading ]”, “[ Testament 1 Heading ]”, “[ Testament 2 Heading ]"or set the 
testament to 0, 1 or 2. Setting the testament will set the other parts to 0 if 
Intros is true else 1.

Something like the following should work to get the headings.
VerseKey vk;
vk.setIntros(true);
vk.setTestament(0); // for module heading. use 1 for OT Heading and 2 for NT 
heading.

or
VerseKey vk;
vk.setIntros(true);
ListKey verses = vk.parseVerseList(“[ Module Heading ]”, vk, true); // or “[ 
Testament 1 Heading ]”, “[ Testament 2 Heading ]”
verses.setPosition(TOP);
vk = verseKeys;

Currently in OSIS modules, we are storing the build info in a milestone which 
SWORD won’t render. It is stored in the NT Heading when the module is NT only, 
and in the OT Heading otherwise.

As far as I can tell there’s no test to see if a module has these intros. I 
would think from a front end perspective you’d want to show them only if the 
user has chosen to show intros/headings/titles and only if they have content.

It might make sense to show them when showing Book intros to Gen or Matt. I’m 
not sure what you’d do if the module was the NT and Psalms. Perhaps, an upfront 
test to determine whether the module has these intros and show them separately.



— DM


> _______________________________________________
> sword-devel mailing list: sword-devel@crosswire.org
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Reply via email to