I have 2 plots which in turn have 4 plots each, which I label as shown in the MWE. I am trying to get the caption of the figure to read:

Figure 1: (a)-(d) XYZ and (e)-(h) PQR

In the MWE I am doing it manually. How do I provide sub-references for all the figures such that I get the caption shown above? I cannot get \subref{fig_top_1,fig_top_2,fig_top_3,fig_top_4} to generate the desired. How can I get multiple sub-references to appear as a range in the caption (as above)?




    \caption{\protect\subref{fig_top_1,fig_top_2,fig_top_3,fig_top_4} XYZ  
         and \protect\subref{fig_bottom_1}--\subref{fig_bottom_4} PQR}


1 Answer 1


The following solution lets you use both \cref and \crefrange to create the cross-references. Note that \subref is not used.

enter image description here


\renewcommand\p@subfigure{} % no figure-number prefixes in cross-refs to subfigures




    \caption{\cref{fig_top_1,fig_top_2,fig_top_3,fig_top_4} XYZ and 
             \crefrange{fig_bot_1}{fig_bot_4} PQR}

  • 3
    This works fine. But it causes the subfigure references elsewhere to be without figure prefix. Is there a way to prevent this? Should I ask a separate question?
    – nxkryptor
    Feb 5, 2018 at 7:24
  • @nxkryptor - Yes, please post a new query. Do make sure to state what exactly isn't working as you would expect.
    – Mico
    Feb 5, 2018 at 7:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.