
apacite와 함께 natbibapa를 사용하고 역참조를 삽입하면 역참조의 사용자 정의 텍스트가 이 그림과 같이 두 배가 됩니다.
어떤 아이디어가 있습니까? 문제를 해결하는 방법은 무엇입니까? 감사해요!
MWE는 다음과 같습니다.
\documentclass[11pt,a4paper]{article}
\usepackage[pagebackref=true]{hyperref}
%OR \usepackage{backref}
\renewcommand*{\backref}[1]{Zitiert auf S.{\,}#1.}
\usepackage[natbibapa]{apacite}
%\usepackage{natbib}
\RequirePackage{filecontents}
\begin{filecontents}{jobname.bib}
@book{aaas1990,
author = {{American Association for the Advancement of Science [AAAS]}},
year = {1990},
title = {{Science for all Americans}},
address = {New York},
publisher = {{Oxford University Press}},
key = {AAAS}
}
\end{filecontents}
\begin{document}
I cite \citep{aaas1990}. %Problem occurs independent of the use of \cite{}, \citep{} or anything else.
\bibliography{jobname}
\bibliographystyle{apacite}
\end{document}
- Hyperref의 backref-option이나 backref-package 모두에서 문제가 발생합니다.
- apacite의 natbibapa 옵션이나 natbib-package에서 문제가 발생합니다.
답변1
\renewcommand*{\backref}[1]{Zitiert auf S.{\,}#1.}
로 교체하세요 \renewcommand*{\backrefxxx}[3]{Zitiert auf S.{\,}#1.}
.
backref
또한 명령이 두 번 호출되었지만(이유는 모르겠습니다) 첫 번째 라운드에서는 해당 매개변수가 비어 있음을 확인하기 위해 서문에 다음 줄을 추가할 수도 있습니다 . 두 번째로 매개변수에는 다음의 출력이 포함됩니다 \backrefxxx
.
\usepackage{xcolor}
\renewcommand*{\backref}[1]{\textcolor{red}{BACKREF[1=#1]ENDOFBACKREF}}
\renewcommand*{\backrefxxx}[3]{\textcolor{blue}{XXX[1=#1][2=#2][3=#3]ENDOFXXX}}
보다 정교한 대체 방법은 다음과 \backref
같습니다 \backrefalt
.
\usepackage{xcolor}
\renewcommand*{\backref}[1]{} %% documentation says: use this when backref package version < 1.33
%% I have 1.38 and when \backrefalt is defined, it replaces \backref
\renewcommand*{\backrefxxx}[3]{\textcolor{blue}{XXX[1=#1][2=#2][3=#3]ENDOFXXX}}
\renewcommand*{\backrefalt}[4]{\textcolor{green}{ALT[1=#1][2=#2][3=#3][4=#4]ENDOFALT}}
전달된 첫 번째 및 세 번째 인수는 \backrefalt
인용 횟수입니다(#1은 서로 다른 역참조 페이지 수, #3은 총 인용 횟수). 다음 정의를 사용하면 #1=0( \backrefalt
위의 첫 번째 호출)인 경우 아무것도 출력되지 않습니다.
\renewcommand*{\backrefalt}[4]{%
\ifcase #1 {}% %% do not output anything if the first argument is 0!!!
\or page #2% %% first argument=1 => was cited on a single page
\else pages #2% %% first argument>1 => was cited on multiple pages
\fi
}