Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 10 down vote accepted

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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