Re this:

> Ok, I probably missed in the Pandoc citeproc doc that doesn't mention that supports only MD, so I thought it would work for all formats with pattern @test.

The @test citation syntax is defined under the citations extension (with target 'extension-citations'). This is within the 'Pandoc's Markdown' section and so perhaps applies only to markdown.

However, there's another citations extension (with target 'org-citations') in the 'Extensions -> Other extensions' section, and this describes its usage within org and docx documents.

This little shell script illustrates that the 'citations' extension is supported for docx, ipynb, jats, markdown (+variants), opml and org, and is enabled by default for markdown, opml and org.

% for i in $(pandoc --list-input-formats); do echo -n $i:; pandoc --list-extensions=$i | grep citations || echo; done | grep ':.citations'
docx:-citations
ipynb:-citations
markdown:+citations
markdown_github:-citations
markdown_mmd:-citations
markdown_phpextra:-citations
markdown_strict:-citations
opml:+citations
org:+citations

So I think that (not surprisingly?) the 'citations' syntax supported by a given input format (if supported) is a function of that input format. The supported format is clear for markdown (+variants?), org and docx but perhaps not for ipynb and opml.

I think that it might be useful to clarify some of this in the man page? Please let me know if I should create an issue.

On Tue, 8 Nov 2022 at 08:21, Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> wrote:

Mladen Babic <mladen.babic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> What I actually want to do is when the user uploads the DOCX file,
> Pandoc converts the file to HTML and shows it to the HTML editor for
> additional editing by the user and converts it back to DOCX.
> After converting to Html, the system (my app) will replace current
> cites in HTML cite i.e. [1] with the key from the .bib file (like in
> my case [@test1] so the citeproc will know how to process it.

That's an interesting use case. I don't have any immediate ideas; going
via Markdown might be the best option.

But please make sure to also checkout [OS-APS], an open-source
project that uses pandoc for some of the document conversions. Going
from your description it sounds like it could be exactly what you need.
I've added Frederik from that org to CC, he may be able give more info.

[OS-APS]: https://os-aps.de

--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124

--
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/87r0ydoo0n.fsf%40zeitkraut.de.

--
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/CAEe_xxizCtYTk_m5ROjitBB9WPxivF3rKdmk2vOFqEdZBtLX0Q%40mail.gmail.com.