I have got a quick question; I am writing a document with lots of sections and figures. Cross referencing works fine. So far so good. However, I would prefer when I reference something to have the figures and the sections in different formats.
For instance if I reference a section (provided tha appropriate labels are in place) I would like the output to be: Section 4.3
and when I reference a figure to have: Figure 4-3
.
How should I go about it?
Thank you in advance
Best Answer
You can redefine
\p@figure
to produce the desired formatting (but this will only change the formatting of the string used for cross-references; the string used for captions will remain unaltered):And combining this with the
cleveref
package, you can say something like this:Remarks:
[!ht]
as placement specifier just for this example; I am not recommending its usage.x.y
using a different stringx-y
. I would suggest you to reconsider this change.For consistency's sake, I would prefer to change
\thefigure
so the strings used in the object numbering and the one used in the cross-reference will be the same: