Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
flavio20002 committed Dec 24, 2024
1 parent fac58cd commit d18c2b1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib.typ
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,9 @@
if odd_page {
let before = query(selector(heading.where(level: 2)).before(here()))
let counterInt = counter(heading).at(here())
if before != () and counterInt.len()> 2 {
if before != () and counterInt.len()> 1 {
box(width: 100%, inset: (bottom: 5pt), stroke: (bottom: 0.5pt))[
#text(if appendix != none {numbering("A.1", ..counterInt.slice(1,3)) + " " + before.last().body} else {numbering("1.1", ..counterInt.slice(1,3)) + " " + before.last().body})
#text(if appendix != none {numbering("A.1", ..counterInt.slice(0,2)) + " " + before.last().body} else {numbering("1.1", ..counterInt.slice(0,2)) + " " + before.last().body})
#h(1fr)
#page_number
]
Expand All @@ -372,8 +372,8 @@
}
)

show cite: it => {
show regex("\[(\d+)"): set text(main-color)
show cite: it => {
show regex("[\w\W]"): set text(main-color)
it
}

Expand Down
Binary file modified tests/sample-book/ref15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/sample-book/ref21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d18c2b1

Please sign in to comment.