平均能量损失

平均能量损失

我想要对同一个脚注有两个引用。我的版本存在一个问题,即对脚注的引用用大写数字表示,我希望它的大小与脚注编号相同:

TextA~\footnote{TextFootnote\label{ftn:X}} 
TExtB~\ref{ftn:X}

有人有不同的解决方案吗?

整个文档:

\documentclass[11pt, a4paper, oneside]{Thesis}
\usepackage[english,german]{babel} 
\usepackage[textsize=tiny]{todonotes}
\usepackage{doi}
\usepackage[square, numbers, comma, sort&compress]{natbib} 
\usepackage{enumitem}
\usepackage{acronym}  
\usepackage{booktabs}
\usepackage[version=4]{mhchem}
\usepackage{soul}
\usepackage{float}
\usepackage{hyperref}
\usepackage{amsmath}  
\setlist{nolistsep} 
\graphicspath{{Pictures/}{Figures/}}

\begin{document}
TextA~\footnote{TextFootnote\label{ftn:X}} \\
TextB~\textsuperscript{\ref{ftn:X}}
\end{document}

答案1

要将脚注编号作为上标,请使用\textsuperscript{\ref{<label>}}。 提供的链接框hyperref不容易调整,但在调整超链接脚注链接周围的框有一个使所有盒子紧密贴合数字的解决方案

导致:

在此处输入图片描述

平均能量损失

\documentclass[11pt, a4paper, oneside]{article}
\usepackage{hyperref}

%% Code from https://tex.stackexchange.com/a/45656/81905
\usepackage{ltxcmds}
\makeatletter
\renewcommand{\footnote}[2][\empty]{%
  \nolinebreak%
  \addtocounter{footnote}{+1}%
  \xdef\sfootnote@number{\arabic{footnote}}%
  \ltx@ifpackageloaded{hyperref}{% hyperref loaded
    \ifHy@hyperfootnotes% option hyperfootnotes=true
      \addtocounter{Hfootnote}{+1}%
      % Code from the hyperref package
        \global\let\Hy@saved@currentHref\@currentHref%
        \hyper@makecurrent{Hfootnote}%
        \global\let\Hy@footnote@currentHref\@currentHref%
        \global\let\@currentHref\Hy@saved@currentHref%
      % End of code form the hyperref package
    \fi%
   }{% hyperref not loaded, nothing to be done here
   }%
  \xdef\sfootnote@opt{#1}% contains the optional argument
  \xdef\sfootnote@arabic{\arabic{footnote}}% is the Arabic footnotenumber
  \edef\sfootnote@formated{\thefootnote}% could also be * or dagger
  \ifx\sfootnote@opt\empty% i.e. no optional argument used
    \footnotetext{\label{fnr:\sfootnote@arabic}#2}%
  \else%
    \ltx@ifpackageloaded{hyperref}{% hyperref loaded
      \footnotetext[#1]{\phantomsection\label{fnr:\sfootnote@arabic}#2}%
     }{% hyperref not loaded
      \footnotetext[#1]{\label{fnr:\sfootnote@arabic}#2}%
     }%
  \fi%
  \ltx@ifpackageloaded{hyperref}{% hyperref package loaded
    \ifHy@hyperfootnotes% option hyperfootnotes=true
      \hbox {\@textsuperscript {\normalfont \ref{fnr:\sfootnote@arabic}}}%
    \else% option hyperfootnotes=false
      \hbox {\@textsuperscript {\normalfont \ref*{fnr:\sfootnote@arabic}}}%
    \fi%
  }{% hyperref package not loaded
    \hbox {\@textsuperscript {\normalfont \ref{fnr:\sfootnote@arabic}}}%
   }%
}
\makeatother
%% End of code

\begin{document}
\noindent Textoç~\footnote{TextFootnote\label{ftn:X}} \\
TextB~\textsuperscript{\ref{ftn:X}}
\end{document}

相关内容