[sword-devel] Diatheke ?
David Haslam
dfhdfh at protonmail.com
Thu Mar 22 07:35:09 MST 2018
No - that makes no difference, neither did using osis2mod version $3431
<chapter sID="Ps.3" osisID="Ps.3" n="3" />
<!-- cl --><milestone type="x-chapterLabel" n="SALMO 3" />
<!-- d --><title type="psalm" canonical="true">Salmo de David, cuando huía de delante de Absalom su hijo.</title>
<verse sID="Ps.3.1" osisID="Ps.3.1" n="1" />Jehová, ¡cuánto se han multiplicado mis enemigos! muchos se levantan contra mí.<verse eID="Ps.3.1" />
<verse sID="Ps.3.2" osisID="Ps.3.2" n="2" />Muchos dicen de mi alma: No hay para él salud en Dios. Selah.<verse eID="Ps.3.2" />
However, examining the mod2imp output, it becomes evident that there really is a space between the title element and the div eID element.
https://www.dropbox.com/s/ezauqjw68dv36fi/Screenshot%202018-03-22%2014.29.07.png?dl=0
Is this perhaps a quirk of how osis2mod was enhanced a few years ago to handle all preverse content as a milestoned div element?
Best regards,
David
Sent with [ProtonMail](https://protonmail.com) Secure Email. This always seems to "top-post" when I hit reply.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On 22 March 2018 1:57 PM, Greg Hellings <greg.hellings at gmail.com> wrote:
> On Thu, Mar 22, 2018 at 8:51 AM, David Haslam <dfhdfh at protonmail.com> wrote:
>
>> Greg,
>>
>> Thanks for the comparison between KJV and SpaRV1909.
>>
>> It seems therefore that I assumed incorrectly that the "extra space" problem was more general, and that any module with Psalm titles could be used illustrate it.
>>
>> FYI. Test module SpaRV1865 only exists so far in the text development collaboration between myself and Vince LaRue.
>> btw. We're now in our third week of activity and have made very good progress.
>>
>> I suppose it might even depend on which version of osis2mod was used to build the module?
>> i.e. If there's nothing obvious in the OSIS source text that would result in the space.
>> FIO. Here's Psalm 3 in the OSIS file - there are no trailing spaces at all.
>>
>> <chapter eID="Ps.2" />
>> <chapter sID="Ps.3" osisID="Ps.3" n="3" />
>> <!-- cl --><milestone type="x-chapterLabel" n="SALMO 3" />
>> <!-- d --><title type="psalm" canonical="true">Salmo de David, cuando huía de delante de Absalom su hijo.</title>
>> <verse sID="Ps.3.1" osisID="Ps.3.1" n="1" />Jehová, ¡cuánto se han multiplicado mis enemigos! muchos se levantan contra mí.
>> <verse eID="Ps.3.1" />
>
> I wonder if this newline before the eID verse element plus the empty element itself is being converted into a newline and space character by the OSIS->Plain filter? It would be worth comparing that ending to verse endings in e.g. the KJV to see if they are similar. And also possibly worthwhile to compare the results of osis2mod for your SpaRV1865 to what the compiled KJV module is to see if that newline is preserved.
>
> --Greg
>
>> <verse sID="Ps.3.2" osisID="Ps.3.2" n="2" />Muchos dicen de mi alma: No hay para él salud en Dios. Selah.
>> <verse eID="Ps.3.2" />
>> ...
>> <chapter eID="Ps.3" />
>>
>> Nothing shouts "extra space" does it?
>>
>> I will therefore try the more recent version of osis2mod next time I rebuild the module.
>>
>> Maybe Peter can shed light on how diatheke works here?
>> - given that it was he who added the LaTeX format option - a major contribution which we owe him thanks for.
>> - to do that, he must have got deeply involved in the code.
>> Best regards,
>>
>> David
>>
>> Sent with [ProtonMail](https://protonmail.com) Secure Email.
>>
>> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
>> On 22 March 2018 1:20 PM, Greg Hellings <greg.hellings at gmail.com> wrote:
>>
>>> On Thu, Mar 22, 2018 at 4:01 AM, David Haslam <dfhdfh at protonmail.com> wrote:
>>>
>>>> Hi Greg,
>>>>
>>>> With Plain output format, there's a minor side effect in the way the Psalm title was output in the wrong place.
>>>> Verse 2 of the same Psalm was output with a leading space before the Reference.
>>>>
>>>> https://www.dropbox.com/s/uz1amnrp7ez0b4y/Screenshot%202018-03-22%2008.37.42.png?dl=0
>>>>
>>>> This might be less obvious in a terminal, but it's quite evident when the output is piped to a file.
>>>>
>>>> Please ensure that the patch also removes this spurious space, if perhaps it ddidn't do so already.
>>>
>>> As someone who isn't the maintainer of either Diatheke or the filters, I'm not about to dig through the source to find one errant space in the output. Doubly so in that I do not have nor can I easily locate the SpaRV1865 module that you have screenshot there. I don't see the same artifact in KJV so I am going to conclude, for now, that this is either a bug that was already fixed between the older version of Diatheke that you are using and now or that it is an artifact of the module itself. Compare the KJV and the Spa1909 that's on CrossWire's server:
>>>
>>> $ diatheke -b KJV -o h -f Plain -k Ps.3
>>> Psalms 3:1: LORD, how are they increased that trouble me! many are they that rise up against me.
>>> A Psalm of David, when he fled from Absalom his son.
>>> Psalms 3:2: Many there be which say of my soul, There is no help for him in God. Selah.
>>>
>>> $ diatheke -b SpaRV1909 -o h -f Plain -k Ps.3
>>> Psalms 3:1:
>>> Salmo de David, cuando huía de delante de Absalom su hijo.
>>> ¡OH Jehová, cuánto se han multiplicado mis enemigos! muchos se levantan contra mí.
>>> Psalms 3:2: Muchos dicen de mi vida: No hay para él salud en Dios. (Selah.)
>>>
>>> The SpaRV1909 module definitely has spurious spaces around many different places. I suspect that your SpaRV1865 module is in a similar place.
>>>
>>> --Greg
>>>
>>>> While I'm on a roll, I noticed also that there's a subtle change in how diatheke treats the start and end of a hi element.
>>>> There's now a space after the leading asterisk and another space before the trailing asterisk.
>>>> https://www.dropbox.com/s/2h2u1768rgx9p95/Screenshot%202018-03-22%2008.38.21.png?dl=0
>>>>
>>>> If this change was unintended, it ought to be reverted for consistency with earlier versions.
>>>
>>> Sounds like a filter thing.
>>>
>>> --Greg
>>>
>>>> Best regards,
>>>>
>>>> David
>>>>
>>>> Sent with [ProtonMail](https://protonmail.com) Secure Email.
>>>>
>>>> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
>>>> On 21 March 2018 3:33 AM, Greg Hellings <greg.hellings at gmail.com> wrote:
>>>>
>>>>> On Tue, Mar 20, 2018 at 10:21 PM, Troy A. Griffitts <scribe at crosswire.org> wrote:
>>>>>
>>>>>> If I had to guess, I suspect diatheke is not calling renderText before asking for the header. The renderText method triggers all entryAttributes to be filled. The header is an entryAttribute.
>>>>>
>>>>> Spot on. If I were offering commentary, I would call that a bug in the UX of the API. But I do get why it is that way. Attaching a patch that solves the problem.
>>>>>
>>>>> --Greg
>>>>>
>>>>>> On March 20, 2018 8:13:41 PM MST, Greg Hellings <greg.hellings at gmail.com> wrote:
>>>>>>
>>>>>>> To be quite specific: diatheke does not encounter that header in the preverse content until it reaches Psalm 3:2 for some reason that is beyond my ken. Therefore, it is properly rendering that content as preverse, but it has attached it to the wrong verse. Output from my slightly modified diatheke confirms this:
>>>>>>>
>>>>>>> $ ./inst/bin/diatheke -b KJV -o h -f Plain -k Ps 3
>>>>>>> key: Psalms 3:1
>>>>>>> header:
>>>>>>> Psalms 3:1: LORD, how are they increased that trouble me! many are they that rise up against me.
>>>>>>> key: Psalms 3:2
>>>>>>> header: <title canonical="true" type="section"><w savlm="strong:H04210">A Psalm</w> <w savlm="strong:H01732">of David</w>, <w savlm="strong:H01272">when he fled</w> <w savlm="strong:H06440">from</w> <w savlm="strong:H053">Absalom</w> <w savlm="strong:H01121">his son</w>.</title>
>>>>>>> A Psalm of David, when he fled from Absalom his son.
>>>>>>> Psalms 3:2: Many there be which say of my soul, There is no help for him in God. Selah.
>>>>>>>
>>>>>>> --Greg
>>>>>>>
>>>>>>> On Tue, Mar 20, 2018 at 9:53 PM, Greg Hellings <greg.hellings at gmail.com> wrote:
>>>>>>>
>>>>>>>> It's easier to see the problem when using plain formatting:
>>>>>>>>
>>>>>>>> $ diatheke -b KJV -o h -f Plain -k Ps 3
>>>>>>>> Psalms 3:1: LORD, how are they increased that trouble me! many are they that rise up against me.
>>>>>>>> A Psalm of David, when he fled from Absalom his son.
>>>>>>>> Psalms 3:2: Many there be which say of my soul, There is no help for him in God. Selah.
>>>>>>>> Psalms 3:3: But thou, O LORD, art a shield for me; my glory, and the lifter up of mine head.
>>>>>>>> Psalms 3:4:
>>>>>>>> I cried unto the LORD with my voice, and he heard me out of his holy hill. Selah.
>>>>>>>> Psalms 3:5: I laid me down and slept; I awaked; for the LORD sustained me.
>>>>>>>> Psalms 3:6: I will not be afraid of ten thousands of people, that have set themselves against me round about.
>>>>>>>> Psalms 3:7: Arise, O LORD; save me, O my God: for thou hast smitten all mine enemies upon the cheek bone; thou hast broken the teeth of the ungodly.
>>>>>>>> Psalms 3:8: Salvation belongeth unto the LORD: thy blessing is upon thy people. Selah.
>>>>>>>> (KJV)
>>>>>>>> --Greg
>>>>>>>>
>>>>>>>> On Tue, Mar 20, 2018 at 9:50 PM, Greg Hellings <greg.hellings at gmail.com> wrote:
>>>>>>>>
>>>>>>>>> I'm not so sure your initial assertion is correct.
>>>>>>>>>
>>>>>>>>> $ diatheke -b KJV -o h -k Ps 3
>>>>>>>>> Psalms 3:1: <w savlm="strong:H03068"><seg><divineName>Lord</divineName></seg></w>, <w savlm="strong:H07231">how are they increased</w> <w savlm="strong:H06862">that trouble</w> <w savlm="strong:H07227">me! many</w> <transChange type="added">are</transChange> <w savlm="strong:H06965">they that rise up</w> against me.
>>>>>>>>> <title canonical="true" type="section"><w savlm="strong:H04210">A Psalm</w> <w savlm="strong:H01732">of David</w>, <w savlm="strong:H01272">when he fled</w> <w savlm="strong:H06440">from</w> <w savlm="strong:H053">Absalom</w> <w savlm="strong:H01121">his son</w>.</title>Psalms 3:2: <w savlm="strong:H07227">Many</w> <transChange type="added">there be</transChange> <w savlm="strong:H0559">which say</w> <w savlm="strong:H05315">of my soul</w>, <transChange type="added">There is</transChange> <w savlm="strong:H03444">no help</w> <w savlm="strong:H0430">for him in God</w>. <w savlm="strong:H05542">Selah</w>.
>>>>>>>>>
>>>>>>>>> If you notice carefully, the canonical title is there. It is just misplaced. It comes after the text of Psalm 3:1 and not before.
>>>>>>>>>
>>>>>>>>> --Greg
>>>>>>>>>
>>>>>>>>> On Tue, Mar 20, 2018 at 4:40 PM, David Haslam <dfhdfh at protonmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Maybe someone could patch diatheke to fix this?
>>>>>>>>>> Best regards, David
>>>>>>>>>>
>>>>>>>>>> Sent from ProtonMail Mobile
>>>>>>>>>>
>>>>>>>>>> On Wed, Mar 14, 2018 at 12:14, David Haslam <dfhdfh at protonmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Diatheke does not output the canonical Psalm titles when output option h is used.
>>>>>>>>>>>
>>>>>>>>>>> Try this and see what I mean.
>>>>>>>>>>>
>>>>>>>>>>> diatheke -b KJV -o h -k Ps 3
>>>>>>>>>>>
>>>>>>>>>>> This is a significant lack of feature.
>>>>>>>>>>>
>>>>>>>>>>> Best regards,
>>>>>>>>>>>
>>>>>>>>>>> David
>>>>>>>>>>>
>>>>>>>>>>> Sent from ProtonMail Mobile
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> 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
>>>>>>
>>>>>> --
>>>>>> Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20180322/306e8b9e/attachment-0001.html>
More information about the sword-devel
mailing list