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}
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.