Hyperref 不链接 \cite 命令

Hyperref 不链接 \cite 命令

我正在使用 latex 超链接文章中的引文。问题是它链接了图片、方程式和章节编号,但没有链接引文链接。这是 MWE,

\documentclass[letterpaper, 10 pt, conference]{ieeeconf} 
\IEEEoverridecommandlockouts                              
\overrideIEEEmargins                                     % Needed to meet printer requirements.
\usepackage{hyperref}                                   %hyperlink your equations and figures and sorts
\usepackage{times}                                       % assumes new font selection scheme installed
\usepackage{amsmath}                                    %assumes amsmath package installed
\usepackage{amssymb}                                     % assumes amsmath 
\usepackage[export]{adjustbox}
\usepackage{footnote}
\hypersetup{linkbordercolor=green}

\title{\LARGE \bf
Some Title*
 }

\author{Author One$^{1}$, Author 2$^{2}$    % <-this % stops a space
\begin{document}
\long\def\/*#1*/{}                              % Define block comment

\graphicspath{ {Chart and Figures/} }

\maketitle
\thispagestyle{empty}
\pagestyle{empty}


  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{abstract}
Some Random Abstract.

{\textit{Index Terms} - Life Science and Health Care; Mechatronics; Emerging      Topics in Automation }
\end{abstract}   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}

Results from the clinical studies \cite{cervino, c2, c3} serve as motivation   for minimizing patient positioning errors during IGRT in order to minimize   positioning-related uncertainties in cancer dose treatments, improve tumor   control, and reduce toxicity \cite{c4, c5}.

\begin{thebibliography}
\bibitem{cervino} Cervino, L.I., Pawlicki, T., Lawson, J.D., Jiang, S.B., Frame-less and mask-less cranial stereotactic radiosurgery: a feasibility study. Phys. Med. Biol. 55 (2010) 1863-1873.
\bibitem{c2} Xing, L., Dosimetric effects of patient displacement and  collimator and gantry angle misalignment on intensity modulated radiation  therapy. Radiother Oncol, 2000. 56(1): p. 97-108.
\bibitem{c3} Manning, M.A., et al., The effect of setup uncertainty on normal tissue sparing with IMRT for head-and-neck cancer. Int J Radiat Oncol Biol Phys, 2001. 51(5): p. 1400-9.
\bibitem{c4} Hong, T.S., et al., The impact of daily setup variations on head-and-neck intensity-modulated radiation therapy. Int J Radiat Oncol Biol Phys, 2005. 61(3): p. 779-88.
\bibitem{c5} Den, R.B., et al., Daily image guidance with cone-beam computed tomography for head-and-neck cancer intensity-modulated radiotherapy: a prospective study. Int J Radiat Oncol Biol Phys, 2010. 76(5): p. 1353-9.

\end{thebibliography}

\end{document}

但我发现我的 \cite 引用没有超链接。有办法解决这个问题吗?非常感谢您的帮助。谢谢!

答案1

这个问题已经问了两年了,但我会写下我的解决方案,因为我遇到了同样的问题。

正如许多人所建议的那样,hyperref应该最后导入。我也尝试过,但未能在文档中超链接我的引文。所以,问题出在ieeeconf.cls。如果你用你正在使用的 latex 编辑器打开它,你会看到以下内容:

% 2) Provide a fake nabib command \NAT@parse so that hyperref will not
%    interfere with the operation of cite.sty. However, as a result citation
%    numbers will not be hyperlinked. Also, natbib will not be able to work
%    with IEEEtran. However, this is perhaps the best solution until cite.sty
%    and hyperref.sty are able to co-exist with each other.
%    It easy enough to override the fake command via:
%    \makeatletter
%    \let\NAT@parse\undefined
%    \makeatother

以下是我的示例:

\documentclass[letterpaper, 10 pt, conference]{ieeeconf} 
\IEEEoverridecommandlockouts                              
\overrideIEEEmargins                                     % Needed to meet printer requirements.

\usepackage{times}                                       % assumes new font selection scheme installed
\usepackage{amsmath}                                    %assumes amsmath package installed
\usepackage{amssymb}                                     % assumes amsmath 
\usepackage[export]{adjustbox}
\usepackage{footnote}

\makeatletter
\let\NAT@parse\undefined
\makeatother
\usepackage{hyperref}  %hyperref still needs to be put at the end!

\title{\LARGE \bf
Some Title*
}

\author{Author One$^{1}$, Author Two$^{2}$    % <-this % stops a space
\begin{document}
   \maketitle
\thispagestyle{empty}
\pagestyle{empty}

\begin{abstract}
 Some Random Abstract.
\end{abstract}

\section{Introduction}

 Results from the \cite{a}, \cite{b}, \cite{c} serve as motivation...

\begin{thebibliography}
\bibitem{a} First reference
\bibitem{b} Second reference
\bibitem{c} Third reference

\end{thebibliography}

\end{document}  

在此处输入图片描述

我只是在 cls 文件中加入了建议的三行。正如 Schweinebacke 所说,这是针对旧版本的ieeeconf.cls

答案2

您的代码包含多个错误。我在下面的 MWE 中更正了这些错误。主要错误已用 标记<============

一些评论:

  • 必须hyperref是(极少数情况除外)最后的包在序言中。
  • 您的命令\begin{thebibliography}不正确。它必须有一个标签的长度参数,例如\begin{thebibliography}{99}
  • \bf过时。请改用\textbf{...}\bfseries
  • 我评论了你的两个 IEEE 命令,它们在我的课程中是未知的。
  • 您的命令\author{}未以 结尾}
  • MWE 不需要定义块元素(顺便问一下:为什么要使用它?)
  • 您的 MWE 的序言包含几个未在您的代码中使用的包(amsmath、、footnote...)。由于它们与您的问题无关,因此您可以忽略它们!

梅威瑟:

\documentclass[letterpaper, 10 pt, conference]{ieeeconf} % IEEEconf
%\IEEEoverridecommandlockouts                              
%\overrideIEEEmargins     % Needed to meet printer requirements.

\usepackage{times}    % assumes new font selection scheme installed
\usepackage{amsmath}  % assumes amsmath package installed
\usepackage{amssymb}  % assumes amsmath 

\usepackage{xcolor} % <======================================= for green
\usepackage[export]{adjustbox}
\usepackage{footnote}

\usepackage{hyperref} % <====================== last packge to be called
\hypersetup{linkbordercolor=green}

\title{\LARGE 
\textbf{Some Title}*
 }

\author{Author One$^{1}$, Author 2$^{2}$} % <================= missing }

\begin{document}
\long\def\/*#1*/{}                              % Define block comment

\graphicspath{ {Chart and Figures/} }

\maketitle
\thispagestyle{empty}
\pagestyle{empty}

\begin{abstract}
Some Random Abstract.

{\textit{Index Terms}~-- Life Science and Health Care; Mechatronics; 
Emerging      Topics in Automation}
\end{abstract}

\section{Introduction}

Results from the clinical studies \cite{cervino, c2, c3} serve as 
motivation   for minimizing patient positioning errors during IGRT in 
order to minimize   positioning-related uncertainties in cancer dose 
treatments, improve tumor   control, and reduce toxicity \cite{c4, c5}.

\begin{thebibliography}{99} % <==================== length missing! {99}
\bibitem{cervino} Cervino, L.I., Pawlicki, T., Lawson, J.D., Jiang, S.B., Frame-less and mask-less cranial stereotactic radiosurgery: a feasibility study. Phys. Med. Biol. 55 (2010) 1863-1873.
\bibitem{c2} Xing, L., Dosimetric effects of patient displacement and  collimator and gantry angle misalignment on intensity modulated radiation  therapy. Radiother Oncol, 2000. 56(1): p. 97-108.
\bibitem{c3} Manning, M.A., et al., The effect of setup uncertainty on normal tissue sparing with IMRT for head-and-neck cancer. Int J Radiat Oncol Biol Phys, 2001. 51(5): p. 1400-9.
\bibitem{c4} Hong, T.S., et al., The impact of daily setup variations on head-and-neck intensity-modulated radiation therapy. Int J Radiat Oncol Biol Phys, 2005. 61(3): p. 779-88.
\bibitem{c5} Den, R.B., et al., Daily image guidance with cone-beam computed tomography for head-and-neck cancer intensity-modulated radiotherapy: a prospective study. Int J Radiat Oncol Biol Phys, 2010. 76(5): p. 1353-9.

\end{thebibliography}

\end{document}

结果:

在此处输入图片描述

我建议biblatexbib文件一起使用。

答案3

我知道这不是原始问题的答案,但它仍然可以节省几分钟:

  • 链接不显示的另一个原因可能是文档处于草稿模式。仔细检查以确保不是这种情况\documentclass[draft,...]{...}

答案4

您可以使用natbibhyperref。使用该natbib包,您还可以使用\citep\citet命令。

相关内容