Smart, straight and curly
Smart, straight and curly
Before I go about reinventing the wheel, does anyone have a routine to change smart quotes to curly quotes?
I have an issue with translating text from a word document to a number of ebook formats. Word's smart quotes cause problems in some of the formats (at least with the translation software that's being used) and the developer suggests using straight quotes. (Yuk.)
But the curly quote characters ‘’ “” work just fine.
So, I'm going to write a script that will read through a document and "smartly" replace smart quotes with the appropriate curly quote character.
This would need to replace a straight double quote at the beginning of a word (including the beginning of the text, paragraph, sentence, inside parens) with a left double quote
Replace a straight double quote at the end of a word (etc.) with a right double quote. (Also accounting for punctuation)
Same with single quotes.
Plus change some single quotes to right single quotes: "foo's"
And somehow leave straight quotes straight when used to designate feet, inches or degrees. (That last bit may be too much to automate, word gets that wrong too).
Has anyone been down this path?
ES
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden