从一些馆藏书目条目中删除“in”

从一些馆藏书目条目中删除“in”

我的风格指南有一些特点(在 tex.se 上似乎很常见)。对于某些著名的作品集,incollection条目会被引用没有脚注或参考书目中的“in”(指合集)。在 david-purton 的帮助下,我能够让脚注正常工作在回答我的问题时

但是,我还需要更改参考书目。“问题”在于,我只需要更改一些 incollection类型。也就是说,对于所有其他incollection类型,我仍然需要在参考书目中使用“In”。我查看了这些问题和答案这里这里, 和这里但它们都是全局解决方案。我找不到在biblatex-chicagobiblatex基于每个条目编辑此内容的选项。我认为如果我添加entrysubtype并测试,moewe 在上述问题中的解决方案可能会有效?这是一个 MWE:

\documentclass[letterpaper,12pt]{report}
\usepackage{polyglossia}
\setmainlanguage[variant=us]{english}
\usepackage[english=american]{csquotes}

\usepackage[noibid,backend=biber,notes,isbn=false,shorthandfull,shorthandfirst,inheritshorthand=true,citereset=chapter]{biblatex-chicago}

\begin{filecontents}[overwrite]{temp.bib}
    @mvcollection{mvbigbook,
        editor = {James Editorist},
        title  = {A Larger Collection of Essays},
        shorthand = {AMVCoE},
        volumes = {3},
        options   = {skipbib},
        publisher = {Oxford University Press},
        address = {Oxford},
        year = {1997}}
    @collection{bigbook,
        editor = {John Q. Editormann},
        title  = {A Collection of Essays},
        shorthand = {ACoE},
        options   = {skipbib},
        publisher = {Oxford University Press},
        address = {Oxford},
        year = {1995}}
    @incollection{incol,
        crossref = {bigbook},
        entrysubtype = {tdict},
        options  = {skipbiblist},
        author   = {Steve Authormann},
        title    = {This is an Essay},
        pages    = {1-15}}
    @incollection{incol2,
        crossref = {bigbook},
        entrysubtype = {tdict},
        options  = {skipbiblist},
        author   = {John Essaymann},
        title    = {An Essay on Collections},
        pages    = {16-30}}
    @incollection{incol3,
        crossref = {mvbigbook},
        entrysubtype = {tdict},
        options  = {skipbiblist},
        author   = {Jack Essayist},
        title    = {An Essay on Multi Volume Collections},
        pages    = {2:31-40}}
    @incollection{incol4,
        crossref = {mvbigbook},
        entrysubtype = {tdict},
        options  = {skipbiblist},
        author   = {Bob Contraryist},
        title    = {I do not like Multi Volume Collections},
        pages    = {3:100-104}}
    \end{filecontents}

\addbibresource{temp.bib}

\usepackage{xparse}

\ExplSyntaxOn
\cs_set_eq:NN \IfEmptyF \tl_if_blank:nF
\cs_set_eq:NN \IfEmptyTF \tl_if_blank:nTF
\ExplSyntaxOff

\renewbibmacro*{in:}{%
  \ifentrytype{incollection}
    {\ifentrysubtype{tdict}
      {\setunit{\addcomma\space}}
      {\printtext{%
         \bibstring{in}\intitlepunct}}}
    {\printtext{%
       \bibstring{in}\intitlepunct}}}

\makeatletter
\def\paul@blx@trackentry@global#1{%
  \ifbool{citetracker}
    {\blx@xsanitizeafter{\def\sbl@blx@tempa}{#1}%
     \xifinlistcs{\sbl@blx@tempa}{blx@bsee@\the\c@refsection}
       {}
       {\listcsxadd{blx@bsee@\the\c@refsection}{\sbl@blx@tempa}}}
    {}}
\let\paul@blx@trackentry\paul@blx@trackentry@global

\NewDocumentCommand{\fcd}{o o m}{%
  \footnote{%
    \IfNoValueF{#1}{\IfNoValueF{#2}{#1 }}%
    \blx@imc@ifentryseen{#3}
      {\citeauthor{#3}, \citetitle{#3}, }
      {\citename{#3}[default]{labelname}, \citetitle{#3},
       \paul@blx@trackentry{#3}}%
    \citefield{#3}{shorthand}%
    \IfNoValueTF{#2}{, #1}{\IfEmptyTF{#2}{, \citefield{#3}{pages}}{, #2}}.}}%
\NewDocumentCommand{\cd}{o o m}{%
  \IfNoValueF{#1}{\IfNoValueF{#2}{#1 }}%
  \blx@imc@ifentryseen{#3}
    {\citeauthor{#3}, \citetitle{#3}, }
    {\citename{#3}[default]{labelname}, \citetitle{#3},
     \paul@blx@trackentry{#3}}%
  \citefield{#3}{shorthand}%
  \IfNoValueTF{#2}{, #1}{\IfEmptyTF{#2}{, \citefield{#3}{pages}}{, #2}}}%
\NewDocumentCommand{\fcmvd}{o o m}{%
  \footnote{%
    \IfNoValueF{#1}{\IfNoValueF{#2}{#1 }}%
    \blx@imc@ifentryseen{#3}
      {\citeauthor{#3}, \citetitle{#3}, }
      {\citename{#3}[default]{labelname}, \citetitle{#3},
       \paul@blx@trackentry{#3}}%
    \citefield{#3}{shorthand}%
    \IfNoValueTF{#2}{ #1}{\IfEmptyTF{#2}{ \citefield{#3}{pages}}{ #2}}.}}%
\NewDocumentCommand{\cmvd}{o o m}{%
  \IfNoValueF{#1}{\IfNoValueF{#2}{#1 }}%
  \blx@imc@ifentryseen{#3}
    {\citeauthor{#3}, \citetitle{#3}, }
    {\citename{#3}[default]{labelname}, \citetitle{#3},
     \paul@blx@trackentry{#3}}%
  \citefield{#3}{shorthand}%
  \IfNoValueTF{#2}{ #1}{\IfEmptyTF{#2}{ \citefield{#3}{pages}}{ #2}}}%
\makeatother


\begin{document}
\printbiblist{shorthand}
\null\vfill
I need to reference this in a footnote.\fcd[See][]{incol} But this is
another footnote.\fcd[See][18]{incol2} I need the second footnote
twice.\fcd[20]{incol2} But I have a different argument.%
\footnote{%<<<
This is in contrast to what is seen in \cd[28]{incol2}.
} %>>>

This is a new reference collection.\fcmvd[See][]{incol3} But this is another
reference to it with pages.\fcmvd[See][3:101]{incol4} I should cite the first
one again.\fcmvd[2:35]{incol3} But perhaps it is wrong.%
\footnote{%<<<
This guy reall does not like essays, \cmvd[see][3:104]{incol4}.
} %>>>
\clearpage
\printbibliography
\end{document}

以下是我得到的脚注和参考书目:

脚注 围兜

脚注全部正确,但参考书目不正确。需要删除“In”(包括空格分隔符)。

如您所见,我遇到的另一个问题是,对于多卷条目,mvcollection 和页面(包括卷)之间不应该有逗号。我通过创建多卷引用命令以“黑客”方式在脚注中完成了此操作。但我还需要删除incollection父级为 的参考书目中的逗号mvcollection。也许删除参考书目中的“In”的解决方案可以轻松扩展为在父级为 时也删除逗号mvcollection?它也可以用于脚注吗?

更新: 我根据 moewe 的解决方案对上面的 MWE 进行了编辑,并给出了我的最佳猜测这里ifentrysubtype。但是它什么也不做。我认为中没有biblatex。但是,更新 bibmacro 也没有任何作用。我放置了各种文本,但我的 bib 中没有任何变化。所以它一定没有使用该宏。但是,我找不到 中任何其他可以biblatex.def与 配合使用的bibmacro in

相关内容