From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id AEwiFESbMmDfWQAA0tVLHw (envelope-from ) for ; Sun, 21 Feb 2021 17:41:24 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id pKrvD0SbMmCbbAAA1q6Kng (envelope-from ) for ; Sun, 21 Feb 2021 17:41:24 +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 DFEC9CFD5 for ; Sun, 21 Feb 2021 18:41:22 +0100 (CET) Received: from localhost ([::1]:52632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDsjS-0004dz-4b for larch@yhetil.org; Sun, 21 Feb 2021 12:41:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDsiz-0004dM-EW for emacs-orgmode@gnu.org; Sun, 21 Feb 2021 12:40:54 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:39640) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lDsiw-0002br-Nz for emacs-orgmode@gnu.org; Sun, 21 Feb 2021 12:40:53 -0500 Received: by mail-wr1-x42b.google.com with SMTP id v1so16677351wrd.6 for ; Sun, 21 Feb 2021 09:40:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew-cmu-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YseY/1E17snooLSN0OKad7gkAbMINi6N7Fpmuf9sppw=; b=e6dYjXOpdGwYj6c7Mvkny5vyUFUFZIiNckCbfhjdc7cOL/SaQpVN33g98WR46L1sD0 f7hZXozm/BanjW22S32XVUkspzoHI83PuhRBcgAS1NWA4nmeiq/MeG+KuAj1nauJYCcN puPz9lGwSyfeoBHwvYbnedIYVf5ot3tJ+VszzlHM4uJr3jhmhqYDg2MpCVN6dxK15aex 5VynFLLZ2MIUl7OIazpbaBfoEZuJKzBPjL+NBE4usnBt6pOybCO8Z71eYSeqtfqbmeCE zBTVNcu2b0l24HOl8ZPw8E5PDTpiQKyO3xBSYc3QZwSKY8qt9T194hXyPLZsBDy9b/nm L9UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YseY/1E17snooLSN0OKad7gkAbMINi6N7Fpmuf9sppw=; b=S9xkIeiLZMq6+wKBEuNS0j9caiKZZHjzQMSlm0PUfi6UEglHXiagbLGyz2GSnoAwPE FKD8IrcWtAcYvO5T8tCn3D8NRhxpAIf4q4SNPlznDGm0D+EjIHEETyAzi7yLuWtkSR20 doyxEZ19bsnc7gPFdq2kOvVUmBmkCvLxZ9gTmxG1gVZ46ZMMyw/UtK1a/dsgOrDYUaOo lfT+S4akTFajGmdLGhZoxCdGgeKs2HYkPecAGJAqYaguw9c+iPy76fJK7v8qDCq4NI+I +vBcSAqfd7QWrQIKDgeurX4qZuqEvPL0ZP8ky+uQZM2wXz+DpA2+A1+0D3ufO2m09AzU Q5kw== X-Gm-Message-State: AOAM531yHCx47T5Qd8y6Ck7J61rthlrLxxomV+i5wN/sQy8o1DfcBFOr N6tIeacr7bDE+2WHk9lXRw0eaW5eQu1dEpRG9rk= X-Google-Smtp-Source: ABdhPJyIGOhpTBhtMndc2ev1mZid+Wtt8sYnhYuzy9kEsegI+WwYi3/26i9L/62FsXau5OoKugKort/kUtBO4NU4fyA= X-Received: by 2002:a5d:4bce:: with SMTP id l14mr18085065wrt.256.1613929249076; Sun, 21 Feb 2021 09:40:49 -0800 (PST) MIME-Version: 1.0 References: <20A38590-C6E7-4661-8163-078130522DA2@ms2.digital> In-Reply-To: From: John Kitchin Date: Sun, 21 Feb 2021 12:40:38 -0500 Message-ID: Subject: Re: Citations with page numbers using helm-bibtex and org-ref To: Adam Sneller Content-Type: multipart/alternative; boundary="00000000000095786c05bbdc2f41" Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=johnrkitchin@gmail.com; helo=mail-wr1-x42b.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-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, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "emacs-orgmode@gnu.org" , Bruce D'Arcus Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.27 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=andrew-cmu-edu.20150623.gappssmtp.com header.s=20150623 header.b=e6dYjXOp; dmarc=fail reason="SPF not aligned (relaxed)" header.from=andrew.cmu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: DFEC9CFD5 X-Spam-Score: -1.27 X-Migadu-Scanner: scn1.migadu.com X-TUID: XpGfR/hMjdsz --00000000000095786c05bbdc2f41 Content-Type: text/plain; charset="UTF-8" It seems like some ideas are getting mixed up in your description. A cite link in org-ref is related to a bibtex entry in a bibtex file, not to an org heading in an org-file. In other words in your example, I would expecta bibtex entry with the key bradley1973es to exist in one of the default bibliography files you use (or in the one you define in a bibliography link). The notes are just for your purposes. the headings/links in your notes file will not show up in any completion backend in org-ref for citation selection, as only the bibtex entries are used to construct those. If you are looking for a way to select one of those headings from your notes, and then insert the appropriate link, you would have to use something different than org-ref. there is not presently a way to map an annotated cite link to the specific note. I am not even sure you can write a function that does that, as the functions only take a key for looking up the note file, and not the description too. It certainly is possible to write a new function that would work on the link at point to do that, and to call it interactively, or add it as an action though. You would still get the key to open the note file, and then use the link description if it exists to somehow search forward for the relevant heading or text, failing gracefully if you, for example, make a cite to a page you did not make a note on. When it comes time to authoring a paper, I think the workflow is you would have to open the notes you made, find the section you want to use in your paper, and copy the link you put in your notes to your new document. There are some variations you might consider, but none of them would really be integrated into the org-ref completion mechanisms that are generated from the bibtex entries. For example you might store the link or parts in a property like this: * The Accelerator-Multiplier Model :PROPERTIES: :key: bradley1973es :page: p200 :cite: [[cite:bradley1973es][p200]] :END: and then write a small function you use interactively to copy it, e.g. #+BEGIN_SRC emacs-lisp (defun get-link () (interactive) (kill-new (org-entry-get (point) "cite"))) #+END_SRC and you might bind that to a key if you use it a lot. Alternatively you might put the key in file-level property, and only store the page, and use property inheritance, to build the link. There are a lot of options to choose from. But, simply copying and pasting a link might also be the simplest. It might be possible to use the org-store/insert-link machinery for this too, but I have found that to be trickier than I thought it should be in the past. John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Sun, Feb 21, 2021 at 12:13 PM Adam Sneller wrote: > Hi Bruce/John, > > Thanks for getting back to me. So I guess your notes file would look > something like this? > > > #+TITLE: Bradley, J. (1973): Essential Mathematics For Economists > > * Dynamic models: the consumption function > [[cite:bradley1973es][p164]] > > * Changes in Capital Stock > [[cite:bradley1973es][p188]] > > * The Accelerator-Multiplier Model > [[cite:bradley1973es][p200]] > > > So when when it comes time to author your paper, if you run org-store-link > on any of these, the description gets stripped off the link, so that only > cite:bradley1973es is stored (which obviously defeats the purpose). And if > you copy the link over by hand, it maps back to the document > bradley197es.org (not the actual note). > > Am I missing anything? > > Adam > > On 21 Feb 2021, at 12:21, Bruce D'Arcus wrote: > > On Sat, Feb 20, 2021 at 10:31 PM Adam Sneller > wrote: > > I currently use org-ref and helm-bibtex to manage my database of academic > sources, with one notes file per source. A lot of my sources are books. So > note typically grow over time, as I add multiple headers (each pertaining > to a chapter or topic/note taken from that source). > > But now I want to produce a citation that references the page numbers > where I captured that note... > > What is the recommended way to handle this? Are you breaking notes into > individual files, each with their own @inbook citation? > > > Generally speaking, referencing page numbers and sections of a cited > source is not handled by dedicated citations, but rather by > annotations on the containing citation (book etc.). > > So in the pandoc syntax, for example, [@book, p23]. > > I do the same with notes, and just included the specific citation with > the note if I need to maintain the specific source page. > > Bruce > > > --00000000000095786c05bbdc2f41 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It seems like some ideas are getting mixed up in your desc= ription. A cite link in org-ref is related to a bibtex entry in a bibtex fi= le, not to an org heading in an org-file. In other words in your example, I= would expecta bibtex entry with the key bradley1973es to exist in one of t= he default bibliography files you use (or in the one you define in a biblio= graphy link). The notes are just for your purposes.

the headings/lin= ks in your notes file will not show up in any completion backend in org-ref= for citation selection, as only the bibtex entries are used to construct t= hose.

=C2=A0If you are looking for a way to select one of those hea= dings from your notes, and then insert the appropriate link, you would have= to use something different than org-ref. there is not presently a way to m= ap an annotated cite link to the specific note. I am not even sure you can = write a function that does that, as the functions only take a key for looki= ng up the note file, and not the description too. It certainly is possible = to write a new function that would work on the link at point to do that, an= d to call it interactively, or add it as an action though. You would still = get the key to open the note file, and then use the link description if it = exists to somehow search forward for the relevant heading or text, failing = gracefully if you, for example, make a cite to a page you did not make a no= te on.=C2=A0

When it comes time to authoring a pape= r, I think the workflow is you would have to open the notes you made, find = the section you want to use in your paper, and copy the link you put in you= r notes to your new document. There are some variations you might consider,= but none of them would really be integrated into the org-ref completion me= chanisms that are generated from the bibtex entries.

For example you=C2=A0 might store the link or parts in a property like t= his:

* The Accelerator-Multiplier Model
=C2=A0 = :PROPERTIES:
=C2=A0 :key: =C2=A0 =C2=A0 =C2=A0bradley1973es
=C2=A0 :p= age: =C2=A0 =C2=A0 p200
=C2=A0 :cite: [[cite:bradley1973es][p200]]
= =C2=A0 :END:


and then write a small f= unction you use interactively to copy it, e.g.

#+B= EGIN_SRC emacs-lisp
(defun get-link ()
=C2=A0 (interactive)
=C2=A0= (kill-new (org-entry-get (point) "cite")))
#+END_SRC

and you might bind that to a key if you use it a lot. = Alternatively you might put the key in file-level property, and only store = the page, and use property inheritance, to build the link. There are a lot = of options to choose from. But, simply copying and pasting a link might als= o be the simplest.

It might be possible to use the= org-store/insert-link machinery for this too, but I have found that to be = trickier than I thought it should be in the past.

John

-------------= ----------------------
Professor John Kitchin=C2=A0
Doherty Hall A207= F
Department of Chemical Engineering
Carnegie Mellon University
Pi= ttsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchi= ngroup.cheme.cmu.edu



On Sun, Feb 21, 2021 at 12:13 PM Adam Sneller <adam@earth2adam.com> wrote:
Hi Bruce/John,

Thanks for getting= back to me. So I guess your notes file would look something like this?


#+TITLE: Bradley, J. (1973): Esse= ntial Mathematics For Economists

* Dynamic models:= the consumption function
[[cite:bradley1973es][p164]]
=
* Changes in Capital Stock
[[cite:bradley1973es][p= 188]]

* The Accelerator-Multiplier Model
[[cite:bradley1973es][p200]]


So when when it comes time to author your paper, if you run org-store-link= on any of these, the description gets stripped off the link, so that only = cite:bradley1973es is stored (which obviously defeats the purpose). And if = you copy the link over by hand, it maps back to the document bradley197es.org (not the actua= l note).

Am I missing anything?

Adam

On 21 Fe= b 2021, at 12:21, Bruce D'Arcus <bdarcus@gmail.com> wrote:

On = Sat, Feb 20, 2021 at 10:31 PM Adam Sneller <adam.sneller@ms2.digital> wrote:
I currently use org-ref and helm-bibtex to = manage my database of academic sources, with one notes file per source. A l= ot of my sources are books. So note typically grow over time, as I add mult= iple headers (each pertaining to a chapter or topic/note taken from that so= urce).

But now I want to produce a citation that references the page= numbers where I captured that note...

What is the recommended way t= o handle this? Are you breaking notes into individual files, each with thei= r own @inbook citation?

Generally speaking, referencing= page numbers and sections of a cited
source is not handled by dedicated= citations, but rather by
annotations on the containing citation (book e= tc.).

So in the pandoc syntax, for example, [@book, p23].

I d= o the same with notes, and just included the specific citation with
the = note if I need to maintain the specific source page.

Bruce


--00000000000095786c05bbdc2f41--