DearJohn, 

many thanks. I've tried, and with:

pandoc in.docx --filter pandoc-citeproc --bibliography mylibrary.bib -t native


I get

[Para [Str "From",Space,Str "[@andy2020]",Space,Str ...


as you suggested. I've looked at: https://pandoc.org/lua-filters.html
and successfully run the first example "smallcaps.lua". But here I'm stuck: I don't know how to write the filter for 
Str "[@ > Cite "[
replacement.

If its not a problem, I would appreciate any tip/help, or just a snippet,

many thanks in advance, 

Andy


W dniu środa, 25 marca 2020 17:36:06 UTC+1 użytkownik John MacFarlane napisał:

You could use a lua filter.

If you do `pandoc your.docx -t native` you'll see how pandoc
parses these faux markdown citations.

If they appear as

Str "[@jones]"

then you could use a filter to replace any Str elements
fitting this pattern with a Cite element.  I can't explain
the whole thing here -- if you want to pursue this, see
the lua filter docs on the website.

Andrzej Wodecki <andrzej...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> The reason I have citation keys in MS Word is a consequence of my original
> workflow:
> Scrivener > markdown > pandoc-citeproc > MS Word, BTW described here:
> https://medium.com/@andrzej.wodecki/scrivener-for-scientific-writing-setup-af5edf4482b8
>
> But at the final stage of my writings I escaped from Scrivener (export to
> MS Word), with only citation keys left in my doc.
> If only I start from scratch in MS Word that wouldn't be a problem, but...
>
> My temporary workaround (very primitive, but works) is:
> 1. docx > pandoc > markdown
> 2. markdown: replace all \@ by @
> 3. markdown > pandoc-citeproc > docx
>
> Anyway, if you have any ideas for anything smarter would be nice to hear :)
>
> Yours,
>
> Andy
>
>
> W dniu środa, 25 marca 2020 14:11:06 UTC+1 użytkownik Joseph napisał:
>>
>>
>> On 3/25/20 8:01 AM, Andrzej Wodecki wrote:
>> > Second trial  
>> > with in.docx:
>>
>> Pandoc doesn't expect to find markdown (including pandoc's citation
>> syntax) in a Word file. That only works in markdown files (and perhaps org
>> files). So when it sees a citation in word->markdown, it takes it
>> literally, and escapes the brackets so it remains so in the markdown.
>>
>> Perhaps someone else can recommend a configuration that won't escape
>> citation syntax, allowing you to go to markdown, and then from that back to
>> Word.
>>
>> This seems convoluted though. If you're using Zotero, why not use the Word
>> plugin for that? Or, why not stay in markdown as your source document?
>>
>>
>
> --
> 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-...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7e7dfd7e-1bf1-4557-a5f0-e686d48e2438%40googlegroups.com.

--
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/db7c031a-9b53-42e5-b073-f70fa0c16de1%40googlegroups.com.