File size: 614 Bytes
a469ee1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

-- preserve_linebreaks.lua
-- Filter for better preservation of line breaks and paragraph structure

function LineBreak(el)
    return pandoc.RawInline("latex", "\\\\")
end

function SoftBreak(el)
    return pandoc.RawInline("latex", " ")
end

function Para(el)
    -- Add proper spacing for numbered lists and paragraph breaks
    if #el.content > 0 then
        return pandoc.Para(el.content)
    end
end

-- Improve list formatting
function OrderedList(el)
    -- Ensure proper spacing in numbered lists
    return el
end

function BulletList(el)
    -- Ensure proper spacing in bullet lists
    return el
end