The cleveref
package does a very nice job of sorting the labels of the many references for you (whatever they are) in their natural order.
However, I was stumbled by a special case when I wanted to refer to parts of a figure that had already letters like A, B, C, D, etc. generated by external program like Photoshop
or a similar software.
What I want is to refer to these parts of the figure (which are not marked by LaTeX
as subfigures or subfloats) and still be consistent with the rest of my latex document using the multiple references to figures by cleveref
package.
To illustrate this, you would type this in LaTeX
when you typically want to refer to multiple subfigures using the cleveref
package:
\cref{fig:lab1:1, fig:lab1:3, fig:lab1:2}
this would yield the desired typesetting result (normal behavior):
figs. 1.1a, 1.1b and 1.1c
Please note that cleveref
sorted out the order of the subfigues, plus it added the type of the reference, fig.
in this case, and more importantly added s
because they were more than one reference. Also note that the reference number (1.1
in this case) was repeated with the different subfigure letters.
Now back to the special occasion, the figure which was already annotated using an external program with (A,B,C,D). It should be obvious that I cannot use multiple references the usual way, since I don't have separate labels for each part of the figure, I only have one label for the whole figure but not for its parts.
Therefore, as a workaround, I tended to use the following code to mimic the output of cleveref
package had separate labels for the parts of the figure been available:
\cref{fig:lab1}a, \ref{fig:lab1}b and \ref{fig:lab1}c
BUT the output of this code was suboptimal and didn't reproduce the s
to denote many figures as it should be. More importantly, the output is inconsistent with the rest of the document:
fig. 1.1a, 1.1b and 1.1c
What is needed:
- One alternative is to remove the
s
story from all of the document, i.e., customizing thecleveref
package so that not to add thes
wherever multiple references are called out. I would be grateful if you could show me how to do this in code. - To fix this inconsistency issue using some other superior solution that I had no idea of (like usual).
cleveref
and x-referencing in the document. As I said, I want to keep x-referencing consistent throughout the whole document.