\hyperref:脚注链接不活跃且颜色没有变化

\hyperref:脚注链接不活跃且颜色没有变化

我在使用过程\hyperref中遇到了两个问题。第一:脚注链接无效;第二:我似乎无法更改链接的颜色,也无法将彩色链接转换为带边框的链接。

下面是一个例子(使用彩色链接,而不是边框​​):

\documentclass[11pt]{article}
\usepackage{setspace}
\usepackage{amssymb, natbib}
\usepackage[tbtags]{amsmath}
\usepackage{rotating}
\usepackage{ctable}
\usepackage{sectsty}
\usepackage{fancyhdr}
\usepackage{caption}
\usepackage{comment}
\usepackage{appendix}
\usepackage{verbatim}
\usepackage[margin=1.1in]{geometry}

 \usepackage[pdftex, pdftitle={}, pdfauthor={}, colorlinks=true, urlcolor=green, linkcolor=green, citecolor=green, raiselinks=false, hyperfootnotes=true]{hyperref}

任何帮助将不胜感激!


抱歉,我认为这是一个 MWE。

\documentclass[11pt]{article}
\usepackage{setspace}
\usepackage{amssymb, natbib}
\usepackage[tbtags]{amsmath}
\usepackage{rotating}
\usepackage{ctable}
\usepackage{sectsty}
\usepackage{fancyhdr}
\usepackage{caption}
\usepackage{comment}
\usepackage{appendix}
\usepackage{verbatim}
\usepackage[margin=1.1in]{geometry}

 \usepackage[pdftex, pdftitle={Mongolia games paper}, pdfauthor={Daniel Rubenson, Peter Loewen \& Richard Sawyer}, colorlinks=true, urlcolor=green, linkcolor=green, citecolor=green, raiselinks=false, hyperfootnotes=true]{hyperref}

\usepackage{hypernat}

\newcommand{\revertstretch}{\setstretch{1.3}}
\revertstretch

% THEOREM Environments ---------------------------------------------------
 \newtheorem{thm}{Theorem}%[subsection]
 \newtheorem{cor}[thm]{Corollary}
 \newtheorem{lem}[thm]{Lemma}
 \newtheorem{thma}{Theorem}%[subsection]
 \newtheorem{lema}[thm]{Lemma}
 \newtheorem{prop}[thm]{Proposition}
% \theoremcontact{definition}
 \newtheorem{defn}[thm]{Definition}
% \theoremcontact{remark}
 \newtheorem{rem}[thm]{Remark}
 \newtheorem{hypo}{Hypothesis}
% \numberwithin{equation}{subsection} % MATH ------------------------------------------------------------------- %
\DeclareMathOperator{\IM}{Im} % \DeclareMathOperator{\ess}{ess}
 \newcommand{\eps}{\varepsilon}
 \newcommand{\fn}{\footnote}
 \newcommand{\To}{\longrightarrow}
 \newcommand{\h}{\mathcal{H}}
 \newcommand{\s}{\mathcal{S}}
 \newcommand{\A}{\mathcal{A}}
 \newcommand{\J}{\mathcal{J}}
 \newcommand{\M}{\mathcal{M}}
 \newcommand{\W}{\mathcal{W}}
 \newcommand{\X}{\mathcal{X}}
 \newcommand{\BOP}{\mathbf{B}}
 \newcommand{\BH}{\mathbf{B}(\mathcal{H})}
 \newcommand{\KH}{\mathcal{K}(\mathcal{H})}
 \newcommand{\Real}{\mathbb{R}}
 \newcommand{\Complex}{\mathbb{C}}
 \newcommand{\Field}{\mathbb{F}}
 \newcommand{\RPlus}{\Real^{+}}
 \newcommand{\Polar}{\mathcal{P}_{\s}}
 \newcommand{\Poly}{\mathcal{P}(E)}
 \newcommand{\EssD}{\mathcal{D}}
 \newcommand{\Lom}{\mathcal{L}}
 \newcommand{\States}{\mathcal{T}}
 \newcommand{\abs}[1]{\left\vert#1\right\vert}
 \newcommand{\set}[1]{\left\{#1\right\}}
 \newcommand{\seq}[1]{\left<#1\right>}
 \newcommand{\norm}[1]{\left\Vert#1\right\Vert}
 \newcommand{\essnorm}[1]{\norm{#1}_{\ess}}
%%% ----------------------------------------------------------------------
\newenvironment{changemargin}[2]{%
 \begin{list}{}{%
  \setlength{\topsep}{0pt}%
  \setlength{\leftmargin}{#1}%
  \setlength{\rightmargin}{#2}%
  \setlength{\listparindent}{\parindent}%
  \setlength{\itemindent}{\parindent}%
  \setlength{\parsep}{\parskip}%
 }%
\item[]}{\end{list}}






\title{title}
\author{author}
\date{\today}
\begin{document}
\pagenumbering{roman}
\maketitle
\singlespace
\begin{abstract}
\noindent Abstract
\end{abstract}

\clearpage
\doublespace
\pagenumbering{arabic}

\section{Introduction}

\href{a_link}{a link}

An example.\footnote{An example.}

\end{document}

答案1

使用生成的超链接的颜色\href由键控制filecolor,因此您可以说

\usepackage[
  pdftitle={Mongolia games paper}, 
  pdfauthor={Daniel Rubenson, Peter Loewen \& Richard Sawyer}, 
  colorlinks=true, 
  urlcolor=green, 
  linkcolor=green, 
  citecolor=green, 
  filecolor=green, 
  raiselinks=false, 
  hyperfootnotes=true]{hyperref}

但显然您希望所有超链接都采用相同的颜色;在这种情况下,最好使用allcolors

\usepackage[
  pdftitle={Mongolia games paper}, 
  pdfauthor={Daniel Rubenson, Peter Loewen \& Richard Sawyer}, 
  colorlinks=true, 
  allcolors=green, 
  raiselinks=false, 
  hyperfootnotes=true]{hyperref}

paperheight包含部分代码的完整示例(我仅为了示例而更改了值):

\documentclass[11pt]{article}
\usepackage{setspace}
\usepackage{amssymb, natbib}
\usepackage[tbtags]{amsmath}
\usepackage{rotating}
\usepackage{ctable}
\usepackage{sectsty}
\usepackage{fancyhdr}
\usepackage{caption}
\usepackage{comment}
\usepackage{appendix}
\usepackage{verbatim}
\usepackage[margin=1.1in,
paperheight=8cm% just for the example
]{geometry}

\usepackage[
  pdftitle={Mongolia games paper}, 
  pdfauthor={Daniel Rubenson, Peter Loewen \& Richard Sawyer}, 
  colorlinks=true, 
  urlcolor=green, 
  linkcolor=green, 
  citecolor=green, 
  filecolor=green, 
  raiselinks=false, 
  hyperfootnotes=true]{hyperref}

\usepackage{hypernat}

\newcommand{\revertstretch}{\setstretch{1.3}}
\revertstretch

\begin{document}

\href{a_link}{a link}

An example.\footnote{An example.}

\end{document}

在此处输入图片描述

关于脚注超链接的问题,众所周知,它hyperref可能与脚注配合不佳;这里有一条关于该hyperfootnotes选项的小注释,取自的hyperref文档:

在此处输入图片描述

相关内容