Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Android Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 05-26-2021, 05:06 PM   #1
mjcatt
Junior Member
mjcatt began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2018
Device: kindle voyage, Moon+Reader Pro
Moon+Reader Pro punctuation handling

In written spanish dialog, em dash is used somewhat like quotes in english and there are some times where it is followed by a period, for example: —. or possibly —,
Here is a quick example:
—Se habrá perdido —respondió Billy—. Vamos.
In Moon+ Reader Pro, if the length of the line is just right the text sometimes wraps to a new line after the em dash and before the period, as follows:
—Se habrá perdido —respondió Billy—
. Vamos.
Obviously, this looks really strange and I have never seen it happen on my Kindle Voyage, the Calibre book reader or the Calibre server web browser reader. Also, as far as I can tell, there is no accepted HTML/CSS code (except possibly for one inconvenient depreciated <nobr> tag), but I'm no expert.

Does anyone know of a way the keep these punctuation characters together? Is there any setting buried somewhere in Moon+ Reader for this?

Thanks for your help.
mjcatt is offline   Reply With Quote
Old 08-25-2021, 02:22 AM   #2
Tortuosit
Enthusiast
Tortuosit began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Nov 2019
Device: Huawei Mate 20 X
This is a big thing for me - I use AlreaderX for reading only because of this problem.

Moon+ here does things like:
"Hello, he said."
>
"Hello,he said
."

By any chance, do you use names replacement? I think only then it happens. I hope I am right. I tried a lot of font sizes and wasn't able to see the problem with replacement off. I reported my finding to the dev.

AlreaderX is a fine reader, really good reading part... but the library UI is... ugh... lacking. That's why I really want to use Moon+ again.

Last edited by Tortuosit; 08-25-2021 at 02:25 AM.
Tortuosit is offline   Reply With Quote
Old 08-26-2021, 04:10 AM   #3
elchamaco
Zealot
elchamaco will become famous soon enoughelchamaco will become famous soon enoughelchamaco will become famous soon enoughelchamaco will become famous soon enoughelchamaco will become famous soon enoughelchamaco will become famous soon enough
 
Posts: 128
Karma: 500
Join Date: Aug 2011
Device: kindle, boox
I use Moon and i've not seen that. Probably is some option as Tortuosit says.
elchamaco is offline   Reply With Quote
Old 08-27-2021, 02:48 AM   #4
Tortuosit
Enthusiast
Tortuosit began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Nov 2019
Device: Huawei Mate 20 X
My suspect is the names.replament,here's mine:

Code:
»#->#„
«#->#“
›#->#‚
‹#->#‘
Tortuosit is offline   Reply With Quote
Old 10-16-2021, 04:24 PM   #5
Tortuosit
Enthusiast
Tortuosit began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Nov 2019
Device: Huawei Mate 20 X
Without using the replacement, I have never seen the problem again. Reported it to the dev. but unfortunately no reaction.
Tortuosit is offline   Reply With Quote
Old 10-17-2021, 01:15 PM   #6
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by mjcatt View Post
In written spanish dialog, em dash is used somewhat like quotes in english and there are some times where it is followed by a period, for example: —. or possibly —,

[...]

Also, as far as I can tell, there is no accepted HTML/CSS code (except possibly for one inconvenient depreciated <nobr> tag), but I'm no expert.

Does anyone know of a way the keep these punctuation characters together?
You may want to try this:

1. Using the "Word Joiner" Character

Open up your EPUB, and:

Search: —.
Replace: —&#8288;.

Search: —,
Replace: —&#8288;,

That should "combine" the dash + period/comma into a single chunk, telling Moon+ not to line-break there.

2. If that doesn't work, then maybe a CSS solution.

(Although Moon+ is one of the bad readers that throws away all "publisher CSS". I recommend using a more standards-compliant reader.)

We discussed lots of different methods in 2019: "No break space and alignment".

This one is extremely hackish, so it's not recommended:

HTML:

Code:
<p>—Se habrá perdido —respondió <span class="nobreak">Billy—.</span> Vamos.</p>
CSS:

Code:
.nobreak {
  white-space: pre;
}
In English, that CSS tries to say:

"Hey, I already pre-did the linebreaks+spacing here for you. Keep Billy + EM DASH + PERIOD all together. Don't you mess with it!"

You may be able to more easily apply this to your book by using this regex:

Search: (\w+)—([,\.])
Replace: <span class="nobreak">\1—\2</span>

which looks for:

1. Any letters
2. EM DASH
3. comma OR period

then wraps the <span> around it.

But again, I don't recommend mangling up all your code for this. Instead, use a much better reader that actually follows the standards. (PocketBook is a very good reader on Android.)

Last edited by Tex2002ans; 10-17-2021 at 01:20 PM.
Tex2002ans is offline   Reply With Quote
Reply

Tags
moon+ reader pro


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Not sure how to use Moon Reader Pro 2scre Android Devices 1 12-04-2020 08:49 PM
moon reader pro tym Android Devices 0 09-05-2019 06:39 PM
Moon Reader Pro cvkemp Android Devices 29 05-10-2015 10:11 PM
Moon+ Reader Pro laurla Reading and Management 1 12-02-2014 11:28 AM


All times are GMT -4. The time now is 11:08 AM.


MobileRead.com is a privately owned, operated and funded community.