View Single Post
Old 01-26-2017, 06:12 PM   #1678
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by helour View Post
Hi,

I've found problem with the spanning of the text which contains various quotation marks. I can fix it, but I need an info which *.py file handles such things.

Wrong:
Spoiler:
„No dobra,“ prohlasila Desjaniova podrazdene, „kdyz se za Navarra zarucila ta zenska, tak je to asi jasne.“
„Tano…“
„Mate nejake tuseni, kde vubec je?“
„Kdo? Rionova?“ zeptal se Geary. „Ne. Proc?“

<p class="t"><span class="koboSpan" id="kobo.34.1">„No dobra,“ prohlasila Desjaniova podrazdene, „kdyz se za Navarra zarucila ta zenska, tak je to asi jasne.</span><span class="koboSpan" id="kobo.34.2">“</span></p>
<p class="t"><span class="koboSpan" id="kobo.35.1">„Tano…“</span></p>
<p class="t"><span class="koboSpan" id="kobo.36.1">„Mate nejake tuseni, kde vubec je?</span><span class="koboSpan" id="kobo.36.2">“</span></p>
<p class="t"><span class="koboSpan" id="kobo.37.1">„Kdo? </span><span class="koboSpan" id="kobo.37.2">Rionova?</span><span class="koboSpan" id="kobo.37.3">“ zeptal se Geary. </span><span class="koboSpan" id="kobo.37.4">„Ne. </span><span class="koboSpan" id="kobo.37.5">Proc?</span><span class="koboSpan" id="kobo.37.6">“</span></p>

Better (except the ellipsis problem):
Spoiler:
"No dobra," prohlasila Desjaniova podrazdene, "kdyz se za Navarra zarucila ta zenska, tak je to asi jasne."
"Tano..."
"Mate nejake tuseni, kde vubec je?"
"Kdo? Rionova?" zeptal se Geary. "Ne. Proc?"

<p class="t"><span class="koboSpan" id="kobo.34.1">"No dobra," prohlasila Desjaniova podrazdene, "kdyz se za Navarra zarucila ta zenska, tak je to asi jasne."</span></p>
<p class="t"><span class="koboSpan" id="kobo.35.1">"Tano.</span><span class="koboSpan" id="kobo.35.2">.</span><span class="koboSpan" id="kobo.35.3">."</span></p>
<p class="t"><span class="koboSpan" id="kobo.36.1">"Mate nejake tuseni, kde vubec je?"</span></p>
<p class="t"><span class="koboSpan" id="kobo.37.1">"Kdo? </span><span class="koboSpan" id="kobo.37.2">Rionova?" </span><span class="koboSpan" id="kobo.37.3">zeptal se Geary. </span><span class="koboSpan" id="kobo.37.4">"Ne. </span><span class="koboSpan" id="kobo.37.5">Proc?"</span></p>

The incorect spanning leads to ugly spaces between words when the hyphenation and the full justification are enabled.
The file you want is "container.py". It's probably enough to add the other "close quote" characters into the regex at line 215. And as an ellipse can be used at the end of a sentence, it probably should be in there as well. The statement is probably:
Code:
                groups = re.split(ur'(.*?[\.\!\?\:…][\'"\u201d\u2019“]?\s*)',
                                  text,
                                  flags=re.UNICODE | re.MULTILINE)
I can't test that at the moment. And I'm copying and pasting from places, so check that I have actually gotten the correct character.

And for confirmation, can you point to a book in the Kobo store that uses this style of quotes? We can then check that what we do agrees with Kobo does.
davidfor is offline   Reply With Quote