![]() |
#16 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
Yes, ’ is definitely preferable in this case, but this is worth bearing in mind if you want to set the straight quote.
But you learn not to trust anything in this game - while all ePub readers should handle ' perfectly fine (ADE does for instance), there are some, particularly the online readers, that don't. O'Reilly's bookworm reader from Threepress is guilty of this. |
![]() |
![]() |
![]() |
#17 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
In text content, just using the ' character (no entities) is enough, it's only in attribute values that ' or &# 39; might be needed, I believe.
|
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 155
Karma: 200000
Join Date: Dec 2009
Location: Britania
Device: Android
|
I guess it's too late to help, but I've just finished fiddling with a script to help me scan for the apostrophe / open-quote problem, by skipping over unambiguous cases like
'Hullo!' she shouted. It should be pretty helpful for UK-style novels which use single-quotes for dialog. It's designed to handle most html markup. (Argh, it doesn't handle ' ! But I can fix that easily enough.). No documentation yet, other than what you get from "quotes.py --help". It's possible to learn what it does in particular cases by running it on the example files in the GitHub repository. Basically, the ambiguities that remain get marked with a "*", and then you can search the output for that. It also checks for stuff like open-quotes with no matching close-quote, which is marked with a "#". <p>‘Twasn’t my fault #[‘]</p> On the flip side, that means it triggers on multi-paragraph dialogue, where the convention is to omit all but the last closing quote. <p>‘You know what happens if you talk too much? No? I'll tell you what. #[‘]</p> <p>‘You get a whole ’*nother paragraph of dialogue.’</p> [but you can avoid those and just get the "*"s, by running it as "quotes.py --apostrophes"]. |
![]() |
![]() |
![]() |
#19 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Apr 2011
Location: Calgary, Alberta
Device: iPad
|
Any good style guide can give you instructions on when to use apostrophes (single and double) or straight inch/foot marks.
Doing a conversion manually is a pain. Try searching for a space followed by an inch- or foot-mark and replacing it with an open-quote or double-quote mark, then searching for an inch- or foot-mark followed by a space and replacing that with an close-quote or double-quote mark. Don't forget to include the appropriate space in the replace field. THEN, search for foot-marks alone and replace them with close-quote marks. That takes care of the possessives. Once that's all done, do a search for "open-quote Tis", and replace it with "close-quote Tis", and so on... |
![]() |
![]() |
![]() |
#20 | |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#21 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
It would be good if it could mark apostrophes and closing single quotes with different characters. |
|
![]() |
![]() |
![]() |
#22 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 155
Karma: 200000
Join Date: Dec 2009
Location: Britania
Device: Android
|
Nope, but I wasn't being very clear.
Input: <p>‘Twasn’t my fault</p> Output: <p>‘Twasn’t my fault #[‘]</p> Search for #. See the error marker. The bit after the # tells you there's an unclosed single-open-quote; you have to scan backwards to find it. Having found it, you have to figure out that it needs to be changed to a proper apostrophe. It's a very crude implementation. I took the simple regular expressions I've been using, and rewrote them in python on top of an XML tokenizer, so it should work on quotes coded in several different ways, and even on gnarly html generated by MSWord. It's nothing you can't do with the regular expressions, but it seems quite error-prone to keep adapting the regular expressions to work on different files. Quote:
<p>Rock 'n' Roll</p> I don't want to miss those cases - if I wasn't going to bother, I'd stick with straight quotes. I don't trust myself to program an exhaustive set of exceptions that still avoids accepting any errors. I don't trust myself to notice every single case just from reading the book, or I wouldn't need the script in the first place. (And having to squint at every single quote mark is not good for my eyesight). So the script skips everything that's definitely _not_ an apostrophe (because it's not immediately after a word), and flags all the remaining apostrophe-like characters for review. <p>Rock ‘n’* Roll *</p> (The second * indicates that the paragraph contains exactly one unambiguous open-quote, so that exactly one of the starred apostrophes is playing the role of an close-quote. But that's wrong, which means there must be an error: the open-quote character needs to be changed to become an apostrophe). The second * can also appear in the middle of a paragraph, if the open-single-quote is inside double quotes <p>"Rock 'n' Roll", shouted.</p> <p>“Rock ‘n’* Roll” *, shouted.</p> so if there's more than one double-quoted part which contains ambiguous single quotes, you review them separately. The other feature is it keeps a bunch of statistics, so you get an overview of the file without having to read it. (Useful if you want to know what sort of errors to look out for, particularly if you don't want to "spoil" yourself on the book before you read it for the first time). |
|
![]() |
![]() |
![]() |
#23 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#24 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 155
Karma: 200000
Join Date: Dec 2009
Location: Britania
Device: Android
|
Sorry, that was redundant. The script focuses on the ambiguity between curly-closing-quotes / apostrophes. In that sense, open-quote characters are always unambiguous.
Questions are welcome, that's why I posted. I think the script is about as good I can make it, but there wasn't much point putting it online if I can't work out how to explain it ![]() Last edited by sourcejedi; 08-18-2011 at 08:36 AM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free book (Kobo) Twas The Night | arcadata | Deals and Resources (No Self-Promotion or Affiliate Links) | 2 | 12-24-2011 12:01 AM |
Free Book (EPUB) - Twas The Night [ENDED] | koland | Deals and Resources (No Self-Promotion or Affiliate Links) | 2 | 12-12-2010 06:15 PM |
Kindle DX handle ? | nimblem | Amazon Kindle | 0 | 08-14-2010 03:17 PM |
So, how do YOU handle stress? | desertgrandma | Lounge | 141 | 05-09-2009 04:13 AM |
Poetry Moore, Clement C.: Twas The Night Before Christmas [Illus.]. v1. 08 Dec. 08 | Dr. Drib | BBeB/LRF Books | 0 | 12-08-2008 03:43 PM |