aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArash Esbati2025-01-08 19:12:49 +0100
committerArash Esbati2025-01-08 19:12:49 +0100
commit5c3deffd9f4647e0dff33ffc84a28eb6fedb3012 (patch)
treea18446aaffb5bfbc0a573c244282a1f252563ea5
parent6df0e18fed3f3012d56a72f1d5f6a44f2f039ce2 (diff)
downloademacs-5c3deffd9f4647e0dff33ffc84a28eb6fedb3012.tar.gz
emacs-5c3deffd9f4647e0dff33ffc84a28eb6fedb3012.zip
Replace obsolete subfigure package with subfig
* doc/misc/reftex.texi (Builtin Label Environments): Mention the subfig LaTeX package instead of the obsolete subfigure. * lisp/textmodes/reftex-vars.el (reftex-label-alist-builtin): Replace obsolete subfigure entry with subfig. Adjust the macro names accordingly and the regexp for matching the context. Unify the descriptions of all entries. (reftex-default-label-alist-entries): Use subfig as well.
-rw-r--r--doc/misc/reftex.texi12
-rw-r--r--lisp/textmodes/reftex-vars.el36
2 files changed, 27 insertions, 21 deletions
diff --git a/doc/misc/reftex.texi b/doc/misc/reftex.texi
index 5973140734f..9287858fe29 100644
--- a/doc/misc/reftex.texi
+++ b/doc/misc/reftex.texi
@@ -1121,12 +1121,12 @@ the @code{\endnote} macro (from @file{endnotes.sty})
1121@cindex @code{sidewaystable}, LaTeX environment 1121@cindex @code{sidewaystable}, LaTeX environment
1122@code{sidewaysfigure}, @code{sidewaystable} (@file{rotating.sty}) 1122@code{sidewaysfigure}, @code{sidewaystable} (@file{rotating.sty})
1123@item 1123@item
1124@cindex @code{subfigure}, LaTeX package 1124@cindex @code{subfig}, LaTeX package
1125@cindex LaTeX packages, @code{subfigure} 1125@cindex LaTeX packages, @code{subfig}
1126@cindex @code{subfigure}, LaTeX environment 1126@cindex @code{\subfigure}, LaTeX macro
1127@cindex @code{subfigure*}, LaTeX environment 1127@cindex @code{\subtable}, LaTeX macro
1128@code{subfigure}, @code{subfigure*}, the @code{\subfigure} macro 1128the @code{\subfigure} and @code{\subtable} macros (from
1129(@file{subfigure.sty}) 1129@file{subfig.sty})
1130@item 1130@item
1131@cindex @code{supertab}, LaTeX package 1131@cindex @code{supertab}, LaTeX package
1132@cindex LaTeX packages, @code{supertab} 1132@cindex LaTeX packages, @code{supertab}
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el
index c6275c94015..3214f0b98ba 100644
--- a/lisp/textmodes/reftex-vars.el
+++ b/lisp/textmodes/reftex-vars.el
@@ -69,41 +69,46 @@
69 (("figwindow" ?f nil nil 1) 69 (("figwindow" ?f nil nil 1)
70 ("tabwindow" ?f nil nil 1))) 70 ("tabwindow" ?f nil nil 1)))
71 71
72 (rotating "Sidewaysfigure and table" 72 (rotating "The sidewaysfigure and sidewaystable environments"
73 (("sidewaysfigure" ?f nil nil caption) 73 (("sidewaysfigure" ?f nil nil caption)
74 ("sidewaysfigure*" ?f nil nil caption) 74 ("sidewaysfigure*" ?f nil nil caption)
75 ("sidewaystable" ?t nil nil caption) 75 ("sidewaystable" ?t nil nil caption)
76 ("sidewaystable*" ?t nil nil caption))) 76 ("sidewaystable*" ?t nil nil caption)))
77 77
78 (sidecap "SCfigure and SCtable" 78 (sidecap "The SCfigure and SCtable environments"
79 (("SCfigure" ?f nil nil caption) 79 (("SCfigure" ?f nil nil caption)
80 ("SCfigure*" ?f nil nil caption) 80 ("SCfigure*" ?f nil nil caption)
81 ("SCtable" ?t nil nil caption) 81 ("SCtable" ?t nil nil caption)
82 ("SCtable*" ?t nil nil caption))) 82 ("SCtable*" ?t nil nil caption)))
83 83
84 (subfigure "Subfigure environments/macro" 84 (subfig "The \\subfigure and \\subtable macros"
85 (("subfigure" ?f nil nil caption) 85 ;; The main macro \subfloat is ambiguous, so we only support the
86 ("subfigure*" ?f nil nil caption) 86 ;; compat macros for the old subfigure package. The context regexp
87 ("\\subfigure[]{}" ?f nil nil 1))) 87 ;; must match combinations of
88 ;; \subfigure[list-capt.][sub-capt.]{body}
89 (("\\subfigure[][]{}" ?f "fig:" "~\\subref{%s}"
90 "\\\\subfigure\\(?:\\(?:\\[[^]]*\\]\\)?\\[\\|{\\)")
91 ("\\subtable[][]{}" ?t "tab:" "~\\subref{%s}"
92 "\\\\subtable\\(?:\\(?:\\[[^]]*\\]\\)?\\[\\|{\\)")))
88 93
89 (supertab "Supertabular environment" 94 (supertab "Supertabular environment"
90 (("supertabular" ?t nil nil "\\tablecaption{"))) 95 (("supertabular" ?t nil nil "\\tablecaption{")))
91 96
92 (wrapfig "The wrapfig package" 97 (wrapfig "The wrapfigure and wraptable environments"
93 (("wrapfigure" ?f nil nil caption) 98 (("wrapfigure" ?f nil nil caption)
94 ("wraptable" ?t nil nil caption))) 99 ("wraptable" ?t nil nil caption)))
95 100
96 (ctable "The ctable package" 101 (ctable "The \\ctable macro"
97 (("\\ctable[]{}{}{}" ?t "tab:" "~\\ref{%s}" 1 ("table" "Tabelle")))) 102 (("\\ctable[]{}{}{}" ?t "tab:" "~\\ref{%s}" 1 ("table" "Tabelle"))))
98 103
99 (listings "The listings package" 104 (listings "The lstlisting environment"
100 (("lstlisting" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting")))) 105 (("lstlisting" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting"))))
101 106
102 (minted "The minted package" 107 (minted "The listing environment"
103 (("listing" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting")))) 108 (("listing" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting"))))
104 109
105 ;; The LaTeX core stuff 110 ;; The LaTeX core stuff
106 (LaTeX "LaTeX default environments" 111 (LaTeX "LaTeX default macros and environments"
107 (("section" ?s "%S" "~\\ref{%s}" (nil . t) 112 (("section" ?s "%S" "~\\ref{%s}" (nil . t)
108 (regexp "parts?" "chapters?" "chap\\." "sections?" "sect?\\." 113 (regexp "parts?" "chapters?" "chap\\." "sections?" "sect?\\."
109 "paragraphs?" "par\\." 114 "paragraphs?" "par\\."
@@ -456,9 +461,9 @@ If nil, `follow-mode' will be suspended for stuff in unvisited files."
456 :group 'reftex-label-support) 461 :group 'reftex-label-support)
457 462
458(defcustom reftex-default-label-alist-entries 463(defcustom reftex-default-label-alist-entries
459 '(amsmath endnotes fancybox floatfig longtable picinpar 464 '( amsmath endnotes fancybox floatfig longtable picinpar
460 rotating sidecap subfigure supertab wrapfig 465 rotating sidecap subfig supertab wrapfig
461 listings minted ctable LaTeX) 466 listings minted ctable LaTeX)
462 "Default label alist specifications. LaTeX should always be the last entry. 467 "Default label alist specifications. LaTeX should always be the last entry.
463The value of this variable is a list of symbols with associations in the 468The value of this variable is a list of symbols with associations in the
464constant `reftex-label-alist-builtin'. Check that constant for a full list 469constant `reftex-label-alist-builtin'. Check that constant for a full list
@@ -474,7 +479,8 @@ of options."
474 (list 'const :tag (concat (symbol-name (nth 0 x)) 479 (list 'const :tag (concat (symbol-name (nth 0 x))
475 ": " (nth 1 x)) 480 ": " (nth 1 x))
476 (nth 0 x))) 481 (nth 0 x)))
477 reftex-label-alist-builtin))) 482 reftex-label-alist-builtin))
483 :version "31.1")
478 484
479(defcustom reftex-label-alist nil 485(defcustom reftex-label-alist nil
480 "Alist with information on environments for \\label-\\ref use. 486 "Alist with information on environments for \\label-\\ref use.