Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have to create a hyperlink which opens two links with one click.

Is it possible using LaTeX?

I'm using \href{<url>}{Open two links}.

share|improve this question
3  
How is your reader set up to jump to multiple pages simultaneously? –  Mico Oct 4 '13 at 4:14

2 Answers 2

up vote 4 down vote accepted

That would be a web question, not a TeX one, I guess. You can't really cause your reader to open multiple pages at once. I think even if you can do that it can be categorized as suspicious behavior by any anti-virus software. :)

You may want to try using javascript to do this. I really don't think, it will work, but that's the only way I can think of. The other option is to use a web side solution (for example a webpage and pop-ups).

share|improve this answer
    
Found this stackoverflow.com/questions/7064998/…. I was just wondering if Latex have some feature for this. Anyway, thanks. –  TheKojuEffect Oct 4 '13 at 15:36
    
Yes, I was referring to this. You can use javascript in some LaTeX versions as well, but I don't think that the windows.open command works that way. –  masu Oct 4 '13 at 17:53

The PDF format knows nested actions. hyperref supports this by option nextacrtionraw for \href in some rudimentary manner:

\documentclass{article}

\usepackage{hyperref}

\begin{document}
  \href[%
    nextactionraw={%
      <<%
        /Type/Action%
        /S/URI%
        /URI(http://meta.tex.stackexchange.com/)%
      >>%
    }%   
  ]{http://tex.stackexchange.com/}{Two links}

  \url{http://meta.tex.stackexchange.com/}
\end{document}

However, a PDF viewer is needed that supports that feature. And the action code is given in raw PDF syntax.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.