Hi, I have some LaTeX files which I need to convert them to Markdown (gfm or commonMark). But I need the LaTeX's \title{} (I guess metadata.title in pandoc) to be a # (h1). I have some lua filters to do a header.level shift, but I cannot add the metadata.title as a # heading. lua-filter-1: shift headings local title function promote_header(header) if header.level < 6 then header.level = header.level + 1 return header end if not title then title = header.content print(title) return {} end local msg = '[WARNING] title already set; discarding header "%s"\n' io.stderr:write(msg:format(pandoc.utils.stringify(header))) return {} end return { {Meta = function (meta) title = meta.title end}, -- init title {Header = promote_header}, {Meta = function (meta) meta.title = title; return meta end}, -- set title } lua-filter-2: append metadata.title at the beginning of the file as # function Meta(m) if m.title then local title_text = pandoc.utils.stringify(m.title) -- io.write("# " .. title_text .. "\n") end return {} end Any ideas how to achieve this? -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/f2ccb8c5-7628-453e-a22e-041a7fc898f7n%40googlegroups.com.