0

The figures appear colorful when I refer them in the text:

See: enter image description here

However, the subfigures a & b are not real/automated subfigures. They are belong to 1 figure, I type a and be manually. I want the text also pretend like the Fig. 15a all part of it.

So I want to link "a" to the figure and also at the same color, when it is print of non-print mode.

%% Use TU Delft cyan as the color for titles, unless the 'print' option is
%% specified, in which case we use anthracite, a dark gray, which is also used
%% for the thumb indices.
\definecolor{anthracite}{cmyk}{0,0,0,0.8}
\if@print
    \colorlet{title}{anthracite}
\else
    \colorlet{title}{tudelft-cyan}
   %\colorlet{title}{tudelft-cyan}
\fi
    \colorlet{thumb}{anthracite}
9
  • 1
    Why don't you use the subfigure environment (from the subcaption package) to make the labels automatically?
    – Bernard
    Jan 27, 2020 at 15:08
  • @Bernard Because there is indeed only one figure. Jan 27, 2020 at 15:31
  • 1
    But subfigures are nested in a single figure, usually!
    – Bernard
    Jan 27, 2020 at 15:39
  • @Bernard but I have only one file as a figure Jan 27, 2020 at 15:39
  • Do you mean you include a single graphic file for the two subfigures?
    – Bernard
    Jan 27, 2020 at 15:42

1 Answer 1

1

You could add empty subcaption boxes to your figure:

\documentclass{article}
\usepackage{subcaption}
\DeclareCaptionLabelFormat{hidden}{}
\captionsetup[subfigure]{labelformat=hidden}
\usepackage[colorlinks]{hyperref}
\begin{document}
\begin{figure}
\subcaptionbox{\label{a}}{}%
\subcaptionbox{\label{b}}{}%
anything

\caption{somecaption}
\end{figure}

\ref{a}, \ref{b}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .