我的信件中有几个超链接,moderncv
除了一个只能通过右键单击 > 在新选项卡/窗口中打开外,其他所有超链接我都可以通过单击或 Ctrl + 单击打开。为什么会发生这种情况以及如何解决?我使用\href
命令来打开所有超链接。
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage{ragged2e}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.95, top=3cm, bottom=5cm, left=4cm, right=3cm]{geometry}
\renewcommand*{\recomputefootlengths}{%
\setlength{\footwidth}{0.85\textwidth}}
\setlength{\footskip}{120pt}
\renewcommand*{\addressfont}{\small\mdseries}
\name{John}{Templeton}
\title{Resumé title}
\newlength{\currentparskip}
\begin{document}
%----- letter ---------------------------------------------------------
% recipient data
\recipient{98765 }{}
\date{\today}
\opening{}
\closing{sincerely, \vspace{-0.5cm}}
\makelettertitle
\setlength{\currentparskip}{\parskip}
\setlength{\parskip}{\currentparskip}
this \href{ https://www.researchgate.net/publication/319262915_Justifiability_Destpite_Belief_Polarization_A_Disagreement-Based_Theory_of_Epistemic_Justification_Lund_December_2011}{\color{blue} hyperlink does not open directly} but this \href{https://philevents.org/event/show/405}{\color{blue} hyperlink does}.
\makeletterclosing
\end{document}
答案1
这里的问题是第一个链接中的前导空白。删除它后,我的 PDF 查看器 SumatraPDF 可以直接打开该链接,而您的 MWE 则不能。
使用 MWE
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage{ragged2e}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.95, top=3cm, bottom=5cm, left=4cm, right=3cm]{geometry}
\renewcommand*{\recomputefootlengths}{%
\setlength{\footwidth}{0.85\textwidth}}
\setlength{\footskip}{120pt}
\renewcommand*{\addressfont}{\small\mdseries}
\name{John}{Templeton}
\title{Resumé title}
\newlength{\currentparskip}
\begin{document}
%----- letter ---------------------------------------------------------
% recipient data
\recipient{98765 }{}
\date{\today}
\opening{}
\closing{sincerely, \vspace{-0.5cm}}
\makelettertitle
\setlength{\currentparskip}{\parskip}
\setlength{\parskip}{\currentparskip}
this
\href{https://www.researchgate.net/publication/319262915_Justifiability_Destpite_Belief_Polarization_A_Disagreement-Based_Theory_of_Epistemic_Justification_Lund_December_2011}{\color{blue} hyperlink does not open directly}
but this
\href{https://philevents.org/event/show/405}{\color{blue} hyperlink does}.
\makeletterclosing
\end{document}
我可以使用 SumatraPDF 毫无问题地打开链接。我没有 Acrobat,因此无法使用此查看器进行测试。请在您的系统上进行测试...