No space is added before the verse in SAB

I noticed that there is a difference on the the verse rendering in SAB compared to the display in for example Paratext Viewer. In SAB there is no space added before the verses in a paragraph.

Here is an example from Mark 4 vers 3-4 in USFM:

\v 3 “Listen! A farmer went out to sow his seed.
\v 4 As he was scattering the seed, some fell along the path, and the birds came and ate it up.

In SAB this looks like this:

3 “Listen! A farmer went out to sow his seed.4 As he was scattering the seed, some fell along the path, and the birds came and ate it up.

Right now there is no space between the period and verse 4. I would have liked SAB to added this space. Not in front of verse 3 that starts the new paragraph, but before verse 4 that is in the middle of this paragraph. I expected this result:

3 “Listen! A farmer went out to sow his seed. 4 As he was scattering the seed, some fell along the path, and the birds came and ate it up.

And maybe the option to remove the space after the verse instead of the space before:

3“Listen! A farmer went out to sow his seed. 4As he was scattering the seed, some fell along the path, and the birds came and ate it up.

Is this a know issue/bug?

This is not what most of us see in apps built with SAB. Can you send more information, like a screen shot of the app with the problem? And several lines of the actual source from Paratext? My guess, since you gave the example in English is that you are building the app in some non-Roman script. Maybe even a sensitive language? I wonder if the problem is in script handling, not the general mechanism of SAB to put punctuation and spaces in the right places.

Hi, thanks for looking into this. This is not a problem in all places, but I noticed more often in Mark in some sections. And yes this is a Swedish translation, so it is like you say there could be that there is a problem with double-byte characters. The USFM files are UTF-8 encoded. We are also using /fig and /add so maybe is it a combination that throws off the SAB code in some sections? I have seen this problem in earlier versions of the SAB as well as in the latest release (8.6.5) that I tested today.

Attaching screenshot from Mark 5!

There is problem with verse 2 not rendered correctly (there is no space before the number), the same for subsequent numbers in this section:

But in the next section verse 7, and following verses are correct:

Here is the USFM file for Mark 5 vers 1-8

\c 5\s2 Den besatte och svinhjorden\r (Matt 8:28-9:1; Luk 8:26-39)
\m \fig |3904_kursi_tombs_small.jpg|col|||Klippgravar har hittats i Kursi på den östra sidan av Galileiska sjön. Det kan ha varit här Jesus mötte mannen som plågades svårt av mörkrets makter.| \fig*
\v 1 De \add [Jesus och de tolv lärjungarna]\add* kom över till gerasenernas område på andra sidan sjön.
\v 2 Genast när Jesus steg ur båten kom en man emot honom från gravarna. Han hade en oren ande i sig \add [var under den onda andens inflytande, se \xt Matt 8:28\xt*]\add*.
\v 3 Mannen höll till \add (bodde)\add* bland gravarna och ingen kunde längre binda honom, inte ens med kedjor.
\v 4 Han hade ofta bundits med fotbojor och kedjor men han hade slitit av kedjorna och brutit sönder bojorna. Ingen kunde rå på honom.
\v 5 Ständigt, natt och dag, höll han till bland gravarna och uppe i bergen och skrek och skar sig med stenar.
\b \m \add [Markus beskriver med flest detaljer hur djupt plågad den här mannen är av de onda andarna, och hur brutalt han har behandlats av omgivningen. Mannens personlighet har blivit förvriden, men när han ser Jesus ser han den som kan befria honom. Markus och Lukas nämner bara en man, medan Matteus skriver att de var två, se \xt Matt 8:28; Luk 9:27\xt*. Evangelierna är ögonvittnesskildringar och denna typ av skillnader är inte ovanliga eller konstiga. Troligtvis är det två eller flera män som bor här bland gravarna. En av dem är mer framträdande och den som för konversationen.]\add*
\b \m
\v 6 \add [Även om mannen är under demoners inflytande som har nästlat sig in i hans personlighet, har han en fri vilja. Han ser att hos Jesus finns hans befrielse.]\add* När han på långt håll fick se Jesus sprang han fram och föll ner för honom \add (i tillbedjan)\add*
\v 7 och vrålade \add (skrek)\add* med hög röst: ”Vad har du med mig att göra, Jesus, den högste Gudens Son? \add [Frasen som ordagrant är ’vad har jag med dig att göra’ kan betyda ’lämna mig ifred’ eller ’bry dig inte om mig’.]\add* Har du kommit hit för att plåga oss i förtid?”
\v 8 För Jesus hade just befallt honom: ”Kom ut ur mannen, du orene ande!”
\p

Here is the app on Google Play: https://play.google.com/store/apps/details?id=se.karnbibeln.app&hl=sv&gl=US

Hi Jeff, I found a WORKAROUND!

I did some more research and I noticed that the the common factor for the problem to occur figures in the text. It seams like the text following an image will have this problem. I tried a workaround to add

\b \m

after the \fig* tag and that worked fine! It gives a little more space, but that’s works nice.

The root cause of the issue is something with how SAB render verses when there is a figure in the text. The image also display image caption and the verse, maybe there is something in the code for that verse that interfere with the ordinarily verse rendering?