![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Mar 2020
Device: iPhone, iPad, Kobo
|
![]()
Hello, I am giving a first shot at creating an ePUB, and am struggling with non-breaking spaces.
I am on macOS (Catalina), primarily using Pages to generate my ePUB. All is fine except the non-breaking spaces (present in my Pages document) but disappearing from my ePUB. After browsing the Internet, I tried different ways: - I tried generating ePUB from Pages and from Vellum*. - I tried checking the generated XHML, and can't find any non-breaking space tag where they should be. - I tried updating the XHTML with non-breaking space tags (& nbsp, & #160 ...) and re-zipping the ePUB. - I tried opening the ePUB in macOS Library and in Adobe Digital Editions. Inevitably, the non-breaking spaces appear as normal spaces when I eventually display the ePUB. Am I doing something wrong here? Thanks in advance for your help. (*) fun fact: the left part of Vellum shows non-breaking spaces (View -> Invisible Characters) but at the same time the right part of the application (ePUB preview) shows normal spaces. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,730
Karma: 8700123
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
And how should the non-breaking spaces show? The non-breaking spaces are displayed as normal spaces, with the difference that words separated by them, they are maintained joint.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Mar 2020
Device: iPhone, iPad, Kobo
|
Quote:
Aren't they supposed to be also fixed-length? Doesn't it look bad to have something like such trailing question mark (example in French, my apologies)? Code:
N'est-ce pas ? Anticonstitutionnellement, oui. |
|
![]() |
![]() |
![]() |
#4 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,830
Karma: 168959602
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
AFAIK, a non-breaking space does not have a fixed length so it will not have any effect on justification. All the nbsp does is to keep the line from breaking at the non-breaking space so in your first sample, the s and the ? will always be on the same line.
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
|
Dunno about french grammar rules, but in English grammar there should not be any kind of space between end of word and question mark
So the problem goes away if you remove the spaces before ? N'est ce pas? Not n'est CE Pas ? |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,584
Karma: 14328510
Join Date: Nov 2019
Device: none
|
If you're trying to use non-breaking spaces in order to line things up with the line above or below, that's not what they're designed for.
|
![]() |
![]() |
![]() |
#7 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,830
Karma: 168959602
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
@stumped: In French, you do place a space between any "high punctuation" mark and the preceding word (i.e. exclamation points, question marks, colons, and semi-colons). I've also seen people using a space before "low punctuation" marks such as periods and commas though that is not standard.
I seem to remember that a thin non-breaking space (& # 8201; ) is recommended but too many fonts don't have that character so you get s�? for instance--depends on the .notdef glyph in the font. |
![]() |
![]() |
![]() |
#8 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,696
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
French in particular has Blackletter laws (almost) regarding spacing around punctuation. A misplaced thin-space will have the Alliance Française enforcers banging on your door in no time (figuratively)
![]() On the other hand, according to some, English doesn't need any punctuation, especially if you're Irish and you're writing in English ![]() BR |
![]() |
![]() |
![]() |
#9 | |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Mar 2020
Device: iPhone, iPad, Kobo
|
![]() Quote:
For the sake of completeness and further reference to French rules, I found the following resources (albeit in French only) of particular interest: https://crowdagger.github.io/textes/...uristique.html https://www.druide.com/fr/enquetes/p...es-impeccables https://roberge.mus.ulaval.ca/gdrm/08-princ.htm |
|
![]() |
![]() |
![]() |
#10 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Here's another one to add to yours: LibreOffice's article: "Non Breaking Spaces Before Punctuation In French (espaces insécables)" Side Note: For all the different thin/normal spacing around punctuation... you have to know the specific language's conventions. Even within French, there are differences between French + Canadian French punctuation. * * * Over the years, I've written extensively on non-breaking spaces in ebooks. Here are some of the threads that go into extreme detail on non-breaking spaces (and other types of spaces): 2019 "ellipses, with or without spaces?" 2017 "break/no-break and other spaces" 2014 "Non-breaking space" 2013 "[old thread] non breaking spaces (* and   ![]() * * * Questions: You seem to be an actual French speaker... how would French handle odd punctuation like question marks within brackets: (?) or [?] Do similar spacing rules apply for more obscure punctuation like {} + &? Or what about Maths (+, −, =)? Do they follow normal conventions? Or apply some sort of insane French version of spacing? :P Quote:
For maximum compatibility, use ... NO-BREAK SPACE (U+00A0). This is the solution you should use for ebooks. Other spaces are less supported and may lead to missing character symbol � showing up. * * * Side Note: If creating French documents for Print: For proper French typography, stick with these two:
To be super extra technically correct, the thin space would be a NARROW NO-BREAK SPACE (U+202F). But this character isn't in many fonts according to my tests. For more details/tests of different fonts/applications, see my Post #48 in "Problem with inline image". Well, in LibreOffice all the other spaces show as gray highlight, and in Calibre, it shows yellow highlight. :P Quote:
But there are bugs, and some major programs that don't follow this logic... See all the juicy details in LibreOffice's bug: Bug 41652 - "NO-BREAK SPACE" (U+00A0) interpreted as fixed-width space In Word 2013, Microsoft finally stopped treating it as a fixed-width space: https://answers.microsoft.com/en-us/...f06c7cb?auth=1 but... I believe they since reverted that (correct) decision in Word 2016+. Last edited by Tex2002ans; 03-04-2020 at 07:53 PM. |
|||
![]() |
![]() |
![]() |
#11 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,730
Karma: 8700123
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() Quote:
![]() |
|||
![]() |
![]() |
![]() |
#12 | |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,911
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
![]() Ireland almost invented modern writing. Before that there was only ROMAN CAPITALS for Latin. Various people invented bits of punctuation. The ancient Romans did none really, the Greeks sometimes marked sentence or paragraphs. |
|
![]() |
![]() |
![]() |
#13 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
|
![]() |
![]() |
![]() |
#14 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,696
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Can't these black birds of yours see a backhanded crumb when it's thrown their way. If you're not careful I'll send my pet cassowary over to see you ![]() BR |
|
![]() |
![]() |
![]() |
#15 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,911
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
It's not funny.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
AZW3 to DOCX - Non-breaking Spaces | retiredbiker | Conversion | 4 | 09-25-2019 10:53 PM |
Non-breaking spaces | exaltedwombat | Sigil | 15 | 09-16-2019 08:19 AM |
Viewing non-breaking and narrow spaces as code? | veezh | Editor | 2 | 05-06-2015 04:53 AM |
0.8.63 strips non-breaking spaces when converting from epub to mobi | veezh | Calibre | 7 | 08-04-2012 08:39 AM |
Non breaking spaces? | troymc | Sigil | 6 | 05-22-2010 07:47 AM |