auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] Re: contribution to the auctex-package


From: David Kastrup
Subject: [AUCTeX-devel] Re: contribution to the auctex-package
Date: Fri, 22 Sep 2006 11:47:47 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

This has been sent to an ancient mail address.  I am forwarding it to
the AUCTeX developer list.

"stefan.pofahl" <address@hidden> writes:

> Hello maintainers of auctex,
>
> here is my contribution to your beautiful
> LaTeX-enviroment for eqnarry.sty
>
> Please add it to your package!
>
> Best regards,
>
> Stefan Pofahl
>
> cc: address@hidden

Hello Stefan,

for accepting contributions, we need a copyright assignment to the
FSF.  The procedure is that you are sent a form in Email, have to fill
it out, send it to the FSF's copyright clerk.  You then get an
assignment contract by paper mail which you have to sign and send
back.  This is to make sure that all rights of your contribution can
be transferred to the FSF, and enables the FSF to pursue breaches of
the GPL on that code.

If you would like to do that, I can send you the form.  Could you
describe what your contribution achieves?

Any comments from AUCTeX developers?

>
> *********
> ;;; eqnarray.el - Support for the eqnarray style option.
>
> ;; Contributed by Stefan Pofahl <address@hidden>
>
> ;;; Code:
>
> ;; RefTeX should look for labels also in equationarray environment,
> ;; see documentation of ref-tex: 3.4.1 Theorem and Axiom Environments
> (setq reftex-label-alist
>         '(("equationarray"   ?e "eq:"  "~\\vref{%s}" nil ("equation"
> "eqa.") )
>           ))
>
> ;; now some definitions that I took from `latex.el' (auctex-package)
> ;; and changed them for `eqnarray':
>
> ;; usage, copy this file to the auctex-directory where you can find all
> ;; the other auctex-style-enviroment-definition-files, this directory
> ;; is called `/style' and in this directory you will also find files like:
> ;; `amsmath.el' or `fancyref.el':
> (TeX-add-style-hook "eqnarray"
>  (function
>   (lambda ()
>           (LaTeX-add-environments
>             '("equationarray" LaTeX-env-equationarray)
>             ))))
>
> ;(add-hook 'LaTeX-mode-hook
> ;        (lambda ()
> ;          (LaTeX-add-environments
> ;            '("equationarray" LaTeX-env-equationarray)
> ;            )))
>
> (defcustom LaTeX-default-equationarray-format ""
>   "Specifies the default format string for array and tabular environments."
>   :group 'LaTeX-environment
>   :type 'string)
>  (make-variable-buffer-local 'LaTeX-default-format)
>
> (defcustom LaTeX-default-equationarray-position ""
>   "Specifies the default position string for array and tabular
> environments."
>   :group 'LaTeX-environment
>   :type 'string)
>  (make-variable-buffer-local 'LaTeX-default-position)
>
> (defun LaTeX-env-equationarray (environment)
>   "Insert ENVIRONMENT with position and column specifications.
> Just like array and tabular."
>   (let ((pos (read-string "Position: "))
>       (fmt (read-string "Format: " LaTeX-default-equationarray-format)))
>     (setq LaTeX-default-equationarray-position pos)
>       (setq LaTeX-default-equationarray-format fmt)
>     (LaTeX-insert-environment environment
>                             (concat
>                               (if (not (zerop (length pos)))
>                                   (format "[%s]" pos))
>                               (format "{%s}" fmt)))
>     (end-of-line 0)
>     (next-line 1)
>     (delete-horizontal-space)))
>
> ;;; eqnarray.el ends here


-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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