보충 정보의 수치 참조

보충 정보의 수치 참조

나는 하이퍼링크로 연결되어 있다

\usepackage{hyperref}

다음 명령을 사용하여 보충 정보 섹션을 시작합니다.

\begin\newcommand{\beginsupplement}{
    \setcounter{section}{0}
    \renewcommand{\thesection}{S\arabic{section}}
    \setcounter{equation}{0}
    \renewcommand{\theequation}{S\arabic{equation}}
    \setcounter{figure}{0}
    \renewcommand{\thefigure}{S\arabic{figure}}}

\usepackage{hyperref}를 호출하기 전에 방정식, 그림 및 섹션에는 모두 1, 2, ... 번호가 지정되어 있으며 참조하는 방정식, 그림 및 섹션에 올바르게 연결됩니다.

\usepackage{hyperref}를 호출하면 방정식, 그림 및 섹션에 모두 S1, S2, ...라는 번호가 지정되고 방정식과 섹션이 올바르게 연결됩니다. 그러나 수치는 설명할 수 없을 정도로 그렇지 않습니다.

내 수치에는 다음과 같은 라벨이 붙어 있습니다.

\begin{figure*}
    \centering
    \includegraphics[width=8cm]{subfig1.png}
    \includegraphics[width=8cm]{subfig2.png}

    \vspace{0.5cm}

    \includegraphics[width=8cm]{subfig3.png}
    \includegraphics[width=8cm]{subfig4.png}
    \caption{Caption text here.}
    \label{fig:spresults1}
\end{figure*}

보충 정보에서 그림 S3을 참조하면 숫자 S3이 올바르게 표시되지만 링크를 클릭하면 본문의 그림 3으로 이동합니다. 그러나 방정식과 섹션은 제대로 작동합니다. - Eq. S14는 Eq.에 연결됩니다. S14는 방정식이 아닙니다. 14.

\ref 자체는 잘 작동하는데, hyperref 패키지에 문제가 있는 것 같습니다. 이 문제를 해결하는 방법을 아는 사람이 있나요?

답변1

몇 가지 실험 끝에 새 카운터를 만드는 방법을 찾았습니다. 보충 정보를 시작하는 데 사용하는 다음 블록을 마지막 두 줄에 넣었습니다.

\newcommand{\beginsupplement}{
    \setcounter{section}{0}
    \renewcommand{\thesection}{S\arabic{section}}
    \setcounter{equation}{0}
    \renewcommand{\theequation}{S\arabic{equation}}
    \setcounter{table}{0}
    \renewcommand{\thetable}{S\arabic{table}}
    \setcounter{figure}{0}
    \renewcommand{\thefigure}{S\arabic{figure}}
    \newcounter{SIfig}
    \renewcommand{\theSIfig}{S\arabic{SIfig}}}

그런 다음 새 그림의 새 카운터를 다음과 같이 사용합니다.

\begin{figure*}
    \centering
    \includegraphics[width=8cm]{subfig1.png}
    \includegraphics[width=8cm]{subfig2.png}

    \vspace{0.5cm}

    \includegraphics[width=8cm]{subfig3.png}
    \includegraphics[width=8cm]{subfig4.png}

    \refstepcounter{SIfig}\label{fig:spresults1}

    \caption{Caption text here.}
\end{figure*}

캡션이 아닌 SIfig 카운터에 레이블이 적용됩니다. 라벨의 대상은 수치 카운터와 완전히 다르기 때문에 SI 수치에 대한 참조는 SI 수치로 다시 연결됩니다.

관련 정보