Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Section headings should use \hypertarget #6510

Closed
t3nsor opened this issue Aug 24, 2023 · 10 comments · Fixed by #6516
Closed

Section headings should use \hypertarget #6510

t3nsor opened this issue Aug 24, 2023 · 10 comments · Fixed by #6516

Comments

@t3nsor
Copy link
Contributor

t3nsor commented Aug 24, 2023

It would be very useful if we could directly link to a particular section in a PDF version of the standard, e.g., https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4958.pdf#dcl.init.general should open the PDF at page 211.

This could be accomplished by inserting a \hypertarget command, perhaps in the definition of the \Sec macros, or in the definition of \addxref.

@Eelis
Copy link
Contributor

Eelis commented Aug 25, 2023

That would be awesome! (Even though it would put cxxdraft-htmlgen out of business... ;-))

@tkoeppe
Copy link
Contributor

tkoeppe commented Aug 25, 2023

Can you prototype this and check that this would actually work?

@JohelEGP
Copy link
Contributor

(Even though it would put cxxdraft-htmlgen out of business... ;-))

Hardly.
This may be a big use case,
but there's so much more you can do with HTML
that a PDF can't AFAIK.

@t3nsor
Copy link
Contributor Author

t3nsor commented Aug 25, 2023

I'll prototype it soon when I get the chance.

The main motivation for this is for the links to be stable. If I have a paper in the mailing that links to a particular section of the standard, it should be a link that will always be to the particular working draft that was the most recent one at the time the paper was written. But I imagine people will still use eel.is most of the time when such stability isn't required.

@t3nsor
Copy link
Contributor Author

t3nsor commented Aug 26, 2023

Please see the above PR. I've built it locally and confirmed that it works. I haven't uploaded the PDF, as I wouldn't want to be accused of violating ISO policy somehow, but please see more details on the PR.

@leni536
Copy link

leni536 commented Aug 26, 2023

FTR https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4958.pdf#subsection.9.4.1 works for me on the current PDF. You can get the link by right clicking the outline element in Firefox, but AFAIK the link should work in other browsers too.

But I do like the better fragment identifiers introduced here.

@JohelEGP
Copy link
Contributor

but AFAIK the link should work in other browsers too.

I remember it being the other way around.

@leni536
Copy link

leni536 commented Aug 26, 2023

but AFAIK the link should work in other browsers too.

I remember it being the other way around.

I know two kinds of fragment id links that get resolved in some browsers:

  1. Fragment id that refers to an outline element by outline name:
  1. Fragment id that refers to a PDF "bookmark"

I meddled with this part of the PDF spec a bit at my previous workplace.

@t3nsor
Copy link
Contributor Author

t3nsor commented Sep 12, 2023

Bump. Anything needed from me? I'd be really happy if this could get merged before the next working draft.

@t3nsor
Copy link
Contributor Author

t3nsor commented Oct 25, 2023

Bump

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 a pull request may close this issue.

5 participants