I’m trying to typeset a lengthy URL in ConTeXt MKIV. The URL appears correctly in the resulting PDF when I use hyphenatedurl, but the hyperlink is wrong in two ways. First, only the first line of the URL in the PDF is a hyperlink. Second, the hyperlink target is incorrectly set to be just the first line of the URL.

Here is some example code that produces this problem for me:

% !TEX TS-program = ConTeXt (LuaTeX)


On my system, this generates a PDF containing the URL printed over three lines, with line breaks as follows:


Of these three lines, only the first line is clickable/interactive, and its target is incorrectly set to http://cocatalog.loc.gov/cgi-bin/Pwebrecon.cgi?Search_Arg=TX0008128881&Search, rather than the full URL.

How can I set the hyperlink correctly? Alternatively, how can I turn off the hyperlink altogether?

1 Answer 1


Actually, I get no hyperlink at all, which is what I expect because \hyphenatedurl only typesets the URL and doesn't make a link. And even if I made a link using \goto{<text>}[url(<link>)] it wouldn't work because interaction is not turned on. It seems to me that some heuristic of your PDF viewer is trying to detect the link and transform it into something clickable. This however fails on the line break.

It is very easy though to set up a clickable link from within ConTeXt. I also put an empty style because I don't like bold links. See the Garden for further configuration.






enter image description here

  • Thank you! I had been using \setupinteraction to try to turn OFF the hyperlink, but it never occurred to me that my PDF viewer may have been interpreting the text as a hyperlink on its own. Your explanation makes perfect sense.
    – J. King
    Commented Jun 26, 2017 at 22:38

You must log in to answer this question.

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