View Single Post
Old 07-13-2014, 01:00 AM   #13
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,893
Karma: 30277270
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by mikapanja View Post
@ JSWolf

I believe this should cover it, but it will replace all the quotes, both in dialogues and outside them, except those that are part of a contraction. Of course, the book must have proper punctuation to begin with.

1) Replace opening single curly quotes with opening double curly quotes
Search: ‘
Replace: “

2) Replace closing single curly quotes with closing double curly quotes (two passes)

Search: ([.|…|,|:|;|?|!|\-|–|—])’
Replace: \1”

Search: ’([ |.|…|,|:|;|?|!|\-|–|—])
Replace: ”\1

Some of the combinations are unlikely to be found, but I guess better an overkill than missed instances
Two passes on closing quotes are only required if punctuation is sometimes inside e.g ‘This is the end of the sentence.’ and other times outside e.g. ‘This is the end of the sentence’.; having both in the same text would be an exception, probably an error.

When converting single to double or visa versa one needs to be careful not to 'spoil' 6' 3" (Imperial length) 20' 15" (Time) and 33° 52' 34" S, 151° 13' 24" E (Geolocation).

And I've never seen an automated straight to curly that preserves the straight quotes on measurements. Shouldn't be too hard, if preceded by a digit leave it alone. Depends on the font, but to my eyes line B looks wrong.

A - 6' 3" (Imperial length) 20' 15" (Time) and 33° 52' 34" S, 151° 13' 24" E
B - 6’ 3” (Imperial length) 20’ 15” (Time) and 33° 52’ 34” S, 151° 13’ 24” E


I might start using « » on dialogue instead of “ ”

BR

Last edited by BetterRed; 07-13-2014 at 01:11 AM.
BetterRed is offline   Reply With Quote