Hi,

On 12 September 2011 01:03, Ondřej Vágner <[email protected]> wrote:
> Hi, I've been using asciidoc (right now at 8.6.6) pretty regularly these
> past months (it's awesome, by the way), and I noticed some problems with the
> way it deals with single and double quotes.
>
> 1. Direct speech over multiple paragraphs
>
> asciidoc doesn't seem to recognise opening double quotes `` if they aren't
> paired with closing quotes '' and vice versa. But direct speech continuing
> over multiple paragraphs is only closed by a single pair of closing quotes,
> like this (for English):
>
> ========================================
>
> John said, ``It's going to rain.
>
> ``My knees hurt every time there's a storm coming.''
>
> ========================================
>
> which should be rendered with &#8220; and &#8221;, respectively:
>
> ========================================
> John said, “It’s going to rain.
>
> “My knees hurt every time there’s a storm coming.”
> ========================================
>
> but is instead rendered:
>
> ========================================
> John said, ``It’s going to rain.
>
> “My knees hurt every time there’s a storm coming.”
> ========================================
>

Quotes must match, your example doesn't.  Note also quotes are only
over a phrase, not multiple paragraphs which I think is what you are
trying to do so you may have to manually add the &#8220; and &#8221;
or use {rdquo} and {ldquo}


> Presumably, in languages that do not use opening quotes for each paragraph
> of direct speech, the final quotes would remain a pair of '' instead of
> proper double quotes.

Asciidoc is not natural language specific.

>
> 2. Word-final apostrophes
>
> Similarly to the previous problem, word-final apostrophes (the girls' toys)
> are not rendered properly as &#8217;, but rather as simple dumb typewriter
> single quote &#39;.

A single quote isn't asciidoc markup, use {rsquo}

>
> 3. Single/double quote combinations
>
> Finally, there seems to be a big mix-up in sentences like:
>
> ========================================
> ```Garlic' is not the word I would use,'' Peter said.
> ========================================
>
> which is rendered:
>
> ========================================
> “`Garlic' is not the word I would use,” Peter said.
> ========================================
>
> instead of:
>
> ========================================
> “‘Garlic’ is not the word I would use,” Peter said.
> ========================================
>
> that is with the inner quotes not replaced by &#8216; and &#8217;
> respectively, but instead remaining as ` and '. The accompanying issue
>
> ========================================
> ``I think the proper term is `Huzzah!'''
> ========================================
>
> renders all the quotes, but switches the final ''' into double quote-single
> quote order:
>
> ========================================
> “I think the proper term is ‘Huzzah!”’
> ========================================
>
> while it should be single quote-double quote:
>
> ========================================
> “I think the proper term is ‘Huzzah!’”
> ========================================
>
> as the inner quotes should be closed before the outer ones.

Both of these are a side effect of the order that quotes are
recognised and processed, double quotes are recognised first so the
opening `` is replaced first, then the first two trailing `` are
recognised as closing double quotes.  Then the first single quote is
not recognised since it doesn't have a space or ascii punctuation
before it (it is now &8220; from the double quotes) and the last
single quote also.

Unfortunately it has to be in this order otherwise all occurrences of
`` would be recognised as two opening single quotes and never a double
quote.

As I said above asciidoc is a markup language, not a natural language
processing system.  The possible punctuation combinations [1] may be
recognisable by humans but are too much for a mere pattern recognising
program.

Cheers
Lex

[1] http://en.wikipedia.org/wiki/Non-English_usage_of_quotation_marks

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to