[Tex/LaTex] Why can’t LaTeX smartly match the double quote

punctuation

In many word processors, when you type " twice, it will give you a left and right double quotation marks in sequence, they are smartly matched. Why does latex end up with using,

``Blahblahblah...''

to do double quotings?

Question: Any philosophy behind this design?

A side complaint: This is very annoying when you try to copy a text file with a lot of " double quote marks. And you cannot just simply replace them all, you have to do it manually!!!

Best Answer

The standard logic for inserting smart quotes in place of dumb quotes is as follows:

  1. If there is a space character before the quote, it is an opening quote;
  2. Otherwise, it is a closing quote.

However, this is problematic in the case of the apostrophe. Consider the (English) transcription of the dropped 'h' in 'hello', which is stereotypically attributed to the Cockney accent:

’ello

According to the rules above, this would be typeset as an opening single quote, rather than as an apostrophe (which is equivalent to the closing single quote).

Although I am not familiar with the language, I gather that there are many examples of this in French as well.

There is no algorithm for determining when such an apostrophe is intended, rather than an opening quote, and so incorporating this feature would require an exception list, as in hyphenation. However, since the use of apostrophes for indicating elisions (as in the example above) is significantly increased in dialectal speech (at least in English), an exception list is not an appropriate solution to this problem.

So it is not appropriate for the compiler to attempt to convert dumb single quotes into smart single quotes. Although your question refers to double quotes, single quotes and double quotes really ought to work the same way, since they are so closely related.