
\citeauthor[xx]{author}
포스트노트에 ", p./pp"를 사용하도록 biblatex의 변형을 재정의할 수 있는 방법이 있습니까? 콜론 대신? "In Author (p. xx)..." (그러면 연도가 스스로 이해될 때 여러 번 반복할 필요가 없습니다.)
나는 와 내부에서 시도했지만 \DeclareDelimFormat
내가 \DeclareFieldFormat
무엇 \DeclareCiteCommand{\citeauthorpage}
을 하고 있는지 전혀 모릅니다.
내 생각에 가장 좋은 방법은 또 다른 포스트노트 매크로를 정의하는 것입니다.
\newbibmacro{\authorpostnote}{...}
나는 또한 이것을 시도했지만 전혀 작동하지 않습니다.
\DeclareDelimFormat[citeauthor]{postnotedelim}
{\mkpageprefix[pagination]{#1}}
MWE
\documentclass{article}
\usepackage[english]{babel}
\usepackage{xspace}
\usepackage[backend=biber,natbib=true,citestyle=ext-authoryear-comp,bibstyle=ext-authoryear,articlein=false,innamebeforetitle=true,dashed=false,useprefix=true,sortcites=false]{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareFieldFormat{postnote}{\mknormrange{#1}} %remove p. in ref
\DeclareFieldFormat{multipostnote}{\mknormrange{#1}} %remove pp. in ref
\DeclareDelimFormat{postnotedelim}{\addcolon\@\xspace\nobreak} %colon after year in ref
\begin{document}
Lorem \textcite[380]{sigfridsson}
ipsum \citeauthor[380]{sigfridsson}
\printbibliography
\end{document}
답변1
단지 구분 기호를 변경하는 것은 쉽게 가능 citeauthor
하지만(컨텍스트 감지 구분 기호 인터페이스의 용도) 필드 형식도 변경해야 하기 때문에(본질적으로 컨텍스트에 민감하지 않음) 결국 재정의하고 다음을 \citeauthor
사용합니다. 덜 정교한 방법.
\documentclass{article}
\usepackage[english]{babel}
\usepackage[
backend=biber,
natbib=true,
style=ext-authoryear-comp,
articlein=false,
innamebeforetitle=true,
dashed=false,
useprefix=true,
sortcites=false,
]{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareFieldFormat{postnote}{\mknormrange{#1}}
\DeclareFieldFormat{multipostnote}{\mknormrange{#1}}
\DeclareDelimFormat{postnotedelim}{\addcolon\@\space\nobreak}
\DeclareFieldFormat{postnote:citeauthor}{%
\mkbibparens{%
\mkpageprefix[pagination][\mknormrange]{#1}}}
\newbibmacro*{postnote:citeauthor}{%
\iffieldundef{postnote}
{}
{\setunit{\addspace}%
\printfield[postnote:citeauthor]{postnote}}}
\DeclareCiteCommand{\citeauthor}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
{\ifciteindex
{\indexnames{labelname}}
{}%
\printnames{labelname}}
{\multicitedelim}
{\usebibmacro{postnote:citeauthor}}
\begin{document}
Lorem \textcite[380]{sigfridsson}
ipsum \citeauthor[380]{sigfridsson}
\printbibliography
\end{document}
관련된 매크로의 원래 정의를 찾을 수 있습니다.biblatex.def
. \citeauthor
에 정의되어 있습니다ll. 2172-2181. postnote:citeauthor
(postnote
ll. 2379-2383).
답변2
질문이 해결되었습니다.
- I. 포스트노트 전용 프로그래밍
\citeauthor
\newbibmacro{authorpostnote}{\addcomma\space\nobreak\mkpageprefix[pagination][\mknormrange]
\DeclareCiteCommand{\citeauthorpage}[\mkbibparens] % Parencite with just author name!
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
{\ifciteindex
{\indexnames{labelname}}
{}%
\printnames{labelname}}
{\multicitedelim}
{\usebibmacro{authorpostnote}}
- II. 소유 변형
보완책으로 인용 명령을 소유격으로 바꾸고 이 경우에도 완벽하게 작동하는 멋진 코드에 주목하겠습니다.
크레딧은 @Psychonaut 및 @Audrey로 이동합니다. 이 페이지를 참조하세요.
https://tex.stackexchange.com/a/307461/262813.
\documentclass{article}
\usepackage[english]{babel}
\usepackage[
backend=biber,
natbib=true,
style=ext-authoryear-comp,
articlein=false,
innamebeforetitle=true,
dashed=false,
useprefix=true,
sortcites=false,
]{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareFieldFormat{postnote}{\mknormrange{#1}}
\DeclareFieldFormat{multipostnote}{\mknormrange{#1}}
\DeclareDelimFormat{postnotedelim}{\addcolon\@\space\nobreak}
\DeclareNameWrapperFormat{labelname:poss}{#1's}
\DeclareFieldFormat{shorthand:poss}{%
\ifnameundef{labelname}{#1's}{#1}}
\DeclareFieldFormat{citetitle:poss}{\mkbibemph{#1}'s}
\DeclareFieldFormat{label:poss}{#1's}
\newrobustcmd*{\posscitealias}{%
\AtNextCite{%
\DeclareNameWrapperAlias{labelname}{labelname:poss}%
\DeclareFieldAlias{shorthand}{shorthand:poss}%
\DeclareFieldAlias{citetitle}{citetitle:poss}%
\DeclareFieldAlias{label}{label:poss}}}
\DeclareFieldFormat{postnote:citeauthor}{%
\mkbibparens{%
\mkpageprefix[pagination][\mknormrange]{#1}}}
\newbibmacro*{postnote:citeauthor}{%
\iffieldundef{postnote}
{}
{\setunit{\addspace}%
\printfield[postnote:citeauthor]{postnote}}}
\DeclareCiteCommand{\citeauthorpage}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
{\ifciteindex
{\indexnames{labelname}}
{}%
\printnames{labelname}}
{\multicitedelim}
{\usebibmacro{postnote:citeauthor}}
\newrobustcmd*{\citeauthorpagepos}{%
\posscitealias%
\citeauthorpage}
\begin{document}
Lorem \citeauthorpage[380]{sigfridsson}
ipsum \citeauthorpagepos[380]{sigfridsson}
\printbibliography
\end{document}