11-16-2019, 06:29 PM | #16 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Just tested that specific code too...
The spacing looks okay in Sigil, but in ADE the gap still stretches when I make the window bigger/smaller. And it still line-breaks (Sigil/ADE/PocketBook). In ADE/PocketBook, the white-space: pre; also causes this: Code:
This is an example of text — <--- 2 spaces to right-edge Lorem ipsum [...] <--- 2 spaces along left-edge too, so line looks "indented" Last edited by Tex2002ans; 11-16-2019 at 06:32 PM. |
11-16-2019, 09:30 PM | #17 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Hi
For my first test with Calibre, I only need one space ("pre") instead of four and the vertical alignment seems OK. If I only use it for dialogues, I do not worrry about line-breaks. it seems to work OK with Sigil, the Calibre viewer and Prince PDF. It works also nicely with Koreader ePub (Cool Reader engine) Next book; I'll try another solution from Tex Last edited by roger64; 11-17-2019 at 04:59 AM. |
Advert | |
|
11-17-2019, 11:06 AM | #18 | |||
Wizard
Posts: 1,552
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Quote:
Quote:
Finally, THE SOLUTION FOR RMSDK is the following: Code:
<p>—<span class="ps"> </span>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> <p>—<span class="ps"> </span>Nulla ac tellus nunc. Phasellus imperdiet leo metus, et gravida lacus.</p> <p>—<span class="ps"> </span>Donec metus ligula, elementum at pellentesque pellentesque, suscipit ac nunc. Etiam lobortis, massa ac aliquam auctor, augue nisl sagittis urna, at dapibus tellus erat ullamcorper ligula.</p> Code:
p { text-align: justify; } .ps { white-space: pre; } Last edited by pdurrant; 11-17-2019 at 11:48 AM. Reason: fixed quote tag |
|||
11-17-2019, 07:00 PM | #19 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Thank you both for your extensive trials.
I'll use this latest Ruben proposal for my next book. It adds to the no-break quality of the "nbsp" the fixed space of the "pre" css command. Could it be the best of two worlds? |
11-17-2019, 09:06 PM | #20 |
Resident Curmudgeon
Posts: 74,336
Karma: 129333690
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
roger, why do you want to use such poor code? Just use a left margin with a negative indent and be done with it. That's what works.
|
Advert | |
|
11-18-2019, 06:42 AM | #22 |
Wizard
Posts: 1,552
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
¿Poor code? I see you didn't understand of the nature of the Roger's issue. He is not seeking a replace for a bullet in an unordered list. By the way, I also see that you didn't bother to test your "rich code" either. If you had done it, you would have seen that the alignment varies with different font sizes, and different font names. You can not set an unique margin and one unique text-indent that work with all font sizes and all font family. So that, it is your solution that is really poor (no offense).
|
11-18-2019, 06:46 AM | #23 | |
Wizard
Posts: 1,552
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
|
|
11-18-2019, 06:44 PM | #24 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
I did not test it thoroughly but I'll keep it unless proven wrong by some tester.
Again, thanks for your help. |
11-19-2019, 05:44 PM | #25 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
|
11-20-2019, 06:24 AM | #26 | |
Wizard
Posts: 1,552
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Code:
<p>—<span class="ps"> </span>Lorem ipsum dolor sit amet, consectet...</p>
------------
p {
text-align: justify;
}
.ps {
white-space: pre;
}
|
|
11-20-2019, 08:44 AM | #27 | |
Grand Sorcerer
Posts: 6,512
Karma: 84500001
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
Quote:
The KFX renderer is Amazon's own creation and according to the Amazon Kindle Publishing Guidelines, Appendix B: Attributes and Tags Supported by Enhanced Typesetting, the only values it supports for the "white-space" property are "nowrap" and "normal". |
|
11-20-2019, 02:44 PM | #28 | ||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
In ADE: Using didn't stretch. Using 1 or more normal space (as the previous examples), you get the stretchiness. I attached an EPUB using your code + various amounts of normal spaces. Quote:
Is it guaranteed they always begin the line? These types of dashes can't occur in the middle of paragraphs? Because wrapping the in a <span> line-breaks in ADE... which defeats half of the actual functionality! |
||
11-20-2019, 03:37 PM | #29 | |||
Wizard
Posts: 1,552
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
"O thou, man of little faith"
Quote:
Quote:
Quote:
Code:
—<span class="ps"> </span>Some text here By the way, if you in the class "ps" use the following properties: Code:
.ps { white-space: pre; background: red; } |
|||
11-20-2019, 06:47 PM | #30 | |
Grand Sorcerer
Posts: 6,512
Karma: 84500001
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Display of narrow no-break space (Linux build) | roger64 | Sigil | 16 | 02-17-2018 10:35 AM |
Representing the no-break space | roger64 | Sigil | 11 | 08-09-2017 02:09 AM |
Narrow No-Break Space display | roger64 | Sigil | 6 | 12-20-2012 02:43 PM |
Narrow No-Break Space and commercial support. | roger64 | ePub | 8 | 09-04-2012 01:08 PM |
Is it possible to define rules for non break space? | habanr | Conversion | 4 | 02-22-2011 07:36 AM |