Sean Allred | 24 Feb 15:18 2015

Fwd: Support for expl3

Whoops – didn’t reply-all. Sorry folks.

Begin forwarded message:

Subject: Re: [AUCTeX-devel] Support for expl3
From: Sean Allred <tex <at> seanallred.com>
Date: February 24, 2015 at 8:15:57 AM CST
To: Tassilo Horn <tsdh <at> gnu.org>

Hi Tassilo,

No, this is the right place. :-)

:-)

Is there any planned support for expl3 syntax?
No, not really as it seems nobody from us is using it.

I would imagine AUCTeX development is geared more toward authors than developers (and rightfully so)., so this isn’t too surprising :) You should give it a try though – it’s pretty neat. It’s an interesting language.

Could you please test this expl3.el style file and check if it DTRT?

It definitely changes the syntax table (as reported by C-h s), but the syntax table doesn’t have an effect on word-based movement (though it does work with symbol-based movement, which makes more sense. Wouldn’t be too difficult for the end user to bind M-[fb] to their symbol equivalents when in any sort of `expl3` mode. So yes, as far as pure navigation, this does the right thing. :)

What would be the right way to go about adding the syntax highlighting? If there’s any existing framework in AUCTeX to do this (i.e. particular to csnames), I could try to write something up that does what’s needed.

-Sean

P.S. The ‘rx’ macro makes some of these regular expressions much less of a headache: `(rx "\\" (+ (or (syntax symbol) (syntax word))))` :-)

_______________________________________________
auctex-devel mailing list
auctex-devel <at> gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel
Sean Allred | 22 Feb 21:39 2015

Support for expl3

Hello all,

Forgive me if this is the wrong place to bring this up — this is my first time posting to this list.

I searched the list through gmane, but it would seem that expl3 hasn’t even been mentioned. Is there any
planned support for expl3 syntax? I’ve tried to modify some things myself, but I don’t have a
firm-enough grasp on emacs-specific lisp to say that I know what I’m doing.

- The syntax table would need a modification to include `:` and `_` as part of a csname/symbol
- There should be some fontification for csnames that match expl3 patterns (as described in `texdoc
expl3`§3`The naming scheme`). I’ve provided examples below just as examples of how the symbols could
be broken down. For KEY-VALUE, I’m not sure how it can be made context-sensitive to within
`keys_define:nn`, but there it is if it’s possible.
  - KEY-VALUE :: https://regex101.com/r/aO0tC8/1 :: /\s*([a-z\-]+)\s+(\.[a-z_]+):([nNpTFwcVvxof]*)\s+=/g
  - VARIABLES :: https://regex101.com/r/jW6hN7/1 :: /(\\[cgl]__?)([a-z][a-z_]+)(_[A-Za-z]+)/g
  - FUNCTION :: https://regex101.com/r/sL8tY9/1 :: /(\\(?:__)?[a-z]+_)([a-z_]+)(:[nNpTFwcVvxof]*)/g

I know that this would make expl3 development easier for me, and I’m sure others would appreciate the
ability. expl3 syntax is currently (or at least will be?) an official part of LaTeX: AUCTeX should have
some support for it.

If I can be of any help, please let me know. I’d very much like this to get pushed through.

All the best,
Sean
_______________________________________________
auctex-devel mailing list
auctex-devel <at> gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel
Uwe Brauer | 22 Feb 12:41 2015
Picon

GNU emacs: 24.4.1 auctex 11.88: installation problem: style files


Hello

I apologize if I miss here something elementary.

Here is what I do:

    -  I unpack auctex-11.88 in ~/emacs/site-lisp/packages/auctex-11.88/

    -  I run ./configure EMACS=/opt/emacs24/bin/emacs
       (nothing more no pkg directory is specified)

    -  I run make

    -  I don't run make install

    -  I add the following paths to my init file
    (setq load-path (cons (expand-file-name "~/emacs/site-lisp/packages/auctex-11.88")  load-path))
(setq load-path (cons (expand-file-name
    "~/emacs/site-lisp/packages/auctex-11.88/preview")  load-path))

    -  I add
    (load "auctex.el" nil t t)
    (load "preview-latex.el" nil t t)
    or 
    (require 'tex-site)    
    both seems to be equivalent, the latter is the old one from ancient times,
    which I prefer.

    -  now everything seems fine, save as I just found out, the  style
       files. If for example try to use in a beamer file some beamer
       specific command I obtain:

,----
|   Debugger entered--Lisp error: (void-function TeX-arg-beamer-overlay-spec)
|   TeX-arg-beamer-overlay-spec(nil)
|   TeX-parse-argument(nil TeX-arg-beamer-overlay-spec)
|   TeX-parse-arguments((TeX-arg-beamer-overlay-spec 1))
|   TeX-parse-macro("only" (TeX-arg-beamer-overlay-spec 1))
|   TeX-insert-macro("only")
|   call-interactively(TeX-insert-macro nil nil)
|   command-execute(TeX-insert-macro)
`----
   of course I can load beamer.el from the style directory manually and
   everything is fine but this cannot be a general solution.

    -  so I thought of just adding
(setq load-path (cons (expand-file-name "~/emacs/site-lisp/packages/auctex-11.88/style")  load-path))
   to my init file, however this turns out to be a very bad idea since
   then on startup I obtain:

,----
| Warning (initialization): An error occurred while loading `/home/oub/.emacs':
| 
| Symbol's function definition is void: TeX-add-style-hook
| 
| To ensure normal operation, you should investigate and remove the
| cause of the error in your initialization file.  Start Emacs with
| the `--debug-init' option to view a complete error backtrace.
`----

   so I am sort of stuck. In Xemacs this does not happen since when I
   compile it as a package or download the package, this load-path issue
   does not occur. I presume elpa would be the equivalent solution but I
   had also problems with elpa.

Could somebody please enlighten me what to do with the files in the
style directory and how to access them.

Thanks

Regards

Uwe Brauer 
Attachment (smime.p7s): application/pkcs7-signature, 8117 bytes
_______________________________________________
auctex-devel mailing list
auctex-devel <at> gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel
Arash Esbati | 7 Feb 21:08 2015
Picon
Picon

Adding key/vals to predefined ones

Hi,

some packages like enumitem.sty oder caption.sty (something I'd like to
see supported by AUCTeX BTW) have the infastructure to define new
key/vals by user in addition to the predefined ones.  E.g., enumitem.sty
offers `\SetEnumitemKey' and `\SetEnumitemValue' for this purpose
(cf. section 9 Generic keys and values of the documentation).

Is there any blueprint how this can be implemented on AUCTeX side?  The
following excerpt for an `enumitem.el' works for commands mentioned
above, but I have still no clear idea about how to build a bridge
between AUCTeX auto-parser and key-vals defined when a file is loaded,
i.e. how to add items from `LaTeX-enumitem-SetEnumitem*-list' to
`LaTeX-enumitem-key-val-options'.

--8<---------------cut here---------------start------------->8---
;; Example for predefined key/vals
(defvar LaTeX-enumitem-key-val-options
  '(("align" ("left" "right" "parleft"))
    ("style" ("standard" "multiline" "nextline" "sameline" "unboxed"))
    ("mode" ("boxed" "unboxed")))
  "Key=value options for enumitem macros and environments.")

;; Standard auto-parsing procedure
(defun LaTeX-enumitem-auto-cleanup ()
  "Move parsing results into right places for further usage."
  ;; \SetEnumitemKey{<key>}{<replacement>}
  (dolist (key LaTeX-auto-enumitem-SetEnumitemKey)
    (add-to-list 'LaTeX-enumitem-SetEnumitemKey-list
		 (list key)))
  ;; \SetEnumitemValue{<key>}{<val>}{<replacement>}
  (dolist (key-val LaTeX-auto-enumitem-SetEnumitemValue)
    (let* ((key (car key-val))
	   (val (cdr key-val)))
      (list key val))))

;; Functions to be called
(defun LaTeX-arg-SetEnumitemKey (optional &optional prompt)
  "Ask for a new key to be defined and add it to
`LaTeX-enumitem-key-val-options'."
  (let ((key     (read-string "New Key: "))
	(replace (TeX-read-key-val optional
				   LaTeX-enumitem-key-val-options "Replacement")))
    (TeX-argument-insert key     optional)
    (TeX-argument-insert replace optional)
    (add-to-list 'LaTeX-enumitem-key-val-options (list key))
    (LaTeX-add-enumitem-SetEnumitemKeys key)))

(defun LaTeX-arg-SetEnumitemValue (optional &optional prompt)
  "Ask for a new value added to an existing key incl. the final
replacement of value."
  (let* ((key (TeX-read-key-val optional LaTeX-enumitem-key-val-options "Key"))
	 (val (read-string "String value: "))
	 (key-match (car (assoc key LaTeX-enumitem-key-val-options)))
	 (val-match (cdr (assoc key LaTeX-enumitem-key-val-options))))
    (setq LaTeX-enumitem-key-val-options
    	  (assq-delete-all (car (assoc key LaTeX-enumitem-key-val-options))
    			   LaTeX-enumitem-key-val-options))
    (if (null val-match)
	(add-to-list 'LaTeX-enumitem-key-val-options (list key (list val)))
      (add-to-list 'LaTeX-enumitem-key-val-options
		   (list key (delete-dups (cons val val-match)))))
    (TeX-argument-insert key optional)
    (TeX-argument-insert val optional)))

(TeX-add-style-hook
 "enumitem"
 (lambda ()

    ;; "Key" will be added to key-val list.
    '("SetEnumitemKey" LaTeX-arg-SetEnumitemKey)

    ;; "Key" and "Value" are added to the key-val list
    '("SetEnumitemValue" LaTeX-arg-SetEnumitemValue "Replacement"))
--8<---------------cut here---------------end--------------->8---

Best, Arash
Arash Esbati | 7 Feb 19:34 2015
Picon
Picon

New style `color.el'

Hi,

this patch adds support for `color.sty'.  Any comments welcome.

Best, Arash

_______________________________________________
auctex-devel mailing list
auctex-devel <at> gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel
Nicolas Vaughan | 4 Feb 02:54 2015

Style file for tcolorbox.sty

Hi,
I created a very basic style file for tcolorbox.sty (attached here).
Please tell if this is enough to get it included in the next version of 
AuCTeX.
Thanks.
Nicolas
-- 
Nicolás Vaughan, PhD
Profesor asociado
Universidad Jorge Tadeo Lozano
Bogotá, Colombia

;;; tcolorbox.el -- AUCTeX style for tcolorbox.sty

;; Copyright (C) 2003-2005, 2015 Free Software Foundation, Inc.

;; Author: Nicolas Vaughan <n.vaughan <at> oxon.org>
;; Maintainer: Nicolas Vaughan <n.vaughan <at> oxon.org>
;; Created: 2015-02-03
;; Keywords: tex

;; This file is part of AUCTeX.

;; AUCTeX is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.

;; AUCTeX is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with AUCTeX; see the file COPYING.  If not, write to the Free
;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
;; 02110-1301, USA.

;;; Commentary:

;; This file adds support for `tcolorbox.sty'.

;;; Code:

;; Insert an tcolorbox environment and ask for an optional title
(defun LaTeX-tcolorbox-env-item-opt-label (environment)
  "Insert a `tcolorbox' environment, and an optional title."
  (LaTeX-insert-environment
   environment
   (let ((label (TeX-read-string "(Optional) Title: ")))
     (concat (unless (zerop (length label))
               (format "[title={%s}]" label)))))
  )

(add-hook 'LaTeX-mode-hook
          (lambda ()
            (LaTeX-add-environments
             '("tcolorbox" LaTeX-tcolorbox-env-item-opt-label))
            )
          )

;;; tcolorbox.el ends here
_______________________________________________
auctex-devel mailing list
auctex-devel <at> gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel
Arash Esbati | 31 Jan 21:31 2015
Picon
Picon

color.el: RFC and a question

Hi,

I wrote a style for `color.sty' (see below) and would like to ask for
any comments before I make a proper submission.

Besides, I don't understand why 

(LaTeX-add-color-definecolors LaTeX-color-dvipsnames-colors)

does not work -- it confuses any `completing-read' call.  I ended up
feeding the function with a copy of the content of that variable.  Any
idea?

TIA and Best, Arash

--8<---------------cut here---------------start------------->8---
(defvar LaTeX-color-colour-models
  '("cmyk" "gray" "named" "rgb")
  "List of color models provided by `color.sty'.")

(defvar LaTeX-color-dvipsnames-colors
  '("Apricot"        "Aquamarine"      "Bittersweet"  "Black"
    "Blue"           "BlueGreen"       "BlueViolet"   "BrickRed"
    "Brown"          "BurntOrange"     "CadetBlue"    "CarnationPink"
    "Cerulean"       "CornflowerBlue"  "Cyan"         "Dandelion"
    "DarkOrchid"     "Emerald"         "ForestGreen"  "Fuchsia"
    "Goldenrod"      "Gray"            "Green"        "GreenYellow"
    "JungleGreen"    "Lavender"        "LimeGreen"    "Magenta"
    "Mahogany"       "Maroon"          "Melon"        "MidnightBlue"
    "Mulberry"       "NavyBlue"        "OliveGreen"   "Orange"
    "OrangeRed"      "Orchid"          "Peach"        "Periwinkle"
    "PineGreen"      "Plum"            "ProcessBlue"  "Purple"
    "RawSienna"      "Red"             "RedOrange"    "RedViolet"
    "Rhodamine"      "RoyalBlue"       "RoyalPurple"  "RubineRed"
    "Salmon"         "SeaGreen"        "Sepia"        "SkyBlue"
    "SpringGreen"    "Tan"             "TealBlue"     "Thistle"
    "Turquoise"      "Violet"          "VioletRed"    "White"
    "WildStrawberry" "Yellow"          "YellowGreen"  "YellowOrange")
  "List of colors defined by package option `dvipsnames' from `color.sty'.")

;; Needed for auto-parsing.
(require 'tex)

;; Plug color into the parser: now we have the following:
;; 1. LaTeX-auto-color-definecolor: Name of temporary variable used
;; when parsing.
;; 2. LaTeX-add-color-definecolors: Name of function to add
;; information to add to #3.
;; 3. LaTeX-color-definecolor-list: Name of variable holding buffer
;; local information.
;; 4. LaTeX-color-definecolors-changed: Name of variable indicating
;; that #3 has changed.
(TeX-auto-add-type "color-definecolor" "LaTeX")

(defvar LaTeX-color-definecolor-regexp
  '("\\\\definecolor{\\([^}]+\\)}{\\([^}]+\\)}{\\([^}]+\\)}"
    1 LaTeX-auto-color-definecolor)
  "Matches the arguments of `\\definecolor' from `color'
package.")

(defun LaTeX-color-auto-prepare ()
  "Clear `LaTeX-auto-color-definecolor' before parsing."
  (setq	LaTeX-auto-color-definecolor nil))

(defun LaTeX-color-auto-cleanup ()
  "Move parsed colors from `LaTeX-auto-color-definecolor' to
`LaTeX-color-definecolor-list'."
  ;; \definecolor{<name>}{<model>}{<colour-spec>}
  ;; color=<name>, ignored=<model>, ignored=<colour-spec>
  (dolist (color LaTeX-auto-color-definecolor)
    (add-to-list 'LaTeX-color-definecolor-list (list color))))

(add-hook 'TeX-auto-prepare-hook #'LaTeX-color-auto-prepare t)
(add-hook 'TeX-auto-cleanup-hook #'LaTeX-color-auto-cleanup t)

(defun TeX-arg-color-definecolor (optional &optional prompt)
  "Insert arguments of `\\definecolor' from `color.sty'."
  ;; \definecolor{<name>}{<model>}{<color spec>}
  ;; Ask for <name>, add to our list and insert it
  (let ((colorname (read-string "Color name: ")))
    (LaTeX-add-color-definecolors colorname)
    (TeX-argument-insert colorname optional))
  ;; Ask and insert <model>
  (let ((model (completing-read
		(TeX-argument-prompt optional prompt "Color model")
		(if (not (or (LaTeX-provided-package-options-member "color" "dvips")
			     (LaTeX-provided-package-options-member "color" "dvipsnames")))
		    (remove "named" LaTeX-color-colour-models)
		  LaTeX-color-colour-models))))
    (TeX-argument-insert model optional)
    ;; Depending on <model>, ask for <color spec> and insert it
    (cond (;; <cmyk> model
	   (string-equal model "cmyk")
	   (let ((cyan    (read-string "Value Cyan (between 0,1): "))
		 (magenta (read-string "Value Magenta (between 0,1): "))
		 (yellow  (read-string "Value Yellow (between 0,1): "))
		 (black   (read-string "Value Black (between 0,1): ")))
	     (TeX-argument-insert
	      (concat cyan "," magenta "," yellow "," black) optional)))
	  ;; <rgb> model
	  ((string-equal model "rgb")
	   (let ((red   (read-string "Value Red (between 0,1): "))
		 (green (read-string "Value Green (between 0,1): "))
		 (blue  (read-string "Value Blue (between 0,1): ")))
	     (TeX-argument-insert
	      (concat red "," green "," blue) optional)))
	  ;; <gray> model
	  ((string-equal model "gray")
	   (let ((grayness (read-string "Value Gray (between 0,1): ")))
	     (TeX-argument-insert grayness optional)))
	  ;; <named> model takes the dvipsnames
	  ((string-equal model "named")
	   (let ((color (completing-read "Named Color: "
					 LaTeX-color-dvipsnames-colors)))
	     (TeX-argument-insert color optional))))))

(defun TeX-arg-color (optional &optional prompt)
  "Insert arguments of various color commands from `color.sty'."
  ;; \color{<name>} or \color[<model>]{<color spec>}
  ;; First, ask for <model>.  `named' is removed here from completion
  ;; if package option is not given
  (let ((model (completing-read
		(TeX-argument-prompt t prompt "Color model")
		(if (not (or (LaTeX-provided-package-options-member "color" "dvips")
			     (LaTeX-provided-package-options-member "color" "dvipsnames")))
		    (remove "named" LaTeX-color-colour-models)
		  LaTeX-color-colour-models))))
    (if (string-equal model "")
	;; if empty, ask for <name> with completion
	(let ((color (completing-read
		      (TeX-argument-prompt optional prompt "Color name")
		      (LaTeX-color-definecolor-list))))
	  (TeX-argument-insert color optional))
      ;; if not empty, insert [<model>] and proceed
      (insert (concat LaTeX-optop model LaTeX-optcl))
      (cond (;; <cmyk> model
	     (string-equal model "cmyk")
	     (let ((cyan    (read-string "Value Cyan (between 0,1): "))
		   (magenta (read-string "Value Magenta (between 0,1): "))
		   (yellow  (read-string "Value Yellow (between 0,1): "))
		   (black   (read-string "Value Black (between 0,1): ")))
	       (TeX-argument-insert
		(concat cyan "," magenta "," yellow "," black) optional)))
	    ;; <rgb> model
	    ((string-equal model "rgb")
	     (let ((red   (read-string "Value Red (between 0,1): "))
		   (green (read-string "Value Green (between 0,1): "))
		   (blue  (read-string "Value Blue (between 0,1): ")))
	       (TeX-argument-insert
		(concat red "," green "," blue) optional)))
	    ;; <gray> model
	    ((string-equal model "gray")
	     (let ((grayness (read-string "Value Gray (between 0,1): ")))
	       (TeX-argument-insert grayness optional)))
	    ;; <named> model; allowed are dvipsnames.
	    ((string-equal model "named")
	     (let ((color (completing-read "Named Color: "
					   LaTeX-color-dvipsnames-colors)))
	       (TeX-argument-insert color optional)))))))

(defun TeX-arg-color-fcolorbox (optional &optional prompt)
  "Insert arguments of `\\fcolorbox' from `color.sty'. "
  ;; \fcolorbox{<frame color name>}{<box color name>}{<text>} or
  ;; \fcolorbox[<model>]{<frame color spec>}{<box color spec>}{<text>}
  ;; First, ask for <model>; remove `named' again
  (let ((model (completing-read
		(TeX-argument-prompt t prompt "Color model")
		(if (not (or (LaTeX-provided-package-options-member "color" "dvips")
			     (LaTeX-provided-package-options-member "color" "dvipsnames")))
		    (remove "named" LaTeX-color-colour-models)
		  LaTeX-color-colour-models))))
    (if (string-equal model "")
	;; if empty, ask for <frame color spce> with completion
	(let ((frame-color (completing-read
			    (TeX-argument-prompt optional prompt "Frame color name")
			    (LaTeX-color-definecolor-list)))
	      (box-color   (completing-read
			    (TeX-argument-prompt optional prompt "Box color name")
			    (LaTeX-color-definecolor-list))))
	  (TeX-argument-insert frame-color optional)
	  (TeX-argument-insert box-color   optional))
      ;; if not empty, insert [<model>] and cater for 2 mandatory args.
      (insert (concat LaTeX-optop model LaTeX-optcl))
      (cond (;; <cmyk> model
	     (string-equal model "cmyk")
	     (let ((cyan    (read-string "Frame value Cyan (between 0,1): "))
		   (magenta (read-string "Frame value Magenta (between 0,1): "))
		   (yellow  (read-string "Frame value Yellow (between 0,1): "))
		   (black   (read-string "Frame value Black (between 0,1): ")))
	       (TeX-argument-insert
		(concat cyan "," magenta "," yellow "," black) optional))
	     (let ((cyan    (read-string "Box value Cyan (between 0,1): "))
		   (magenta (read-string "Box value Magenta (between 0,1): "))
		   (yellow  (read-string "Box value Yellow (between 0,1): "))
		   (black   (read-string "Box value Black (between 0,1): ")))
	       (TeX-argument-insert
		(concat cyan "," magenta "," yellow "," black) optional)))
	    ;; <rgb> model
	    ((string-equal model "rgb")
	     (let ((red   (read-string "Frame value Red (between 0,1): "))
		   (green (read-string "Frame value Green (between 0,1): "))
		   (blue  (read-string "Frame value Blue (between 0,1): ")))
	       (TeX-argument-insert
		(concat red "," green "," blue) optional))
	     (let ((red   (read-string "Box value Red (between 0,1): "))
		   (green (read-string "Box value Green (between 0,1): "))
		   (blue  (read-string "box value Blue (between 0,1): ")))
	       (TeX-argument-insert
		(concat red "," green "," blue) optional)))
	    ;; <gray> model
	    ((string-equal model "gray")
	     (let ((grayness (read-string "Frame value Gray (between 0,1): ")))
	       (TeX-argument-insert grayness optional))
	     (let ((grayness (read-string "Box value Gray (between 0,1): ")))
	       (TeX-argument-insert grayness optional)))
	    ;; <named> model; allowed are dvipsnames.
	    ((string-equal model "named")
	     (let ((color (completing-read "Frame named Color: "
					   LaTeX-color-dvipsnames-colors)))
	       (TeX-argument-insert color optional))
	     (let ((color (completing-read "Box named Color: "
					   LaTeX-color-dvipsnames-colors)))
	       (TeX-argument-insert color optional)))))))

(TeX-add-style-hook
 "color"
 (lambda ()
   ;; Add color to the parser.
   (TeX-auto-add-regexp LaTeX-color-definecolor-regexp)

   ;; Add list of colors which are always available
   (LaTeX-add-color-definecolors
    "black" "blue" "cyan" "green" "magenta" "red" "white" "yellow")

   ;; Add dvips colors in conjunction with `usenames'
   (when (and (LaTeX-provided-package-options-member "color" "usenames")
	      (or (LaTeX-provided-package-options-member "color" "dvips")
		  (LaTeX-provided-package-options-member "color" "dvipsnames")))
     (LaTeX-add-color-definecolors
      "Apricot"        "Aquamarine"      "Bittersweet"  "Black"
      "Blue"           "BlueGreen"       "BlueViolet"   "BrickRed"
      "Brown"          "BurntOrange"     "CadetBlue"    "CarnationPink"
      "Cerulean"       "CornflowerBlue"  "Cyan"         "Dandelion"
      "DarkOrchid"     "Emerald"         "ForestGreen"  "Fuchsia"
      "Goldenrod"      "Gray"            "Green"        "GreenYellow"
      "JungleGreen"    "Lavender"        "LimeGreen"    "Magenta"
      "Mahogany"       "Maroon"          "Melon"        "MidnightBlue"
      "Mulberry"       "NavyBlue"        "OliveGreen"   "Orange"
      "OrangeRed"      "Orchid"          "Peach"        "Periwinkle"
      "PineGreen"      "Plum"            "ProcessBlue"  "Purple"
      "RawSienna"      "Red"             "RedOrange"    "RedViolet"
      "Rhodamine"      "RoyalBlue"       "RoyalPurple"  "RubineRed"
      "Salmon"         "SeaGreen"        "Sepia"        "SkyBlue"
      "SpringGreen"    "Tan"             "TealBlue"     "Thistle"
      "Turquoise"      "Violet"          "VioletRed"    "White"
      "WildStrawberry" "Yellow"          "YellowGreen"  "YellowOrange"))

   (TeX-add-symbols
    ;; \definecolor{<name>}{<model>}{<color spec>}
    '("definecolor" TeX-arg-color-definecolor)

    ;; \color{<name>} or \color[<model>]{<color spec>}
    '("color" TeX-arg-color)

    ;; \textcolor{<name>}{<text>} or
    ;; \textcolor[<model>]{<color spec>}{<text>}
    '("textcolor" TeX-arg-color "Text")

    ;; \pagecolor{<name>} or
    ;; \pagecolor[<model>]{<color spec>}
    '("pagecolor" TeX-arg-color)

    ;; \nopagecolor
    '("nopagecolor" 0)

    ;; \colorbox{<name>}{<text>} or
    ;; \colorbox[<model>]{<color spec>}{<text>}
    '("colorbox" TeX-arg-color "Text")

    ;; \fcolorbox{<frame color name>}{<box color name>}{<text>} or
    ;; \fcolorbox[<model>]{<frame color spec>}{<box color spec>}{<text>}
    '("fcolorbox" TeX-arg-color-fcolorbox "Text"))

   ;; Fontification
   (when (and (featurep 'font-latex)
	      (eq TeX-install-font-lock 'font-latex-setup))
     (font-latex-add-keywords '(("color"         "[{")
				("pagecolor"     "[{"))
			      'type-declaration)
     (font-latex-add-keywords '(("textcolor"     "[{{")
				("colorbox"      "[{{" )
				("fcolorbox"     "[{{{"))
			      'type-command)
     (font-latex-add-keywords '(("definecolor"    "{{{"))
			      'function)))
 LaTeX-dialect)

(defvar LaTeX-color-package-options
  '("debugshow" "dvipdf" "dvipdfm" "dvipdfmx" "dvips" "dvipsnames"
    "dvipsone" "dviwin" "dviwindo" "emtex" "monochrome"
    "nodvipsnames" "oztex" "pctex32" "pctexhp" "pctexps"
    "pctexwin" "pdftex" "tcidvi" "textures" "truetex"
    "usenames" "vtex" "xdvi" "xetex")
  "Package options for the color package.")
--8<---------------cut here---------------end--------------->8---
Arash Esbati | 31 Jan 20:41 2015
Picon
Picon

[PATCH] New style `currvita.el'

Hi,

this patch adds support for `currvita.sty'.  Any
comments welcome.

Best, Arash

_______________________________________________
auctex-devel mailing list
auctex-devel <at> gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel
Uwe Brauer | 14 Jan 18:59 2015
Picon

feature proposal: make LaTeX-mark-section behave like LaTeX-mark-environment

Hello

I find it very useful that LaTeX-mark-environment moves the mark to out
environments:
that is 

  \begin{enumerate}
    \item 
    \begin{equation}
      \label{eq:proto-euler-poisson-banach:7}
      \|\nabla \phi \|_{H_{s+1,\delta+1}}^{2}
      \leq  
      C_{El} \|\rho\|_{H_{s,\delta+2}}^{2}
    \end{equation}   
   \item bla bla
  \end{enumerate}

When used with the cursor placed inside the equation environment, that
environment gets marked, when executed again, the next out environment
enumerate, gets marked etc.

Could LaTeX-mark-section do the same? When executed first it marks the
subsection, when executed again the section etc.

\section{Introduction}

Bla bla
\subsection{Result}

Blabla 

Uwe Brauer 
Attachment (smime.p7s): application/pkcs7-signature, 8123 bytes
_______________________________________________
auctex-devel mailing list
auctex-devel <at> gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel
Arash Esbati | 9 Jan 19:21 2015
Picon
Picon

minted.el: Parsing with `\newminted'

Hi,

I copied this from minted doc in a file:

\usepackage{minted}
\newminted{cpp}{gobble=2,linenos}

After `C-u C-c C-n C-c C-e', AUCTeX offers `cpp' and `cpp*' for
completion.  My expectation was `cppcode' and `cppcode*'.  The
one-liner below fixes this.

diff --git a/style/minted.el b/style/minted.el
index 83d4764..3c768e2 100644
--- a/style/minted.el
+++ b/style/minted.el
 <at>  <at>  -138,7 +138,7  <at>  <at> 
   (dolist (name-lang LaTeX-minted-auto-newminted)
     (let* ((env (if (> (length (car name-lang)) 0)
                    (car name-lang)
-                 (cadr name-lang)))
+                 (concat (cadr name-lang) "code")))
           (env* (concat env "*")))
       (add-to-list 'LaTeX-auto-environment (list env))
       (add-to-list 'LaTeX-auto-environment

Best, Arash
Uwe Brauer | 3 Jan 23:57 2015
Picon

change: documents with $$ to \begin{documents}

Hi[1]

Sometimes I receive documents with have basically only 
$$
\int f =0
$$
constructions instead of say 
\begin{displaymath} or {equation*} etc.

Anybody has a idea how to change the evil $$ to true latex constructs by
using sophisticated regexp?

thanks

Uwe Brauer 

Footnotes:
[1]  happy new year

Attachment (smime.p7s): application/pkcs7-signature, 8123 bytes
_______________________________________________
auctex-devel mailing list
auctex-devel <at> gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel

Gmane