From 87a198707ca9d83c17f1c4eed5c66dee563e1881 Mon Sep 17 00:00:00 2001 From: RubyflameWarrior <104446839+RubyflameWarrior@users.noreply.github.com> Date: Tue, 27 Feb 2024 19:43:52 -0500 Subject: [PATCH] Add TOC debug code --- entries/competition/valley-mall.typ | 2 ++ template/toc.typ | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/entries/competition/valley-mall.typ b/entries/competition/valley-mall.typ index 1817753..fbecdf4 100644 --- a/entries/competition/valley-mall.typ +++ b/entries/competition/valley-mall.typ @@ -520,6 +520,8 @@ ) ] +#colbreak() + = Skills #nb_admonition(type: "competition", title: "Skills Performance")[ - *Driver Skills Score:* 72 diff --git a/template/toc.typ b/template/toc.typ index 221fe64..acdd995 100644 --- a/template/toc.typ +++ b/template/toc.typ @@ -81,14 +81,18 @@ let frontmatter_count = frontmatter_page_counter.final(loc).at(0) + if frontmatter_count + page_number + 2 - page-number-offset + 4 < 0 { + panic(str(info.name) + str(entry.title) + str(frontmatter_count + page_number + 2 - page-number-offset)) + } + [ #box(baseline: 15%, nb_icon(label: entry.type, size: 1em)) #h(5pt) #box(fill: info.color.lighten(30%), radius: 1pt, height: 1em, baseline: 15%)[ #align(center + horizon)[ - #link((page: {frontmatter_count + page_number + 2/* - page-number-offset*/}, x: 0pt, y: 0pt))[ + #link((page: {{frontmatter_count + page_number + 2 - page-number-offset + 4}}, x: 0pt, y: 0pt))[ #text(fill: black)[ - _#h(2pt) /*[#frontmatter_count + #page_number + #2 - #page-number-offset] */#start_date #sym.dash.em #info.name: #entry.title #h(2pt)_ + _#h(2pt) {#frontmatter_count + #page_number + #2 - #page-number-offset} #start_date #sym.dash.em #info.name: #entry.title #h(2pt)_ ] ] ]