Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7436985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:19:36+00:00 2026-05-29T10:19:36+00:00

With RefTeX C-c C-) invokes reftex-citation which first asks for type of label one

  • 0

With RefTeX C-c C-) invokes reftex-citation which first asks for type of label one wants to reference then asks one to select a reference from a list. The list is a list of labels in a document. For LaTeX figures the list includes the caption of each figure (the arguments of \caption). Whenever a document contains subcaptions done with \subcaption they are not recognized and therefore not included in the list. Can RefTeX be made to recognize them such that they are put next to their respective labels in the list?

I guess a solution is to modify the variable reftex-label-alist by letting a regexp find \subcaption.

Here follows an example to make the problem clearer. Say that you have the following LaTeX document:

\documentclass{article}

\usepackage{subcaption}

\begin{document}

\begin{figure}
  \begin{minipage}{.5\linewidth}
    \subcaption{A subfigure}\label{fig:1a}
  \end{minipage}
  \caption{A figure}\label{fig:1}
\end{figure}

\end{document}

If you do C-c C-) you will see something like the following:

*RefTeX Select* of reftex-citation: No match for content regexp

Notice that the main figure’s caption is shown but not the subfigure’s caption.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:19:37+00:00Added an answer on May 29, 2026 at 10:19 am

    You can customize reftex-default-context-regexps and change the regular expression of the caption entry from \\\(rot\)?caption\*?[[{] to \\\(rot\|sub\)?caption\*?[[{].

    I think you might have to restart emacs, or run (reftex-set-dirty 'reftex-default-context-regexps reftex-default-context-regexps), or something, so that AUCTeX will update the proper variables. It’s supposed to do that automatically, but I’ve had some problems with it.

    If you dislike Customize you can set it with the following code:

    (eval-after-load "reftex-vars"
      '(progn (setcdr (assoc 'caption reftex-default-context-regexps)
                      "\\\\\\(rot\\|sub\\)?caption\\*?[[{]")))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a yasnippet with this function \cite{${1:label$(unless yas/modified-p (reftex-citation nil 'dont-insert))}}$0
I'm trying to send a value to the appDelegate from one UIViewController, so that
I've written a simple linq query as follows: var query = from c in
I have a simple table for reference page: id name description image In reference.php,
i am trying to make some kind of reflex like game for android, which
Take this skeleton class that someone wants to fill in to fetch RSS streams
I'd like to modify emacs' behaviour when using reftex, so that after pressing 'C-c
This first query grabs all the transaction_details for a particular date range This is
I'm playing with a custom TextBox inheriting from the WPF TextBox, trying to learn
I am using a delegate which calls an unmanaged function pointer. This causes the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.