sile-typesetter / sile

The SILE Typesetter — Simon’s Improved Layout Engine
https://sile-typesetter.org
MIT License
1.67k stars 99 forks source link

url in documentation contains line breaks #393

Open mdaniel opened 8 years ago

mdaniel commented 8 years ago

Expected Behavior

A url enclosed in \url{} may be visually line-broken(?) but the hyperlink that materializes in the pdf should be the original url as authored. Or, if that's not possible then perhaps consider not line-breaking URLs so the user agent will have a better chance of making them clickable

Actual behavior

It'll be helpful when talking about the actual behavior to have this example, which I observed while reading the sile 0.9.4 pdf [its original text is on line 888 of sile.sil ]

can be found at http://www.simon-cozens.org/
content/duffers-guide-fontconfig-and-harfbuzz)

The hyperlink in Chrome, Preview, and Skim just points to the http://www.simon-cozens.org/ part. The copy-and-paste behaves correctly for Preview and Skim (that is, the text appears in the clipboard as seen immediately above), whereas Chrome takes the more literal "draw stroke here" approach and will not copy across the line boundary, making re-assembling the URL harder

simoncozens commented 8 years ago

What's more interesting is that I have no idea why that has turned into a hyperlink.

khaledhosny commented 8 years ago

These hyper links are “guessed” by some viewers, since the PDF does not contain any. There is no way to fix if we don’t want to make them hyperlinks.

simoncozens commented 8 years ago

I guess the way to fix it is to put an explicit hyperlink in there using PDF "specials". I'll work on it.

Omikhleia commented 2 years ago

What do we expect in this ticket?

Seems to me this ticket could be closed/rejected.

alerque commented 2 years ago

I think my expectation here is that we would update our manual generation code to explicitly make URLs into hyperlinks with no extra formatting, but clickable. The SILE manual is highly likely to be viewed on a computer screen as much or more than in print and there are quite a few URLs we could make more accessible for folks.

Beyond that the guessing behaviour of the PDF reader is clearly out of scope, and our breaking is already happening correctly. Just the link (both halves if broken) should should be added to the full url.

Omikhleia commented 4 months ago

Since 0.15 (via #1977), links can now be line-broken, so we should be able to fix the manual accordingly.

Omikhleia commented 3 days ago

Removing my own assignment - I'm wont have any time for this small thing.