11

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.

12

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.