add _extensions

This commit is contained in:
2026-05-21 13:37:53 +08:00
parent 6a9a5fc90e
commit 61bd0bea2f
252 changed files with 33972 additions and 1 deletions
@@ -0,0 +1,7 @@
title: Remove First Paragraph Style
author: Tom Ben
version: 1.0.0
quarto-required: ">=1.5.0"
contributes:
filters:
- no-first-paragraph.lua
@@ -0,0 +1,16 @@
--- Convert all paragraphs to use "Body Text" style instead of "First Paragraph" style in DOCX output
--- This is particularly useful for Chinese documents where the "First Paragraph" style is not needed
--- Copyright: © 2025Present Tom Ben
--- License: MIT License
function Para(para)
-- If not DOCX output, return element unchanged
if FORMAT ~= 'docx' then
return para
end
-- Wrap paragraph in a Div with custom-style attribute set to "Body Text"
-- This ensures all paragraphs use the "Body Text" style instead of "First Paragraph"
return pandoc.Div(para, pandoc.Attr("", {}, { ["custom-style"] = "Body Text" }))
end