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

[macros] Fix PDF links to clauses and annexes #4154

Merged
merged 1 commit into from Sep 8, 2020

Conversation

jensmaurer
Copy link
Member

@jensmaurer jensmaurer commented Sep 7, 2020

Such links were pointing to immediately after the clause
or annex title, not to immediately before them. The issue
was introduced with commit beb8815.

Fixes NB JP 014 and JP 015 (C++20 DIS)

Fixes cplusplus/nbballot#390
Fixes cplusplus/nbballot#391

@jensmaurer jensmaurer added the ballot-comment Response to an NB or ISO comment on a ballot label Sep 7, 2020
@jensmaurer jensmaurer added this to the C++20 milestone Sep 7, 2020
@tkoeppe
Copy link
Contributor

tkoeppe commented Sep 7, 2020

Looks good! Would you like me to test it? Otherwise if it works for you, feel free to commit.

@JohelEGP
Copy link
Contributor

JohelEGP commented Sep 7, 2020

Please do, it doesn't work for me.

@jensmaurer
Copy link
Member Author

jensmaurer commented Sep 8, 2020

Well, there is a bit of implementation-dependence here, because the "chapter.x" thing is modeled after what is produced by the regular \label. If your particular memoir or hyperref package writes something else there, this won't work. So, please try it out.

If it doesn't work for you, please replace the single use of \clauselabel in macros.tex with plain \label and put the resulting first occurrence of \newlabel in basic.aux in this issue, for comparison.

@jensmaurer
Copy link
Member Author

Ok, I've now analyzed this some more and I've copied a little bit of the original (memoir) \label definition. This means fewer assumptions about href naming are made.
@JohelEGP , please try again: This should work for you.
Test case: Click on any "Clause X" hyperlink in the PDF and you should be taken to just before the clause X heading.

Such links were pointing to immediately after the clause
or annex title, not to immediately before them. The issue
was introduced with commit beb8815.

Fixes NB JP 014 and JP 015 (C++20 DIS)
@tkoeppe
Copy link
Contributor

tkoeppe commented Sep 8, 2020

I cherrypicked this onto the main branch, since the c++20 branch hasn't got the version update fix for one of the packages, and there it worked as intended for me. But it's possible that there are dependencies on unstable implementation details.

@tkoeppe
Copy link
Contributor

tkoeppe commented Sep 8, 2020

@jensmaurer, @zygoloid: Could we perhaps cherrypick all the non-visible changes onto the c++20 branch (e.g. the version requirements), so that the "build environment" is the same for both?

@tkoeppe
Copy link
Contributor

tkoeppe commented Sep 8, 2020

The new version of this change also works for me.

@jensmaurer
Copy link
Member Author

@tkoeppe, consider approving this pull request if it works for you.

@tkoeppe tkoeppe self-requested a review September 8, 2020 14:48
@JohelEGP
Copy link
Contributor

JohelEGP commented Sep 8, 2020

Yes, it works now.

@zygoloid zygoloid merged commit bc42757 into cplusplus:c++20 Sep 8, 2020
@jensmaurer jensmaurer deleted the jp015 branch September 9, 2020 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ballot-comment Response to an NB or ISO comment on a ballot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants