fix some image/table list problems

This commit is contained in:
2025-10-02 23:26:48 +02:00
parent 8a76ee9e1e
commit bfe08ac9b4
2 changed files with 15 additions and 12 deletions

View File

@@ -51,6 +51,7 @@
abbrlist(language); abbrlist(language);
imagelist(language); imagelist(language);
tablelist(language); tablelist(language);
pagebreak(weak: true);
content content
bibliogr(language, citation_file); bibliogr(language, citation_file);
}); });

View File

@@ -239,11 +239,11 @@
} }
} }
// _ OUTLINE // _ OUTLINE FIGURE INNER
#let _outline_figure_inner(selector, title, body_mapper) = { #let _outline_figure_inner(selector, title, body_mapper) = {
show outline.entry: it => { let entry(selector, element) = {
link( link(
it.element.location(), element.location(),
grid( grid(
columns: 3, columns: 3,
gutter: .5em, gutter: .5em,
@@ -251,21 +251,23 @@
dir: ltr, dir: ltr,
text(numbering( text(numbering(
"1. 1", "1. 1",
counter(heading).at(it.element.location()).at(0), counter(heading).at(element.location()).at(0),
counter(selector).at(it.element.location()).at(0), counter(selector).at(element.location()).at(0),
)), )),
h(.5em), h(.5em),
text(body_mapper(it)), text(body_mapper(element)),
), ),
box(repeat([.], gap: 0.15em)), box(repeat([.], gap: 0.15em)),
str(it.element.location().page()), str(element.location().page()),
), ),
) )
} }
if not is_none(selector) { heading(title, numbering: none, outlined: false);
outline(target: selector, title: title); for el in query(figure.where(kind: selector)) {
} else { if is_none(el.caption) {
outline(title: title); continue;
}
entry(figure.where(kind: selector), el);
} }
} }
@@ -276,7 +278,7 @@
if realcount.final().at(0) == 0 { if realcount.final().at(0) == 0 {
return; return;
} }
_outline_figure_inner(figure.where(kind: target), title, (it) => it.element.caption.body); _outline_figure_inner(target, title, (it) => it.caption.body);
} }
} }