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: Tailor Quotes for Chinese Characters in LaTeX Body
author: Tom Ben
version: 1.0.0
quarto-required: ">=1.5.0"
contributes:
filters:
- latex-body-quotes.lua
@@ -0,0 +1,25 @@
-- Replace Chinese corner brackets with guillemets for LaTeX output.
-- This filter is responsible for body text only; header handling lives in latex-header-quotes.
-- The filter is run before citeproc to avoid touching bibliography, which is handled separately in cnbib-quotes.
--- Copyright: © 2025Present Tom Ben
--- License: MIT License
function Str(el)
if not FORMAT:match('latex') then
return el
end
local replacements = {
[''] = '«',
[''] = '»',
[''] = '',
[''] = ''
}
for original, replacement in pairs(replacements) do
el.text = el.text:gsub(original, replacement)
end
return el
end