From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31714 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "'William Lupton' via pandoc-discuss" Newsgroups: gmane.text.pandoc Subject: Re: Pandoc Citeproc doesn't work on HTML format Date: Tue, 8 Nov 2022 09:21:48 +0000 Message-ID: References: <8e24d40c-5977-4912-9e1b-6cfa0f66d5e5n@googlegroups.com> <87v8nqon26.fsf@zeitkraut.de> <87r0ydoo0n.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000862c6705ecf21260" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4221"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Frederik Eichler To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCS4HJ6WSAHBBOV7VCNQMGQEOBNOMQY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Nov 08 10:22:06 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qk1-f185.google.com ([209.85.222.185]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1osKo2-0000p3-3u for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 08 Nov 2022 10:22:06 +0100 Original-Received: by mail-qk1-f185.google.com with SMTP id bq13-20020a05620a468d00b006fa5a75759asf12405717qkb.13 for ; Tue, 08 Nov 2022 01:22:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1667899325; cv=pass; d=google.com; s=arc-20160816; b=QDlhczR6uMiYzqLeX8YBLimMj5BQZKAo+UzS57pm9oLicdYUNFEKOQRErniKLvJ/dn zfIf9oV0celjYB05jziIZ2K0x1vqgueQ7LWPwVflBYwSphykPVLcLKUHhy/HlNDTNAIj PlMGk+si3nJVuWYr/ZTgYmAhqFDKFoT+Mk7/BcTigoUb2cXp6HTHjTQeg2sAwTVaBxg0 9wjShnMCLN/1iZCjV6lNE9gv62jHluowHScn9h21Hd+rwawsx7iJwheqN5/v/JtXfyM+ m7grnhkW3ODTvat9y2e7Pd0CSEn447tLhllZTvjtJ5TLLdoe7FCnvocrh4HVjm6A4Y1T Cmkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:dkim-signature; bh=C450LYBqd7NgqHiwpodZwm0yrt4gUWKSNE3w/pgQ6qs=; b=ZOBX3Nx1Cbsv390ZQhNMlfDN6QYe3p0UjFEe7JG8WGbENURQOmH3w1ncOUASCHRZjO /n7kH2AmW3jJPQhBtTQGXT8JXgvJ4vQCsHIEpUV9OXxkN0YDcjgBxnnv8sJ6WU4psykb xZyPPaxAkVCWJKK6OjBItgHspBKuiLF4KuJRebdytKeMkuX03L6Ts4cxPTJRnFygyUD+ 8b5f/XSage4DxoHkP1dpOjYF05WMLRPCmGAzGUz6UyzjyLSwvsRjCKcFkEP86I9Z0A/u VbKJLd2+YKFk9N9HYwIenN+MVu8dt8OlYiJRWyB1NEwi1sdjl4J62kOU+pYgKE5g8JsM l+XA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@broadband-forum.org header.s=google header.b=bnJU3Kte; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::b2e as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadband-forum.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version:from:to:cc :subject:date:message-id:reply-to; bh=C450LYBqd7NgqHiwpodZwm0yrt4gUWKSNE3w/pgQ6qs=; b=Tq9B+1em6n58UBOkYvoO2OJYuooQu92cA0bflo/F5Si+RLZJ0t8e46Fof/7Fkkzz5N 5sLBYuoWUSKaQgcSdGU+aCNex+oXnvh9JKQccso9NF18sKPvbOJ8cbdNEv71EA1FKCIV 37IlSHKhqGeVP20/+tmYeqv62fNUBGCnW4fkz3gfTdH0jUlMH079oRdjw6jwlq718sX/ FsrZVpBLcIvwCuPeJ4kLUjR7Emo+Y/Fh2TqDQfREkM4iccQmlzYekW7c8Z/Ah5n0iVf/ Z0fB8QRBg+mzERFJwCWEov8wAtGyTWzu2+2wJZvpP9eGEYtUmxi4KNMMGc3iRrvIpH5e c0Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=C450LYBqd7NgqHiwpodZwm0yrt4gUWKSNE3w/pgQ6qs=; b=iSLegj4z9euk38/r2GoyjXfjGvjiU5N0Lg5lTPCyuE2J909Fvs6cNWPkVyMrE2JrYO E8OnFsMdv34awuSVQFWL/1ZDRB5UxLMRWG5Uz1HGS8Il/4SuQnO/xNfHjEISrsoHU/Om 7yWpZ16P//q1ts0l/GHUWMFJrbs8DNXtv9w8JbXgL0X4SBNKb7q3Kqppj8E+XGKDguuw X34Qtpl4PP0yESnlz07c8Dvtr8DRHmUipylMbxdEtpjJMVczuDqMWMvQ2SvQQGEuhgXM qThYmEWfPDViqJxgEHCfZ5/C1nx8RtixWHe/5Fu8DF8Wo5JtIsu9kK5IxkF+ X-Gm-Message-State: ACrzQf2IXryhRXdRPHCKGQDa+Ld2cJljw2RYnCBbIvZdcFVhdEPHkWha EBMgem+MXQa+5aWuiK0iI44= X-Google-Smtp-Source: AMsMyM45RWvhR4jAGhXYcc97J+/AAKZojZuVNJExFBMRCoD2gu3aBeKwZvRdptdNcEI1OznyXuPVsg== X-Received: by 2002:a05:6214:b6b:b0:4bb:9fea:f53a with SMTP id ey11-20020a0562140b6b00b004bb9feaf53amr48860073qvb.7.1667899325161; Tue, 08 Nov 2022 01:22:05 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ac8:4643:0:b0:39c:c64d:83d3 with SMTP id f3-20020ac84643000000b0039cc64d83d3ls8330405qto.8.-pod-prod-gmail; Tue, 08 Nov 2022 01:22:02 -0800 (PST) X-Received: by 2002:ac8:47d2:0:b0:3a5:541a:63d with SMTP id d18-20020ac847d2000000b003a5541a063dmr20248464qtr.658.1667899322568; Tue, 08 Nov 2022 01:22:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667899322; cv=none; d=google.com; s=arc-20160816; b=mWkDC9+TlWGXodUZYZd+OyN5H9h2JyYd75YDCDQIncmFvINKGkkDIioDdOJSQnx3EM 402uqQlxd91Tj0un5lM4nBqib0VmeU+YzSrhWx9ve2WQYl9aCQj4hT+b/wFaeu8YjHn6 pElRclIGAOquVTwC/8LY2oSgQ4/cSN99XjsD6+CVSaU7EsnTUDo87kTBRepIM88NgQ3c TbHNldFk+vm/3wdTUju0uJRv06sgOVxJKyNNj1GqVMkBptGrSeJC8vJY3qNhyXyqh0lb 9ClSVS7RCjX/nPXKkFQuHOJ0HDVouJOSJ3zLrwmyA0f9lp0fF6V2G+reT8eFoCsiMzwt 4T8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=xrDk76GLTX5GEoytAHnMGDequAWaL+oBkXg3Ve0t95Y=; b=GeZK1FmlFhmhw/AHR5L2m6mDp0oRQPdHKiA4+PdquTw8BiZkOGPtRGtn//OCwAPKby imDCbi29BjrIYwsugrTK4PjW0jKiDIrsa51u+HerYml+bbYhrnFbi5MhX9fV4Lv5My+7 SXSXpJJEE9tzxYcBJ2EsWDlMLvGBAXuxZtFW1NPrTD5SKGSx3WX54JFMZiA4yEKQXmru NcQHipTLO2cnAaTCVGZOueFt88Hkr8mZkGvfP0W0bhV5s1jq0y/pq8Ugl1YugHgI8nlh uxhnEYr4TNzgh2TSUiXFSnnMTJy7mOXqndMllrytrAXT62dzFPKUEmN4ngIqdjFpjn1J F9QA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@broadband-forum.org header.s=google header.b=bnJU3Kte; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::b2e as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadband-forum.org Original-Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com. [2607:f8b0:4864:20::b2e]) by gmr-mx.google.com with ESMTPS id r1-20020ac85e81000000b003a4f2725cd1si458795qtx.4.2022.11.08.01.22.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Nov 2022 01:22:02 -0800 (PST) Received-SPF: pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::b2e as permitted sender) client-ip=2607:f8b0:4864:20::b2e; Original-Received: by mail-yb1-xb2e.google.com with SMTP id 7so12119718ybp.13 for ; Tue, 08 Nov 2022 01:22:02 -0800 (PST) X-Received: by 2002:a05:6902:10c2:b0:6d5:afd8:1ae9 with SMTP id w2-20020a05690210c200b006d5afd81ae9mr14213633ybu.247.1667899320569; Tue, 08 Nov 2022 01:22:00 -0800 (PST) In-Reply-To: <87r0ydoo0n.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> X-Original-Sender: wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@broadband-forum.org header.s=google header.b=bnJU3Kte; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::b2e as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadband-forum.org X-Original-From: William Lupton Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:31714 Archived-At: --000000000000862c6705ecf21260 Content-Type: text/plain; charset="UTF-8" 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 wrote: > > Mladen Babic 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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. --000000000000862c6705ecf21260 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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.
<= br>
The=C2=A0@test citation syntax is defined under the citations extension= =C2=A0(with target 'extension-citations'). This is within the &= #39;Pandoc's Markdown' section and so perhaps applies only=C2=A0to = markdown.

However, there's another citations extension=C2=A0= (with target 'org-citations') in the 'Extensions -> Other ex= tensions' section, and this describes its usage within org and docx doc= uments.

This little shell script illustrates that = the 'citations' extension is supported for docx, ipynb, jats, markd= own (+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=3D$i | grep citations || echo; = done | grep ':.citations'
docx:-citations
ipynb:-citationsmarkdown:+citations
markdown_github:-citations
markdown_mmd:-citatio= ns
markdown_phpextra:-citations
markdown_strict:-citations
opml:+c= itations
org:+citations

So I think that (not su= rprisingly?) the 'citations' syntax supported by a given input=C2= =A0format (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 usef= ul 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; g= oing
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=C2=A0 e836 388d c0b2 1f63 1124

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/87r0ydo= o0n.fsf%40zeitkraut.de.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.= google.com/d/msgid/pandoc-discuss/CAEe_xxizCtYTk_m5ROjitBB9WPxivF3rKdmk2vOF= qEdZBtLX0Q%40mail.gmail.com.
--000000000000862c6705ecf21260--