
일부 하위 플로트가 있는 그림이 있습니다. 그림은 다음과 같습니다.
나는 각 하위 플로트를 별도로 가지고 있지 않고 단일 사진을 가지고 있습니다.
그림을 텍스트의 참조와 연결하기 위해 나는 하이퍼참조를 사용했습니다.
\documentclass{article}
\usepackage{subfig}
\usepackage{hyperref}
\usepackage{graphicx}
\begin{document}
Figures \ref{Fig1a} and \ref{Fig1b} are in Figure \ref{Fig1}
\begin{figure}[htb]
\centering
\subfloat{
\includegraphics{example-image}
\label{Fig1a}
}
\subfloat{\label{Fig1b}}
\caption{Image description:
\textbf{(a)}~figure 1a and
\textbf{(b)}~figure 1b
}
\label{Fig1}
\end{figure}
\end{document}
문서 Fig1a
를 클릭하면 바로 그림으로 이동하지만, 클릭하면 캡션으로 이동합니다. Fig1b를 클릭하면 캡션이 아닌 이미지로 이동하려면 어떻게 해야 합니까?Fig1
.pdf
Fig1b
답변1
문제는 두 번째 항목을 \subfloat
vmode로 가져오는 방법입니다. 이는 줄 끝에서만 발생하기 때문입니다. 그런 다음 미니페이지가 효과적으로 새 페이지(vmode에서)를 시작한다고 생각했습니다.
물론,\subfloat
미니페이지 내부에 넣는 것은 일종의 중복입니다.~이다미니페이지.
\documentclass{article}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{hyperref}
\begin{document}
Figures \ref{Fig1a} and \ref{Fig1b} are in Figure \ref{Fig1}
\begin{figure}[htb]
\centering
\subfloat{
\includegraphics[width={\dimexpr 0.5\textwidth-0.5\columnsep}]{example-image-a}
\label{Fig1a}
}\hfil
\begin{minipage}[b]{\dimexpr 0.5\textwidth-0.5\columnsep}
\subfloat{
\includegraphics[width=\textwidth]{example-image-b}
\label{Fig1b}
}
\end{minipage}
\caption{Image description:
\textbf{(a)}~figure 1a and
\textbf{(b)}~figure 1b
}
\label{Fig1}
\end{figure}
\end{document}
이 솔루션은 미니페이지만 사용합니다. 여전히 subfig 패키지의 일부 정의를 사용합니다.
\documentclass{article}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{hyperref}
\makeatletter
\newcommand{\stepsubfigure}{%
\advance\c@figure by 1 %local
\refstepcounter{subfigure}%
}
\makeatother
\begin{document}
Figures \ref{Fig1a} and \ref{Fig1b} are in Figure \ref{Fig1}
\begin{figure}[htb]
\begin{minipage}[b]{\dimexpr 0.5\textwidth-0.5\columnsep}
\stepsubfigure
\includegraphics[width=\textwidth]{example-image-a}
\label{Fig1a}
\end{minipage}\hfill
\begin{minipage}[b]{\dimexpr 0.5\textwidth-0.5\columnsep}
\stepsubfigure
\includegraphics[width=\textwidth]{example-image-b}
\label{Fig1b}
\end{minipage}
\caption{Image description:
\textbf{(a)}~figure 1a and
\textbf{(b)}~figure 1b
}
\label{Fig1}
\end{figure}
\end{document}