1

Is it possible to insert a command in LaTeX so that on the resulting PDF file the designated/default blank browser can be opened by a click?

Maesumi
  • 9,059
  • 3
    If by "the designated browser" you mean the default browser, then there are many options via hyperref or url. – Werner May 30 '12 at 18:16
  • 2
    Could you provide a small example (in the form of a minimal example) of the usage you're after? – Werner May 30 '12 at 18:17
  • 1
    I am trying to use the popupmenu package http://tex.stackexchange.com/questions/53508/how-to-make-a-drop-down-menu and occasionally the links used in a menu do not open. I have not isolated the problem enough to make a MWE. I thought if the browser is already open then it might bypass whatever the issue is. So I want to put a link that just opens the default browser. – Maesumi May 30 '12 at 19:29
  • If your question is about the link opening in a specific browser (such as Firefox), I think the answer is going to be no as the default browser is controlled by the end user, and not all browsers are available in all platforms. Otherwise this would require the PDF to launch a specific executable which could potentially be dangerous. – Peter Grill May 30 '12 at 19:29
  • What is the URL of about:blank? and is there a way of forcing the browser to open instead of it blinking on the tray waiting to be clicked to open. (Perhaps this is not a TeX question.) – Maesumi May 30 '12 at 19:48
  • Downvoted as this is not a TeX-related question. – mSSM May 30 '12 at 20:11
  • For the next time, please try to be more specific right from the beginning and document what previous effort you made yourself. – Christian May 31 '12 at 07:00

2 Answers2

6

When the hyperlink is clicked in the following MWE, it opens up the default browser on a blank page (about:blank):

enter image description here

\documentclass{article}
\usepackage{hyperref}% http://ctan.org/pkg/hyperref
\begin{document}
This is a \href{about:blank}{blank page}.
\end{document}

enter image description here

Here's a resource motivating the above: about URI scheme

Werner
  • 603,163
5
\documentclass{article}
\usepackage{hyperref}
\begin{document}
This is an \href{http://tex.stackexchange.com/}{example link}.
\end{document}

See texdoc hyperref for more macros and options on how to change the look of such links.

Christian
  • 19,238