[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] Insert two dollars when typing one

From: Mosè Giordano
Subject: Re: [AUCTeX-devel] Insert two dollars when typing one
Date: Wed, 13 Feb 2013 19:49:40 +0100

Hi Tassilo,

2013/2/13 Tassilo Horn <address@hidden>:
>> +(defcustom TeX-math-close-single-dollar nil
>> +  "If non-nil, when outside math mode insert opening and closing dollar
>> +signs for TeX inline equation and put the point between them, just by
>> +typing a single `$'."
>> +  :group 'TeX-macro
>> +  :type 'boolean)
> Does that play well with `TeX-math-close-double-dollar'?  I'm not
> completely sure if closing of single or double dollars and placement of
> point should be controlled by the same variables.  What's the result of
> typing $$$ when both variables are t?
If both variables are t, first `$' will insert `$$' and put point in
the middle.  If one move a character forward (ie, after the second
`$') and press another time `$' it will close the first `$$',
considered as opening display math because this comes first in `cond'
clauses.  This seems to me reasonable.

If one thinks will use one construct (`$...$' or `$$...$$') more often
than the other probably won't set both variable to t, so if one use
only LaTeX and no plain TeX probably will completely ignore
`TeX-math-close-double-dollar' and use only

I'm sending patches with your suggestions.  I've documented in
`auctex.texi' also some other recent changes.  ChangeLog entry:

2013-02-13  Mosè Giordano  <address@hidden>

        * doc/auctex.texi (Quotes): Document
        (Selecting a Command): Remove reference to
        (Parsing Files): Document `LaTeX-auto-index-regexp-list',
        `LaTeX-auto-counter-regexp-list', `LaTeX-auto-length-regexp-list',

        * tex.el (TeX-math-close-single-dollar): New variable.
        (TeX-insert-dollar): Use it.

Mosè Giordano

Attachment: tex.el.patch
Description: Binary data

Attachment: auctex.texi.patch
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]