如何从 footcite 中删除引用编号

如何从 footcite 中删除引用编号

如何显示仅包含引文文本而不包含任何脚注编号的脚注引文(并将其从文本中删除)。例如,我想获取以下脚注(MWE 如下):


母鹿 2013,公众 2013

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
    @article{Doe2013,
        title   = {Lorem Ipsum},
        volume  = {1},
        journal = {J. Foo},
        author  = {J. Doe},
        year    = {2013},
        pages   = {1--10},
    }

    @article{Public2013,
        title   = {Dolor Sit Amet},
        volume  = {1},
        journal = {J. Foo},
        author  = {J. Q. Public},
        year    = {2013},
        pages   = {11--20},
    }
\end{filecontents}

\usepackage[
    style=authoryear-icomp,
    backend=biber
]{biblatex}
\addbibresource{./test.bib}

\begin{document}
    \footcite{Doe2013,Public2013}
\end{document}

答案1

一种方法是重新定义\blx@mkbibfootnote在脚注中定义引用的命令。您可以使用修改后的命令版本\footnote,不带数字。

重新定义\footnote命令

\newcommand\footnotenonun[1]{%
  \begingroup
  \renewcommand\thefootnote{}\footnote{#1}%
  \addtocounter{footnote}{-1}%
  \endgroup
}

命令的重新定义\blx@mkbibfootnote

\makeatletter
\renewrobustcmd{\blx@mkbibfootnote}[2]{%
  \iftoggle{blx@footnote}
    {\blx@warning{Nested notes}%
     \addspace\mkbibparens{#2}}
    {\unspace
     \ifnum\blx@notetype=\tw@
       \expandafter\@firstoftwo
     \else
       \expandafter\@secondoftwo
     \fi
       {\csuse{blx@theendnote#1}{\protecting{\blxmkbibnote{end}{#2}}}}
       {\csuse{footnotenonum#1}{\protecting{\blxmkbibnote{foot}{#2}}}}}}
\makeatother

好处是,如果您使用“常规”\footnote命令,它不会干扰脚注编号。当然,如果您希望所有脚注都没有编号,您可以使用\renewcommand\footnote命令,而不必创建新的脚注。

梅威瑟:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
    @article{Doe2013,
        title   = {Lorem Ipsum},
        volume  = {1},
        journal = {J. Foo},
        author  = {J. Doe},
        year    = {2013},
        pages   = {1--10},
    }

    @article{Public2013,
        title   = {Dolor Sit Amet},
        volume  = {1},
        journal = {J. Foo},
        author  = {J. Q. Public},
        year    = {2013},
        pages   = {11--20},
    }
\end{filecontents}

\usepackage[
    style=authoryear-icomp,
    backend=biber
]{biblatex}
\addbibresource{\jobname.bib}

\newcommand\footnotenonum[1]{%
  \begingroup
  \renewcommand\thefootnote{}\footnote{#1}%
  \addtocounter{footnote}{-1}%
  \endgroup
}

\makeatletter
\renewrobustcmd{\blx@mkbibfootnote}[2]{%
  \iftoggle{blx@footnote}
    {\blx@warning{Nested notes}%
     \addspace\mkbibparens{#2}}
    {\unspace
     \ifnum\blx@notetype=\tw@
       \expandafter\@firstoftwo
     \else
       \expandafter\@secondoftwo
     \fi
       {\csuse{blx@theendnote#1}{\protecting{\blxmkbibnote{end}{#2}}}}
       {\csuse{footnotenonum#1}{\protecting{\blxmkbibnote{foot}{#2}}}}}}
\makeatother

\begin{document}
    \footcite{Doe2013,Public2013} test\footnote{test}, test\footnotenonum{test2}, test\footcite{Doe2013}
\end{document}

输出: 运行后获得pdflatex test.tex(有 BibTeX 警告,可能会启动biber test然后重新运行pdflatex test.tex但它仍然有效)。

在此处输入图片描述

在此处输入图片描述

相关内容