Beamer 使用 entrykey 在框架中打印引文

Beamer 使用 entrykey 在框架中打印引文

我在用这个答案定义一个DeclareCiteCommand,将 bibkey 打印为框架的脚注。我想添加,keyentry以便同时显示数字。

梅威瑟:

\documentclass[10pt]{beamer}
    \usepackage[english]{babel}
    \usepackage{tikz}
    \usepackage[%
          autocite=footnote,
          maxnames=2,
          autolang=hyphen,
          hyperref=true,
          abbreviate=true,
          doi=false,
          backend=bibtex]{biblatex}
    %minimum bib file
    \usepackage{filecontents}
        \begin{filecontents}{\jobname.bib}
        @Article{Doe2019,
            author  = {Doe, Jhon and Doe2, Jhon2},
            title   = {Some journal article},
            journal = {Fancy Journal},
            year    = {2019},
            volume  = {56},
            number  = {3},
            pages   = {1-99},
        }
        \end{filecontents}
    \addbibresource{\jobname.bib}         

    %cite command to get abbreviated citation in frame
    \DeclareCiteCommand{\citeframe}
    {\usebibmacro{prenote}}
    {\printtext[beamercolorauthor]{%
            \printnames[family]{labelname}%
            \setunit{\addcomma\space}}%
        \printtext[beamercolornote]{%
            \printfield{journaltitle}%
            \setunit{\addspace}%
            \printtext[parens]{%
                \printdate}}}
    {\multicitedelim}
    {\usebibmacro{postnote}}

    %tikz command to get footnote with source (could be defined in a general cite command if a newline could be define between each citations when multiple citation per frame)
    \newcommand{\rightsource}[1]{%
        \begin{tikzpicture}[remember picture,overlay]
        \node[xshift=-0.5cm,yshift=0.3cm,above left] at (current page.south east) {\footnotesize %
            \begin{tabular}{r}#1\end{tabular}};
        \end{tikzpicture}
    }

    \begin{document}
    \begin{frame}
        \frametitle{Introduction}
        this relies on this article \cite{Doe2019}

        \rightsource{\citeframe{Doe2019}}   
    \end{frame} 
    \end{document}

输出: MWE 输出

期望的输出(这里我手动添加了数字,但我希望它自动完成): 期望输出

我曾尝试在文章中看到的那样\thefield{entrykey}在后面添加prenote,但我进入了undefined control sequence error投影仪......我更习惯于 TikZ 或文章类,但我不是超级用户,所以请对任何高级功能给出明确的解释,以便我可能能够做更多的事情而不是复制/粘贴!:)

注意:我定义了一个\citeframe命令来在文本中添加关键编号,并定义了一个命令\rightsource来将缩写引用添加为脚注,但如果您知道如何仅使用一个函数(cite例如通过更改)来获得这两个命令,那就更好了。请注意,一个框架中可能会有多个引用,那么每个引用都应在脚注中按行显示。

相关内容