\supercite 作为 \footnotemark 参数

\supercite 作为 \footnotemark 参数

我怎样才能将其用作和的\supercite参数?\footnotemark\footnotetext

(我的目标是将引文作为脚注,并将其索引与参考书目中的索引相匹配。对我来说,现有的答案使用时会产生不良结果minipage。)

梅威瑟:

\documentclass{beamer}
\usepackage[style=ieee,backend=bibtex]{biblatex}
\usepackage{csquotes}
\usepackage{filecontents}
% https://tex.stackexchange.com/a/299084
\begin{filecontents}{\jobname.bib}
@misc{Doe12,
  author = {Doe, John},
  year = {2012},
  title = {A macro for formatting names},
}
\end{filecontents}
\addbibresource{\jobname.bib}
% https://tex.stackexchange.com/a/559986
\makeatletter
\def\blfootnote{\xdef\@thefnmark{}\@footnotetext}
\makeatother
\DeclareCiteCommand{\myfullcite}
  {\usebibmacro{prenote}}
   {{\printtext[labelnumberwidth]{%
        \printfield{prefixnumber}
        \printfield{labelnumber}}}
  \usedriver%
     {\DeclareNameAlias{sortname}{default}}
     {\thefield{entrytype}}}
  {\par\hspace{-1em}}
  {\usebibmacro{postnote}}

\newcommand{\PresCite}[1]{%
\autocite{#1}%
\begin{NoHyper}%
\blfootnote{\hspace{-1em}\myfullcite{#1}}%
\end{NoHyper}
}
%% FIXME This \renewcommand is silly but without it the MWE fails to compile:
% ! Missing $ inserted.
% <inserted text>
%                 $
% l.50 \end{frame}
\renewcommand{\supercite}[1]{2}
\begin{document}
\begin{frame}
    \begin{minipage}{.5\textwidth}
        MWE\footnotemark[\supercite{Doe12}]
    \end{minipage}%
    \begin{minipage}{.5\textwidth}
        Existing solution \& \texttt{minipage}:~\PresCite{Doe12}
    \end{minipage}
    \footnotetext[\supercite{Doe12}]{\footnotesize\texttt{fullcite} should be here: \fullcite{Doe12}}
\end{frame}
\begin{frame}{Bibliography}
    \printbibliography%
\end{frame}
\end{document}

MWE 第 1 页 MWE 第 2 页

答案1

可能需要进行一些调整才能使其看起来美观,但一种方法可能是:

\documentclass{beamer}
\usepackage[style=ieee,backend=bibtex]{biblatex}
\usepackage{csquotes}
\usepackage{filecontents}
% https://tex.stackexchange.com/a/299084
\begin{filecontents}{\jobname.bib}
@misc{Doe12,
  author = {Doe, John},
  year = {2012},
  title = {A macro for formatting names},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\usepackage{etoolbox}
\newcounter{rsc}
\AtEveryCite{\stepcounter{rsc}}
\makeatletter
\def\blfootnote{\xdef\@thefnmark{}\@footnotetext}
% https://tex.stackexchange.com/a/226351
\patchcmd{\beamer@doseveralframes}% <cmd>
{\begin{beamer@frameslide}}% <search>
{\begin{beamer@frameslide}\begin{refsegment}}
{}{}% <success><failure>
\patchcmd{\beamer@doseveralframes}% <cmd>
{\end{beamer@frameslide}}% <search>
{\ifnum\value{rsc}>0\blfootnote{\printbibliography}\fi\end{refsegment}\setcounter{rsc}{0}\end{beamer@frameslide}}
{}{}% <success><failure>
\makeatother
% https://tex.stackexchange.com/a/203783
\renewcommand{\bibfont}{\normalfont\footnotesize}
\begin{document}
\begin{frame}
    \begin{minipage}{.5\textwidth}
        MWE~\cite{Doe12}
    \end{minipage}%
    \begin{minipage}{.5\textwidth}
        \texttt{minipage}~\cite{Doe12}
    \end{minipage}
    \footnote{\footnotesize\texttt{fullcite} should be here: \fullcite{Doe12}}
\end{frame}
\begin{frame}{Bibliography}
    \printbibliography%
\end{frame}
\end{document}

MWE 结果

相关内容