[sword-devel] WHNU variants

Will Thimbleby will at thimbleby.net
Sat May 14 16:22:05 MST 2005


Great, thanks. I'm using a modified BibleTime filter at the moment.  
I'm not sure I understand which filters do what. This is what I got  
from diatheke -- is this right?


     if (optionfilters & OP_VARIANTS && variants) {
             if (variants == -1)
                 manager.setGlobalOption("Variants", "All Readings");
             else if (variants == 1)
                 manager.setGlobalOption("Variants", "Secondary  
Readings");
     }
     else
         manager.setGlobalOption("Transliteration", "Primary Readings");



What would also be very handy is if you could point me at a verse  
that has variants in WHNU and, even better, what I should be showing  
for that verse.

thanks for the info -Will

On 14 May 2005, at 10:11 pm, Troy A. Griffitts wrote:

> Will,
>     There are 3 options for displaying variants in WHNU: Primary  
> Reading, Secondary Reading, and Both.
>
>     The first 2 get done at the filter level in the sword engine.   
> The user selects the option just like any other option (not sure  
> how users select sword options in MacSword).  The last one will  
> send both words to you and will look funny if they aren't marked up  
> differently.  I'd have to know what filter you are using for ThML  
> rendering.  Anyway, here is an excerpt of code from the thmlosis  
> filter that catches them when converting thml to osis.  You can  
> probably use this same logic and replace:
> <seg type="x-variant" subType="x-class:1">word in WH</seg>
> <seg type="x-variant" subType="x-class:2">word in NU</seg>
>
> with something like: <u>word in NU</u> (alt: word in WH)
> I'm sure you'll come up with something a little more asthetically  
> pleasing, as you are the master of all such :)
>
> Here's the code snippet:
>
>                // variants
>                if (!strncmp(token, "div type=\"variant\"", 18)) {
>                     XMLTag tag = token;
>                     text.append("<seg type=\"x-variant\"");
>                     SWBuf cls = "x-class:";
>                     cls += tag.getAttribute("class");
>                     if (cls.length()>8)
>                          text.appendFormatted(" subType=\"%s\"",  
> cls.c_str());
>
>                     text += ">";
>                     divEnd = "</seg>";
>                     newText = true;
>                     lastspace = false;
>                     handled = true;
>                }
>
>
> Will Thimbleby wrote:
>
>> Hi, can some one point me to some variants in the WHNU module,  
>> along  with what MacSword should be showing. So I can fix  
>> MacSwords variant  code.
>> thanks --Will
>> _______________________________________________
>> 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