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

"stefan.pofahl" <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]

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 <[EMAIL PROTECTED]>
>
> ;;; 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


_______________________________________________
auctex-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to