Hello all,

I have trouble writing the correct lua filter for my pandoc conversion of docx to latex.

In short, I have citations in the format "\cite{reference}" (csl style from Better Bibtex) in my docx file, which I would like to preserve and keep unchanged during pandoc conversion.

When calling "pandoc --to=native test.docx", I see that pandoc reads these entries as strings and I've tried writing filters with pandoc.RawInline to preserve these strings. However, using for instance this function keeps the reference keys but gets rid of all the latex formatting (the backslash and the curly brackets):
function Str(el)
  local citekey = el.text:match("\\cite[{](%w+)[}]")
  if citekey then
    return pandoc.RawInline('latex', citekey)
  end
end

How do I keep my latex-styled reference strings as they are during pandoc conversion?

Thanks in advance!
Sandra

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/0df70b72-8e13-4e1c-986f-6a54ef352f6cn%40googlegroups.com.