如何删除 LaTeX 中引文(出版物)的超链接?

如何删除 LaTeX 中引文(出版物)的超链接?

如何删除 TeX 生成的 PDF 中的引文(出版物)超链接?我注意到,当某些超链接跨越多列或多页时,LaTeX 编译会抛出错误。我希望避免这种情况。

我读来自 tex.stackexchange 的帖子谈到了类似的事情,但它似乎与我需要的略有不同。

这是我的 LaTeX 文档的骨架:

\documentclass[a4paper,fleqn,usenatbib]{mnras}
\usepackage[T1]{fontenc}
\usepackage{ae,aecompl}

\usepackage{graphicx}   % Including figure files
\usepackage{pdflscape}  % Landscape pages
\usepackage{hyperref}
\usepackage{float}

\title[heading]{Title}

\author[Author et al.]{
Author1$^{1}$\thanks{E-mail: [email protected]}
\\
$^{1}$University 1
}

\date{Accepted XXX. Received YYY; in original form ZZZ}

\pubyear{2018}

\begin{document}
\label{firstpage}
\pagerange{\pageref{firstpage}--\pageref{lastpage}}
\maketitle

\section{Introduction}
Some introduction. Papers: \citep[][]{Kolb2006, Haavard2006, Bene2006, Krasinski2010, Chatterjee2011, Celerier2014, Skarke2014, Mertens2016}

\bibliographystyle{mnras}
\bibliography{ref}

\bsp    % typesetting comment
\label{lastpage}
\end{document}

我正在ref.bib使用的可以找到这里

我将非常感激您的帮助。

答案1

您可以添加\hypersetup{nolinks=true}以删除文档中的所有超链接。

据我所知,你的bib文件中有一些错误,例如在输入

@article{White2011,
  author={Martin White and M. Blanton and A. Bolton and D. Schlegel and J. Tinker and A. Berlind and L. da Costa and E. Kazin and Y.-T. Lin and M.
Maia and C. K. McBride and N. Padmanabhan and J. Parejko and W. Percival and F. Prada and B. Ramos and E. Sheldon and F.
de Simoni and R. Skibba and D. Thomas and D. Wake and I. Zehavi and Z. Zheng and R. Nichol and Donald P. Schneider and Michael A.
Strauss and B. A. Weaver and David H. Weinberg},
  title={The Clustering of Massive Galaxies at z ~ 0.5 from the First Semester of BOSS Data},
  journal={The Astrophysical Journal},
  volume={728},
  number={2},
  pages={126},
  url={http://stacks.iop.org/0004-637X/728/i=2/a=126},
  year={2011},
  abstract={We calculate the real- and redshift-space clustering of massive galaxies at z ~ 0.5 using the first semester of data by the Baryon Oscillation Spectroscopic Survey (BOSS). We study the correlation functions of a sample of 44,000 massive galaxies in the redshift range 0.4 < z < 0.7. We present a halo-occupation distribution modeling of the clustering results and discuss the implications for the manner in which massive galaxies at z ~ 0.5 occupy dark matter halos. The majority of our galaxies are central galaxies living in halos of mass 10 13 h –1 M ☉ , but 10% are satellites living in halos 10 times more massive. These results are broadly in agreement with earlier investigations of massive galaxies at z ~ 0.5. The inferred large-scale bias ( b ##IMG## [http://ej.iop.org/icons/Entities/sime.gif] {sime} 2) and relatively high number density ( ##IMG## [http://ej.iop.org/images/0004-637X/728/2/126/apj378616ieqn1.gif] {$\bar{n}=3\times 10^{-4}\,h^3\,{\rm Mpc}^{-3}$} ) imply that BOSS galaxies are excellent tracers of large-scale structure, suggesting BOSS will enable a wide range of investigations on the distance scale, the growth of large-scale structure, massive galaxy evolution, and other topics.}
}

为了获得正确的 LaTeX 语法,您需要更改10%10\%。但最后我认为您可以删除文件中的所有摘要bib,它们不会被打印...

如果我编译以下 MWE,我只会收到一些警告,例如,对于bib输入,Amendola2017结果空的 hperlink 被抑制:

参赛号码:

@ARTICLE{Amendola2017,
author        = {{Amendola}, L. and {Kunz}, M. and {Saltas}, I.~D. and {Sawicki}, I.},
title         = "{The fate of large-scale structure in modified gravity after GW170817 and GRB170817A}",
journal       = {ArXiv e-prints},
archivePrefix = "arXiv",
eprint        = {1711.04825},
keywords      = {Astrophysics - Cosmology and Nongalactic Astrophysics, 
                 General Relativity and Quantum Cosmology, 
                 High Energy Physics - Theory},
year          = 2017,
month         = nov,
adsurl        = {http://adsabs.harvard.edu/abs/2017arXiv171104825A},
adsnote       = {Provided by the SAO/NASA Astrophysics Data System},
}

\bibitem*.bbl文件中:

\bibitem[\protect\citeauthoryear{{Amendola}, {Kunz}, {Saltas}  \&
  {Sawicki}}{{Amendola} et~al.}{2017}]{Amendola2017}
{Amendola} L.,  {Kunz} M.,  {Saltas} I.~D.,   {Sawicki} I.,  2017, preprint,
  \href {http://adsabs.harvard.edu/abs/2017arXiv171104825A} {} % <=========================
  (\mn@eprint {arXiv} {1711.04825})

可能是bib条目中缺少某些信息?抱歉,我不知道类别mras及其规格...

完整的 MWE

\documentclass[%
% a4paper,
  fleqn,usenatbib
]{mnras}
\usepackage[T1]{fontenc}
%\usepackage{ae,aecompl} % <============================================obsolete

\usepackage{graphicx}   % Including figure files
\usepackage{pdflscape}  % Landscape pages
\usepackage{float}
\usepackage{hyperref} % <===============================================last called
%\hypersetup{nolinks=true} % <==========================================

\title[heading]{Title}

\author[Author et al.]{
Author1$^{1}$\thanks{E-mail: [email protected]}
\\
$^{1}$University 1
}

\date{Accepted XXX. Received YYY; in original form ZZZ}

\pubyear{2018}

\begin{document}
\label{firstpage}
\pagerange{\pageref{firstpage}--\pageref{lastpage}}
\maketitle

\section{Introduction}
Some introduction. 
Papers: \citep[][]{Kolb2006, Haavard2006, Bene2006, Krasinski2010, 
Chatterjee2011, Celerier2014, Skarke2014, Mertens2016}
\nocite{*}

\bibliographystyle{mnras}
\bibliography{ref}

\bsp    % typesetting comment
\label{lastpage}
\end{document}

导致下面的页面没有编译错误,只有一些警告!

在此处输入图片描述

取消注释后,\hypersetup我得到以下结果,没有任何警告:

在此处输入图片描述

请注意,包aeaecompl已经过时,不要再使用它们!

答案2

我认为该hyperref软件包正在创建文档中的链接。我找不到关闭该功能的选项他们的选择摘要或者在他们的文档中,但据我发现,该cite包与该包不兼容,hyperref所以如果您将该cite包添加到您的序言中,链接就会消失。

我知道这是一个有点黑客的解决方案,但似乎无法通过选项关闭这些链接hyperref

相关内容