emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
@ 2009-02-22 12:05 Taru Karttunen
  2009-02-22 14:17 ` Sebastian Rose
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Taru Karttunen @ 2009-02-22 12:05 UTC (permalink / raw)
  To: Org-mode ml

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

Hello

Motivated by the discussion on exporting BibTeX to html
and LaTeX when using org-mode I created an extension that
does this.

The html export uses bibtex2html from
http://www.lri.fr/~filliatr/bibtex2html/ also
packaged in e.g. Debian.

This works by a
#+BIBLIOGRAPHY: bibfilebasename stylename
e.g. given foo.bib and using style plain:
#+BIBLIOGRAPHY: foo plain

For LaTeX export this simply inserts the lines
\bibliographystyle{plain}
\bibliography{foo}
into the tex-file when exporting.

For Html export it:
1) converts all \cite{bar} to links to the bibliography
2) creates a foo.html and foo_bib.html
3) includes the contents of foo.html in the exported html file

Code attached.


- Taru Karttunen

[-- Attachment #2: org-exp-bibtex.el --]
[-- Type: text/plain, Size: 3169 bytes --]

;;; org-exp-bibtex.el --- Export bibtex fragments

;; Copyright (C) 2009 Taru Karttunen

;; Author: Taru Karttunen <taruti@taruti.net >

;; This file is not currently part of GNU Emacs.

;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2, or (at
;; your option) any later version.

;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program ; see the file COPYING.  If not, write to
;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.

;;; Commentary:
;;
;; This is an utility to handle BibTeX export to both LaTeX and html
;; exports. It uses the bibtex2html software from
;; http://www.lri.fr/~filliatr/bibtex2html/
;;
;; The usage is as follows:
;; #+BIBLIOGRAPHY: bibfilebasename stylename
;; e.g. given foo.bib and using style plain:
;; #+BIBLIOGRAPHY: foo plain

;; For LaTeX export this simply inserts the lines
;; \bibliographystyle{plain}
;; \bibliography{foo}
;; into the tex-file when exporting.

;; For Html export it:
;; 1) converts all \cite{foo} to links to the bibliography
;; 2) creates a foo.html and foo_bib.html
;; 3) includes the contents of foo.html in the exported html file


(defun org-export-bibtex-preprocess ()
  "Export all BibTeX."
  (interactive)
  (save-window-excursion
    (setq oebp-cite-plist '())
    ;; Convert #+BIBLIOGRAPHY: name style
    (goto-char (point-min))
    (while (re-search-forward "^#\\+BIBLIOGRAPHY:\\s-+\\(\\w+\\)\\s-+\\(\\w+\\)" nil t)
      (let ((file  (match-string 1))
	    (style (match-string 2)))
	(replace-match
	(cond
	 (htmlp ;; We are exporting to HTML
	  (call-process "bibtex2html" nil nil nil "--nodoc"  "--style" style "--no-header" (concat file ".bib"))
	  (with-temp-buffer
	    (save-match-data
	      (insert-file-contents (concat file ".html"))
	      (goto-char (point-min))
	      (while (re-search-forward "a name=\"\\(\\w+\\)\">\\(\\w+\\)" nil t)
		(setq oebp-cite-plist (cons (cons (match-string 1) (match-string 2)) oebp-cite-plist)))
	      (goto-char (point-min))
	      (while (re-search-forward "<hr>" nil t)
		(replace-match "<hr/>"))
	      (concat "\n#+BEGIN_HTML\n<div class=\"bibliography\">\n" (buffer-string) "\n</div>\n#+END_HTML\n"))))
	 (latexp ;; Latex export
	  (concat "\n#+LATEX: \\\\bibliographystyle{" style "}"
		  "\n#+LATEX: \\\\bibliography{" file "}\n"))))))
    ;; Convert cites to links in html
    (goto-char (point-min))
    (when htmlp
      (while (re-search-forward "\\\\cite{\\(\\w+\\)}" nil t)
	(let* ((cn (match-string 1))
	       (cv (assoc cn oebp-cite-plist)))
	  (replace-match 
	   (concat "\[_{}[[" cn "][" (if cv (cdr cv) cn) "]]\]")))))))


(add-hook 'org-export-preprocess-hook 'org-export-bibtex-preprocess)

(provide 'org-exp-bibtex)

;;; org-exp-bibtex.el ends here

[-- Attachment #3: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
  2009-02-22 12:05 org-exp-bibtex.el - add support to citing bibtex in both html and latex exports Taru Karttunen
@ 2009-02-22 14:17 ` Sebastian Rose
  2009-02-22 18:15   ` Taru Karttunen
  2009-02-22 15:04 ` Carsten Dominik
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 17+ messages in thread
From: Sebastian Rose @ 2009-02-22 14:17 UTC (permalink / raw)
  To: Taru Karttunen; +Cc: Org-mode ml

Hi Taru,


are there changes to the XHTML structure imposed by using this
extension? Or does it simply add a section with the usual containers and
ID's?

Since I know many people will use an extension like this, I'd like to
support that in org-info.js, that's why I ask.


Best,

  Sebastian

Taru Karttunen <taruti@taruti.net> writes:
> Hello
>
> Motivated by the discussion on exporting BibTeX to html
> and LaTeX when using org-mode I created an extension that
> does this.
>
> The html export uses bibtex2html from
> http://www.lri.fr/~filliatr/bibtex2html/ also
> packaged in e.g. Debian.
>
> This works by a
> #+BIBLIOGRAPHY: bibfilebasename stylename
> e.g. given foo.bib and using style plain:
> #+BIBLIOGRAPHY: foo plain
>
> For LaTeX export this simply inserts the lines
> \bibliographystyle{plain}
> \bibliography{foo}
> into the tex-file when exporting.
>
> For Html export it:
> 1) converts all \cite{bar} to links to the bibliography
> 2) creates a foo.html and foo_bib.html
> 3) includes the contents of foo.html in the exported html file
>
> Code attached.
>
>
> - Taru Karttunen
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

-- 
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.:  +49 (0)511 - 36 58 472
Fax:   +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
Http:  www.emma-stil.de

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

* Re: org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
  2009-02-22 12:05 org-exp-bibtex.el - add support to citing bibtex in both html and latex exports Taru Karttunen
  2009-02-22 14:17 ` Sebastian Rose
@ 2009-02-22 15:04 ` Carsten Dominik
  2009-02-24  5:52 ` Carsten Dominik
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 17+ messages in thread
From: Carsten Dominik @ 2009-02-22 15:04 UTC (permalink / raw)
  To: Taru Karttunen; +Cc: Org-mode ml

This is going to be fantastically useful.  Thanks.

- Carsten

On Feb 22, 2009, at 1:05 PM, Taru Karttunen wrote:

> Hello
>
> Motivated by the discussion on exporting BibTeX to html
> and LaTeX when using org-mode I created an extension that
> does this.
>
> The html export uses bibtex2html from
> http://www.lri.fr/~filliatr/bibtex2html/ also
> packaged in e.g. Debian.
>
> This works by a
> #+BIBLIOGRAPHY: bibfilebasename stylename
> e.g. given foo.bib and using style plain:
> #+BIBLIOGRAPHY: foo plain
>
> For LaTeX export this simply inserts the lines
> \bibliographystyle{plain}
> \bibliography{foo}
> into the tex-file when exporting.
>
> For Html export it:
> 1) converts all \cite{bar} to links to the bibliography
> 2) creates a foo.html and foo_bib.html
> 3) includes the contents of foo.html in the exported html file
>
> Code attached.
>
>
> - Taru Karttunen
> <org-exp-bibtex.el><mime-attachment.txt>

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

* Re: org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
  2009-02-22 14:17 ` Sebastian Rose
@ 2009-02-22 18:15   ` Taru Karttunen
  0 siblings, 0 replies; 17+ messages in thread
From: Taru Karttunen @ 2009-02-22 18:15 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: Org-mode ml

On 22.02 15:17, Sebastian Rose wrote:
> are there changes to the XHTML structure imposed by using this
> extension? Or does it simply add a section with the usual containers and
> ID's?

Currently it just wraps the whole thing in a
<div class="bibliography"> with the bibtex2html
generated html inside with a slight fix to make
it XHTML complicant.

What kind of classes would org-info.js like?

Since it doesn't generate a heading are the
outline-X classes appropriate?

- Taru Karttunen

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

* Re: org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
  2009-02-22 12:05 org-exp-bibtex.el - add support to citing bibtex in both html and latex exports Taru Karttunen
  2009-02-22 14:17 ` Sebastian Rose
  2009-02-22 15:04 ` Carsten Dominik
@ 2009-02-24  5:52 ` Carsten Dominik
  2009-02-24  7:43 ` Carsten Dominik
       [not found] ` <D0D50C5D-9E40-41CF-A042-475938430B9E@uva.nl>
  4 siblings, 0 replies; 17+ messages in thread
From: Carsten Dominik @ 2009-02-24  5:52 UTC (permalink / raw)
  To: Taru Karttunen; +Cc: Org-mode ml

Has anyone tested this?

Taru, do you agree that I should add it to the contrib directory?

- Carsten

On Feb 22, 2009, at 1:05 PM, Taru Karttunen wrote:

> Hello
>
> Motivated by the discussion on exporting BibTeX to html
> and LaTeX when using org-mode I created an extension that
> does this.
>
> The html export uses bibtex2html from
> http://www.lri.fr/~filliatr/bibtex2html/ also
> packaged in e.g. Debian.
>
> This works by a
> #+BIBLIOGRAPHY: bibfilebasename stylename
> e.g. given foo.bib and using style plain:
> #+BIBLIOGRAPHY: foo plain
>
> For LaTeX export this simply inserts the lines
> \bibliographystyle{plain}
> \bibliography{foo}
> into the tex-file when exporting.
>
> For Html export it:
> 1) converts all \cite{bar} to links to the bibliography
> 2) creates a foo.html and foo_bib.html
> 3) includes the contents of foo.html in the exported html file
>
> Code attached.
>
>
> - Taru Karttunen
> <org-exp-bibtex.el><mime-attachment.txt>

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

* Re: org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
  2009-02-22 12:05 org-exp-bibtex.el - add support to citing bibtex in both html and latex exports Taru Karttunen
                   ` (2 preceding siblings ...)
  2009-02-24  5:52 ` Carsten Dominik
@ 2009-02-24  7:43 ` Carsten Dominik
       [not found] ` <D0D50C5D-9E40-41CF-A042-475938430B9E@uva.nl>
  4 siblings, 0 replies; 17+ messages in thread
From: Carsten Dominik @ 2009-02-24  7:43 UTC (permalink / raw)
  To: Taru Karttunen; +Cc: Org-mode ml

Hi Taru,

if I understand correctly, if I have a large BibTeX database,
the entire database file will be included into the HTML file.

A possible extension for your program would be to select only the
references actually used in the exported file.

- Carsten

On Feb 22, 2009, at 1:05 PM, Taru Karttunen wrote:

> Hello
>
> Motivated by the discussion on exporting BibTeX to html
> and LaTeX when using org-mode I created an extension that
> does this.
>
> The html export uses bibtex2html from
> http://www.lri.fr/~filliatr/bibtex2html/ also
> packaged in e.g. Debian.
>
> This works by a
> #+BIBLIOGRAPHY: bibfilebasename stylename
> e.g. given foo.bib and using style plain:
> #+BIBLIOGRAPHY: foo plain
>
> For LaTeX export this simply inserts the lines
> \bibliographystyle{plain}
> \bibliography{foo}
> into the tex-file when exporting.
>
> For Html export it:
> 1) converts all \cite{bar} to links to the bibliography
> 2) creates a foo.html and foo_bib.html
> 3) includes the contents of foo.html in the exported html file
>
> Code attached.
>
>
> - Taru Karttunen
> <org-exp-bibtex.el><mime-attachment.txt>

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

* Re: org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
       [not found] ` <D0D50C5D-9E40-41CF-A042-475938430B9E@uva.nl>
@ 2009-03-01 10:57   ` Taru Karttunen
  2009-03-02 16:40     ` William Henney
  2010-10-19 21:57     ` Lingyu Ma
  0 siblings, 2 replies; 17+ messages in thread
From: Taru Karttunen @ 2009-03-01 10:57 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Org-mode ml

On 27.02 17:19, Carsten Dominik wrote:
> can I add your code to the contrib directory in Org?
>

Yes, feel free to. Do you need some copyright stuff
or is that not needed with contrib?

I will probably have some wibbles to it in the next
few months, but those can be added in the Git repository.

Selecting only some entries to display would be possible,
but is it really necessary? In my use cases I just tend
to have a per-article bib-file that contains the entries
I wish to use. Making a rich enough API to sort, reformat 
and select a portion of a BibTeX file seems quite overblown 
for org.

- Taru Karttunen

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

* Re: org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
  2009-03-01 10:57   ` Taru Karttunen
@ 2009-03-02 16:40     ` William Henney
  2009-03-03  6:33       ` Taru Karttunen
  2010-10-19 21:57     ` Lingyu Ma
  1 sibling, 1 reply; 17+ messages in thread
From: William Henney @ 2009-03-02 16:40 UTC (permalink / raw)
  To: Taru Karttunen; +Cc: Org-mode ml

Hi Taru

On Sun, Mar 1, 2009 at 4:57 AM, Taru Karttunen <taruti@taruti.net> wrote:
> Selecting only some entries to display would be possible,
> but is it really necessary? In my use cases I just tend
> to have a per-article bib-file that contains the entries
> I wish to use. Making a rich enough API to sort, reformat
> and select a portion of a BibTeX file seems quite overblown
> for org.

Personally, I use a single .bib file for everything, which is
currently running at 12269 entries, so something like Carsten's
suggestion would be necessary before org-exp-bibtex.el became useful
to me :)

Bibtex2html already comes with a separate tool "bib2bib" which seems
to already do exactly what is needed. See
http://www.lri.fr/~filliatr/bibtex2html/doc/#htoc12

Cheers

Will


-- 

  Dr William Henney, Centro de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia

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

* Re: org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
  2009-03-02 16:40     ` William Henney
@ 2009-03-03  6:33       ` Taru Karttunen
  2009-03-03  7:37         ` Sebastian Rose
  2009-03-03  9:34         ` Carsten Dominik
  0 siblings, 2 replies; 17+ messages in thread
From: Taru Karttunen @ 2009-03-03  6:33 UTC (permalink / raw)
  To: William Henney; +Cc: Org-mode ml

On 02.03 10:40, William Henney wrote:
> > Selecting only some entries to display would be possible,
> > but is it really necessary? In my use cases I just tend
> > to have a per-article bib-file that contains the entries
> > I wish to use. Making a rich enough API to sort, reformat
> > and select a portion of a BibTeX file seems quite overblown
> > for org.
> 
> Personally, I use a single .bib file for everything, which is
> currently running at 12269 entries, so something like Carsten's
> suggestion would be necessary before org-exp-bibtex.el became useful
> to me :)
> 
> Bibtex2html already comes with a separate tool "bib2bib" which seems
> to already do exactly what is needed. See
> http://www.lri.fr/~filliatr/bibtex2html/doc/#htoc12

Yes, it contains bib2bib and even the main bibtex2html contains
functionality for this.

Now how do we want to do this with org-mode?
1) The user is responsible for creating a bib-file using
whatever tools she prefers (e.g. bib2bib).
2) Add an option to just select the entries that are used
in the org-file. Nothing fancy.
3) Add a generic API to select+sort+format the entries.

Both 1 and 2 are easy to do. I can create a patch that 
adds support for this later this week. Are there any
other features that you would need?

- Taru Karttunen

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

* Re: org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
  2009-03-03  6:33       ` Taru Karttunen
@ 2009-03-03  7:37         ` Sebastian Rose
  2009-03-03  9:34         ` Carsten Dominik
  1 sibling, 0 replies; 17+ messages in thread
From: Sebastian Rose @ 2009-03-03  7:37 UTC (permalink / raw)
  To: Taru Karttunen; +Cc: Org-mode ml

Could anyone of the bibtex users here add a little 5 line tutorial on how
to use bibtex (just few lines to get me started)? I never used bibtex,
but I'd want to support it in org-info.js and therefore need to create
testfiles.

(Ignore this mail if just another section is added to the resulting
XHTML)


Thanks and best regards,

   Sebastian

Taru Karttunen <taruti@taruti.net> writes:
> On 02.03 10:40, William Henney wrote:
>> > Selecting only some entries to display would be possible,
>> > but is it really necessary? In my use cases I just tend
>> > to have a per-article bib-file that contains the entries
>> > I wish to use. Making a rich enough API to sort, reformat
>> > and select a portion of a BibTeX file seems quite overblown
>> > for org.
>>
>> Personally, I use a single .bib file for everything, which is
>> currently running at 12269 entries, so something like Carsten's
>> suggestion would be necessary before org-exp-bibtex.el became useful
>> to me :)
>>
>> Bibtex2html already comes with a separate tool "bib2bib" which seems
>> to already do exactly what is needed. See
>> http://www.lri.fr/~filliatr/bibtex2html/doc/#htoc12
>
> Yes, it contains bib2bib and even the main bibtex2html contains
> functionality for this.
>
> Now how do we want to do this with org-mode?
> 1) The user is responsible for creating a bib-file using
> whatever tools she prefers (e.g. bib2bib).
> 2) Add an option to just select the entries that are used
> in the org-file. Nothing fancy.
> 3) Add a generic API to select+sort+format the entries.
>
> Both 1 and 2 are easy to do. I can create a patch that
> adds support for this later this week. Are there any
> other features that you would need?
>
> - Taru Karttunen
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

--
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.:  +49 (0)511 - 36 58 472
Fax:   +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
Http:  www.emma-stil.de

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

* Re: org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
  2009-03-03  6:33       ` Taru Karttunen
  2009-03-03  7:37         ` Sebastian Rose
@ 2009-03-03  9:34         ` Carsten Dominik
  2009-03-04 23:08           ` William Henney
  1 sibling, 1 reply; 17+ messages in thread
From: Carsten Dominik @ 2009-03-03  9:34 UTC (permalink / raw)
  To: Taru Karttunen; +Cc: Org-mode ml


On Mar 3, 2009, at 7:33 AM, Taru Karttunen wrote:

> On 02.03 10:40, William Henney wrote:
>>> Selecting only some entries to display would be possible,
>>> but is it really necessary? In my use cases I just tend
>>> to have a per-article bib-file that contains the entries
>>> I wish to use. Making a rich enough API to sort, reformat
>>> and select a portion of a BibTeX file seems quite overblown
>>> for org.
>>
>> Personally, I use a single .bib file for everything, which is
>> currently running at 12269 entries, so something like Carsten's
>> suggestion would be necessary before org-exp-bibtex.el became useful
>> to me :)
>>
>> Bibtex2html already comes with a separate tool "bib2bib" which seems
>> to already do exactly what is needed. See
>> http://www.lri.fr/~filliatr/bibtex2html/doc/#htoc12
>
> Yes, it contains bib2bib and even the main bibtex2html contains
> functionality for this.
>
> Now how do we want to do this with org-mode?
> 1) The user is responsible for creating a bib-file using
> whatever tools she prefers (e.g. bib2bib).
> 2) Add an option to just select the entries that are used
> in the org-file. Nothing fancy.

I think (1) and (2) would be really nice.

>
> 3) Add a generic API to select+sort+format the entries.

(3) seems to be indeed more than necessary.  I for one would be  
perfectly
happy if the entries would come out in the sequence of citation, which
will likely be automatic?

> Both 1 and 2 are easy to do. I can create a patch that
> adds support for this later this week. Are there any
> other features that you would need?

For consistency with other HTML in Org's output, I think it
would be good if the div around the bibliography would be

<div id="bibliography">

instead of class.

- Carsten


>
>
> - Taru Karttunen
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
  2009-03-03  9:34         ` Carsten Dominik
@ 2009-03-04 23:08           ` William Henney
  2009-03-05  9:37             ` Carsten Dominik
  0 siblings, 1 reply; 17+ messages in thread
From: William Henney @ 2009-03-04 23:08 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Org-mode ml

On Tue, Mar 3, 2009 at 3:34 AM, Carsten Dominik <dominik@science.uva.nl> wrote:
>> Now how do we want to do this with org-mode?
>> 1) The user is responsible for creating a bib-file using
>> whatever tools she prefers (e.g. bib2bib).
>> 2) Add an option to just select the entries that are used
>> in the org-file. Nothing fancy.
>
> I think (1) and (2) would be really nice.
>
>>
>> 3) Add a generic API to select+sort+format the entries.
>
> (3) seems to be indeed more than necessary.  I for one would be perfectly
> happy if the entries would come out in the sequence of citation, which
> will likely be automatic?

Agreed. Alphabetic sorting would be a nice optional extra, but just
(1) and (2) would be great.

Cheers

Will

-- 

  Dr William Henney, Centro de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia

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

* Re: org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
  2009-03-04 23:08           ` William Henney
@ 2009-03-05  9:37             ` Carsten Dominik
  2009-03-05 12:32               ` Chris Gray
  0 siblings, 1 reply; 17+ messages in thread
From: Carsten Dominik @ 2009-03-05  9:37 UTC (permalink / raw)
  To: William Henney; +Cc: Org-mode ml


On Mar 5, 2009, at 12:08 AM, William Henney wrote:

> On Tue, Mar 3, 2009 at 3:34 AM, Carsten Dominik <dominik@science.uva.nl 
> > wrote:
>>> Now how do we want to do this with org-mode?
>>> 1) The user is responsible for creating a bib-file using
>>> whatever tools she prefers (e.g. bib2bib).
>>> 2) Add an option to just select the entries that are used
>>> in the org-file. Nothing fancy.
>>
>> I think (1) and (2) would be really nice.
>>
>>>
>>> 3) Add a generic API to select+sort+format the entries.
>>
>> (3) seems to be indeed more than necessary.  I for one would be  
>> perfectly
>> happy if the entries would come out in the sequence of citation,  
>> which
>> will likely be automatic?
>
> Agreed. Alphabetic sorting would be a nice optional extra, but just
> (1) and (2) would be great.

In fact, implementing alphabetic sorting for names that actually
will work is pretty much a nightmare :-)

- Carsten

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

* Re: org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
  2009-03-05  9:37             ` Carsten Dominik
@ 2009-03-05 12:32               ` Chris Gray
  2009-03-05 13:25                 ` Carsten Dominik
  0 siblings, 1 reply; 17+ messages in thread
From: Chris Gray @ 2009-03-05 12:32 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik wrote:
> In fact, implementing alphabetic sorting for names that actually
> will work is pretty much a nightmare :-)

There is a switch (-a) in bibtex2html that sorts the entries as bibtex
would sort them.

Cheers,
Chris

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

* Re: Re: org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
  2009-03-05 12:32               ` Chris Gray
@ 2009-03-05 13:25                 ` Carsten Dominik
  0 siblings, 0 replies; 17+ messages in thread
From: Carsten Dominik @ 2009-03-05 13:25 UTC (permalink / raw)
  To: Chris Gray; +Cc: emacs-orgmode

OK, so this is simple then.  Great.

- Carsten

On Mar 5, 2009, at 1:32 PM, Chris Gray wrote:

> Carsten Dominik wrote:
>> In fact, implementing alphabetic sorting for names that actually
>> will work is pretty much a nightmare :-)
>
> There is a switch (-a) in bibtex2html that sorts the entries as bibtex
> would sort them.
>
> Cheers,
> Chris
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
  2009-03-01 10:57   ` Taru Karttunen
  2009-03-02 16:40     ` William Henney
@ 2010-10-19 21:57     ` Lingyu Ma
  2010-10-19 22:56       ` Nick Dokos
  1 sibling, 1 reply; 17+ messages in thread
From: Lingyu Ma @ 2010-10-19 21:57 UTC (permalink / raw)
  To: emacs-orgmode

Taru Karttunen <taruti <at> taruti.net> writes:

> 
> On 27.02 17:19, Carsten Dominik wrote:
> > can I add your code to the contrib directory in Org?
> >
> 
> Yes, feel free to. Do you need some copyright stuff
> or is that not needed with contrib?
> 
> I will probably have some wibbles to it in the next
> few months, but those can be added in the Git repository.
> 
> Selecting only some entries to display would be possible,
> but is it really necessary? In my use cases I just tend
> to have a per-article bib-file that contains the entries
> I wish to use. Making a rich enough API to sort, reformat 
> and select a portion of a BibTeX file seems quite overblown 
> for org.
> 
> - Taru Karttunen
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode <at> gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> 
> 



Hi Taru,

I have seen your post about "org-exp-bibtex.el".
In the issue "http://www.mail-archive.com/address@hidden/msg11723.html" you
mentioned that it is possible and easy to automatically select BibTex entries
used in the org file.

At present, if I include a *.bib which has 1000 entries in an org-file,
although I only cite 3 of them in the org-file, the generated html file
will still include all the 1000 entries.

How can I solve this problem?
Is there any way I only need to set some variable or add some keywords in the
org file?

Thanks in advance!

regards,
Lingyu Ma

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

* Re: Re: org-exp-bibtex.el - add support to citing bibtex in both html and latex exports
  2010-10-19 21:57     ` Lingyu Ma
@ 2010-10-19 22:56       ` Nick Dokos
  0 siblings, 0 replies; 17+ messages in thread
From: Nick Dokos @ 2010-10-19 22:56 UTC (permalink / raw)
  To: Lingyu Ma; +Cc: nicholas.dokos, emacs-orgmode

Lingyu Ma <lingyu.ma.fu@googlemail.com> wrote:

> Taru Karttunen <taruti <at> taruti.net> writes:
> 
> > 
> > On 27.02 17:19, Carsten Dominik wrote:
> > > can I add your code to the contrib directory in Org?
> > >
> > 
> > Yes, feel free to. Do you need some copyright stuff
> > or is that not needed with contrib?
> > 
> > I will probably have some wibbles to it in the next
> > few months, but those can be added in the Git repository.
> > 
> > Selecting only some entries to display would be possible,
> > but is it really necessary? In my use cases I just tend
> > to have a per-article bib-file that contains the entries
> > I wish to use. Making a rich enough API to sort, reformat 
> > and select a portion of a BibTeX file seems quite overblown 
> > for org.
> > 
> > - Taru Karttunen
> > 
> > _______________________________________________
> > Emacs-orgmode mailing list
> > Remember: use `Reply All' to send replies to the list.
> > Emacs-orgmode <at> gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> > 
> > 
> 
> 
> 
> Hi Taru,
> 
> I have seen your post about "org-exp-bibtex.el".
> In the issue "http://www.mail-archive.com/address@hidden/msg11723.html" you
> mentioned that it is possible and easy to automatically select BibTex entries
> used in the org file.
> 
> At present, if I include a *.bib which has 1000 entries in an org-file,
> although I only cite 3 of them in the org-file, the generated html file
> will still include all the 1000 entries.
> 
> How can I solve this problem?
> Is there any way I only need to set some variable or add some keywords in the
> org file?
> 
> Thanks in advance!
> 

The commentary to org-exp-bibtex.el says:

,----
| ;;; Commentary:
| ;;
| ;; This is an utility to handle BibTeX export to both LaTeX and html
| ;; exports. It uses the bibtex2html software from
| ;; http://www.lri.fr/~filliatr/bibtex2html/
| ;;
| ;; The usage is as follows:
| ;; #+BIBLIOGRAPHY: bibfilebasename stylename optional-options
| ;; e.g. given foo.bib and using style plain:
| ;; #+BIBLIOGRAPHY: foo plain option:-d
| ;;
| ;; Optional options are of the form:
| ;;
| ;; option:-foobar pass '-foobar' to bibtex2html
| ;; e.g.
| ;; option:-d sort by date.
| ;; option:-a sort as BibTeX (usually by author) *default*
| ;; option:-u unsorted i.e. same order as in .bib file
| ;; option:-r reverse the sort.
| ;; see the bibtex2html man page for more. Multiple options can be combined like:
| ;; option:-d option:-r
| ;;
| ;; Limiting to only the entries cited in the document:
| ;; limit:t
`----

Did you try the limit option?

Nick

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

end of thread, other threads:[~2010-10-19 22:56 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-22 12:05 org-exp-bibtex.el - add support to citing bibtex in both html and latex exports Taru Karttunen
2009-02-22 14:17 ` Sebastian Rose
2009-02-22 18:15   ` Taru Karttunen
2009-02-22 15:04 ` Carsten Dominik
2009-02-24  5:52 ` Carsten Dominik
2009-02-24  7:43 ` Carsten Dominik
     [not found] ` <D0D50C5D-9E40-41CF-A042-475938430B9E@uva.nl>
2009-03-01 10:57   ` Taru Karttunen
2009-03-02 16:40     ` William Henney
2009-03-03  6:33       ` Taru Karttunen
2009-03-03  7:37         ` Sebastian Rose
2009-03-03  9:34         ` Carsten Dominik
2009-03-04 23:08           ` William Henney
2009-03-05  9:37             ` Carsten Dominik
2009-03-05 12:32               ` Chris Gray
2009-03-05 13:25                 ` Carsten Dominik
2010-10-19 21:57     ` Lingyu Ma
2010-10-19 22:56       ` Nick Dokos

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).