Graphics, Figures & TablesCustom figure label

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
David Evans
Posts: 5
Joined: Mon Jul 04, 2011 1:05 pm

Custom figure label

Post by David Evans »

Hi,

Apologies if this has been posted before - I have searched but could not find anything specifically answering my question.

I'm using the caption package and was wondering if there was a way to customise what appears before the figure caption, i.e. instead of 'Figure 1' i'd like 'Figure XY1'. This prefix to the number would be constant throughout the document (e.g. Figure XY2, Figure XY3 etc.).

Any help would be greatly appreciated,

Thanks
David

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

David Evans
Posts: 5
Joined: Mon Jul 04, 2011 1:05 pm

Re: Custom figure label

Post by David Evans »

Ok, let me modify my previous post as I've partly found the solution -
using \captionsetup{figurename=Figure XY} lets me rename the figure labels, but can anyone tell me how to also make this change in references to that figure? For example although I can now get Figure XY1, in the text references (e.g. \ref{fig:figurename}) still appear simply as figure 1.

Thanks again
David
Post Reply