From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/24730 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: generate bibliography from citations keys in docx? Date: Wed, 25 Mar 2020 09:35:28 -0700 Message-ID: References: <4d035407-d692-4ada-ac1a-b2668c8c80bc@googlegroups.com> <30f53079-9e7a-2046-f458-b23f9736ac48@reagle.org> <7e7dfd7e-1bf1-4557-a5f0-e686d48e2438@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="47193"; mail-complaints-to="usenet@ciao.gmane.io" To: Andrzej Wodecki , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBXMQ53ZQKGQE3H665HA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Mar 25 17:36:01 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ua1-f62.google.com ([209.85.222.62]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jH90a-000C56-3Z for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 25 Mar 2020 17:36:00 +0100 Original-Received: by mail-ua1-f62.google.com with SMTP id t10sf1061957uaj.5 for ; Wed, 25 Mar 2020 09:36:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1585154159; cv=pass; d=google.com; s=arc-20160816; b=ckJMNzwXCwZ9IgpOH5kj3ZBXDQCpq4iPHtqPrFQ0SV1BJm4VmwQ4YtpXmnBukauKYS +x3b9KEE0RowGZDCnu+WWZ10+By1pxvsY7lqQW8+qtZLd2gO0SS6j/p46bT4KrJG7bkB vgfvYwqW8i5QgK1FBF04jIfDnskoqoFNeSJHeW/DWe3hgBXyr/gc2Vkxh68CSTpraU+O tCuIbKV/ZlHFpxkyK/ZvNkZN9ueOs0F30H2vQnlQrT6+WHeYihEoIlJ/YLDRMTsaATXa dJDp7SMOkTgvCfzvRBYatihlTIVbIE89md7RAekjjHOYhSA6e9apAVog0SXtj34V0qqT 4iyg== 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:content-transfer-encoding :mime-version:message-id:date:references:in-reply-to:subject:to:from :sender:dkim-signature; bh=vwalnwpPHm7iFW6L1+fkfs1F7VSj5O8MFBAiH6V9VoE=; b=pDUNxWFXLn5q67K/giRji8kuUTg/WxYO+kBQx+W6ztVgheyCthZ/7p6st3WeSZvCkj elru1h9v7jE5HokXdoKCN/zdi4S6kkDjbWXMdaeONRJwQtCN55cY+BPPdO1sLde1SHuh EhhepqX5Yk/EtGCB1dIfG4dvmrRfATCgf2/R/fltmJ9djwBLTRmjPkHuJdIbyLHYI9JW vbd9pam3w1aUjKjoiTiJWm5JsFfukrbOYzyK1EAlnCyibC1x37s684qo+RkMHDUj781j VhRjy0/KJJiQMXYQ3OnKkkOF7eM6YuWcxeAIzwE3f6MTUpf2Dc496/zyvT3FdSZ5OMKh 7xxQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=Ewq1g47E; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::42c as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=vwalnwpPHm7iFW6L1+fkfs1F7VSj5O8MFBAiH6V9VoE=; b=i00+wJyp3k98xL459R0iWIDpfUsrh4wKYcMbMhn96iB+UyT8YX7dbg695366vASVvZ iZ8cN9VlHlGVw6cYmjrEiWNJnJYhcuggkZHUutaxkPrYDkmyBcP5Gq+CuoWCsW8mRpua acpzxTAbqIsgO1XLJzofVADEVGTNbp2nq2sYh2K0q1POGaBFJ3AZrpAJGJ/Yl3aFgOrE T4g3qMK4Q679fv2RRCx0nush+drVgsh9QFyPo2/vpP3QU0eQv9VFN71oBRdIp7NRDF3y RlEQTK8cv36KJiJCuutdDRQ6ixZ+UxPqyqCJfZ4e7tShKHljqEDtZfQcALtwDtopfsNd xo2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:content-transfer-encoding :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=vwalnwpPHm7iFW6L1+fkfs1F7VSj5O8MFBAiH6V9VoE=; b=DvesK91qB2wQY3vvfmjlpg6FEcyXZxgCf7dSkF8a7/3V6OQ7ERNagjLvO7uoZ1Fms2 5ze6dceN/MSpZthaPi/a5xRK1v6qWnQYKNWGDHGgKhGI/T0wOp/GORQ6s9W7gJ4awvFZ fvZaCC/oV8MTA7kuFOW962nN/aqc2t2I+mlBSEnzeRaKRcYiF6Gy79Y6Z8O6hzJ2k9Jo mBHH00b0ZxaLnPsejcFtfAP1Z7DguqC/u4elSSV89vgcWjxzq54vms/cOwf6h4Xwa70S ffZeVN3ynIPml6uGGRrTpfiQgwH1wZ+5q6NLIbnvYoziZihJITLy44wHSTuP8Y5pWBPl Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANhLgQ2rBtCjGHS1aySphpOBYPkRO2CiBupFpAJ3RcMUmrBEWTSe5/2C S5UFw8oQzKJzHr9Ge9On9bo= X-Google-Smtp-Source: ADFU+vvAY/XS934tg01WrkI5Lp69wzkXNHsHabYlAwiGHRrOWWu3ltnw3Qer+uT0zLL7q3b2qBfqHA== X-Received: by 2002:a67:c189:: with SMTP id h9mr3288301vsj.91.1585154159106; Wed, 25 Mar 2020 09:35:59 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6102:8e:: with SMTP id t14ls309329vsp.5.gmail; Wed, 25 Mar 2020 09:35:41 -0700 (PDT) X-Received: by 2002:a67:69d8:: with SMTP id e207mr3499325vsc.141.1585154141527; Wed, 25 Mar 2020 09:35:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585154141; cv=none; d=google.com; s=arc-20160816; b=Uug8POiNNrbZBGNJ7+E0lfcKPmK3vvDF7PaKa5fYx032L4yzB4/gP06ShVWki0dFDq Hie4lSQOpVbsG2Sbgv9Wb8ADq0w7u61cOhHzJ19dokwHLRm4hTwmEXgHP65iNhF3/l+v 45+NTm/UikXIeWdL+XXEa1WHmUU5nJQ5AlF8F2CqS0oqH8ONI6ooLHflMdYODmze+N9f hgfoQUlQpzHa4l4Joaazrn+hAUs0yrpARa8qS6VRmuZYik3TXX8QHNkJUNhpvf4uHyzw +ZS+UxGjaOCDUProlvl0J1YMSCUrZphEkBQ9K97+8gSqQcMGmK7CFd93scGBoiYeFu5k pdxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:dkim-signature; bh=H1w6ek68TD8GTz8Vd3PCV4mPyeBckTYaUUtYr172qAk=; b=xIAaegpW9+yUffQHoKE4qWzU9ptLqAXHtllEErtVYb18pg4vNBYib7dtPkSkcEZ64I als50qlGxwPl2g4gMiaF9bIuB4h/Oks1kmE9IA4Cf2f3rLnc3rdZ0TZwpEcSmLdR33IK iMNueBtEm8uEK+8Gr+M/u87D7d6LoPXiuqlFh7AnQv+wZgs2JGpvblAUjaeAmisFXqTt f+8OpmQFe76RHnnl9YIApVWg1AfvZ19V9E+T0SKyOr8etzQW19yEsl/B/liqXD6rpIJy bcLiU2n2i4+q9hhSGlkaCKlDQhHBL96icndjYoQ9p7qN7grIzAE77KGH1BAYQHNzxm/L pnjg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=Ewq1g47E; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::42c as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com. [2607:f8b0:4864:20::42c]) by gmr-mx.google.com with ESMTPS id d20si364772vsf.2.2020.03.25.09.35.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Mar 2020 09:35:41 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::42c as permitted sender) client-ip=2607:f8b0:4864:20::42c; Original-Received: by mail-pf1-x42c.google.com with SMTP id j1so1312284pfe.0 for ; Wed, 25 Mar 2020 09:35:41 -0700 (PDT) X-Received: by 2002:aa7:93cd:: with SMTP id y13mr4152341pff.213.1585154140497; Wed, 25 Mar 2020 09:35:40 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id m28sm5782122pgn.7.2020.03.25.09.35.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2020 09:35:39 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 85C1FA26A; Wed, 25 Mar 2020 12:35:28 -0400 (EDT) In-Reply-To: <7e7dfd7e-1bf1-4557-a5f0-e686d48e2438-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=Ewq1g47E; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::42c as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org 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:24730 Archived-At: 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 writes: > The reason I have citation keys in MS Word is a consequence of my origina= l=20 > workflow: > Scrivener > markdown > pandoc-citeproc > MS Word, BTW described here:=20 > https://medium.com/@andrzej.wodecki/scrivener-for-scientific-writing-setu= p-af5edf4482b8 > > But at the final stage of my writings I escaped from Scrivener (export to= =20 > 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,=20 > > Andy > > > W dniu =C5=9Broda, 25 marca 2020 14:11:06 UTC+1 u=C5=BCytkownik Joseph na= pisa=C5=82: >> >> >> On 3/25/20 8:01 AM, Andrzej Wodecki wrote:=20 >> > Second trial =20 >> > with in.docx:=20 >> >> Pandoc doesn't expect to find markdown (including pandoc's citation=20 >> syntax) in a Word file. That only works in markdown files (and perhaps o= rg=20 >> files). So when it sees a citation in word->markdown, it takes it=20 >> literally, and escapes the brackets so it remains so in the markdown.=20 >> >> Perhaps someone else can recommend a configuration that won't escape=20 >> citation syntax, allowing you to go to markdown, and then from that back= to=20 >> Word.=20 >> >> This seems convoluted though. If you're using Zotero, why not use the Wo= rd=20 >> plugin for that? Or, why not stay in markdown as your source document?= =20 >> >> > > --=20 > 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/msgi= d/pandoc-discuss/7e7dfd7e-1bf1-4557-a5f0-e686d48e2438%40googlegroups.com. --=20 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 e= mail 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/m28sjotmsv.fsf%40johnmacfarlane.net.