biblatex 和 footnote-dw – 删除速记后的逗号?(postnotedelim?)

biblatex 和 footnote-dw – 删除速记后的逗号?(postnotedelim?)

我遇到了 Biblatex 和 footnote-dw 的问题(希望可以快速解决)。由于我的一些短标题非常短(在某些情况下只有一个字母),我不希望它们和页面之间有逗号。",869”看起来很奇怪。为了统一起见,我宁愿在全球范围内进行更改。

因此,我认为我需要将 postnotedelim 更改为简写形式(仅限),但我找不到一种简单的方法来做到这一点,而无需在每个条目的参考书目文件中插入一些内容。

按要求 MWE (问题在于 FN 2 和 6):

\documentclass[fontsize=11.5pt,twoside]{scrreprt}
\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage[]{english}


\begin{filecontents*}{test.bib} 
    @book{Kant1, 
        author={Manu Kant}, 
        title={Critique of Pure Treason}, 
        subtitle={Why are there no pink MandMs},
        address={Chocolvania}, 
        shorthand={A},
        year=2017
    } 

    @book{Kant4, 
    author={Franz Kant}, 
title={Down with pink}, 
subtitle={A heteronormative misogynist manifesto},
address={Reesestown}, 
shorthand={Manifesto},
year=2008
}

        @book{Kant2, 
    author={Franz Kant}, 
    title={Ignore my Brother}, 
    subtitle={Hes an idiot},
    address={Reesestown}, 
    shorthand={Moron},
    year=2018
}   
\end{filecontents*}



\usepackage[style=footnote-dw,
backend=biber,
%ibidem=strict,
edbyidem=true,
nopublisher=true,
edsuper=true,
idembibformat=dash,
%ibidemfont=italic,
doi=false,isbn=false,url=false,
]{biblatex}

%get rid of p.
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\DeclareFieldFormat{pages}{#1}

\addbibresource{test.bib}

\begin{document}
The argument between the Brothers Kant\footnote{See \cite[123]{Kant1} and \cite[5]{Kant2}.} seems to boil\cite[43]{Kant1} down\cite[2]{Kant1} mostly to sugary treats.\cite[7]{Kant2} Mmmmmhmmm sugary treats.\footnote{Yet see also the sexist underpinnings in \cite{Kant1}, cf. \cite{Kant4}!} But I wanna check \cite[6]{Kant1} again.
\end{document}

答案1

这是一个可能的解决方案。

我使用与bibmacro中相同的逻辑\postnotedelim来设置,以便在打印时打印,否则打印。\AtEveryCitekeycitefootnote-dw.cbx\addspaceshorthand\addcomma\space

\documentclass[fontsize=11.5pt,twoside]{scrreprt}
\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage[]{english}

\begin{filecontents}{test.bib} 
@book{Kant1, 
  author={Manu Kant}, 
  title={Critique of Pure Treason}, 
  subtitle={Why are there no pink MandMs},
  address={Chocolvania}, 
  shorthand={A},
  year=2017
} 
@book{Kant4, 
  author={Franz Kant}, 
  title={Down with pink}, 
  subtitle={A heteronormative misogynist manifesto},
  address={Reesestown}, 
  shorthand={Manifesto},
  year=2008
}
@book{Kant2, 
  author={Franz Kant}, 
  title={Ignore my Brother}, 
  subtitle={Hes an idiot},
  address={Reesestown}, 
  shorthand={Moron},
  year=2018
}   
\end{filecontents}

\usepackage[style=footnote-dw,
edbyidem=true,
nopublisher=true,
edsuper=true,
idembibformat=dash,
doi=false,isbn=false,url=false,
]{biblatex}

%get rid of p.
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\DeclareFieldFormat{pages}{#1}

% set \postnotedelim at every citation
\newbibmacro*{setpostnotedelim}{%
  \ifboolexpr{
    test {\ifciteseen}
    and not
    bool {cbx:textcitefull}
  }
    {\iffieldundef{shorthand}
       {\gdef\postnotedelim{\addcomma\space}}
       {\ifbool{cbx:shorthandibid}
          {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
             {\gdef\postnotedelim{\addcomma\space}}
             {\gdef\postnotedelim{\addspace}}}
          {\gdef\postnotedelim{\addspace}}}}
    {\gdef\postnotedelim{\addcomma\space}}}

\AtEveryCitekey{\usebibmacro{setpostnotedelim}}

\addbibresource{test.bib}

\begin{document}
\null\vfill
The argument between the Brothers Kant\footnote{See \cite[123]{Kant1} and
\cite[5]{Kant2}.} seems to boil\cite[43]{Kant1} down\cite[2]{Kant1} mostly to
sugary treats.\cite[7]{Kant2} Mmmmmhmmm sugary treats.\footnote{Yet see also
the sexist underpinnings in \cite{Kant1}, cf. \cite{Kant4}!} But I wanna
check \cite[6]{Kant1} again.
\end{document}

在此处输入图片描述

相关内容