BibLaTeX 样式“philosophy-verbose”与“shorthandintro=false”选项给出 keyval 错误

BibLaTeX 样式“philosophy-verbose”与“shorthandintro=false”选项给出 keyval 错误

我正在使用 biblatex 和 philosophy-verbose 样式在我的 LaTeX 文档中插入参考文献。在一些 bib 条目中,我插入了一个简写字段,并决定从头到尾仅使用简写作为标签来引用它们。但是,当我使用 philosophy-verbose 样式和 shorthandintro=false 选项时,我得到了一个包键值错误。这是一个最小的工作示例:

\documentclass{article}

\usepackage[style=philosophy-verbose,backend=biber,language=auto, shorthandintro=false]{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"\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}

是我做错了什么吗,还是哲学详细风格中存在错误?

也许有一个解决方法,如所述我第一次使用 biblatex 时如何能在引用中使用简写?。但该解决方案只适用于“verbose”风格,但如果 philosophy-verbose 确实存在错误,我将需要使用“verbose-trad2”。

答案1

该样式philosophy-verbose并非基于philosophy-classic选项的shorthandintro定义位置,因此您无法使用它。

然而,在序言中添加这个重新定义似乎可以实现你想要的效果

\renewbibmacro*{cite}{%
  \usebibmacro{cite:citepages}%
  \global\togglefalse{cbx:fullcite}%
  \global\togglefalse{cbx:loccit}%
  \bibhypertarget{cite\the\value{instcount}}{%
    \ifciteseen
      {\iffieldundef{shorthand}
         {\ifciteibid
            {\usebibmacro{cite:ibid}}
            {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
               {\usebibmacro{cite:idem}}
               {\usebibmacro{cite:name}}%
             \usebibmacro{cite:title}}%
      \usebibmacro{cite:save}}
         {\usebibmacro{cite:shorthand}}}
      {\iffieldundef{shorthand}
       {\usebibmacro{cite:full}%
        \usebibmacro{cite:save}}
       {\usebibmacro{cite:shorthand}}}}}

梅威瑟:

\documentclass{article}

\usepackage[style=philosophy-verbose,backend=biber,language=auto]{biblatex}
\renewbibmacro*{cite}{%
  \usebibmacro{cite:citepages}%
  \global\togglefalse{cbx:fullcite}%
  \global\togglefalse{cbx:loccit}%
  \bibhypertarget{cite\the\value{instcount}}{%
    \ifciteseen
      {\iffieldundef{shorthand}
         {\ifciteibid
            {\usebibmacro{cite:ibid}}
            {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
               {\usebibmacro{cite:idem}}
               {\usebibmacro{cite:name}}%
             \usebibmacro{cite:title}}%
      \usebibmacro{cite:save}}
         {\usebibmacro{cite:shorthand}}}
      {\iffieldundef{shorthand}
       {\usebibmacro{cite:full}%
        \usebibmacro{cite:save}}
       {\usebibmacro{cite:shorthand}}}}}

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

输出:

在此处输入图片描述

相关内容