auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] Auto insertion of ampersands


From: Ikumi Keita
Subject: Re: [AUCTeX-devel] Auto insertion of ampersands
Date: Tue, 15 Jul 2014 18:40:47 +0900

Hi Mosè,

I attach the revised patch.  Thank you for your instructions.

> - there are some undocumented functions (`LaTeX-amsmath-env-alignat',
> `LaTeX-amsmath-env-alignedat', `LaTeX-item-equation',
> `LaTeX-item-equation-alignat');

I added doc strings to those functions.

> - a couples of variables (`LaTeX-array-skipping-regexp' and
> `LaTeX-tabular*-skipping-regexp') are defined after being used for the
> first time.  Although this is not a big deal, defining them before
> first use silences some compilation warnings;

They are moved before the first use.

> - style/plext.el lacks the copyright notice;

The copyright notice is added.

> - please provide the ChangeLog entries and the appropriate
> documentation if needed.

I added documentaion to auctex.texi and changes.texi.  Here is the
ChangeLog entries.

2014-07-15  Ikumi Keita  <address@hidden>

        * latex.el: Enhance array and tabular(*) environments support.
        (LaTeX-env-array): Add call to `LaTeX-item-array'.
        (LaTeX-env-tabular*): Add call to `LaTeX-item-tabular*'.
        (LaTeX-array-skipping-regexp): New variable.
        (LaTeX-tabular*-skipping-regexp): Ditto.
        (LaTeX-item-array): New function.  Put line break macro on the
        last line and insert suitable number of ampersands.
        (LaTeX-item-tabular*): Ditto.
        (LaTeX-insert-ampersands): New function.  Insert suitable number
        of ampersands.
        (LaTeX-array-column-letters): New variable.  Column letters for
        array-like environments.
        (LaTeX-array-count-columns): New function.  Count number of
        ampersands to be inserted.
        (LaTeX-common-initialization): Add entries to LaTeX-item-list to
        use `LaTeX-item-array' and `LaTeX-item-tabular*'.

        * style/amsmath.el: Enhance alignat-like environments support
        as well as some cleanups.
        (LaTeX-item-equation-alignat): New function.  Insert contents to
        terminate a line in multi-line equations environment.
        (LaTeX-amsmath-env-alignat): Use it.  Add doc string.
        (LaTeX-amsmath-env-alignedat): Ditto.
        (LaTeX-amsmath-env-aligned): Removed.  Just specifying a prompt
        string for an optional argument is enough.
        (LaTeX-item-equation): Take over the job of
        `LaTeX-item-equations'.  Add an optional `suppress' argument:
        when it is non-nil skip putting line break macro.  Add doc string.
        (LaTeX-item-equations): Removed.  Its task is now covered by
        `LaTeX-item-equation'.
        (LaTeX-item-equation-alignat): New function.  Insert ampersands
        according to the columns number, as well as calling
        `LaTeX-item-equation'.
        (LaTeX-amsmath-alignat-number-of-ampersands): New function.
        ("amsmath"): Arrange setups of variables to adopt the above
        changes.

        * style/array.el ("array"): Change `LaTeX-array-column-letters'
        locally to include addtional letters extended in array.sty.

        * style/plext.el: New style file.  Add support for extended
        format for array-like environments.

        * Makefile.in (STYLESRC): Include style/plext.el.

        * doc/auctex.texi: Add documentation for the above enhancements.

        * doc/changes.texi: Ditto.

> Also, a test suite for this feature would be nice.

  I failed to write the working test code :-), so it is not included.
Sorry for that!

Regards,
Ikumi Keita

Attachment: auctex-array-autoinsert-ampersands-ver2
Description: revised-patch


reply via email to

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