5

I'm using \enquote command of csquotes package to handle (multilingual) quotations.

With Emacs+AUCTeX, I use the three following lines (in .emacs) to be able to call \enquote command by pressing to " twice.

 '(LaTeX-csquotes-close-quote "}")
 '(LaTeX-csquotes-open-quote "\\enquote{")
 '(LaTeX-csquotes-quote-after-quote t)

Indeed, the LaTeX-csquotes-quote-after-quote option creates this shortcut. (Here is more information about it from AUCTex Documentation).

User Option: TeX-quote-after-quote

Determines the behavior of ". If it is non-nil, typing " will insert a literal double quote. The respective values of TeX-open-quote and TeX-close-quote will be inserted after typing " once again.

[...]

In case you are using the ‘csquotes’ package, you should customize LaTeX-csquotes-open-quote, LaTeX-csquotes-close-quote and LaTeX-csquotes-quote-after-quote. The quotation characters will only be used if both variables—LaTeX-csquotes-open-quote and LaTeX-csquotes-close-quote—are non-empty strings. But then the ‘csquotes’-related values will take precedence over the language-specific ones.

So, if I press once " I obtain ", if I press twice I obtain \enquote{. I can close the quotation by pressing again twice " which produces }.

However, I use \enquote a lot and never ". Therefore, I would like to change the default behavior of cquostes.el by inversing this order.

My goal is to have \enquote{ and } when pressing only one time ". I would also be able to call " be pressing twice ".

How can I achieve this?

1 Answer 1

4

The answer is very silly.

I shouldn't activate the LaTeX-csquotes-quote-after-quote option... I was wrong (in my question): the LaTeX-csquotes-quote-after-quote option does not create the shortcut but introduces the "pressing twice" thing.

Removing this line (or set it to false or nil) fixes the issue:

'(LaTeX-csquotes-quote-after-quote t)
2
  • So how are you getting " then? May 19, 2014 at 14:47
  • @StephanLehmke Pressing once " calls \enquote{ and twice gets normal ".
    – ppr
    May 19, 2014 at 14:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .