Hi,

Tassilo Horn wrote (Sun, Feb 24, 2019 at 10:59:13AM +0100):
> Yes, that's allright.  I've added such "alias styles" for beamerarticle
> and beamerswitch.

I had earlier emailed a very basic tabu.el as a starting point for tabu.sty to 
auctex-devel. I've attached it with this email as well. I'm not sure of the 
proper way to go about getting this reviewed and included in the styles 
directory if it's found to be reasonable. Could you please advise?

Thanks,
Mandar.
;;; tabu.el --- AUCTeX style for the tabu package.

;; Author: Mandar Mitra

;;; Commentary:

;; This file adds very basic support for the tabu package.

;;; Code:

(defun LaTeX-env-tabu (environment)
  "Insert tabu with position and column specifications."
  (let* ((to-or-spread (read-string "to / spread: " nil nil
                                    '(" spread " " " " to ")))
         (target (unless (equal (length to-or-spread) 1)
                   (read-string "to / spread length: " nil nil
                                '("0in" "1.0\\linewidth"))))
         (fmt (read-string "Format 
X[coef,l/c/r/j(default),p(default)/m/b,$/$$]: " LaTeX-default-format)))
    (setq LaTeX-default-format fmt)
    (LaTeX-insert-environment environment
                              (concat
                               (unless (equal (length to-or-spread) 1) 
                                 to-or-spread)
                               (unless (zerop (length target)) 
                                 (concat target " "))
                               (concat TeX-grop fmt TeX-grcl)))))

(TeX-add-style-hook
 "tabu"
 (lambda ()
   ;; New symbols
   (TeX-add-symbols
    '("everyrow" (TeX-arg-literal "{") (TeX-arg-literal "}"))
    '("rowfont" [ "alignment" "c" ] ("family" "\\bfseries"))
    '("tabulinesep" (TeX-arg-literal "=") 
                    (TeX-arg-free "length" "4pt")))
   ;; New environments
   (LaTeX-add-environments
    '("tabu" LaTeX-env-tabu))))

;;; tabu.el ends here
_______________________________________________
auctex mailing list
auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to