# Quotes in LaTeX ? [duplicate]

Possible Duplicate:
What is the best way to use quotation mark glyphs

Can I just use " for the quotes in my document?

I'm asking this because when I use them in my TextMate editor the included text is highlighted with a red color. Therefore, I was wondering if I should instead some other symbol preceded by \.

thanks

-

## marked as duplicate by Harald Hanche-Olsen, lockstep, Alan Munn, Juan A. NavarroFeb 9 '11 at 14:30

See this question: tex.stackexchange.com/questions/531/… – Harald Hanche-Olsen Feb 9 '11 at 12:37

Yes, you can, but you shouldn't. Instead, use quoted'' to get the result “quoted”, assuming you are writing English. Some languages prefer quotes like «this» or like »that«, and those you can enter directly, provided you have the right input encoding set up. (You can input “ and ” directly too, if you use a utf-8 input encoding.)

Note that in some languages, babel uses the " character for various purposes not related to quotation marks, so it really is best to avoid it.

-

In general it is better to use either  and '' to start and end quoting or packages like csquotes and babel. The latter gives you a great support for many languages and their quotes.

However, if you, and the packages you use, don't use the " mark for anything else, you could just define it to automatically insert the above start and end quote marks:

\documentclass{article}
\newif\ifquoteopen
\catcode\"=\active % lets you define " as a macro
\DeclareRobustCommand*{"}{%
\ifquoteopen
\quoteopenfalse ''%
\else
\quoteopentrue %
\fi
}
% Deactive with: \catcode\"=12\relax % changes " back to normal

\begin{document}
A "quote" is a "quote" is a "quote".
\end{document}


The quotes will automatically open and close. The quote status can be manually set using \quoteopenfalse and \quoteopentrue. This behavior is local to the TeX group, e.g. local to an environment. If this is not wanted a \global can be added before this macros.

This seems to work fine in section titles and also works with babel. However babel sets the language at \begin{document} which might overwrite " again. In this case the macro should be (re-)declared afterwards.

It shall be notes that this might brake code which writes the " in an non-text context to the .aux or other auxiliary file.

-

You can just use " as right quotation mark in some font encodings, but it is upright quotation mark in some other font encodings, sometimes it isn't quotation mark.

In OT1,OT2 encoding, " is right quotatoin mark (for CM fonts). In T1 encoding, it is upright quotation mark. And in EU1(for XeLaTeX) and EU2(for LuaLaTeX), " is right quotation mark the same as ”.

IMHO, it is better to use double ' as quotation mark, or to use csquotes package. If you use XeLaTeX or LuaLaTeX, use “ ” is better.

The symbol " should be left for other usage, for example, accents in some languages (using babel).

-
Well, I could use " only, and ignore the red highlighting in my editor, however in the generated pdf, the opening quotes are wrongly flipped: d.pr/m8Fy – Patrick Feb 9 '11 at 12:52
@Patrick: " can be used to replace '', but it cannot replace . – Leo Liu Feb 9 '11 at 13:27