1

I just started using URW-Garamond with mathdesign, and it's typesetting straight double-quote character as a straight double-quote rather than a right double-quote. How can I fix this?

That is, when I put this in my header:

\usepackage[T1]{fontenc}
\usepackage[urw-garamond]{mathdesign}

I get a nice Garamond in my output, but " in my input file produces a Garamond version of the same character in the output. If I use two single-quotes instead, it comes out properly as a double right-quote. I could switch to typing '' or set up a macro, but this is undesirable for more than one reason.

Is there any way to use urw-garamond without this non-traditional behavior for "?

egreg
  • 1,121,712
Mars
  • 1,086

2 Answers2

5

The T1 encoding is set up so that the fonts have a straight double quote in the position of the " character.

One should never use " for typesetting closing quotes in TeX anyway. The correct way is ''.

The package csquote can be considered, since it avoids marking quotes explicitly.

egreg
  • 1,121,712
  • What about changing the catcode of " to active and defining it to mean closing double quote? Is this a bad idea? – Ian Thompson Jan 29 '12 at 00:26
  • egreg, I tend toward the "it's worked for years, so don't break it" philosophy. A minority view these days. Ian, I assume you mean editing the encoding? I may figure out how to do that ... eventually. For now I need to get some work done! In CM, apparently. :-) Thanks! – Mars Jan 29 '12 at 06:44
  • I've posted my suggestion with more detail as an answer. – Ian Thompson Jan 29 '12 at 12:58
1

As @egreg says, it's probably best to switch to using two single quote marks. However, a dirty hack is to make " active so that it acts as a single character control sequence. Here I have defined it to produce ++, to avoid any visual confusion between the different types of quote mark.

\documentclass{article} 
\catcode`\"=\active 
\def"{++} 
\begin{document}
"abc"def 
\end{document}

Inside the braces you would need two single right quotes instead of ++.

Ian Thompson
  • 43,767
  • This will have catastrophic consequences as soon as one loads babel with languages where " is a shortcut. – egreg Jan 29 '12 at 13:06
  • Are you sure about this? The log files for my documents list a huge number of hyphenation patterns, but I am not encountering any problems when I add the catcode change and definition to the preamble. – Ian Thompson Jan 29 '12 at 13:22
  • Try your code adding the line \usepackage[german]{babel} to the preamble. – egreg Jan 29 '12 at 13:27
  • Ah, now I see it. – Ian Thompson Jan 29 '12 at 13:41
  • Thanks to everyone. I will switch to using two single quotes, but will figure out how to configure my editor to do it automatically when I get a chance. Ian's suggestion looks like a good temporary solution until then, since I won't be using Babel in the immediate future. – Mars Jan 31 '12 at 14:45
  • Learned the hard way that a disadvantage of '' is that LaTeX thinks ''' means double-quote single-quote, when I meant the reverse. So now instead of '" , I have to type ','' . Sigh. I understand that there has to be some way to typeset straight-quotes, but to my way of thinking, the ubiquity of double-right-quote makes the newer, more elegant policy (" means straight-quotes is more elegant than " means right-double-quote) a policy that is less practical--to a degree that makes it undesirable. Oh well. I'll use both methods as convenient, and try to stay out of trouble. -Rebel with a Quote – Mars Feb 13 '12 at 05:15