Repository navigation
Fixes #151: Generate page references for tocentry/@bookmarkRef - #193
Merged
Merged
Conversation
- A tocentry with @bookmarkRef now gets a tab and a PAGEREF field that points to the bookmark with that @id (looked up by @name, including bookmarks defined after the ToC). @Arg-N="true" suppresses it. - Only mark the ToC field dirty (update on open) when the toc has no explicit tocentry elements, since Word would otherwise replace the explicit entries with generated ones. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tocentrywith@bookmarkRefnow gets a tab and aPAGEREFfield pointing at the bookmark with that@id. The bookmark's@nameis looked up from the input document, including bookmarks defined after the ToC.@arg-n="true"suppresses the page number.tochas no explicittocentrychildren. Word replaces explicit entries with generated ones when it updates a dirty field.Not taken from
feature/Issue-151-tocentry-bookmarkRefThat branch also made bookmark names always equal their
@id, made a missing hyperlink@hrefthrow, and skipped namespace tokens inmakeRun. These change behaviour beyond this issue, so I left them out. The old branch can be deleted after merge.Testing
mvn installpasses.arg-n="true"has no page number.🤖 Generated with Claude Code