biblatex: "등." 고유 이름 = false인 경우에도 마찬가지입니다.

biblatex: "등." 고유 이름 = false인 경우에도 마찬가지입니다.

(및 ) biblatex옵션을 사용하면 코드를 추가하여 다중 저작물을 첫 번째 전체 인용 후로 축약할 수 있습니다. 참조. 아래 MWE:uniquename = truecitetracker = true, maxcitenames = 1\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{99}}}Author et al.

\documentclass{article}
\usepackage[style = authoryear-comp, citetracker = true, maxcitenames = 1, uniquename = true]{biblatex}
\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{99}}} % cite all authors of multi-authored works only once
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{lennon1963,
    AUTHOR = "John Lennon and Paul McCartney",
    TITLE = "She loves you",
    YEAR = "1963"}
@BOOK{lennon2004,
    AUTHOR = "Sean Lennon",
    TITLE = "My father was John Lennon",
    YEAR = "2004"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\noindent\cite{lennon1963}\\
\cite{lennon1963}\\
\cite{lennon2004}
\end{document}

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

그러나 uniquename = true으로 변경하면 uniquename = false작동하지 않습니다.

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

질문: 옵션 \AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{99}}}을 사용하여 의 기능을 어떻게 유지할 수 있습니까 ?biblatexuniquename = false


편집하다 카를로의아래에 답변하세요작동하지만 이제는 작품의 저자가 3명 이상인 경우에만 Author 1, Author 2, and Author 3약어가 시작되도록 이를 어떻게 제한할 수 있는지 궁금합니다 . Author 1 et al.아래 MWE에서는 Lennon and McCartney 1963두 번째 인용에서는 그대로 유지되어야 하고, 두 번째 인용에서는 Lennon, McCartney, Harrison, and Starkey 1970로 축약되어야 합니다 .Lennon et al. 1970

\documentclass{article}
\usepackage[style = authoryear-comp, citetracker = true, maxcitenames = 99, mincitenames = 2, uniquename = false]{biblatex}
\AtEveryCitekey{\ifciteseen{\defcounter{maxnames}{1}}{}} % cite all authors of multi-authored works only once
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{lennon1963,
    AUTHOR = "John Lennon and Paul McCartney",
    TITLE = "She loves you",
    YEAR = "1963"}
@BOOK{lennon1970,
    AUTHOR = "John Lennon and Paul McCartney and George Harrison and Richard Starkey",
    TITLE = "We're breaking up now",
    YEAR = "1970"}
@BOOK{lennon2004,
    AUTHOR = "Sean Lennon",
    TITLE = "My father was John Lennon",
    YEAR = "2004"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\noindent\cite{lennon1963}\\
\cite{lennon1963}\\
\cite{lennon1970}\\
\cite{lennon1970}\\
\cite{lennon2004}
\end{document}

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


편집하다 편집하다

아래 Carlo의 답변은 완벽하게 작동합니다. 하지만 코드를 약간 단순화하고 나중에 볼 때 이해할 수 있도록 약간 수정했습니다 :).

\AtEveryCitekey% for every citation
    {%
        \ifnumgreater{\value{labelname}}{2}% if there are >2 authors
            {%
                \ifciteseen% and if citation has been seen before
                    {\setcounter{maxnames}{1}}% then cite only one author
                    {\setcounter{maxnames}{\value{labelname}}}% otherwise cite all authors
            }
            {\setcounter{maxnames}{\value{labelname}}}% otherwise cite ≤2 authors
    }

답변1

"논리를 바꿔라". maxcitenames = 99옵션 biblatex\defcounter{maxnames}{1}의 .Trueifciteseen

MWE

\documentclass{article}
\usepackage[style = authoryear-comp, citetracker = true, maxcitenames = 99, uniquename = false]{biblatex}
\AtEveryCitekey{%
    \ifciteseen
    {\defcounter{maxnames}{1}}
    {}} % cite all authors of multi-authored works only once
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{lennon1963,
    AUTHOR = "John Lennon and Paul McCartney",
    TITLE = "She loves you",
    YEAR = "1963"}
@BOOK{lennon2004,
    AUTHOR = "Sean Lennon",
    TITLE = "My father was John Lennon",
    YEAR = "2004"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\noindent\cite{lennon1963}\\
\cite{lennon1963}\\
\cite{lennon2004}
\end{document}

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

EDIT 편집 질문에 답하세요.##

나는 두 가지 방법을 찾았고 둘 다 게시했습니다.

첫번째

이것은 최선의 형식이 아닙니다. 처음에는 다른 형식을 찾지 못했습니다. 이런 식으로 사용되지 않습니다 \AtEveryCitekey. listtotal목록( author, editors... 또는 )의 총 개수를 카운터로 사용됩니다 labelname. 카운터는 listtotal다음에서만 허용됩니다.형식 지정 지시문을 나열하고 다른 곳에서 사용될 때 의미 있는 값을 보유하지 않습니다..

\patchlabelnameformat값이 listtotal2보다 크고 첫 번째 인용인 경우 에 liststop(인쇄할 항목 목록의 최대 수)를 설정합니다 \value{listtotal}. 첫 번째 인용이 아닌 경우 listtop1로 설정됩니다. 반면, 값이 listtotal2보다 작으면 는 으로 listtop설정됩니다.\value{listtotal} .

MWE:

\documentclass{article}
\usepackage[style = authoryear-comp, citetracker = true,maxnames=2, minnames=2,uniquename=false]{biblatex}

\def\fgt{\setcounter{liststop}{\value{listtotal}}} %first and greater than two
\def\nfgt{\setcounter{liststop}{1}} %non first and greater than two

\def\flt{\setcounter{liststop}{\value{listtotal}}} %first and lower than two

\def\patchlabelnameformat{%
 \ifnumgreater{\value{listtotal}}{2}
    {\ifciteseen
       {\nfgt}
       {\fgt}}
    {\flt}}

\DeclareNameFormat{labelname}{%
 \patchlabelnameformat
 \ifcase\value{uniquename}%
    \usebibmacro{name:last}{#1}{#3}{#5}{#7}%
  \or
    \ifuseprefix
      {\usebibmacro{name:first-last}{#1}{#4}{#5}{#8}}
      {\usebibmacro{name:first-last}{#1}{#4}{#6}{#8}}%
  \or
    \usebibmacro{name:first-last}{#1}{#3}{#5}{#7}%
  \fi
  \usebibmacro{name:andothers}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{lennon1963,
    AUTHOR = "John Lennon and Paul McCartney",
    TITLE = "She loves you",
    YEAR = "1963"}
@BOOK{lennon1970,
    AUTHOR = "John Lennon and Paul McCartney and George Harrison and Richard Starkey",
    TITLE = "We're breaking up now",
    YEAR = "1970"}
@BOOK{lennon2004,
    AUTHOR = "Sean Lennon",
    TITLE = "My father was John Lennon",
    YEAR = "2004"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\noindent\cite{lennon1963}\\
\cite{lennon1963}\\
\cite{lennon1970}\\
\cite{lennon1970}\\
\cite{lennon2004}
\end{document}

두번째

최고의 형태. 사용됩니다 \AtEveryCitekey. 논리는 첫 번째 방법과 동일하지만 목록 형식화 지시문 listtotal이 아니기 listtop때문에 사용할 수 없습니다 . \AtEveryCitekey그런 다음 이런 방식으로 카운터를 사용 labelname하고 maxnames. uniquelist=false에서 사용해야 합니다.biblatex .

MWE:

\documentclass{article}
\usepackage[style = authoryear-comp, citetracker = true,uniquename=false,uniquelist=false]{biblatex}

\AtEveryCitekey{\maxminformat} % cite all authors of

\def\fgt{\setcounter{maxnames}{\value{labelname}}} %first and greater than two
\def\nfgt{\setcounter{minnames}{1}\setcounter{maxnames}{1}} %non first and greater than two

\def\flt{\setcounter{maxnames}{\value{labelname}}} %first and lower than two

\def\maxminformat{%
 \ifnumgreater{\value{labelname}}{2}
    {\ifciteseen
       {\nfgt}
       {\fgt}}
    {\flt}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{lennon1963,
    AUTHOR = "John Lennon and Paul McCartney",
    TITLE = "She loves you",
    YEAR = "1963"}
@BOOK{lennon1970,
    AUTHOR = "John Lennon and Paul McCartney and George Harrison and Richard Starkey",
    TITLE = "We're breaking up now",
    YEAR = "1970"}
@BOOK{lennon2004,
    AUTHOR = "Sean Lennon",
    TITLE = "My father was John Lennon",
    YEAR = "2004"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\noindent\cite{lennon1963}\\
\cite{lennon1963}\\
\cite{lennon1970}\\
\cite{lennon1970}\\
\cite{lennon2004}
\end{document}

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

관련 정보