![]() |
#1 |
Enthusiast
![]() Posts: 29
Karma: 10
Join Date: Mar 2017
Device: none
|
Add empty spaces between characters (Calibre)?
In my ebook, I have a line of text that includes empty spaces, like:
"asdfkl sdfkjsdfl" But the spaces disappeared in the conversion from InDesign to Calibre. So I was wondering if there's a way to add empty spaces between characters in Calibre? As a work-around, I tried to make some 'invisible' characters; e.g. change the text color to white, but then I realized I would obviously need two styles within one line, because some characters would still need to be black, and I couldn't figure out how to do that... |
![]() |
![]() |
![]() |
#2 |
Obsessively Dedicated...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,221
Karma: 35037583
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
|
Do you mean a space between each character in a word? Like so?
H A P P Y {oops -- the no-parse tags are not working well. I had to put a space after the ampersand "&" to keep forum software from changing my text into actual whitespace. If you use these in real code, make sure there are no spaces inside the entities.} You might try using the non-breaking space --- use the html name or the html number & #160; like so: Code:
H A P P Y H& #160;A& #160;P& #160;P& #160;Y The entity for a regular space is & #32;. Also be aware that rendering will collapse multiple regular spaces into a single space, and you have to fool the engine by using a combination of nbsp and regular space, OR wrap in a tag that defines how you want the whitespace handled. W3schools has information here: https://www.w3schools.com/cssref/pr_...hite-space.asp If you are producing this book for distribution, it's very good that you decided against the "color" solution. If the user decides to change the background color, your white text would suddenly become visible. You should avoid setting any colors for text --- end-users get upset if your *black* text suddenly disappears when they want to use night-mode. EDIT TO ADD: While I am thinking of it, if you simply have single spaces between characters, Calibre would not have deleted those. Did you mean MULTIPLE spaces? If so, you will indeed have to use multiple nbsp, or wrap text with a tag defining whitespace. Your example text does not show clearly what you are trying to do. Can you attach a screenshot? Last edited by GrannyGrump; 04-06-2017 at 01:26 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Just add the style
letter-spacing: 1em |
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,613
Karma: 6718541
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
|
Quote:
Based on those assumptions, the space omission occurred in InDesign, likely a formatting type that its ePub export doesn't handle. This would leave you with two functional fixes:
|
|
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,072
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,351
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
|
![]() |
![]() |
![]() |
#7 |
Enthusiast
![]() Posts: 29
Karma: 10
Join Date: Mar 2017
Device: none
|
Thank you very much for your time!
First, I have to explain an embarrassing fact that I should have included in my original post (I did so in my first forum post some days ago, but forgot it here): I'm absolutely new to ebooks, and the embarrassing part is that I don't even have the time to really learn much about it, so I have to fake it as I go along, copying code I don't understand, as I literally don't have a clue about the very basics. I just happen to have this one long mess of a physical book, with lots of styles and fonts, and thanks to the good people here, my digital version actually looks correct now, with the exception of this space-thing. And to make matters worse, I only now realize that the forum software here treats my spacing exactly like the ebook readers, e.g. it cuts away extra multiple spaces between words. So how jhowell actually managed to quote a correct version of my original post (two post up) is completely beyond me! But this is what it should look like: "asdfkl xxxxxxxxxx sdfkjsdfl" (Where the x's represent additional empty spaces.) So I'm sorry that I inadvertently led GrannyGrump, kovidgoyal, Turtle91 and everybody else in a wrong direction. ![]() |
![]() |
![]() |
![]() |
#8 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
To see what someone actually typed hit the quote button, also see ==>> MobileRead Forums - BB Code List BR |
|
![]() |
![]() |
![]() |
#9 |
Enthusiast
![]() Posts: 29
Karma: 10
Join Date: Mar 2017
Device: none
|
|
![]() |
![]() |
![]() |
#10 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
I forget how to type and display things like non-breaking spaces, shys, etc in the calibre code editor, which is one of the reasons I don't use it much for editing the code. BR Last edited by BetterRed; 04-07-2017 at 04:07 AM. |
|
![]() |
![]() |
![]() |
#11 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
I hate to rain on the parade, but, AFAIK, ADE/RMSDK based epub apps don't support letter-spacing in epub2 books.
ADE 4.5.x/RMSDK 12.5.x supports letter-spacing but only in epub3 books. |
![]() |
![]() |
![]() |
#12 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,752
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I still don't get what's wanted. Can this be properly explained? Is there letter spacing or is it word spacing where there is more than one space between words?
|
![]() |
![]() |
![]() |
#13 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
If you press quote on the original post you can see for yourself - must the time of the year, everyone wants to be fed with a spoon. BR Last edited by BetterRed; 04-07-2017 at 05:23 AM. |
|
![]() |
![]() |
![]() |
#14 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,752
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Doesn't work because the code tags are in a quote.
|
![]() |
![]() |
![]() |
#15 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you want spaces between words, not letters, add the style
Code:
white-space: pre-wrap |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add empty MD file to book | Dalcyks | Library Management | 6 | 11-27-2016 02:05 AM |
Generous use of empty spaces (Foolish?) | chaot | Editor | 6 | 10-29-2015 02:57 PM |
Sigil adds spaces between HTML tags, creating strange characters | chezjim | Sigil | 10 | 06-10-2011 04:00 AM |
Can't add files to library if the filename contain spaces | mduijkers | enTourage Archive | 8 | 09-19-2010 05:10 AM |
Add Empty Books? | Sydney's Mom | Calibre | 4 | 03-14-2010 08:26 PM |