
다음 MWE를 고려하십시오.
\documentclass{article}
\usepackage[style=authoryear-comp,backend=biber,backref=true]{biblatex}
\addbibresource{biblatex-examples.bib}
\newbibmacro*{mypageref}{%
\addperiod
\iflistundef{pageref}
{}
{\printtext[brackets]{%
\ifnumgreater{\value{pageref}}{1}
{\bibstring{backrefpages}\ppspace}
{\bibstring{backrefpage}\ppspace}%
\printlist[pageref][-\value{listtotal}]{pageref}}}}
\renewbibmacro{pageref}{}
\renewbibmacro{finentry}{%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{mypageref}%
\finentry}
\begin{document}
\fullcite{knuth:ct:e}
\printbibliography
\end{document}
이를 통해 내가 원하는 방식(대괄호 사이 등)으로 역참조의 형식을 지정할 수 있지만 명령과 함께 역참조도 인쇄합니다 \fullcite
. \fullcite
참고문헌에서 역참조(및 서식)를 유지하면서 사용할 때 문서 본문에서 역참조를 비활성화하려면 어떻게 해야 합니까 ?
답변1
이론적으로는 우리가 cite 명령에 있는지, 아니면 참고문헌에 있는지 확인하는 것이 가능할 것입니다(with \ifcitation
and \ifbibliography
, pp. 185-186 of thebiblatex
선적 서류 비치, 여기서는 실제로 필요하지 않습니다. pageref
원하는 대로 매크로를 수정하고(새 가 필요 없음 mypageref
) 마침표를 사용하여 페이지 참조를 나머지 참고문헌 항목과 분리할 수 있기 때문입니다.
\renewcommand{\bibpagerefpunct}{\addperiod\space}
\renewbibmacro*{pageref}{%
\iflistundef{pageref}
{}
{\printtext[brackets]{%<--- here we had parens before
\ifnumgreater{\value{pageref}}{1}
{\bibstring{backrefpages}\ppspace}
{\bibstring{backrefpage}\ppspace}%
\printlist[pageref][-\value{listtotal}]{pageref}}}}
s에서는 표준이 pageref
사용되지 않으므로 \fullcite
여기서는 괜찮습니다.
MWE
\documentclass{article}
\usepackage[style=authoryear-comp,backend=biber,backref=true]{biblatex}
\addbibresource{biblatex-examples.bib}
\renewcommand{\bibpagerefpunct}{\addperiod\space}
\renewbibmacro*{pageref}{%
\iflistundef{pageref}
{}
{\printtext[brackets]{%
\ifnumgreater{\value{pageref}}{1}
{\bibstring{backrefpages}\ppspace}
{\bibstring{backrefpage}\ppspace}%
\printlist[pageref][-\value{listtotal}]{pageref}}}}
\begin{document}
\fullcite{knuth:ct:e}
\printbibliography
\end{document}