03-08-2012, 01:32 PM | #1 |
Enthusiast
Posts: 35
Karma: 474582
Join Date: Mar 2012
Device: Kindle-DX
|
Questions about converting ellipsis
In my Word documents, I expand the spacing in the ellipsis by 3pt., but conversion ignores it and give me dot-dot-dot squeezed together. Typically, when it converts, it looks like this: TEXT ... TEXT or: TEXT...TEXT
By adding a space between the dots, this is how I want it to look: TEXT. . .TEXT When converting to an ebook, can Calibre detect this as an ellipsis and allow the line to break before or after, or is that determined by the reading device? Also, does Calibre recognize non-breaking spaces? Last edited by Bobosmite; 03-08-2012 at 01:35 PM. |
03-08-2012, 02:41 PM | #2 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Someone should correct me if I'm wrong but... Check your Convert - Look&Feel page. If the 'Smarten punctuation' box is checked then both dot-dot-dot (3-char) and dot-space-dot-space-dot (5-char) will be converted to a single char ellipsis in the converted file. The visual appearance of the single-char ellipsis will depend on the font face used in the ereader application.
As far as I know Calibre respects the non-breaking-space entity. What I don't know is whether dot-nbsp-dot-nbsp-dot will also be converted to a single char ellipsis if 'Smarten punctuation' is checked. As far as line-breaking at an ellipsis is concerned, I would think the reading application would decide that. |
03-08-2012, 02:51 PM | #3 |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
03-08-2012, 06:04 PM | #4 | ||
Wizard
Posts: 1,613
Karma: 6718479
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
|
probably not as you've inserted spaces between the dots.
Quote:
A true elipsis is a single special character. The three periods style is an antique typewriter kluge. Many apps, including a properly configured MS Word, will replace these with a proper elipsis even if you adjust the letter spacing (aka kerning) between the characters. When you space the periods out with space characters I wouldn't expect any app to do the auto replacement. If you use non-breaking spaces ( in HTML) to space the periods it will flow as if it is a single character, but you need to use standard "breaking" spaces before and/or after if you want the reader to be able to wrap the line at those positions. Quote:
|
||
03-08-2012, 06:34 PM | #5 |
Enthusiast
Posts: 35
Karma: 474582
Join Date: Mar 2012
Device: Kindle-DX
|
Yeah, I had a feeling that might be the case. I'm so used to having full control of the document and going the other direction, to a flat file, is like drawing with ASCII. Once I figure out the conversion logic, it will be much easier.
|
03-09-2012, 05:29 AM | #6 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
|
03-09-2012, 06:49 AM | #7 | |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
I wasn't guessing. I looked at the code for the SmartyPants script that's included with calibre. The only things Smarten punctuation converts to the elipse character is three periods in a row, or period<sp>period<sp>period. Period-nbsp-period-nbsp-period will escape Smarten punctuation's notice. |
|
03-09-2012, 07:20 AM | #8 | |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Quote:
http://bazaar.launchpad.net/~kovid/c.../preprocess.py edit - it's possible you're agreeing with me, but we got mixed up on where the smartypants vs smarten_punctuation code is. Last edited by ldolse; 03-09-2012 at 07:26 AM. |
|
03-09-2012, 07:54 AM | #9 | ||
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
\.\.\. and \. \. \. Spoiler:
Quote:
To be perfectly honest... those last lines of calibre code you linked to have always confused me. SmartyPants already converted '...' and '. . .' to the ellipse html entity... so I'm not sure why it's being done again before doing the substitute_entity call. And the first -- replacement is being done to preserve any html comments, but it seems as if the final "--" substitution would undo all that. EDIT: never mind that last part about the -- replacement. That appears to be catching any '--' that has a space on either side of it, which would exclude the html comments... but I'm still convinced it's not going to find any occurrances of ' -- ' after the SmartyPants default call. Last edited by DiapDealer; 03-09-2012 at 08:34 AM. |
||
03-12-2012, 10:38 AM | #10 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Interesting. I didn't realize the logic was already built into smartypants, and I distinctly recall having test cases which weren't converted by smartypants, which was why the extra lines were added - I agree with you that on a quick review of the code they seem redundant, and it's possible something else was going on. I'll dig back into it when I get a chance.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Converting to .mobi Questions | gilvezan | Calibre | 1 | 01-15-2011 02:15 PM |
Questions about converting epub to Kindle | inkyness | Amazon Kindle | 6 | 01-10-2011 02:02 PM |
Questions about Send to Folder and converting to Mobi | Diana495 | Calibre | 2 | 09-17-2010 08:45 AM |
How to prevent ellipsis orphan? | Chad48309 | ePub | 2 | 08-16-2010 08:43 PM |
2 questions converting covers and library | mypolar | Calibre | 3 | 08-18-2009 11:40 PM |