Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 08-16-2011, 07:25 PM   #1
Rand Brittain
Bookmaker
Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.
 
Posts: 268
Karma: 1966722
Join Date: Sep 2010
Device: Cybook Opus
Single-quote/Double-quote

Could someone tell me the simplest tool these days for replacing British-style single-quotes with American-style double-quotes?
Rand Brittain is offline   Reply With Quote
Advert
Old 08-16-2011, 08:16 PM   #2
pholy
Booklegger
pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.
 
pholy's Avatar
 
Posts: 1,801
Karma: 7999816
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook, Kobo Touch
The simplest tool, but neither fast nor reliable, is a text editor and your eyeballs and fingertips...

To be more useful... What kind of text file do you have? Is it 7-bit ASCII or UTF-8? Is it html or xhtml? And, most importantly, is the apostrophe character the same as the right quote? If not, then a simple character substitution would work. However, they are usually the same, so something more sophisticated is required.

I use quoter to change straight quotes to curly quotes in my html, and straight apostrophes to right single quotes. I don't know if it will do single quotes to double quotes, however. I found it with google, and it is supplied as a lex/yacc source, so it could be modified, I suppose.
pholy is offline   Reply With Quote
Old 08-16-2011, 10:20 PM   #3
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
Do you have a link for the code for quoter? I know of SmartyPants from Daring Fireball, but would be interested to see some other code that did the same thing.
charleski is offline   Reply With Quote
Old 08-16-2011, 11:16 PM   #4
Rand Brittain
Bookmaker
Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.
 
Posts: 268
Karma: 1966722
Join Date: Sep 2010
Device: Cybook Opus
The file in question is an epub. As far as I can see, the single quote and apostrophe are the same; both curly, I'm afraid.
Rand Brittain is offline   Reply With Quote
Old 08-17-2011, 04:34 AM   #5
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,009
Karma: 8796505
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I wouldn't trust anything automatic, this is what I'd do:

1. Replace every left-single with "¬" (or any otherwise unused character)
2. For every "¬", find the matching right-single (not apostrophe), and replace it with "|" (or other)
3. Replace every remaining right-single (apostrophes) with "÷" (or other)
4. Replace every left-double with left-single, and right-double with right-single.
5. Replace every "¬" with left-double, and "|" with right-double.
6. Replace every "÷" with something different from right-single, but which displays the same (for instance, "& #8217;", without space and quotes).
Jellby is offline   Reply With Quote
Advert
Old 08-17-2011, 05:17 AM   #6
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 77,911
Karma: 68014473
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Air 2, iPhone 6
I would regard the quoting style as a part of the book, and wouldn't change it, personally.
HarryT is offline   Reply With Quote
Old 08-17-2011, 06:15 AM   #7
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,009
Karma: 8796505
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
But maybe someone has changed it before
Jellby is offline   Reply With Quote
Old 08-17-2011, 02:19 PM   #8
pholy
Booklegger
pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.
 
pholy's Avatar
 
Posts: 1,801
Karma: 7999816
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook, Kobo Touch
Quote:
Originally Posted by charleski View Post
Do you have a link for the code for quoter? I know of SmartyPants from Daring Fireball, but would be interested to see some other code that did the same thing.
Ahhh, found it. Second page of google; I thought it would show up sooner:

http://www.dwheeler.com/quoter/
pholy is offline   Reply With Quote
Old 08-22-2011, 01:28 PM   #9
sjkramer
Connoisseur
sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.
 
Posts: 68
Karma: 526028
Join Date: Nov 2009
Location: New York, NY
Device: iphone
Quote:
Originally Posted by HarryT View Post
I would regard the quoting style as a part of the book, and wouldn't change it, personally.
It's interesting that The Chicago Manual of Style (the publishing industry standard style guide) includes changing quote style in its very limited list of acceptable alterations to a text.
sjkramer is offline   Reply With Quote
Old 09-01-2011, 12:34 PM   #10
carmenchu
Connoisseur
carmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to all
 
Posts: 91
Karma: 159672
Join Date: Dec 2010
Device: none
Alternate option:
in Sigil/Notepad++ or other software allowing RegExp search/replace mode, and in that mode:
1. replace ([a-z])'([a-z]) with \1<unused char/string>\2 -- almost every apostrophe "escaped" to the <unused char/string> of your choice
2. check for expression like " 'em " in your text, at need, replace each of them with " <unused char/string>em " ...
Now, in normal Mode:
3. Follow Jellby 's previous post to switch " and '
4. Restore <unused char/string> to ' .

If right quote/apostrophe are curly, steep 2. is only for those.
carmenchu is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unutterably Silly Quote the avatar above you Cyclops Lounge 1648 06-18-2016 09:36 AM
HTML2ePub conversion (question mark instead single quote) mikij Calibre 5 08-07-2010 03:15 AM
Quote Hunter brewt Workshop 3 01-05-2008 09:02 PM
cannot post or quote Aprilbeginnings Sony Reader 21 07-23-2007 07:15 PM


All times are GMT -4. The time now is 09:41 AM.


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