liblouis / liblouis

Open-source braille translator and back-translator.
http://liblouis.io
GNU Lesser General Public License v2.1
259 stars 209 forks source link

capsmodechars should have an influence on where the endcapsphrase indicator is placed #763

Closed bertfrees closed 5 years ago

bertfrees commented 5 years ago

capsmodechars should have an influence on where the endcapsphrase before indicator is placed, if the indicator is the same as endcapsword. Take the following example:

BIJ MEER DAN DRIE WOORDEN IN HOOFDLETTERS ZUID-AFRIKA

If, like in Dutch, - is not a capsmodechars, and the last word of the phrase contains a -, the end indicator should be placed after it:

>>bij meer dan drie woorden in hoofdletters zuid->afrika

If the end indicator is placed before the word, it needs to be repeated after the - (according to the Dutch standard), so the one before the word becomes redundant:

>>bij meer dan drie woorden in hoofdletters >zuid->afrika

The current behavior of Liblouis is as follows:

>>bij meer dan drie woorden in hoofdletters >zuid-afrika

While this can not be misinterpreted as BIJ MEER DAN DRIE WOORDEN IN HOOFDLETTERS ZUID-Afrika, because in Liblouis a passage can not contain words with lowercase letters, it is not correct according to the Dutch standard. If you don't like the new behavior, you can force the old behavior by defining endcapsphrase before and begcapsword with different dot patterns, and changing them into a single dot pattern in a second pass.

bertfrees commented 5 years ago

The same goes for emphmodechars of course.

bertfrees commented 5 years ago

Fixed by https://github.com/liblouis/liblouis/pull/761