Repository navigation
Synchronize page numbering in outline with page counter - #284
Merged
Merged
Conversation
Member
|
I'll see whether I can handle the edge case with the page counter update in a general way. |
Closed
yipinliu
pushed a commit
to yipinliu/typst
that referenced
this pull request
Mar 27, 2023
* 'main' of https://github.com/typst/typst: (22 commits) Added IPA pronunciation (typst#349) Cache eviction helps Pronunciation Don't let the build script overwrite TYPST_VERSION (typst#154) Document behaviour of dictionary.insert() when key exists (typst#282) Add custom font search path support for typst cli (typst#270) Added return type to methods of colors in docs (typst#291) change page numbering for outline (typst#284) Newton's notation for derivatives (typst#281) Use correct smart quotes for Norwegian Bokmål language code (typst#278) Fix fill color obstructing page header and background (typst#277) Simplify heading block example Fix index out of bounds error in build script (typst#173) Replace infinite repeat layout panic with error (typst#235) Changed "ColorChoice::Always" to "ColorChoice::Auto" to honour user setting of TERM / NO_COLOR (typst#230) Fixed Typo (typst#227) Fix descriptions of some types (typst#206) Fix import syntax in tutorial (typst#205) Make alignment actually centered (typst#176) strip cli target (typst#143) ...
Dikluwe
pushed a commit
to Dikluwe/typst-crystalline
that referenced
this pull request
Sep 12, 2026
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.
This PR addresses issue #275.
Description
Instead of inserting the number of the page where a heading is located, we now take into account the state of the page counter and therefore query the page counter at the location of the heading.
Discussion
Currently (with the changes in this PR), when we have
the heading will be listed with page number 1 instead of 2 in the outline, that is, if the page counter is altered after the heading, the page number in the outline will not match the page number appearing in the footer.
I will be happy to change that, however I am unsure how to specifically query the state of the page counter at the end of a page.
I tested what happens, if we have no numbering or footer set, that is,
#set page(numbering: none, footer: none). It seems to behave correctly, however as this is my first time working with this codebase I cannot fully understand why this is the case. I'd recommend that the reviewer double checks the correctness.