我正在使用\usepackage[bottom]{footmisc}
with包。我终于按照许多答案中的建议hyperref
加载了包。当我单击脚注超链接时,它会带我到标题页。此外,我收到此警告:hyperref
name{Hfootnote.1} 已被引用但不存在,已由固定名称替换
以下是我的文档序言。它由多个章节组成,使用以下方式组织subfile
:
\documentclass[12pt]{report}
\usepackage[a4paper, total={6in, 8.5in}]{geometry}
\usepackage{ltablex}
\usepackage{tabu}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{amsmath,mathtools}
\usepackage[inline]{enumitem}
\usepackage[numbers,sort&compress]{natbib}
\usepackage{csquotes}
\usepackage{ltablex}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage{float}
\usepackage{setspace}
\usepackage[font=small]{caption}
\usepackage{parskip}
\usepackage{physics}
\usepackage{doi}
\usepackage{subfiles}
\usepackage[bottom]{footmisc}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
urlcolor=cyan,
citecolor=magenta
}
\graphicspath{ {images/} }
\onehalfspacing
编辑:这是 MWE。单击脚注超链接可返回第一页:
\documentclass[12pt]{report}
\usepackage{doi}
% the above package is creating trouble, but
% I need this to hyperlink DOI's in the
% bibliography, which I manage using natbib
\usepackage[bottom]{footmisc}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
urlcolor=cyan,
citecolor=magenta
}
\begin{document}
First page
\newpage
Second page\footnote{Footnote}
\end{document}
答案1
添加doi
之后hyperref
和footmisc
之前的包hyperref
:
\documentclass[12pt]{report}
\usepackage[bottom]{footmisc}
\usepackage{hyperref}
\usepackage{doi} % added last
\hypersetup{
colorlinks=true,
linkcolor=blue,
urlcolor=cyan,
citecolor=magenta
}
\begin{document}
First page
\newpage
Second page\footnote{Footnote}
\end{document}