Hi everyone, A while ago I asked on this list about connecting org-mode with ebib, which is a bibtex database manager for emacs. Thanks to Joost Kremers, there is now a solution. I asked the developer of ebib, Joost Kremers, if he could write a function that would start ebib on a given bibtex entry. He kindly added this functionality to the 'ebib' function (which starts ebib in emacs) and it is now available in the ebib git repository (see http://ebib.sourceforge.net). If you are using ebib and would like to get org-mode to open bibtex entries do the following: 1) Install the latest development version of ebib. 2) make sure ebib-preload-bib-files is set properly so that your .bib file is loaded by ebib when ebib starts 3) add the following lines to your .emacs: (org-add-link-type "ebib" 'ebib) Now you can insert ebib links in your documents like this: [[ebib:Jones1998][some paper title]]. Opening this link should now result in ebib starting, loading your default bibtex database, and highlighting the bibtex entry Jones1998. Alternatively, if you already have started ebib, then opening the link will get you to the bibtex entry in your opened ebib database. /Ali Tofigh
On Dec 10, 2010, at 7:19 AM, Ali Tofigh wrote: > Hi everyone, > > A while ago I asked on this list about connecting org-mode with ebib, > which is a bibtex database manager for emacs. Thanks to Joost Kremers, > there is now a solution. > > I asked the developer of ebib, Joost Kremers, if he could write a > function that would start ebib on a given bibtex entry. He kindly > added this functionality to the 'ebib' function (which starts ebib in > emacs) and it is now available in the ebib git repository (see > http://ebib.sourceforge.net). If you are using ebib and would like to > get org-mode to open bibtex entries do the following: > > 1) Install the latest development version of ebib. > > 2) make sure ebib-preload-bib-files is set properly so that your .bib > file is loaded by ebib when ebib starts > > 3) add the following lines to your .emacs: > (org-add-link-type "ebib" 'ebib) > > Now you can insert ebib links in your documents like this: > [[ebib:Jones1998][some paper title]]. Opening this link should now > result in ebib starting, loading your default bibtex database, and > highlighting the bibtex entry Jones1998. Alternatively, if you already > have started ebib, then opening the link will get you to the bibtex > entry in your opened ebib database. > > /Ali Tofigh > Aloha /Ali Tofigh, Thanks very much for this. It is a nice addition to Org-mode. Now it is also possible to add link types for LaTeX citation macros, as the following link type for one of the natbib citation macros: (org-add-link-type "citep" 'ebib (lambda (path desc format) (cond ((eq format 'latex) (format "\\citep[%s]{%s}" desc path))))) A link like [[citep:jones][35]] will export this to LaTeX: \citep[35]{jones} And of course the link will jump to the bibtex entry with a single click. Thanks again for making this happen. All the best, Tom > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
"Thomas S. Dye" <tsd@tsdye.com> writes:
> On Dec 10, 2010, at 7:19 AM, Ali Tofigh wrote:
>
>> Hi everyone,
>>
>> A while ago I asked on this list about connecting org-mode with ebib,
>> which is a bibtex database manager for emacs. Thanks to Joost Kremers,
>> there is now a solution.
>>
>> I asked the developer of ebib, Joost Kremers, if he could write a
>> function that would start ebib on a given bibtex entry. He kindly
>> added this functionality to the 'ebib' function (which starts ebib in
>> emacs) and it is now available in the ebib git repository (see
>> http://ebib.sourceforge.net). If you are using ebib and would like to
>> get org-mode to open bibtex entries do the following:
>>
>> 1) Install the latest development version of ebib.
>>
>> 2) make sure ebib-preload-bib-files is set properly so that your .bib
>> file is loaded by ebib when ebib starts
>>
>> 3) add the following lines to your .emacs:
>> (org-add-link-type "ebib" 'ebib)
>>
>> Now you can insert ebib links in your documents like this:
>> [[ebib:Jones1998][some paper title]]. Opening this link should now
>> result in ebib starting, loading your default bibtex database, and
>> highlighting the bibtex entry Jones1998. Alternatively, if you already
>> have started ebib, then opening the link will get you to the bibtex
>> entry in your opened ebib database.
>>
>> /Ali Tofigh
>>
> Aloha /Ali Tofigh,
>
> Thanks very much for this. It is a nice addition to Org-mode.
>
> Now it is also possible to add link types for LaTeX citation macros,
> as the following link type for one of the natbib citation macros:
>
> (org-add-link-type
> "citep" 'ebib
> (lambda (path desc format)
> (cond
> ((eq format 'latex)
> (format "\\citep[%s]{%s}" desc path)))))
>
> A link like [[citep:jones][35]] will export this to LaTeX:
> \citep[35]{jones}
Ali & Tom,
thanks for this. This is brilliant. I have modified (well, copied and
created an alternative) the last snippet to
--8<---------------cut here---------------start------------->8---
(org-add-link-type
"cite" 'ebib
(lambda (path desc format)
(cond
((eq format 'latex)
(format "\\cite{%s}" path)))))
--8<---------------cut here---------------end--------------->8---
as I tend to use =cite= much more than =citep=. This works like a charm
although I must admit that citep with the description is prettier in an
org context! In any case, no more \cite's in my org files and the link
to ebib is ever so useful.
Thanks again,
eric
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.4 (release_7.4.10.g93135f)
Hi all. There was a discussion about integration of ebib and org mode. And it is possible to open ebib on selected link like this [[citep:jones1999][35]] . But I cannot manage to insert such link from ebib into org-mode. Have anybody made a function for it? Thanks. Petro.
Piter_ <x.piter@gmail.com> writes: > Hi all. > There was a discussion about integration of ebib and org mode. And it > is possible to open ebib on selected link like this > [[citep:jones1999][35]] . > But I cannot manage to insert such link from ebib into org-mode. > Have anybody made a function for it? > Thanks. > Petro. > > Aloha Petro, Here's how I insert those links (perhaps someone else has a better way): [[citep: (type this in the org-mode buffer) M-x ebib (find desired reference in ebib buffer) P Ret Ret Z (push the reference to the default buffer without using one of the ebib format functions, then submerge ebib) ][XX]] (close the link, optionally adding a page number) hth, Tom -- Thomas S. Dye http://www.tsdye.com
I use Reftex for inserting -- from the .bib file, not from ebib -- thanks to the setup tips here: http://article.gmane.org/gmane.emacs.orgmode/2406/match=bibliography http://www.mfasold.net/blog/2009/02/using-emacs-org-mode-to-draft-papers/ Yours, Christian On 5/10/11 6:15 PM, Thomas S. Dye wrote: > Piter_<x.piter@gmail.com> writes: > >> Hi all. >> There was a discussion about integration of ebib and org mode. And it >> is possible to open ebib on selected link like this >> [[citep:jones1999][35]] . >> But I cannot manage to insert such link from ebib into org-mode. >> Have anybody made a function for it? >> Thanks. >> Petro. >> >> > > Aloha Petro, > > Here's how I insert those links (perhaps someone else has a better way): > > [[citep: (type this in the org-mode buffer) > > M-x ebib (find desired reference in ebib buffer) > > P Ret Ret Z (push the reference to the default buffer without using one > of the ebib format functions, then submerge ebib) > > ][XX]] (close the link, optionally adding a page number) > > hth, > Tom >
Christian Moe <mail@christianmoe.com> writes:
> I use Reftex for inserting -- from the .bib file, not from ebib --
> thanks to the setup tips here:
>
> http://article.gmane.org/gmane.emacs.orgmode/2406/match=bibliography
>
> http://www.mfasold.net/blog/2009/02/using-emacs-org-mode-to-draft-papers/
I agree, reftex is very nice and Org will understand the
citations just fine.
Here is my setup, which might be (read `probably is') stolen from
somewhere:
,----[ Reftex ]
| It is nice to be able to access reftex to insert citations
|
| #+begin_src emacs-lisp
|
| (defun org-mode-reftex-setup ()
| (load-library "reftex")
| (and (buffer-file-name)
| (file-exists-p (buffer-file-name))
| (reftex-parse-all))
| (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
| (add-hook 'org-mode-hook 'org-mode-reftex-setup)
|
| #+end_src
`----
–Rasmus
--
Sent from my Emacs
Aloha Christian, I like RefTeX, too, when I'm using AucTeX, but I've found it has a few annoying habits in the Org-mode environment. Can I ask how you deal with these? How do you pass the master file name to RefTeX? Do you let RefTeX parse all your Org-mode buffers? If not, how do you direct it to the buffers you want parsed? All the best, Tom Christian Moe <mail@christianmoe.com> writes: > I use Reftex for inserting -- from the .bib file, not from ebib -- > thanks to the setup tips here: > > http://article.gmane.org/gmane.emacs.orgmode/2406/match=bibliography > > http://www.mfasold.net/blog/2009/02/using-emacs-org-mode-to-draft-papers/ > > Yours, > Christian > > > On 5/10/11 6:15 PM, Thomas S. Dye wrote: >> Piter_<x.piter@gmail.com> writes: >> >>> Hi all. >>> There was a discussion about integration of ebib and org mode. And it >>> is possible to open ebib on selected link like this >>> [[citep:jones1999][35]] . >>> But I cannot manage to insert such link from ebib into org-mode. >>> Have anybody made a function for it? >>> Thanks. >>> Petro. >>> >>> >> >> Aloha Petro, >> >> Here's how I insert those links (perhaps someone else has a better way): >> >> [[citep: (type this in the org-mode buffer) >> >> M-x ebib (find desired reference in ebib buffer) >> >> P Ret Ret Z (push the reference to the default buffer without using one >> of the ebib format functions, then submerge ebib) >> >> ][XX]] (close the link, optionally adding a page number) >> >> hth, >> Tom >> > > > -- Thomas S. Dye http://www.tsdye.com
On 5/15/11 8:02 AM, Thomas S. Dye wrote: > Aloha Christian, > > I like RefTeX, too, when I'm using AucTeX, but I've found it has a few > annoying habits in the Org-mode environment. Can I ask how you deal > with these? Uhm... I probably don't deal with them, and I probably don't even know what I'm missing, since I don't have much of a LaTeX background. I have used Reftex solely for inserting citations. I'll be watching with interest to see if others can answer your questions, though. > How do you pass the master file name to RefTeX? If I understand your question, the issue hasn't come up, so I don't know. The longest thing I've authored in Org so far was a 40-odd-page report, without co-authors, so I haven't had any need yet to manage master files and included files. > Do you let RefTeX parse all your Org-mode buffers? Yes, via org-mode-hook. For my uses, the overhead is negligible. So I haven't looked at how to do this selectively. Yours, Christian