APA 스타일 인용문, 괄호가 있는 연도, 각주, ibidem

APA 스타일 인용문, 괄호가 있는 연도, 각주, ibidem

나는 원한다

  1. 내 인용 스타일은 각주로 되어 있어요Author (Year)
  2. 전체가 참고 Author (Year)문헌에 대한 하이퍼링크가 되도록 함
  3. 반복적으로 인용하려면Ibid

지금까지는 거의 다 할 수 있어요.

아래 코드는 올바른 하이퍼링크와 올바른 ibidem을 제공하도록 컴파일되지만 인용은 Author Year(괄호 없음)입니다. 각각을 autocite다음으로 변경하면 footcite올바른 하이퍼링크와 올바른 인용을 얻을 수 있지만 잘못된 ibidem: Author (ibid.).

autocite내가 처음으로 a 를 만들면 footcite, 나는의도한 결과를 얻다...하지만이는 자동 ibidem의 목적을 무너뜨리는 autociteand 를 추적해야 함을 의미합니다 .footcite

\documentclass{article}
\usepackage{varioref}
\usepackage{hyperref}
\usepackage{cleveref}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,style=authoryear-ibid,ibidtracker=constrict, autocite=footnote]{biblatex}

\DeclareFieldFormat{citehyperref}{%
  \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
  \bibhyperref{#1}}

\DeclareFieldFormat{textcitehyperref}{%
  \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
  \bibhyperref{%
    #1%
    \ifbool{cbx:parens}
      {\bibcloseparen\global\boolfalse{cbx:parens}}
      {}}}

\savebibmacro{cite}
\savebibmacro{textcite}

\renewbibmacro*{cite}{%
  \printtext[citehyperref]{%
    \restorebibmacro{cite}%
    \usebibmacro{cite}}}

\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}}}

% The following lines give the correct footcite Author (Year) but make the ibid erroneous
% Author (ibid)
\DeclareCiteCommand{\footcite}[\mkbibfootnote]
  {\boolfalse{cbx:parens}}
  {\usebibmacro{citeindex}%
   \iffirstcitekey
     {\setcounter{textcitetotal}{1}}
     {\stepcounter{textcitetotal}%
      \textcitedelim}%
   \usebibmacro{textcite}}
  {\ifbool{cbx:parens}
     {\bibcloseparen\global\boolfalse{cbx:parens}}
     {}}
  {\usebibmacro{textcite:postnote}}


\begin{filecontents}{\jobname.bib}

@book{Chomsky1986,
    Address = {Cambridge Mass.},
    Author = {Noam Chomsky},
    Publisher = {{MIT} Press},
    Title = {Barriers},
    Year = {1986}}

@book{Chomsky1981,
    Address = {Dordrecht},
    Author = {Noam Chomsky},
    Publisher = {Foris Publications},
    Title = {Lectures on Government and Binding},
    Year = {1981}}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
\section{}
% switching between \autocite and \footcite solves some problems but 
% exposes others
\autocite{Chomsky1981} and \autocite{Chomsky1981}
\printbibliography
\end{document}

답변1

일반 cite매크로를 재정의하여 연도를 괄호로 묶을 수 있습니다. 다른 인용 명령과 관련된 문제를 피하기 위해 변경된 매크로에 대해 새 이름을 선택합니다.cite:paren:labelyear+extrayear

\renewbibmacro*{cite}{\printtext[citehyperref]{%
  \global\boolfalse{cbx:loccit}%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
       {\usebibmacro{cite:ibid}}
       {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
          {\usebibmacro{cite:label}%
           \setunit{\addspace}}
          {\printnames{labelname}%
           \setunit{\nameyeardelim}}%
        \usebibmacro{cite:paren:labelyear+extrayear}}}
    {\usebibmacro{cite:shorthand}}}}

\renewbibmacro*{cite:paren:labelyear+extrayear}{%
  \iffieldundef{labelyear}
    {}
    {\printtext[parens]{%
       \printfield{labelyear}%
       \printfield{extrayear}}}}

\footcite명령 을 변경할 필요가 없습니다.

MWE

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,style=authoryear-ibid,ibidtracker=constrict, autocite=footnote]{biblatex}
\usepackage{hyperref}

\DeclareFieldFormat{citehyperref}{%
  \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
  \bibhyperref{#1}}

\renewbibmacro*{cite}{\printtext[citehyperref]{%
  \global\boolfalse{cbx:loccit}%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
       {\usebibmacro{cite:ibid}}
       {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
          {\usebibmacro{cite:label}%
           \setunit{\addspace}}
          {\printnames{labelname}%
           \setunit{\nameyeardelim}}%
        \usebibmacro{cite:paren:labelyear+extrayear}}}
    {\usebibmacro{cite:shorthand}}}}

\renewbibmacro*{cite:paren:labelyear+extrayear}{%
  \iffieldundef{labelyear}
    {}
    {\printtext[parens]{%
       \printfield{labelyear}%
       \printfield{extrayear}}}}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{sigfridsson} ipsum\autocite{sigfridsson}. Dolor\autocite{knuth:ct:a,knuth:ct:b}.
\end{document}

예제 문서의 각주

관련 정보