I have a very small (probably silly) issue with reference to a subfigure. I am using the following code snippet for the name and reference to a subfigure:
\usepackage{caption}
\usepackage[labelformat=simple]{subcaption}
\renewcommand{\thesubfigure}{Figure \thefigure.(\alph{subfigure}):}
\makeatletter
\renewcommand\p@subfigure{}
\makeatother
Here \ref command to a subfigure \label is showing the following output:
Figure <figure no.>.<(subfigure no.)>:
How to get rid of the punctuation ' : ' in the reference but keep that in the caption label? Please help.
MWE:
\documentclass{article} \usepackage{mathtools} \usepackage{tikz, pgf} \usepackage{caption} \usepackage[labelformat=simple]{subcaption} \renewcommand{\thesubfigure}{Figure \thefigure.(\alph{subfigure}):} \makeatletter \renewcommand\p@subfigure{} \makeatother \begin{document} \begin{figure}[h] \centering \begin{subfigure}{0.45\linewidth} \centering \begin{tikzpicture}[declare function={a=1.5;b=1;}] \fill [fill=gray!25] (b,0) node[anchor=south west] {\scriptsize$ (1,0) $} -- (0,b) node[left] {\scriptsize $ (0,1) $} -- (-b,0) node[anchor=north east] {\scriptsize$ (-1,0) $} -- (0,-b) node[right] {\scriptsize$ (0,-1) $} -- cycle; \draw [<->] (-a,0) -- (a,0); \draw [<->] (0,-a) -- (0,a); \draw (0,0) node[above=0.01pt] {\scriptsize$ (0,0) $} circle (1pt); \end{tikzpicture} \caption{$ B_{1}((0,0);1) $} \end{subfigure} \unskip\ \vrule\ \hfil \begin{subfigure}{0.45\linewidth} \centering \begin{tikzpicture}[declare function={a=1.5;b=1;}] \fill [fill=gray!25] (0,0) node[above=0.01pt] {\scriptsize$ (0,0) $} circle (b); \draw [<->] (-a,0) -- (a,0); \draw [<->] (0,-a) -- (0,a); \draw (b,0) node[anchor=south west] {\scriptsize$ (1,0) $}; \draw (0,0) node[above=0.01pt] {\scriptsize$ (0,0) $} circle (1pt); \end{tikzpicture} \caption{$ B_{2}((0,0);1) $} \label{Fig: open ball in p=2} \end{subfigure} \caption{Open unit balls in plane for $ p=1,2,10,\infty $.} \label{Fig: p-open balls} \end{figure} \ref{Fig: open ball in p=2} \end{document}

\renewcommand{\thesubfigure}{Figure \thefigure.(\alph{subfigure})}? Please add a MWE. – Alessandro Cuttin Apr 28 '20 at 20:39subfigurecaption label. Let me prepare an MWE. – Subhajit Paul Apr 28 '20 at 20:48\ref. – Subhajit Paul Apr 29 '20 at 07:54\captionsetup{subrefformat=<name>}you can format\subrefseparately from\thesubfigureor\ref. With\DeclareCaptionLabelFormat(page 24 of caption manual) you can create new format names. – John Kormylo Apr 30 '20 at 03:33