some thesis fixes

This commit is contained in:
2025-01-29 14:12:57 +02:00
parent 2dcfff689a
commit 45292990b1
4 changed files with 87 additions and 26 deletions

View File

@@ -315,7 +315,7 @@ function converters.Image(data, ctx)
return text, title and { title } or alt_plain or url or "[picture]";
end
function converters.Figure(data, ctx)
local chapter_i = #(ctx.headers or {});
local chapter_i = count_headers(ctx.headers or {});
ctx.figures_indices = ctx.figures_indices or {};
ctx.figures_indices[chapter_i] = (ctx.figures_indices[chapter_i] or 0) + 1;
local figure_i = ctx.figures_indices[chapter_i];