[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1 Insertion of Quotes, Dollars, and Braces

Quotation Marks

In TeX, literal double quotes ‘"like this"’ are seldom used, instead two single quotes are used ‘``like this''’. To help you insert these efficiently, AUCTeX allows you to continue to press " to insert two single quotes. To get a literal double quote, press " twice.

Command: TeX-insert-quote count

(") Insert the appropriate quote marks for TeX.

Inserts the value of TeX-open-quote (normally ‘``’) or TeX-close-quote (normally ‘''’) depending on the context. With prefix argument, always inserts ‘"’ characters.

User Option: TeX-open-quote

String inserted by typing " to open a quotation. (See European, for language-specific quotation mark insertion.)

User Option: TeX-close-quote

String inserted by typing " to close a quotation. (See European, for language-specific quotation mark insertion.)

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.

The ‘babel’ package provides special support for the requirements of typesetting quotation marks in many different languages. If you use this package, either directly or by loading a language-specific style file, you should also use the special commands for quote insertion instead of the standard quotes shown above. AUCTeX is able to recognize several of these languages and will change quote insertion accordingly. See European, for details about this feature and how to control it.

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.

Dollar Signs

In AUCTeX, dollar signs should match like they do in TeX. This has been partially implemented, we assume dollar signs always match within a paragraph. The first ‘$’ you insert in a paragraph will do nothing special. The second ‘$’ will match the first. This will be indicated by moving the cursor temporarily over the first dollar sign.

Command: TeX-insert-dollar arg

($) Insert dollar sign.

Show matching dollar sign if this dollar sign end the TeX math mode. Ensure double dollar signs match up correctly by inserting extra dollar signs when needed if TeX-math-close-double-dollar is non-nil.

With optional arg, insert that many dollar signs.

User Option: TeX-math-close-double-dollar

Control the insertion of double dollar signs for delimiting display math. (Note that you should not use double dollar signs in LaTeX because this practice can lead to wrong spacing in typeset documents.) If the variable is non-nil and you enter a dollar sign that matches a double dollar sign ‘$$’ AUCTeX will automatically insert two dollar signs.


To avoid unbalanced braces, it is useful to insert them pairwise. You can do this by typing C-c {.

Command: TeX-insert-braces

(C-c {) Make a pair of braces and position the cursor to type inside of them. If there is an active region, put braces around it and leave point after the closing brace.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Ralf Angeli on January 13, 2013 using texi2html 1.82.