auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] reftex-label-alist for ctable package


From: Tassilo Horn
Subject: Re: [AUCTeX] reftex-label-alist for ctable package
Date: Thu, 02 Aug 2012 20:59:21 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux)

Tassilo Horn <address@hidden> writes:

>> So there seems to be something awry with the way the ?t gets used
>> inside the alist for ctable in reftex-label-alist-builtin, doesn't it?
>
> Indeed, and ?l doesn't even occur as possible selection, although
> there's a listing in the file...
>
> I'll look into that, but don't hold your breath.  I'm in holidays from
> Friday on.

Ok, here's another patch.  With that, at least C-c ) followed by l will
show listing and minted environments.  However, it only works for
environments but not for macros like \ctable or \endnote.  Not sure
why...

Bye,
Tassilo

=== modified file 'lisp/textmodes/reftex-vars.el'
--- lisp/textmodes/reftex-vars.el       2012-07-27 07:59:50 +0000
+++ lisp/textmodes/reftex-vars.el       2012-08-02 18:42:11 +0000
@@ -90,6 +90,15 @@
     (wrapfig     "The wrapfigure environment"
      (("wrapfigure" ?f nil nil caption)))
 
+    (ctable    "The ctable package"
+     (("\\ctable[]{}{}{}" ?t "tab:" "\\ref{%s}" 1 ("table" "Tabelle"))))
+
+    (listings  "The listings package"
+     (("lstlisting" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting"))))
+
+    (minted    "The minted package"
+     (("minted" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting"))))
+
     ;; The LaTeX core stuff
     (LaTeX       "LaTeX default environments"
      (("section"   ?s "%S" "~\\ref{%s}" (nil . t)
@@ -120,16 +129,7 @@
 
       ;; The label macro is hard coded, but it *could* be defined like this:
       ;;("\\label{*}" nil nil nil nil)
-      ))
-
-    (ctable    "The ctable package"
-     (("\\ctable[]{}{}{}" ?t "tab:" "\\ref{%s}" 1 ("table" "Tabelle"))))
-
-    (listings  "The listings package"
-      (("lstlisting" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting"))))
-
-    (minted    "The minted package"
-      (("minted" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting")))))
+      )))
   "The default label environment descriptions.
 Lower-case symbols correspond to a style file of the same name in the LaTeX
 distribution.  Mixed-case symbols are convenience aliases.")
@@ -430,7 +430,8 @@
 
 (defcustom reftex-default-label-alist-entries
   '(amsmath endnotes fancybox floatfig longtable picinpar
-            rotating sidecap subfigure supertab wrapfig LaTeX)
+            rotating sidecap subfigure supertab wrapfig
+           listings minted ctable LaTeX)
   "Default label alist specifications.  LaTeX should always be the last entry.
 The value of this variable is a list of symbols with associations in the
 constant `reftex-label-alist-builtin'.  Check that constant for a full list
@@ -583,7 +584,7 @@
 Any list entry may also be a symbol.  If that has an association in
 `reftex-label-alist-builtin', the cddr of that association is spliced into the
 list.  However, builtin defaults should normally be set with the variable
-`reftex-default-label-alist-entries."
+`reftex-default-label-alist-entries'."
   :group 'reftex-defining-label-environments
   :set 'reftex-set-dirty
   :type


reply via email to

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