text-crossrefs: automatically add a rule to suppress Typst's “page” prefixes
This commit is contained in:
@ -171,6 +171,17 @@ local function configure(metadata)
|
||||
end
|
||||
end
|
||||
|
||||
local function remove_prefixes_typst(metadata)
|
||||
if TYPST_VARIANT:get() == 'ref' then
|
||||
local label_macro_def = '\n#set page(supplement: [])\n'
|
||||
if not metadata['header-includes'] then
|
||||
metadata['header-includes'] = pandoc.MetaBlocks(pandoc.RawBlock('typst', ''))
|
||||
end
|
||||
metadata['header-includes']:insert(pandoc.RawBlock('typst', label_macro_def))
|
||||
end
|
||||
return metadata
|
||||
end
|
||||
|
||||
-- End of configuration
|
||||
|
||||
-- Preprocessing of identifiers on notes
|
||||
|
||||
Reference in New Issue
Block a user