Skip to content

Conversation

@drgrice1
Copy link
Member

@drgrice1 drgrice1 commented Dec 4, 2025

The webwork2.sty file currently creates this link using the \url command. That command attempts to detect the link type. In this case that results in a file link. Depending on the PDF viewer used, that results in different behavior. In Firefox's PDF viewer it behaves as if it is not a link at all, but just text. Clicking on it does nothing. In Google Chrome's PDF viewer or Evince it is a link, but clicking on it results in a message being displayed that the file does not exist.

So this switches to using the \href command instead. That requires that both the link URL and link text explicitly be given, but reliably results in a working link.

The `webwork2.sty` file currently creates this link using the `\url`
command.  That command attempts to detect the link type.  In this case
that results in a file link.  Depending on the PDF viewer used, that
results in different behavior.  In Firefox's PDF viewer it behaves as if
it is not a link at all, but just text.  Clicking on it does nothing. In
Google Chrome's PDF viewer or Evince it is a link, but clicking on it
results in a message being displayed that the file does not exist.

So this switches to using the `\href` command instead. That requires
that both the link URL and link text explicitly be given, but reliably
results in a working link.
@Alex-Jordan
Copy link
Contributor

Using \href{https://openwebwork.org}{\texttt{openwebwork.org}} would preserve the current look of it. I guess it doesn't matter for this small URL, but for larger URLs where the components are not words, when the URL might need to be manually typed as you read it from printed paper, I tend to lean toward using monospace font.

@drgrice1
Copy link
Member Author

drgrice1 commented Dec 4, 2025

I added \nolinkurl to the link text. That does basically the same thing that \texttt does in this case. Using \nolinkurl is how the hyperref package documents to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants