BibLaTeX-dw 样式 authortitle-dw:如何应用 firstfull=true 但不应用于带有简写字段的条目

BibLaTeX-dw 样式 authortitle-dw:如何应用 firstfull=true 但不应用于带有简写字段的条目

我正在使用带有style=authortitle-dw选项的BibLaTeX firstfull=true。有没有办法不应用于firstfull=true我的 .bib 文件中包含shorthand条目的那些条目?

仅显示按预期工作的 MWEfirstfull=true将是:

\documentclass{article}

\usepackage[style=authortitle-dw,backend=biber, firstfull=true]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}

@Book{A1,
  Title                    = {Title1},
  Author                   = {AuthorA},
  Year                     = {1900},
  Shorthand                = {GuI}
}

@Book{B2,
  Title                    = {Title2},
  Author                   = {AuthorB},
  Year                     = {1900}
}

@Book{C2,
  Title                    = {Title2},
  Author                   = {AuthorC},
  Year                     = {1900}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

"Some citation of a shorthand title"\parencite[][34]{A1}

"Some citation of the same shorthand title in a footnote"\footcite[][34]{A1}

"Some citation of the same title from another page"\footcite[][70]{A1}

"Some citation of a non-shorthand title"\footcite[][12]{B2}

"Some citation of the same non-shorthand title from another page"\footcite[][15]{B2}

"Some citation of the same non-shorthand title from another author"\footcite[][15]{C2}

\printshorthands

\printbibliography

\end{document}

答案1

我查看了authortitle-dw.cbx文件,可能找到了解决方案。更改\newbibmacro*{cite}定义似乎可以完成工作:

\renewbibmacro*{cite}{%
  \usebibmacro{cite:citepages}%
  \global\boolfalse{cbx:loccit}%
  \ifbool{cbx:inreffull}
     {\usebibmacro{cite:inreffull}}
    {\ifbool{cbx:firstfull}
      {\ifciteseen
        {\usebibmacro{cite:normal}}
        {\iffieldundef{shorthand}
           {\usebibmacro{cite:firstfull}}
           {\usebibmacro{cite:normal}}}}
      {\usebibmacro{cite:normal}}}}

但由于我并不真正了解自己在做什么,所以我不知道该解决方案是否适合非常长的文档。

以下是 MWE:

\documentclass{article}

\usepackage[style=authortitle-dw,backend=biber, firstfull=true]{biblatex}

\renewbibmacro*{cite}{%
  \usebibmacro{cite:citepages}%
  \global\boolfalse{cbx:loccit}%
  \ifbool{cbx:inreffull}
     {\usebibmacro{cite:inreffull}}
    {\ifbool{cbx:firstfull}
      {\ifciteseen
        {\usebibmacro{cite:normal}}
        {\iffieldundef{shorthand}
           {\usebibmacro{cite:firstfull}}
           {\usebibmacro{cite:normal}}}}
      {\usebibmacro{cite:normal}}}}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}

@Book{A1,
  Title                    = {Title1},
  Author                   = {AuthorA},
  Year                     = {1900},
  Shorthand                = {GuI}
}

@Book{B2,
  Title                    = {Title2},
  Author                   = {AuthorB},
  Year                     = {1900}
}

@Book{C2,
  Title                    = {Title2},
  Author                   = {AuthorC},
  Year                     = {1900}
}
 \end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

"Some citation of a shorthand title"\parencite[][34]{A1}

"Some citation of the same shorthand title in a footnote"\footcite[][34]{A1}

"Some citation of the same title from another page"\footcite[][70]{A1}

"Some citation of a non-shorthand title"\footcite[][12]{B2}

"Some citation of the same non-shorthand title from another page"\footcite[][15]{B2}

"Some citation of the same non-shorthand title from another author"\footcite[][15]{C2}

\printshorthands

\printbibliography

\end{document}

相关内容