emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* bibtex and babel support
@ 2020-12-16  8:19 Colin Baxter
  2020-12-16  9:46 ` Eric S Fraga
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Baxter @ 2020-12-16  8:19 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I am confused over org-mode's babel support for bibtex, or if indeed
there is support.

I can tangle src blocks

#+begin_src bibtex :tangle file.bib
@BOOK{Key:XX,
     AUTHOR = {},
     TITLE = {},
.....
.....
}
#+end_src

to obtain a bibtex formatted file file.bib. I find this very useful in
making annotated book catalogues. However, tangling bibtex src blocks
works without an explicit (bibtex . t). Indeed if I do insert such a
line in my emacs init file, I get an error with "(require ob-bibtex) not
found". I assume therefore there no ob-bibtex file - an Index topic
search in org-mode info for "ob-bibtex" produces no results.

Although the tangle of bibtex src blocks works well, the block itself
often seem to have fontlock issues and sometimes it seems not to accept
the standard bibtex comment, which begins with @ followed by a space and
then text.

I am using org-9.4.2.

Thanks

Colin Baxter.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bibtex and babel support
  2020-12-16  8:19 bibtex and babel support Colin Baxter
@ 2020-12-16  9:46 ` Eric S Fraga
  2020-12-16 11:59   ` Colin Baxter
  0 siblings, 1 reply; 3+ messages in thread
From: Eric S Fraga @ 2020-12-16  9:46 UTC (permalink / raw)
  To: Colin Baxter; +Cc: emacs-orgmode

On Wednesday, 16 Dec 2020 at 08:19, Colin Baxter wrote:
> However, tangling bibtex src blocks works without an explicit (bibtex
> . t).

Good.  As it should.

> Indeed if I do insert such a line in my emacs init file, I get
> an error with "(require ob-bibtex) not found". 

But there is no need for such a line as bibtex src blocks cannot be
evaluated.  org babel makes no sense in this case.

> Although the tangle of bibtex src blocks works well, the block itself
> often seem to have fontlock issues and sometimes it seems not to accept
> the standard bibtex comment, which begins with @ followed by a space and
> then text.

This will be a bibtex-mode issue, not an org issue?  Does it font lock
correctly if you edit the src block in bibtex mode?

Just to say that I use bibtex src blocks a lot but I also use the
functionality found in ol-bibtex.el for creating bib files from org
properties.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.2-143-gc822c8


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bibtex and babel support
  2020-12-16  9:46 ` Eric S Fraga
@ 2020-12-16 11:59   ` Colin Baxter
  0 siblings, 0 replies; 3+ messages in thread
From: Colin Baxter @ 2020-12-16 11:59 UTC (permalink / raw)
  To: emacs-orgmode

Dear Eric,

Thanks for the reply.

>>>>> Eric S Fraga <e.fraga@ucl.ac.uk> writes:

    > On Wednesday, 16 Dec 2020 at 08:19, Colin Baxter wrote:
    >> However, tangling bibtex src blocks works without an explicit
    >> (bibtex . t).

    > Good.  As it should.

    >> Indeed if I do insert such a line in my emacs init file, I get an
    >> error with "(require ob-bibtex) not found".

    > But there is no need for such a line as bibtex src blocks cannot
    > be evaluated.  org babel makes no sense in this case.

Yes, I thought that at the time. I think I was thrown by the initial
error message, which prompted me to think that a file called
"ob-bibtex.el" existed or had existed, and this would add some sort of
functionality that I had yet to understand.

    >> Although the tangle of bibtex src blocks works well, the block
    >> itself often seem to have fontlock issues and sometimes it seems
    >> not to accept the standard bibtex comment, which begins with @
    >> followed by a space and then text.

    > This will be a bibtex-mode issue, not an org issue?  Does it font
    > lock correctly if you edit the src block in bibtex mode?

This turns out to be a red herring. I find I can edit the source blocks
and insert appropriate comment lines using C-c '. I forgot about this
and was editing the source blocks directly in the org file.😱

    > Just to say that I use bibtex src blocks a lot but I also use the
    > functionality found in ol-bibtex.el for creating bib files from
    > org properties.

Yes ol-bibtex.el is good but doesn't fit my purpose. I use non-standard
bib fields - such as "illustrations", "binding", "condition", etc. -
that are not in available properties of ol-bibtex.el.

Thanks again for your help - I feel I understand things a little better.

Colin.




Colin Baxter
URL: http://www.Colin-Baxter.com
---------------------------------------------------------------------
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
---------------------------------------------------------------------
Since mathematicians have invaded the theory of relativity, I do not
understand it myself. A. Einstein


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-16 12:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16  8:19 bibtex and babel support Colin Baxter
2020-12-16  9:46 ` Eric S Fraga
2020-12-16 11:59   ` Colin Baxter

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).