2

I have a couple of hyperlinks on my moderncv letter and all I can open via click or Ctrl+click except one which only open via right-click>open in new tab/window. Why such a thing happen and how to fix it? I am using \href command for all hyperlinks.

\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} 
7
  • 3
    We'd need to see the difference between these two apparent behaviours. Also, what PDF reader/viewer do you use?
    – Werner
    Aug 24, 2017 at 15:15
  • @Werner It is adobe pdf reader and I open in on the web by Chrome.
    – Sasan
    Aug 24, 2017 at 15:19
  • 2
    ...and how can we replicate this behaviour? Please provide a minimal example that starts with \documentclass and ends with \end{document}. We should be able to copy-and-paste-and-compile and reproduce your setup. Without that, it's difficult to address your vague problem.
    – Werner
    Aug 24, 2017 at 15:26
  • 1
    I've never seen a version of Adobe reader with a right-click option to "open in new tab" (or window). I think your reply to Werner should be that your PDF reader is Chrome (for these purposes)
    – Chris H
    Aug 24, 2017 at 15:28
  • 2
    I assume removing the space at the beginning of the first href doesn't help?
    – Chris H
    Aug 24, 2017 at 16:25

1 Answer 1

2

The problem here is the leading blank in the first link. After deleting it my PDF viewer SumatraPDF can directly open the link, with your MWE not.

With the 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} 

I can open the link without problems with SumatraPDF. I do not have Acrobat, I can not test it with this viewer. Please test it on your system ...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .