Re: Citations with page numbers using helm-bibtex and org-ref

2021-02-21 Thread Adam Sneller
Thanks John!

I think you have just given me my next homework assignment for "Adam's list of 
things to noodle around with in eLisp" :)

Adam

> On 21 Feb 2021, at 17:40, John Kitchin  wrote:
>
> 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 

Re: Citations with page numbers using helm-bibtex and org-ref

2021-02-21 Thread John Kitchin
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
>
>
>


Re: Citations with page numbers using helm-bibtex and org-ref

2021-02-21 Thread Adam Sneller
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
>



Re: Citations with page numbers using helm-bibtex and org-ref

2021-02-21 Thread John Kitchin
In org-ref you also handle this by annotations of the cite links, e.g.
[[cite:book-key][p23]] and then bibtex or biblatex does the formatting.

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 7:22 AM 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
>
>


Re: Citations with page numbers using helm-bibtex and org-ref

2021-02-21 Thread Bruce D'Arcus
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



Citations with page numbers using helm-bibtex and org-ref

2021-02-20 Thread Adam Sneller
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? And suppose you are 
capturing a section (not necessarily a chapter title). Are you still using 
@inbook?

Thanks!

Adam Sneller – CCO
MS2 Digital
20 Old Bailey, St Paul's, ​London EC4M 7AN
​adam.sneller@ms2.digital
office: 020 3988 6800
direct: 020 3988 6809
The information in this e-mail and any documents and files transmitted with it 
are confidential and for the use of the intended recipient only. If you are not 
the intended recipient, please delete the message and any attachments 
immediately and notify the sender. Although MS2 Group Limited believes this 
e-mail and any attachments are free of any virus or other defect which may 
affect a computer, it is the responsibility of the recipient to ensure that it 
is virus free and MS2 Group Limited does not accept any responsibility for any 
loss or damage arising from its use. MS2 Group Limited is registered in England 
and Wales, company number 10410414. Registered office: 27 Old Gloucester 
Street, London WC1N 3AX. 'MS2 Digital' is the trading name of MS2 Group Limited.
​
​© 2020 MS2 Group Limited