12

I use the AUCTeX feature to expand " into csquotes macros. To enable it I have put the following in my .emacs:

;; " expands into csquotes macros
(setq LaTeX-csquotes-close-quote "}"
      LaTeX-csquotes-open-quote "\\enquote{")

However, when I use it together with babel " is not expanded to csquotes macros.

For instance, pressing " in the following example

\documentclass{article}

\usepackage[danish]{babel}
\usepackage{csquotes}

\begin{document}

\end{document}

results in

"`

Here is a screenshot of when I press " inside the document environment:

Screenshot of what happens when I press "

What I would like to happen is that \enquote{ is inserted.

N.N.
  • 36,163

1 Answers1

13

For it to work you have to load babel after csquotes as reported in http://permalink.gmane.org/gmane.emacs.auctex.bugs/1850.

\documentclass{article}

\usepackage{csquotes}
\usepackage[danish]{babel}

\begin{document}

\end{document}

Now pressing " will correctly expand to \enquote{:

Screenshot of the working expansion

N.N.
  • 36,163