From d682a191f39727a82b8effa72b83f72332ec2bda Mon Sep 17 00:00:00 2001 From: LordBaryhobal Date: Thu, 23 Jul 2026 11:46:08 +0200 Subject: [PATCH] feat(report): add list of tables and listings --- report/bachelor_thesis.typ | 40 +++++++++++++++++++++++++++++--------- report/requirements.typ | 3 ++- 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/report/bachelor_thesis.typ b/report/bachelor_thesis.typ index e639bd4..2f4a1a0 100644 --- a/report/bachelor_thesis.typ +++ b/report/bachelor_thesis.typ @@ -86,6 +86,29 @@ outlined: false, ) + +// Table of figures/tables/listings +#context { + let f = inc.global-language.get() + let tab = outline.with(depth: 1, indent: auto) + { + show pagebreak: none + tab( + title: page-title(i18n(f, "figure-table-title"), mult: 1, top: 0.4em, bottom: 0.4em), + target: figure.where(kind: image), + ) + tab( + title: page-title(i18n(f, "table-table-title"), mult: 1, top: 0.4em, bottom: 0.4em), + target: figure.where(kind: table), + ) + } + show outline.entry: set text(size: 0.94em) + tab( + title: page-title(i18n(f, "listing-table-title"), mult: 1, top: 0.4em, bottom: 0.4em), + target: figure.where(kind: raw), + ) +} + //////////////////////////// // Let's get started folks! //////////////////////////// @@ -147,18 +170,9 @@ You can also change the order or the names of the sections, for instance, if you #appendix-page() #pagebreak() -#set heading(numbering: "A.1", supplement: [Appendix]) - -#set figure(numbering: (..nums) => counter(heading).display("A.1") + "." + numbering("1", ..nums)) - // Table of acronyms (optional). Defined near the acronyms above. #acronym-table() -#pagebreak() - -// Table of listings -#table-of-figures() - // Code inclusion #pagebreak() #code-samples() @@ -175,8 +189,16 @@ You can also change the order or the names of the sections, for instance, if you #pagebreak() +#counter(heading).update(0) + +#set heading(numbering: "A.1", supplement: [Appendix]) + +#set figure(numbering: (..nums) => counter(heading).display("A.1") + "." + numbering("1", ..nums)) #set heading(outlined: false) #show heading.where(level: 1): set heading(outlined: true) +#counter(figure.where(kind: image)).update(0) +#counter(figure.where(kind: table)).update(0) +#counter(figure.where(kind: raw)).update(0) = Midas Language Definition diff --git a/report/requirements.typ b/report/requirements.typ index cb66ece..57cc73e 100644 --- a/report/requirements.typ +++ b/report/requirements.typ @@ -1 +1,2 @@ -#import "@preview/isc-hei-bthesis:0.8.1" \ No newline at end of file +//#import "@preview/isc-hei-bthesis:0.8.1" +#import "@local/isc-hei-bthesis:0.8.1" \ No newline at end of file