# Place subfigure Labels in italics and parentheses in normal font with Cleveref

I am writing an article and as per formatting specifications, I need to place subfigure labels in italics and their parenthesis in normal roman font (without italics) i.e. (a) for a label. Similarly, I need to cross-reference subfigures in the same manner, i.e. alphanumeric labels in italics and parenthesis in normal font e.g., Figure 1(a). Kindly advice how I should implement this using cleveref and subfig packages as illustrated in MWE below.

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage[capitalise]{cleveref}

\graphicspath{{figures/}}

\usepackage[labelformat=simple,labelfont=it]{subfig}%places subfig labels in italic
\renewcommand{\thesubfigure}{(\alph{subfigure})}%alphabetic subfigure numbering
\crefrangelabelformat{figure}{#3#1#4--(#5\crefstripprefix{#1}{#2}#6}
%add dash as between subfig numbers and Strips redundant
%figure digit to be Figures 11(a)-(g)

\begin{document}
My challenge is place the subfigure labels in italics and their
parentheses in normal roman font (without italics).

\begin{figure}
\centering
\captionsetup{justification=raggedright}
\subfloat[text]{\label{fig:1b}\includegraphics{file2.eps}}\\
\subfloat[text]{\label{fig:1d}\includegraphics{file4.eps}}
\caption{Now these labels \protect\subref*{fig:1a},
\protect\subref*{fig:1b}, $\dots$, \protect\subref*{fig:1d} should be
placed in italics and their parenthesis in normal roman font (without
italics), i.e (\textit{a})}
\label{fig:1}
\end{figure}

Moreover, I wish to crossreference this \Cref{fig:1a} with the label "a"
in italics and parenthesis in normal roman font (without italics), i.e.,
Figure~(\textit{a}) and similarly \Cref{fig:1a,fig:1b,fig:1c,fig:1d},
i.e. Figures~(\textit{a})--(\textit{d}) .

\end{document}


If I understand your formatting objectives correctly, you do not wish to include the Figure number in cross-references to subfigures. If this interpretation is correct, the following solution should work for you.

\documentclass{article}
\usepackage[demo]{graphicx}
\graphicspath{{figures/}}
\usepackage[labelformat=simple]{subfig}
\usepackage[capitalise,noabbrev]{cleveref}

\makeatletter
\renewcommand{\p@subfigure}{} % remove the figure number "prefix"
\makeatother
%% only the alphabetic label should be in italics:
\renewcommand{\thesubfigure}{(\textit{\alph{subfigure}})}
%% change range conjunction indicator to "en-dash" (default is " to ")
\newcommand\crefrangeconjunction{--}

\begin{document}

\begin{figure}

\subfloat[text]{\label{fig:1a}\includegraphics{file1.eps}}\hspace{\fill}
\subfloat[text]{\label{fig:1b}\includegraphics{file2.eps}}

\subfloat[text]{\label{fig:1c}\includegraphics{file3.eps}}\hspace{\fill}
\subfloat[text]{\label{fig:1d}\includegraphics{file4.eps}}

\caption{The labels \protect\subref*{fig:1a}, \protect\subref*{fig:1b},
\dots, \protect\subref*{fig:1d} should be placed in italics and
their parentheses in normal roman font (without italics), i.e.,
(\textit{a}), etc.}
\label{fig:1}
\end{figure}

My challenge is to place the subfigure labels in italics and their
parentheses in upright roman font (without italics).

E.g., I wish to cross-reference \Cref{fig:1a} with the label~a'' in
italics and the parentheses in normal roman font (without italics), i.e.,
Figure~(\textit{a})''.

Finally, both \cref{fig:1a,fig:1b,fig:1c,fig:1d} and
\crefrange{fig:1a}{fig:1d} should be typeset as
Figures~(\textit{a})--(\textit{d})''.

\end{document}

• @Mico...Thank you but I wish to clarify that I also need the figure numbers. – Benson Mar 25 '18 at 15:10
• Thanks I have modified the code it works well sorry for miscommunication. – Benson Mar 25 '18 at 16:41
• How can I get italics on the reference (not below the image but within the text with \cref ? – skan Oct 7 '18 at 19:59