bibledit / cloud

Source code for Bibledit core library and Cloud binary
GNU General Public License v3.0
13 stars 3 forks source link

tag \va and \vp are not recognized #88

Closed LAfricain closed 6 years ago

LAfricain commented 6 years ago

Hello, The \va and \vp tags are not yet recognized, would be?

teusbenschop commented 6 years ago

Hello! Is this a question to ask whether the two tags are not recognized? Or is this a statement "that" they are not recognized? I am about to look into this issue, but it's not yet clear to me what to do exactly.

teusbenschop commented 6 years ago

An example of the specific usage is here:

https://ubsicap.github.io/usfm/chapters_verses/index.html

I tried it out. Bibledit does recognize those markers. (It may not output the exact same format as given in the examples above, but that's another matter. It does recognize the markers).

LAfricain commented 6 years ago

Or is this a statement "that" they are not recognized

It is a statement.

\c 1
\s1 Bwanya bouti wapi ?
\s Maloba ma liboso *
\p
\ vp 1\ vp* Toyebi makambo manene mingi mpo totangi minkanda mya Mibeko,
\ vp 2\ vp* mya baprofeta mpe mya bato basusu bayaki nsima.
\ vp 3\ vp* Ebongi tokumisa ekolo ya Israel mpo ya mi­nkanda mya bango mpe mpo ya bwanya bozali wana.
\ vp 4\ vp* Solo, ebongi ’te bato bakoma koyeba makambo mingi na botangi minkanda,
\ vp 5\ vp* kasi, ntango basili kozwa mateya, base­ngeli kosalisa bato basusu
\ vp 6\ vp* na maloba mpe na minkanda mya bango. 7 Yango wana nkoko wa ngai mobali, Yezu, amipesaki mobimba na mosala mwa botangi 8 buku ya Mibeko, 9 ya baprofeta, 10 mpe bikoma bisusu bya bankoko ba biso. 11 Aye­baki minkanda minso malamu mpe­nza. 12 Yango wana ye mpe akomaki o monkanda maye matali mateya mpe bwanya, 13 mpo ’te baye balingi koyekola batanga monkanda mwa ye, batosa mateya mana, 14 mpe babo­ngisa bomoi bwa bango engebene na Mobeko. 15 Bongo, nabondeli bino 16 bota­nga buku eye 17 na motema malamu mpe na bokebi. 18 Bolimbisa ngai so­ko bomoni 20 ’te nabongoli lika­mbo lyoko lyoko malamu te, 19 ata nasalaki makasi. 21 Mpamba te, maye makomami o monkanda moye o lokota la ba-Ebrei 22 makeseni mbala mingi mwa moke na maye babo­ngoli o lokota losusu. 23 Kasi ezali bongo bobele na monkanda moye te : 24 o buku ya Mibeko, ya baprofeta 25 mpe o buku isusu, 26 maloba mi­ngi babongoli, makeseni na maye makomamaki liboso. 27 Nakendeki o Ezipeti, nafandaki kuna. 28 O mobu mwa ntuku isato na mwambe mwa bokonzi bwa Evergeto, 29 nazwi mateya maye ma bwa­nya bonene. 30 Nakanisi ’te nasengelaki kondima na mpiko lotomo loye lonene la kobongola buku eye o lokota la biso, ata nasengeli komiyokisa mwa mpasi. 31 Mikolo mingi nalalaki noki te, nayekolaki mpe mingi 32 ntango eye, 33 mpo ’te nasilisa mosala mpe nabimisa mo­nkanda moye 34 mpo ya bandeko ba­kei o bikolo bisusu mpe balingi koyeba bwanya 35 mpe kobongisa bomoi bwa bango lokola ekomami o buku ya Mobeko.
\p
\v 1\va 4\ va* Bwanya bonso bouti na Mokonzi *, mpe bozali pene na ye seko.
\v 2 \va 5\ va* Nani ayebi kotanga mbuma ya zelo o libongo lya mbu, na matanga ma mbula, na mikolo boni mokili mokoumela ?
\v 3 \ va 6\va* Bosanda bwa likolo, bonene bwa mokili, bozindo bwa mai, nani ako­ki koyeba mango ?
\v 4 \ va 7\va* Bwanya bokelami liboso lya bikelamo binso, boyebi makambo bo­ba­ndaka kala mpenza *.. (
\v 5 )
\v 6 Nani ayebi esika nini bwanya bo­uti ? Mikano minso mya bwanya, nani ayebi myango ? (
\v 7 )
\v 8 Oyo azali na bwanya mpe base­ngeli kobanga, azali se moko : ye Mokonzi oyo afandi o ngwende ya ye.
\v 9 Ye Mokonzi akeli bwanya, amoni bwango mpe atali bonene bwa bwango ; akaboli bwango na bikelamo binso,
\v 10 apesi bwango na bato banso lokola ye moko alingi, akabi bwa­ngo na baye balingi ye.
\s Bobangi Nzambe *
\p

Give this:

sira_va_vp

I can add that bibledit always put the closing tag on the line!

teusbenschop commented 6 years ago

The sample USFM given is not in agreement with the USFM standard at https://ubsicap.github.io/usfm/chapters_verses/index.html. It uses a different format.

Question: Does the USFM check https://bibledit.org:8081/checks/settings for well formed USFM consider the sample USFM to be without errors?

The reason for this question is that Bibledit only formats well formed USFM properly.

LAfricain commented 6 years ago

The sample USFM given is not in agreement with the USFM standard

You are right! @DavidHaslam, can give you opinion? Maybe I need to change the usfm file, let me do some tests, after advise David...

Question: Does the USFM check https://bibledit.org:8081/checks/settings for well formed USFM consider the sample USFM to be without errors?

Yes the checks find the errors of the \vp and \ va tags, because bibledit put always the end tag at a new line:

 \va 4
\ va* Bwanya bonso bouti na Mokonzi *, mpe bozali pene na ye seko.
\v 2 \va 5
\ va* Nani ayebi kotanga mbuma ya zelo o libongo lya mbu, na matanga ma mbula, na mikolo boni mokili mokoumela ?
\v 3
DavidHaslam commented 6 years ago

There should be no space after the reverse solidus!

Rather than \ vp 1\ vp* you should have \vp 1\vp*, etc.

LAfricain commented 6 years ago

I always suppress the space, but, it is bibledit that add always it!! :(

DavidHaslam commented 6 years ago

The USFM files in the LinVB project do not now have this mistake. I can't remember whether they did earlier.

LAfricain commented 6 years ago

See post behind :)

DavidHaslam commented 6 years ago

I find that hard to believe! If that were always the case, then how do you explain this:

\v 1\va 4\ va* Bwanya bonso bouti na Mokonzi *, mpe bozali pene na ye seko.
\v 2 \va 5\ va* Nani ayebi kotanga mbuma ya zelo o libongo lya mbu, na matanga ma mbula, na mikolo boni mokili mokoumela ?

The first line has no space in the first \va tag. On the other hand, the space after the verse number is missing in the \v # tag just before that.

Let's hear about this from @teusbenschop

LAfricain commented 6 years ago

I suppress the spaces in bibledit before export, this \v 1\va 4\ va* is a my mistake, to be correct!

DavidHaslam commented 6 years ago

Is there an issue about the bad export?

LAfricain commented 6 years ago

Yes, the export is bugged. See the capture above.

LAfricain commented 6 years ago

I did a test with the example from ubiscap:

\ms1 Addition B
\s A Copy of the Letter
\p
\v 14 \vp 1b\vp* This is a copy of the letter:
\pmo From Artaxerxes, the Great King, to the governors and officials of my one hundred twenty-seven provinces from India to Ethiopia.
\pm
\v 15 \vp 2b\vp* I rule many nations, and I am the most powerful king in the world. But I have never used my power in a proud or arrogant way. Instead, I have always been reasonable and kind to the people in my kingdom. I know they want peace, and so I have decided to make every part of my kingdom peaceful and safe for travel.

See the capture:

vp_tag

DavidHaslam commented 6 years ago

OK - assuming the screenshot is of Bibledit, the developers should examine the way that ParaTExt renders the same text in the right hand side of the example in the USFM User Reference.

screenshot 2017-11-21 19 16 29

Ignoring here the use of drop caps for the rendering of \ms1 Addition B, it's evident that text wrapped within the \vp_#\vp* tags should be displayed as superscripted.

DavidHaslam commented 6 years ago

And ideally, the same requirements should apply for Bibledit-Desktop formatted view.

LAfricain commented 6 years ago

And ideally, the same requirements should apply for Bibledit-Desktop formatted view.

Of course! But Matthew, have not so much time to work on it... He's a little bit alone. Currently I use the two sofware, Bibledit-Desktop for the job on usfm, and Bibledit for the export... As I don't know c++ I can help Matthew, :(

teusbenschop commented 6 years ago

I always suppress the space, but, it is bibledit that add always it!! :(

While investigating this, additionally Bibledit changes \ca 53\ca* to

\ca 53
\ca*

upon saving. That needs a fix also. But it is not too big an issue, because in USFM it is not too important whether markup starts on a new line.

teusbenschop commented 6 years ago

I opened a new issue about the \ca thing: https://github.com/bibledit/cloud/issues/99

teusbenschop commented 6 years ago

Yes the checks find the errors of the \vp and \ va tags, because bibledit put always the end tag at a new line:

\va 4
\ va* Bwanya bonso bouti na Mokonzi *, mpe bozali pene na ye seko.
\v 2 \va 5
\ va* Nani ayebi kotanga mbuma ya zelo o libongo lya mbu, na matanga ma mbula, na mikolo boni mokili mokoumela ?
\v 3

I understood that this is an issue in Bibledit-Desktop. Jut to be sure I tried it: The issue cannot be reproduced in Bibledit (plain).

teusbenschop commented 6 years ago

Ignoring here the use of drop caps for the rendering of \ms1 Addition B, it's evident that text wrapped within the \vp_#\vp* tags should be displayed as superscripted.

The user can display it superscripted, and do that by editing the stylesheet, at the location shown in the screenshot:

screen shot 2017-11-27 at 12 57 33

It can be set to superscript (On), then it should be OK.

teusbenschop commented 6 years ago

The default style has now been updated to superscript for the markers va and vp. This fixes the issue for new installation. For existing installation, the user can edit the stylesheet, or create a new default stylesheet. Closing the issue.