local function add_item_style (item_style)
return function (list)
for i, item in ipairs(list.content) do
item = item:map(function (blk)
return blk.t == 'Plain' and pandoc.Para(blk.content) or blk
end)
list.content[i] = {pandoc.Div(item, {['custom-style'] = item_style})}
end
return list
end
end
OrderedList = add_item_style 'List Number'
BulletList = add_item_style 'List Bullet'
1条答案
按热度按时间bsxbgnwa1#
您可以使用Lua filter:
将上述内容保存到文件
item-style.lua
中,并将其用于