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.
This commit is contained in:
Arash Esbati 2025-01-08 19:12:49 +01:00
parent 6df0e18fed
commit 5c3deffd9f
2 changed files with 27 additions and 21 deletions

View file

@ -1121,12 +1121,12 @@ the @code{\endnote} macro (from @file{endnotes.sty})
@cindex @code{sidewaystable}, LaTeX environment
@code{sidewaysfigure}, @code{sidewaystable} (@file{rotating.sty})
@item
@cindex @code{subfigure}, LaTeX package
@cindex LaTeX packages, @code{subfigure}
@cindex @code{subfigure}, LaTeX environment
@cindex @code{subfigure*}, LaTeX environment
@code{subfigure}, @code{subfigure*}, the @code{\subfigure} macro
(@file{subfigure.sty})
@cindex @code{subfig}, LaTeX package
@cindex LaTeX packages, @code{subfig}
@cindex @code{\subfigure}, LaTeX macro
@cindex @code{\subtable}, LaTeX macro
the @code{\subfigure} and @code{\subtable} macros (from
@file{subfig.sty})
@item
@cindex @code{supertab}, LaTeX package
@cindex LaTeX packages, @code{supertab}

View file

@ -69,41 +69,46 @@
(("figwindow" ?f nil nil 1)
("tabwindow" ?f nil nil 1)))
(rotating "Sidewaysfigure and table"
(rotating "The sidewaysfigure and sidewaystable environments"
(("sidewaysfigure" ?f nil nil caption)
("sidewaysfigure*" ?f nil nil caption)
("sidewaystable" ?t nil nil caption)
("sidewaystable*" ?t nil nil caption)))
(sidecap "SCfigure and SCtable"
(sidecap "The SCfigure and SCtable environments"
(("SCfigure" ?f nil nil caption)
("SCfigure*" ?f nil nil caption)
("SCtable" ?t nil nil caption)
("SCtable*" ?t nil nil caption)))
(subfigure "Subfigure environments/macro"
(("subfigure" ?f nil nil caption)
("subfigure*" ?f nil nil caption)
("\\subfigure[]{}" ?f nil nil 1)))
(subfig "The \\subfigure and \\subtable macros"
;; The main macro \subfloat is ambiguous, so we only support the
;; compat macros for the old subfigure package. The context regexp
;; must match combinations of
;; \subfigure[list-capt.][sub-capt.]{body}
(("\\subfigure[][]{}" ?f "fig:" "~\\subref{%s}"
"\\\\subfigure\\(?:\\(?:\\[[^]]*\\]\\)?\\[\\|{\\)")
("\\subtable[][]{}" ?t "tab:" "~\\subref{%s}"
"\\\\subtable\\(?:\\(?:\\[[^]]*\\]\\)?\\[\\|{\\)")))
(supertab "Supertabular environment"
(("supertabular" ?t nil nil "\\tablecaption{")))
(wrapfig "The wrapfig package"
(wrapfig "The wrapfigure and wraptable environments"
(("wrapfigure" ?f nil nil caption)
("wraptable" ?t nil nil caption)))
(ctable "The ctable package"
(ctable "The \\ctable macro"
(("\\ctable[]{}{}{}" ?t "tab:" "~\\ref{%s}" 1 ("table" "Tabelle"))))
(listings "The listings package"
(listings "The lstlisting environment"
(("lstlisting" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting"))))
(minted "The minted package"
(minted "The listing environment"
(("listing" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting"))))
;; The LaTeX core stuff
(LaTeX "LaTeX default environments"
(LaTeX "LaTeX default macros and environments"
(("section" ?s "%S" "~\\ref{%s}" (nil . t)
(regexp "parts?" "chapters?" "chap\\." "sections?" "sect?\\."
"paragraphs?" "par\\."
@ -456,9 +461,9 @@ If nil, `follow-mode' will be suspended for stuff in unvisited files."
:group 'reftex-label-support)
(defcustom reftex-default-label-alist-entries
'(amsmath endnotes fancybox floatfig longtable picinpar
rotating sidecap subfigure supertab wrapfig
listings minted ctable LaTeX)
'( amsmath endnotes fancybox floatfig longtable picinpar
rotating sidecap subfig 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
@ -474,7 +479,8 @@ of options."
(list 'const :tag (concat (symbol-name (nth 0 x))
": " (nth 1 x))
(nth 0 x)))
reftex-label-alist-builtin)))
reftex-label-alist-builtin))
:version "31.1")
(defcustom reftex-label-alist nil
"Alist with information on environments for \\label-\\ref use.