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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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