From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wFwDA5GNumFJqwAAgWs5BA (envelope-from ) for ; Thu, 16 Dec 2021 01:51:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 4KlFOpCNumFZdQAAB5/wlQ (envelope-from ) for ; Thu, 16 Dec 2021 00:51:28 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6E95E1653A for ; Thu, 16 Dec 2021 01:51:27 +0100 (CET) Received: from localhost ([::1]:36850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxezW-0004mX-Io for larch@yhetil.org; Wed, 15 Dec 2021 19:51:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxeyr-0004l3-0y for emacs-orgmode@gnu.org; Wed, 15 Dec 2021 19:50:45 -0500 Received: from [2a00:1450:4864:20::333] (port=52125 helo=mail-wm1-x333.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxeyl-0006j7-MN for emacs-orgmode@gnu.org; Wed, 15 Dec 2021 19:50:44 -0500 Received: by mail-wm1-x333.google.com with SMTP id z206so3615399wmc.1 for ; Wed, 15 Dec 2021 16:50:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew.cmu.edu; s=google-2021; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Z010S3sT1/SrFRNxxiR5S24atcrV70kjoGq0pSqPVuM=; b=JvODCbU80m0fhD4WBee5edSCNe5rUwgha9zT18JIsPW76zKScGT1Xug87zF6saFuw7 4O+OeMHmkLWNlyfuHNTH72fVcBmbHT05jrX8neRb4BQ9hiUC/6RXsZDQm0vjs+vpDoKl mBoQADCsesaEzFXYAbdtO2bSxr+I+Ny8NIDTr20UOh1Rp553f6a7vbOMD8EaY6asVg1d c/SU+C7nj3fy89eYyH0lglc2bfvj6GX8q7IZn2TvN9cRY+zY66jt3fsWQt7+IWx6+aZg bDvbAcsJAcTao04LILgA0AcZa/PjTzQwFwZoYpJ8SKCgdYiPjQnW87IumTKDa16cCwtt u4yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Z010S3sT1/SrFRNxxiR5S24atcrV70kjoGq0pSqPVuM=; b=PvFKTAxc2UgNhMTr/0AFgZm4p5VTsnQXBda/RhCj1KbPNQ5j4kw9fx3TYsoQ2041a2 JFwLSyNL6JXTlh9h+HjBFzHgUAEaNv22fEsU61TkSouBZw5E2wfeheF1E1fMTI5raHen hjvR4YvJoAHvAQCgiup2miPvhLoZPBQNntTWpvEPxiz4U/Puuev1/ID/GCa1kbDoEB99 K7MVVq7zXJLRzr2Cg9lyAtfosXvcO8yjb0s0t5ijXYl3luho6hxufG4isXkBV8XTmbx3 KoevBDrfUFMcKhy0LrfN/zyoSk2rXX+aMgvAOajHscoG+jR+apGum8tHkw4pCucRYeQZ qDkQ== X-Gm-Message-State: AOAM532YBeWGg+KYtsNdG3fRcLEqPgPMRVd5JTbPLOW1yrwe8+F4JTLD I+f6M3otxEj1BO2EG2fv+95wSd0+8vAr7m4bfeM= X-Google-Smtp-Source: ABdhPJzDm25MtuH2GbAs99twbL5daWRepAQHsO+ebIv6GzYiIWJYAYN9HNpoNbdXm1xkQvkTLPbnkeK42P8t4ObvYLg= X-Received: by 2002:a1c:4d15:: with SMTP id o21mr2509027wmh.171.1639615835132; Wed, 15 Dec 2021 16:50:35 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: John Kitchin Date: Wed, 15 Dec 2021 19:50:23 -0500 Message-ID: Subject: Re: org-cite and export to ODT To: =?UTF-8?B?WGlhbndlbiBDaGVuICjpmYjotKTmlocp?= Content-Type: multipart/alternative; boundary="0000000000006bd5a405d338cff2" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::333 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=johnrkitchin@gmail.com; helo=mail-wm1-x333.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Org-mode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639615888; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Z010S3sT1/SrFRNxxiR5S24atcrV70kjoGq0pSqPVuM=; b=T88OkNJKclfX7bPDN8pMEHzqZuCM9wmDNmQ6bhGy+J9v2nNbHCWe87R+LYCbBUJBd4MZLm wpHYE3MRR9W4TqJNgg5N6Rp5MyAVYVdldBUmX2S45Ap548hwVUMfaUS8V8t8O/LDsR6Ena PnGgt+upajkZH03kvQ0NR0kc+c8MN6/fLhDDZmf80srXsrH0LXPKnRGPxfMn1/2ECh/qzR 1BpGTP+zma0/IlnmCR1ph+6M+EcrQaL0/ILmwtudQ5zcHWlDaCWcQ9ZpQsTusJkOHVyofH qaQnO+W2ZD9bx39JRKW5F5PSSqcHmXYzOHD3A67UXrgfjOWx+9zWmZv2WxwLmQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639615888; a=rsa-sha256; cv=none; b=aF6L7HSi9aj/vobLiLQ8AexGbZ8CZgd46ZJtDdMU4z/B17ulIdbRhCxng0yH+gZxQI+2eU wiToy6l06TKzqX6FSOxxToUoyD4OKI4TXPro6Pke4MESeoU8BpLaijWLqmtBaoGq0uER9m tQxtEpuishEWUXwNG/mgUli6YLh1oYJCrrKiVxcTtxzqHsHPFCz/gphrfmeWLDW90W/niQ zfp9Mfjd32xY2TEAuOfSAyHvoMebDe3ROc/jmsT0/Uf0NZBjgpXM9pk83HNFN9tOR76lo2 Prsz72C/BCYoOmbX52wPfjqtkqhFiCHf5WV1QnQASNoE24djv36VW+FKiCm9Iw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=andrew.cmu.edu header.s=google-2021 header.b=JvODCbU8; dmarc=pass (policy=none) header.from=andrew.cmu.edu; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -9.19 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=andrew.cmu.edu header.s=google-2021 header.b=JvODCbU8; dmarc=pass (policy=none) header.from=andrew.cmu.edu; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6E95E1653A X-Spam-Score: -9.19 X-Migadu-Scanner: scn0.migadu.com X-TUID: BMtuX3blCTDe --0000000000006bd5a405d338cff2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable you are still not getting the directions. You don't export with C-c Ce oo here. You run that src block by putting your cursor in it and typing C-c C-c to run it. For org-ref, you have to use a preprocessing hook to replace the cite links with the csl derived links before the export is done. That is what the src block does. It temporarily defines org-export-before-parsing-hook to run those three hook functions before making an odt file. Alternatively you can do C-c C-e ro which will use the org-ref exporter that at least runs the org-ref csl preprocessor. John ----------------------------------- Professor John Kitchin (he/him/his) Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Wed, Dec 15, 2021 at 6:58 PM Xianwen Chen (=E9=99=88=E8=B4=A4=E6=96=87) = wrote: > Thank you John. I'm not sure why it does not work. Below is the minimal > example I created, using your example. I ran C-e o o to export to ODT. Th= e > resulted ODT file didn't have the reference. > > #+title: A basic example of org-ref for csl export > #+options: toc:nil > #+csl-style: apa-5th-edition.csl > #+csl-locale: en-US > > * Bibliography > > bibliography:~/data/library/bibliography/biblatex/biblatex.bib > > cite:bayulken-et-al-2020-nbs-climate_change-pandemics > > * build :noexport: > > #+BEGIN_SRC emacs-lisp :results silent > (let ((org-export-before-parsing-hook '(org-ref-cite-natmove ;; do this > first > org-ref-csl-preprocess-buffer > org-ref-refproc))) > (org-open-file (org-odt-export-to-odt) 'system)) > #+END_SRC > > > On Wed, Dec 15, 2021 at 10:16 PM John Kitchin > wrote: > >> That code does not belong in your .emacs file. It should be in an >> emacs-lisp block in your org-file like it is in the example. You should = run >> it from the org file. >> >> >> >> >> John >> >> ----------------------------------- >> Professor John Kitchin (he/him/his) >> Doherty Hall A207F >> Department of Chemical Engineering >> Carnegie Mellon University >> Pittsburgh, PA 15213 >> 412-268-7803 >> @johnkitchin >> http://kitchingroup.cheme.cmu.edu >> >> >> >> On Wed, Dec 15, 2021 at 5:12 PM Xianwen Chen (=E9=99=88=E8=B4=A4=E6=96= =87) < >> xianwen.chen@gmail.com> wrote: >> >>> Thank you all for the responses. I have to upgrade from orgmode 9.4.4 t= o >>> 9.5 first, to try out org-cite. >>> >>> I tried >>> https://github.com/jkitchin/org-ref/blob/master/examples/basic-csl.org#= opendocument. >>> I added the following codes to my .emacs: >>> >>> (let ((org-export-before-parsing-hook '(org-ref-cite-natmove ;; do this >>> first >>> org-ref-csl-preprocess-buffer >>> org-ref-refproc))) >>> (org-open-file (org-odt-export-to-odt) 'system)) >>> >>> I tried to eval-region, after selecting these codes. I got the complain >>> that org-ref-cite-natmove's function definition is void. >>> >>> Do I need to install or require something other than cite-ref? >>> >>> Xianwen >>> >>> On Thu, Dec 9, 2021 at 2:57 PM John Kitchin >>> wrote: >>> >>>> If you are trying to use org-ref for this see >>>> https://www.youtube.com/watch?v=3DrRR-5NSpKyE and this example: >>>> https://github.com/jkitchin/org-ref/blob/master/examples/basic-csl.org= #opendocument. >>>> You need to use a preprocessing hook (org-ref-csl-preprocess-buffer) w= ith >>>> org-ref to get the citations and bibliography . >>>> John >>>> >>>> ----------------------------------- >>>> Professor John Kitchin (he/him/his) >>>> Doherty Hall A207F >>>> Department of Chemical Engineering >>>> Carnegie Mellon University >>>> Pittsburgh, PA 15213 >>>> 412-268-7803 >>>> @johnkitchin >>>> http://kitchingroup.cheme.cmu.edu >>>> >>>> >>>> >>>> On Thu, Dec 9, 2021 at 4:54 AM Xianwen Chen (=E9=99=88=E8=B4=A4=E6=96= =87) < >>>> xianwen.chen@gmail.com> wrote: >>>> >>>>> I have been using org-ref and biblatex. They export well to PDF, >>>>> through LaTeX. I am able to export to ODT as well. However, I'm not a= ble to >>>>> have the bibliography or the references in the produced ODT. >>>>> >>>>> I searched online and found this tutorial: >>>>> https://kjambunathan.github.io/org-mode-ox-odt/Bibliography-and-Citat= ions-in-ODT-export.html. >>>>> However, when following through the tutorial, I wasn't able to find >>>>> ox-jabref. >>>>> >>>>> Thinking about the new org-cite, which is orgmode's native citation >>>>> solution, I'm wondering if it would be easier to use org-cite within >>>>> orgmode and export to ODT? A small example with configuration suggest= ion >>>>> will be highly appreciated! >>>>> >>>>> Xianwen >>>>> >>>> --0000000000006bd5a405d338cff2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
you are still not getting the directions. You don't ex= port with C-c Ce oo here. You run that src block by putting your cursor in = it and typing C-c C-c to run it.

For org-ref, you have t= o use a preprocessing hook to replace the cite links with the csl derived l= inks before the export is done. That is what the src block does. It tempora= rily defines org-export-before-parsing-hook to run those three hook functio= ns before making an odt file.

Alternatively you can = do C-c C-e ro which will use the org-ref exporter that at least runs the=C2= =A0 org-ref csl preprocessor.

John

--------------------------------= ---
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Departm= ent of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA= 15213
412-268-7803

On Wed, D= ec 15, 2021 at 6:58 PM Xianwen Chen (=E9=99=88=E8=B4=A4=E6=96=87) <xianwen.chen@gmail.com> wrote:<= br>
Thank you John. I'm not= sure why it does not work. Below is the minimal example I created, using y= our example. I ran C-e o o to export to ODT. The resulted ODT file didn'= ;t have the reference.

#+title: A bas= ic example of org-ref for csl export
#+options: toc:nil
#+csl-style: = apa-5th-edition.csl
#+csl-locale: en-US

* Bibliography

bib= liography:~/data/library/bibliography/biblatex/biblatex.bib
=C2=A0
ci= te:bayulken-et-al-2020-nbs-climate_change-pandemics

* build :noexpor= t:
=C2=A0
#+BEGIN_SRC emacs-lisp :results silent
(let ((org-expor= t-before-parsing-hook '(org-ref-cite-natmove ;; do this first
o= rg-ref-csl-preprocess-buffer
org-ref-refproc)))
=C2=A0 (org-open= -file (org-odt-export-to-odt) 'system))
#+END_SRC


On Wed, Dec 15, 2021 at 10:16 P= M John Kitchin <jkitchin@andrew.cmu.edu> wrote:
T= hat code does not belong in your .emacs file. It should be in an emacs-lisp= block in your org-file like it is in the example. You should run it from t= he org file.




John

---------------------= --------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F=
Department of Chemical Engineering
Carnegie Mellon University
Pit= tsburgh, PA 15213
412-268-7803


On Wed, Dec 15, 2021 at 5:12 PM Xianwen Chen (=E9=99=88=E8=B4=A4=E6=96=87= ) <xianwen.c= hen@gmail.com> wrote:

I tried <= a href=3D"https://github.com/jkitchin/org-ref/blob/master/examples/basic-cs= l.org#opendocument" target=3D"_blank">https://github.com/jkitchin/org-ref/b= lob/master/examples/basic-csl.org#opendocument. I added the following c= odes to my .emacs:
=
(let ((org-export-= before-parsing-hook '(org-ref-cite-natmove ;; do this first
org= -ref-csl-preprocess-buffer
org-ref-refproc)))
=C2=A0 (org-open-f= ile (org-odt-export-to-odt) 'system))

I tried to eval-region, after selecting these codes. I got the complain th= at org-ref-cite-natmove's function definition is void.

Do I need to install or require something other than cit= e-ref?

Xianwen

On Thu, Dec 9, 2= 021 at 2:57 PM John Kitchin <jkitchin@andrew.cmu.edu> wrote:
If you are trying= to use org-ref for this see=C2=A0https://www.youtube.com/watch?v=3DrRR-5N= SpKyE and this example:=C2=A0htt= ps://github.com/jkitchin/org-ref/blob/master/examples/basic-csl.org#opendoc= ument. You need to use a preprocessing hook (org-ref-csl-preprocess-buf= fer)=C2=A0with org-ref to get the citations and bibliography .
John

---------------= --------------------
Professor John Kitchin (he/him/his)
Doherty Hall= A207F
Department of Chemical Engineering
Carnegie Mellon University<= br>Pittsburgh, PA 15213
412-268-7803


On T= hu, Dec 9, 2021 at 4:54 AM Xianwen Chen (=E9=99=88=E8=B4=A4=E6=96=87) <<= a href=3D"mailto:xianwen.chen@gmail.com" target=3D"_blank">xianwen.chen@gma= il.com> wrote:
I hav= e been using org-ref and biblatex. They export well to PDF, through LaTeX. = I am able to export to ODT as well. However, I'm not able to have the b= ibliography or the references in the produced ODT.

I searched online and found this tutorial: https://kjambunathan.github.io/org-mode-ox-odt/Bi= bliography-and-Citations-in-ODT-export.html. However, when following th= rough the tutorial, I wasn't able to find ox-jabref.

Thinking about the new org-cite, which is orgmode's nat= ive citation solution, I'm wondering if it would be easier to use org-c= ite within orgmode and export to ODT? A small example with configuration su= ggestion will be highly appreciated!

Xian= wen
--0000000000006bd5a405d338cff2--