역참조를 인쇄하지 않고도 Biblatex 참고문헌을 인용문에 연결합니다.

역참조를 인쇄하지 않고도 Biblatex 참고문헌을 인용문에 연결합니다.

내 biblatex 참고문헌에는 참고문헌 옆에 [1]과 같은 숫자가 있습니다. 인용 [1]을 클릭하면 참고문헌 [1]으로 연결됩니다(hyperref 패키지 덕분에). 반대 방향으로 그러한 링크를 가질 수 있는 방법이 있습니까? 그럼 참고문헌을 보면 어디에서 참고문헌이 인용됐는지 빨리 알 수 있다는 건가요?이 솔루션거의 내가 원하는 것이지만 인용 페이지 번호를 인쇄해야 하는데 나는 그것을 원하지 않습니다. 참고 문헌을 두 번 이상 인용하면 의미가 없다는 것을 알지만 제 경우에는 그런 경우가 거의 없습니다.

답변1

다음 솔루션은 를 사용하지 않고 backref의 연결을 기반으로 합니다 verbose-inote.

우리는 모든 인용마다 링크 앵커를 설정하고 참고문헌의 레이블을 첫 번째 앵커(나중에 사용하기에 안전함)에 다시 연결합니다.

이를 위해서는 각 항목의 첫 번째 인용이 \printbibliography.

MWE

\documentclass{article}
\usepackage[backref=false]{biblatex}
\usepackage[colorlinks=false]{hyperref}

\makeatletter
\DeclareFieldFormat{bibhypertarget}{%
  \bibhypertarget{\thefield{entrykey}:\the\value{instcount}}{#1}}

\renewbibmacro*{cite}{%
  \printtext[bibhyperref]{%
    \printtext[bibhypertarget]{%
      \printfield{labelprefix}%
      \printfield{labelnumber}%
      \ifbool{bbx:subentry}
        {\printfield{entrysetcount}}
        {}}}%
  \usebibmacro{cite:save}}

\newbibmacro*{cite:save}{%
  \ifcsundef{cbx@\thefield{entrykey}}
    {\csxdef{cbx@\thefield{entrykey}}{\the\value{instcount}}}
    {}}

\newbibmacro{cbx:linktofirstcite}[1]{%
  \ifcsdef{cbx@\thefield{entrykey}}
    {\bibhyperlink
       {\thefield{entrykey}:\csuse{cbx@\thefield{entrykey}}}
       {#1}}
    {#1}}

\DeclareFieldFormat{labelnumberwidth}{%
  \usebibmacro{cbx:linktofirstcite}{\mkbibbrackets{#1}}}
\makeatother


\addbibresource{biblatex-examples.bib}

\begin{document}
\nocite{knuth:ct}
Some text \autocite{geer,worman}.
\clearpage
Some more text \autocite{cicero}.
\printbibliography
\end{document}

여기에 이미지 설명을 입력하세요

관련 정보