Quotes in LaTeX ?

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}
\section{About "quotes"}
A "quote" is a "quote" is a "quote".
\end{document}

resulting quotes

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 noted that this might break 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).

Tags:

Punctuation