International quotes
Michel Fortin
michel.fortin at michelf.com
Sat Oct 22 18:00:54 EDT 2005
Le 2005-10-21 à 20:11, A. Pagaltzis a écrit :
> Keyboards have no way to enter bottom doublequotes at all, which
> is no wonder considering the common non-Unicode charsets do not
> even contain such a character. So the end result is that everyone
> writes German with straight doublequotes for quotations.
This sadden me, I find them nice these german quotes.
(I've found out that on my keyboard I can type shift-option-^ to get
bottom double quotes. On the downside it seems I can't type an
opening single quote.)
>> The other unanswered problem is that simple angle quotes could
>> be mistaken and replace a *true* greater than or less than, so
>> it may be better to forget about them.
>
> Not only that, but at least the right-pointing single angle mark
> <em >clashes </em >with HTML tag parsing. Granted, so long as the
> angle marks point “inward,” German-style (opening angle mark
> points right, closing points left), you can probably disambiguate
> 95-99% of the cases correctly.
I specifically ignored the HTML tag problem because I don't think it
is a problem. SmartyPants tokenize the tags prior translating
anything. If it wouldn't, think about what would happen to tag
attributes :-) Anyway, my point is SmartyPants doesn't search for
quotes inside tags and wouldn't mistaken a tag for a quote.
Parsing of `<<` wouldn't be easy either. It would probably be
necessary to convert `<<` and `>&gy;` to quotes, as a tool
like Markdown will automatically escape less-than characters with
entities if they are not a tag. And what about `<<b>>`? Markdown will
convert it to `<<b>>` and you would have to figure out a way to
make a quote out of that. Or is it a tag?
I haven't realized until now how much complexity angle quotes (simple
or double) could be.
> But from where I sit it seems impossible to disambiguate single
> angle marks that point “outward” from HTML tags. (F.ex., what
> about the letter <p>?)
This wouldn't work with `<p>`... it could work if you leave spaces as
common French typography suggest (`< p >`), but then how do you know
it isn't part of some mathematical stuff?
1 < p > 2 <=> p > 2
> So I’d say a transliteration for single angle marks right out of
> the window.
One side problem I think of, and it applies to double angle marks as
much as single angle marks, is that `<<` and `>>` are somewhat common
operators in many programming languages. Just like the
emphasis_by_underline problem with paths and programming symbols in
Markdown, converting `<<` and `>>` could lead to display problems in
comment boxes where sample code is outside a `<code>` tag. This
wouldn't be catastrophic (and certainly a smaller concern than the
underline problem), but it may be a good idea to think of this in
advance.
> Actually you’re mixing up the styles. English would be
> transliterated like so:
>
> [...]
Right, my error. And all is really missing in the current SmartyPants
is a special rule for `,,` as a lower double quote.
>> A notable exception is ”...” where both quotes are curled the
>> same way as the closing quote in English (used by Swedish,
>> Finnish, and Dutch (alternative quoting style) [^1]).
>
> This could be written in transliteration as
>
> ''...''
>
> which results in two right doublequotes.
... and happens to work perfectly already with current SmartyPants. I
somewhat thought SmartyPants tried to be "smart" in this case, but it
does not. Great!
* * *
Later:
> I don’t see the harm in having transliterations available. They
> would be useful when you really want to do something that the
> language settings would not allow. SmartyPants would just be
> useless to germanophones if they *had* to use these.
I completely agree with this way of thinking.
To summarize, an upcoming "international" SmartyPants could do this:
| Input | Output |
| -------- | ------------------------ |
| " | “smart” [customizable] |
| ' | ‘smart’ [customizable] |
| `` | “ |
| ` | ‘ |
| '' | ” |
| ,, | „ |
| << | « |
| >> | » |
with some some presets for different languages.
Making `<<` work correctly alongside tags could be a problem however.
Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/
More information about the Markdown-Discuss
mailing list