脚注中引用了 Beamer

脚注中引用了 Beamer

我想要的是: Beamer 中的书目打印样式,结合了\footpartcite带有\autocite。 第一个引用项的例子将如下所示:

所有后续实例都不会在脚注中有任何描述(但会链接到第一个实例):

我拥有的: 和我的平均能量损失(见下文)我能够第一次获得这一点(注意 s footnotemark):

欢迎任何帮助。

更新: 我还有一些\footnote想保持不变的东西(见下图)。

\documentclass{beamer}
\usepackage[style=numeric]{biblatex} 

\usepackage{filecontents}
\begin{filecontents*}{myreferences.bib}
    @online{bad,
        author = {Bad Man},
        year = {1313},
        title = {Bad Title},
        url = {http://badurl.com/},
    }
\end{filecontents*}
\addbibresource{myreferences.bib}

%https://tex.stackexchange.com/a/165016/38244
\hypersetup{
    colorlinks,
    citecolor=red,
    linkcolor=blue,
    %   backref=true
}


% https://tex.stackexchange.com/a/29931/38244
\DeclareCiteCommand{\footpartcite}[\mkbibfootnote]
{\usebibmacro{prenote}}%
{\usebibmacro{citeindex}%
    \mkbibbrackets{\usebibmacro{cite}}%
    \setunit{\addnbspace}
    \printnames{labelname}%
    \setunit{\labelnamepunct}
    \printfield[citetitle]{title}%
    \newunit
    \printfield[]{year}}
{\addsemicolon\space}
{\usebibmacro{postnote}}

%%%\DeclareMultiCiteCommand{\footpartcites}[\mkbibfootnote]{\footpartcite}{\addsemicolon\space}

\begin{document}

    \begin{frame}{What I found}
    Something\footnote{This is a footnote with index 1}

    First time, \autocite{bad} \footpartcite{bad}   

    Another thing\footnote{This footnote index should be 2}
\end{frame}

\begin{frame}{Again}
Next time, \autocite{bad} only
\end{frame}

\end{document}

更新(2)一个优雅(但部分)的解决方案是samcarter(见下文)。剩下唯一要做的就是将引文链接到第一个脚注。

答案1

作为一种快速破解方法,只需将脚注标记的定义更改为空。

\documentclass{beamer}
\usepackage[style=numeric]{biblatex} 

\usepackage{filecontents}
\begin{filecontents*}{myreferences.bib}
    @online{bad,
        author = {{Bad Man}},
        year = {1313},
        title = {Bad Title},
        url = {http://badurl.com/},
    }
\end{filecontents*}
\addbibresource{myreferences.bib}

%https://tex.stackexchange.com/a/165016/38244
\hypersetup{
    colorlinks,
    citecolor=red,
    linkcolor=blue,
%   backref=true
}


% https://tex.stackexchange.com/a/29931/38244
\DeclareCiteCommand{\footpartcite}[\mkbibfootnote]
{\usebibmacro{prenote}}%
{\usebibmacro{citeindex}%
    \mkbibbrackets{\usebibmacro{cite}}%
    \setunit{\addnbspace}
    \printnames{labelname}%
    \setunit{\labelnamepunct}
    \printfield[citetitle]{title}%
    \newunit
    \printfield[]{year}}
{\addsemicolon\space}
{\usebibmacro{postnote}}

%%%\DeclareMultiCiteCommand{\footpartcites}[\mkbibfootnote]{\footpartcite}{\addsemicolon\space}

\setbeamertemplate{footnote}{\insertfootnotetext}

\makeatletter
\def\@makefnmark{}
\makeatother

\begin{document}

\begin{frame}{What I found}
    First time, \autocite{bad} \footpartcite{bad}   
\end{frame}

\begin{frame}{Again}
    Next time, \autocite{bad} only
\end{frame}

\end{document}

在此处输入图片描述


并结合脚注(借助https://tex.stackexchange.com/a/170512/36296):

\documentclass{beamer}
\usepackage[style=numeric,citecounter=true,citetracker=true]{biblatex} 
\usepackage{filecontents}
\begin{filecontents*}{myreferences.bib}
    @online{bad,
        author = {{Bad Man}},
        year = {1313},
        title = {Bad Title},
        url = {http://badurl.com/},
    }
\end{filecontents*}
\addbibresource{myreferences.bib}

%https://tex.stackexchange.com/a/165016/38244
\hypersetup{
    colorlinks,
    citecolor=red,
    linkcolor=blue,
%   backref=true
}

\let\svthefootnote\thefootnote

% https://tex.stackexchange.com/a/29931/38244
\DeclareCiteCommand{\cite}
{\usebibmacro{prenote}}%
{%  
    \ifciteseen{}{%
        \usebibmacro{citeindex}%
        \let\thefootnote\relax%
        \footnotetext{%
            \mkbibbrackets{\usebibmacro{cite}}%
            \setunit{\addnbspace}
            \printnames{labelname}%
            \setunit{\labelnamepunct}
            \printfield[citetitle]{title}%
            \newunit%
            \printfield[]{year}%
        }%
        \let\thefootnote\svthefootnote%
    }%
    \autocite{\thefield{entrykey}}%
  }
{\addsemicolon\space}
{\usebibmacro{postnote}}

\begin{document}

\begin{frame}{What I found}
    test\footnote{test}

    First time, \cite{bad}   

    test\footnote{test}
\end{frame}

\begin{frame}{Again}
    Next time, \cite{bad} only
\end{frame}

\end{document}

在此处输入图片描述

答案2

似乎唯一缺少的是\blx@anchor脚注文本中的 。为了能够使用它,\makeatletter\makeatother是必需的。我在开头添加了另一个测试幻灯片,以显示它不再链接到第一张幻灯片。除此之外,它完全samcarter 的回答

\documentclass{beamer}
\usepackage[style=numeric,citecounter=true,citetracker=true]{biblatex} 
\usepackage{filecontents}
\begin{filecontents*}{myreferences.bib}
    @online{bad,
        author = {{Bad Man}},
        year = {1313},
        title = {Bad Title},
        url = {http://badurl.com/},
    }
\end{filecontents*}
\addbibresource{myreferences.bib}

%https://tex.stackexchange.com/a/165016/38244
\hypersetup{
    colorlinks,
    citecolor=red,
    linkcolor=blue,
%   backref=true
}

\let\svthefootnote\thefootnote

\makeatletter
% https://tex.stackexchange.com/a/29931/38244
\DeclareCiteCommand{\cite}
{\usebibmacro{prenote}}%
{%  
    \ifciteseen{}{%
        \usebibmacro{citeindex}%
        \let\thefootnote\relax%
        \footnotetext{%
            \blx@anchor
            \mkbibbrackets{\usebibmacro{cite}}%
            \setunit{\addnbspace}
            \printnames{labelname}%
            \setunit{\labelnamepunct}
            \printfield[citetitle]{title}%
            \newunit%
            \printfield[]{year}%
        }%
        \let\thefootnote\svthefootnote%
    }%
    \autocite{\thefield{entrykey}}%
  }
{\addsemicolon\space}
{\usebibmacro{postnote}}
\makeatother

\begin{document}

\begin{frame}{Test}
    content
\end{frame}

\begin{frame}{What I found}
    test\footnote{test}

    First time, \cite{bad}   

    test\footnote{test}
\end{frame}

\begin{frame}{Again}
    Next time, \cite{bad} only
\end{frame}

\end{document}

相关内容