[AUCTeX-devel] .el file for tabu.sty

2018-09-23 Thread Mandar Mitra
I've cobbled together some *very* basic support for how I use tabu.sty. I don't 
see a tabu.el in auctex-12.1.1, so attaching in case it is useful in any way.

Thanks for any feedback.
-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-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: On the usage and function of TeX-auto-generate-global and TeX-auto-global.

2021-07-03 Thread Mandar Mitra
Hongyi Zhao wrote (Sun, Jul 04, 2021 at 11:10:55AM +0800):
> This way, the above command won't need root privilege. But based on my
> later tries, it seems that there is no need to run the above command
> at all, and auctex already can give wonderful and rather extensive
> completion results with its initial configuration. To be frank, I'm
> still not sure on the usage and function of TeX-auto-generate-global
> and TeX-auto-global [1].
> 
> Any hints will be highly appreciated.

>From tex-site.el:

(defcustom TeX-auto-global
(if (file-writable-p "/usr/local/var/auctex") "/usr/local/var/auctex" 
"~/.emacs.d/auctex")
...

Also, you probably have set TeX-parse-self to t as recommended in the basic 
setup. I guess this combination explains why things "just work"? 

-mandar