.png)
인용 biblatex
스타일 biblatex-aer
(https://github.com/dmsul/biblatex-aer). 그러나 을 사용하면 \textcite{key1,key2}
다음과 같은 결과를 얻습니다.
걸리와 쇼(1955), 1966
대신에
걸리와 쇼(1955, 1966)
의 코드로 들어가면 biblatex-aer
다음 코드 조각으로 요약됩니다.
\renewbibmacro*{textcite}{%
\ifboolexpr{
( not test {\iffieldundef{prenote}} and
test {\ifnumequal{\value{citecount}}{1}} )
or
( not test {\iffieldundef{postnote}} and
test {\ifnumequal{\value{citecount}}{\value{citetotal}}} )
}
{\DeclareFieldAlias{textcitehyperref}{noformat}}
{}%
\printtext[textcitehyperref]{%
\restorebibmacro{textcite}%
\usebibmacro{textcite}}}
이 줄을 삭제하면 올바른 인용을 받게 되지만 hyperref
더 이상 전체 이름이 색칠되지 않고 출판 연도만 색칠됩니다.
이 문제를 해결하는 방법을 알고 있나요?
답변1
에 사용된 코드https://github.com/dmsul/biblatex-aer/blob/master/biblatex-aer.tex인용의 전체 링크를 얻으려면 Audrey의 답변에서 가져 왔습니다.biblatex 작성자 연도가 포함된 하이퍼링크 이름(biblatex 1.4b). 그 대답은 염두에 두고 작성되었지만 style=authoryear,
(다른 스타일에도 적용됨) 훨씬 더 복잡한 스타일과 더 유사한 의 스타일을 biblatex-aer
기반으로 합니다 (또한 자체도biblatex-chicago
authordate
style=authoryear-comp,
biblatex-chicago
매우복잡한).
이는 링크에 대해 다른 전략이 필요하다는 것을 의미합니다. 다음 변형은 Audrey의 코드에서 영감을 받았습니다.biblatex 작성자 연도가 포함된 하이퍼링크 이름(biblatex 1.4b)그리고 내 대답에 따르면인용문 괄호 앞 부분의 색상을 어떻게 변경하나요?.
biblatex-aer.tex
또한 다음 서문이 완전히 대체되도록 biblatex-aer.tex
굵은 이름의 코드를 업데이트했습니다.https://github.com/dmsul/biblatex-aer/blob/master/biblatex-aer.tex.
\documentclass[american]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[authordate, backend=biber, uniquename=false, noibid]{biblatex-chicago}
\usepackage[colorlinks]{hyperref}
\makeatletter
\newrobustcmd{\blx@imc@transparentprinttext}[2][]{%
\ifblank{#2}
{}
{\ifblank{#1}
{\let\blx@theformat\@firstofone}
{\blx@getformat\blx@theformat{ffd}{#1}{}}%
\ifdefvoid\blx@theformat
{}
{\blx@theformat{#2}}}}
\newcommand*{\blx@imc@iffieldequalstr@swap}[2]{\iffieldequalstr{#2}{#1}}
\newcommand*{\blx@imc@iffieldequalsdefstring}[2]{%
\expandafter\blx@imc@iffieldequalstr@swap\expandafter{#2}{#1}}
\blx@regimcs{\transparentprinttext \iffieldequalsdefstring}
\makeatother
\DeclareFieldFormat{citehyperref}{%
\DeclareFieldAlias{bibhyperref}{noformat}%
\bibhyperref{#1}}
\letbibmacro{orig:cite}{cite}
\renewbibmacro*{cite}{%
\transparentprinttext[citehyperref]{%
\usebibmacro{orig:cite}}}
\letbibmacro{orig:textcite}{textcite}
\letbibmacro{orig:textcite:postnote}{textcite:postnote}
\renewbibmacro*{textcite:postnote}{}
\renewbibmacro*{textcite}{%
\transparentprinttext[citehyperref]{%
\usebibmacro{orig:textcite}%
\ifnumequal{\value{citecount}}{\value{citetotal}}
{\usebibmacro{orig:textcite:postnote}}
{}%
}%
}
\newcommand\ifmknamebold{%
\ifboolexpr{test {\ifcurrentname{labelname}}
or
test {\iffieldequalsdefstring{labelnamesource}{\currentname}}}}
\DeclareNameWrapperFormat{default}{\ifmknamebold{\mkbibbold{#1}}{#1}}
\DeclareNameWrapperFormat{labelname}{#1}
\addbibresource{biblatex-examples.bib}
\begin{document}
\textcite{knuth:ct:a,knuth:ct:b}
\cite{sigfridsson,gaonkar:in,westfahl:space,westfahl:frontier,companion}
\printbibliography
\end{document}