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 eA/TCbn9umGSBQAAgWs5BA (envelope-from ) for ; Thu, 16 Dec 2021 09:50:01 +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 4NmBBbn9umEuRQAAB5/wlQ (envelope-from ) for ; Thu, 16 Dec 2021 08:50:01 +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 66E451F015 for ; Thu, 16 Dec 2021 09:50:00 +0100 (CET) Received: from localhost ([::1]:46994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxmSc-0005AN-Ma for larch@yhetil.org; Thu, 16 Dec 2021 03:49:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxmRK-00054k-Rd for emacs-orgmode@gnu.org; Thu, 16 Dec 2021 03:48:38 -0500 Received: from [2607:f8b0:4864:20::331] (port=42863 helo=mail-ot1-x331.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxmRF-0003iN-Kn for emacs-orgmode@gnu.org; Thu, 16 Dec 2021 03:48:36 -0500 Received: by mail-ot1-x331.google.com with SMTP id 47-20020a9d0332000000b005798ac20d72so28175032otv.9 for ; Thu, 16 Dec 2021 00:48:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=F2kA+PMkIN1p/hnscM5zod0UBH7rPe99XfSEBeOP4q4=; b=KBXaFQd1wl/87eSWJVTVEHsR+bHZRVF4O/hipHjipLkY7TDsYBU2ma4x9AH7K82Mvf 0dTcL5VxJfbWs6aGuqZy6dR4EMSCx1kV4YMJlr9/s5fgScW8/OqS6ixJTtMnVaf613fw JCanb3Hjtc6olpATk7YQk7Xl3dQDAky0DwjM4ljRCAv/DPBYAzazrpJayOf2XHdzS1el B9PELPskavSfSlSp/jLzx0a8WPfn0zNBbx9LaRGI9l1G7e3N3BuFMwdwjI7WVAIH1mD7 zIFBPOSVEOKx6uW6HktIWgi5XUxsujdsfjsfFDoP8xhGDbVon5yrkRZKDwZtEiF+5mTh SstQ== 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=F2kA+PMkIN1p/hnscM5zod0UBH7rPe99XfSEBeOP4q4=; b=gdJCDkPKi174APtf/mJwPSnZMB4PULgjtXpx0/Fbt9PJ4kThZKKYmC03sm7O/RLlfr gHRRq5ksfITX9G3st89JDM9lyTcBx98JVUVou9c1MA/6GaI6o/7sKCcnN59KQkaISpeg nx4yZ42DtwfeleK7hYO4GpwYli0D8dZzdGM+toWIRfM/UHaxoGuO9xvJlHUflcpe3l/R FLk7GPXbf1XG2RudGNRkfLi0UROSRiOklMCb414p/ZtPokPhj3VDuKrqoDvoqxUIoSxY x5cosokPJLFbpgUmg9BUrWTsL1h7ife4ZptZNzj5keTNKRnepXcBbf+Iq0kAo6zeDCig JqCQ== X-Gm-Message-State: AOAM532dXHhbOXsAEFxDRC8HSdYStgyhJopeRyMEKWrrGe6IA7P/kjLu DTqeVnczVdmYQwmqhcLsw2NJd/jq5qhFPDZ3mJ0= X-Google-Smtp-Source: ABdhPJx0gCX8ahGChEjdmdwHWhkq4yJ36Zz6K7a13Q3WDdIGrS2fK8KWsQrCOi0m84vONzNoQgIyYVyAacjVG6UckH4= X-Received: by 2002:a9d:12f3:: with SMTP id g106mr11862252otg.175.1639644511771; Thu, 16 Dec 2021 00:48:31 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?B?WGlhbndlbiBDaGVuICjpmYjotKTmlocp?= Date: Thu, 16 Dec 2021 08:47:55 +0000 Message-ID: Subject: Re: org-cite and export to ODT To: John Kitchin Content-Type: multipart/alternative; boundary="000000000000ae9e9505d33f7c0b" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::331 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::331; envelope-from=xianwen.chen@gmail.com; helo=mail-ot1-x331.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, 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=1639644600; 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=F2kA+PMkIN1p/hnscM5zod0UBH7rPe99XfSEBeOP4q4=; b=o3VCus7OGXb6JdeswgdReG4Y5nqkMyO0XrN9oTqg3IG78BLlnvF1vO/ORAknywAGjTHEL4 mivfD1LG3XOzvRHBN+06nqTV0zuYUFAz5dApz9HSPdTTp7nSbjNNhp9LNBsNxn6rek/MeB amm7xCZ+kBJQA4pA1ruBy8NGpAybP4lc/rSyaIp1fGR07bshenkr+HZw4GE5ZjZTOcnbur fd+cV/3KHAoMSkNwpShEq1WgsVVHg5t0HbicmMebSkH2SkFMS2UKFcSqfcuKbIpscfpabl yU7y0+LY6wgrMq+uCAElh8XUb6lj2SL+b81QAyEt8HBBlmQ5KnejQ2dvARqmZQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639644600; a=rsa-sha256; cv=none; b=mVVBbOvw12Aa4b/rxYkGBIHDZgKU12irY1pDju6Zh4RGbl7ElyD0Kaw9mllMzgEnPViubQ O0UWi4c2o4UER12bqN8gqiAOiHsUfCBaj9U20JqwwozBQr1yRnV1h1kw/WMUWLaJKvQUr0 Z8EOOLVmDEX0XsrOnE38QavfMDzAD5cllZ1yTHjx3mPiGfVjm5Q/LRjJRL3hl3X0zsINtl AB7mH2Jx4WSrF4wQml/Nu1H1jyx0GQc84nHQ8QSA47GJC1Xos+21qGU4H0uAXvBXL1mXX3 +G5Cy8ekaqJqwlbMLfu1/kA+GI6GVybw3SfSbpBraGXU2TxMWkWbHDLHok+W7Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=KBXaFQd1; dmarc=pass (policy=none) header.from=gmail.com; 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: -5.49 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=KBXaFQd1; dmarc=pass (policy=none) header.from=gmail.com; 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: 66E451F015 X-Spam-Score: -5.49 X-Migadu-Scanner: scn0.migadu.com X-TUID: CdkrCY2Waggv --000000000000ae9e9505d33f7c0b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you John. I tried to C-c C-e. I was reminded that org-ref-cite-natmove's function definition is void. I also don't have functions that start with org-ref-export. I suspect that I didn't load a file or package. Bruce and Andr=C3=A1s, I upgraded org-mode on my system to 9.5. org-cite wo= rks after I added (require 'oc) Your examples work. I also noticed that I didn't need the following line: #+cite_export: csl Xianwen On Thu, Dec 16, 2021 at 12:50 AM John Kitchin wrote: > 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. T= he >> 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 >>>> to 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 thi= s >>>> 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 complai= n >>>> 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.or= g#opendocument. >>>>> You need to use a preprocessing hook (org-ref-csl-preprocess-buffer) = with >>>>> 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 = able 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-Cita= tions-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 sugges= tion >>>>>> will be highly appreciated! >>>>>> >>>>>> Xianwen >>>>>> >>>>> --000000000000ae9e9505d33f7c0b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you John. I tried to C= -c C-e. I was reminded that org-ref-cite-natmove's function definition = is void.

I also don't have functions that start with org-ref-export. I = suspect that I didn't load a file or package.

Bruce and Andr=C3=A1s, I = upgraded org-mode on my system to 9.5. org-cite works after I added

(requir= e 'oc)

Your examples work. I also noticed that I didn't need the fo= llowing line:

=C2=A0#+cite_export: csl
<= br>
Xianwen

On Thu, Dec 16, 202= 1 at 12:50 AM John Kitchin <j= kitchin@andrew.cmu.edu> wrote:
you are still not getting the direct= ions. You don't export with C-c Ce oo here. You run that src block by p= utting your cursor in it and typing C-c C-c to run it.

F= or 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 th= ose three hook functions before making an odt file.

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

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


On Wed, Dec 15, 2021 at 6:58 PM Xianwen Chen = (=E9=99=88=E8=B4=A4=E6=96=87) <xianwen.chen@gmail.com> 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. The resulted ODT file didn't have the refere= nce.

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

* Bibliography

bibliography:~/data/l= ibrary/bibliography/biblatex/biblatex.bib
=C2=A0
cite:bayulken-et-al-= 2020-nbs-climate_change-pandemics

* build :noexport:
=C2=A0
#= +BEGIN_SRC emacs-lisp :results silent
(let ((org-export-before-parsing-h= ook '(org-ref-cite-natmove ;; do this first
org-ref-csl-preproc= ess-buffer
org-ref-refproc)))
=C2=A0 (org-open-file (org-odt-exp= ort-to-odt) 'system))
#+END_SRC


On Wed, Dec 15, 2021 at 10:16 PM John Kitchin <= ;jkitchin@andr= ew.cmu.edu> wrote:
That code does not= belong in your .emacs file. It should be in an emacs-lisp block in your or= g-file like it is in the example. You should run it from the org file.


<= div>

John

-----------------------------------Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of= Chemical Engineering
Carnegie Mellon University
Pittsburgh, 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.chen@gmail.com= > wrote:
Thank you all f= or the responses. I have to upgrade from orgmode 9.4.4 to 9.5 first, to try= out org-cite.


(let ((org-export-before-parsing-ho= ok '(org-ref-cite-natmove ;; do this first
org-ref-csl-preproce= ss-buffer
org-ref-refproc)))
=C2=A0 (org-open-file (org-odt-expo= rt-to-odt) 'system))
I tried to eval-= region, after selecting these codes. I got the complain that org-ref-cite-n= atmove'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 Joh= n Kitchin <= jkitchin@andrew.cmu.edu> wrote:
If you are trying to use org-ref fo= r this see=C2=A0https://www.youtube.com/watch?v=3DrRR-5NSpKyE and this= example:=C2=A0https://github.com/jk= itchin/org-ref/blob/master/examples/basic-csl.org#opendocument. You nee= d to use a preprocessing hook (org-ref-csl-preprocess-buffer)=C2=A0with org= -ref to get the citations and bibliography .
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 Thu, Dec 9, 2021 = at 4:54 AM Xianwen Chen (=E9=99=88=E8=B4=A4=E6=96=87) <xianwen.chen@gmail.com> w= rote:
I have been using o= rg-ref and biblatex. They export well to PDF, through LaTeX. I am able to e= xport to ODT as well. However, I'm not able to have the bibliography or= the references in the produced ODT.

I se= arched online and found this tutorial: https://kjambunathan.github.io/org-mode-ox-odt/Bibliography-and= -Citations-in-ODT-export.html. However, when following through the tuto= rial, I wasn't able to find ox-jabref.

=
Xianwen
<= /div>
--000000000000ae9e9505d33f7c0b--