emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Citing articles, bibliography and html export
@ 2009-02-10 13:49 Taru Karttunen
  2009-02-10 14:40 ` Scot Becker
  2009-02-10 15:37 ` Matthew Lundin
  0 siblings, 2 replies; 6+ messages in thread
From: Taru Karttunen @ 2009-02-10 13:49 UTC (permalink / raw)
  To: Org-mode ml

Hello

Is there a good way of writing articles so that citations and
the bibliography works in both latex and html?

Currently I am using \cite{foobar} in the text and
have:

#+LATEX: \bibliographystyle{foo}
#+LATEX: \bibliography{bar}

In the end and a corresponding .bib file. This works nicely with 
latex, but I would like a solution that worked also with html.

How have other people solved this?

- Taru Karttunen

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

* Re: Citing articles, bibliography and html export
  2009-02-10 13:49 Citing articles, bibliography and html export Taru Karttunen
@ 2009-02-10 14:40 ` Scot Becker
  2009-02-10 17:33   ` Manuel Hermenegildo
  2009-02-10 15:37 ` Matthew Lundin
  1 sibling, 1 reply; 6+ messages in thread
From: Scot Becker @ 2009-02-10 14:40 UTC (permalink / raw)
  To: Taru Karttunen; +Cc: Org-mode ml

At the moment, rather than using BibTeX, I'm just doing citations
manually, using org's footnote mechanism and /italics/ markup.  This
works, but I think I may have a few bugs to report with org's LaTeX
export.  All those italics, punctuation, and parentheses in close
proximity seem like they may be causing problems.  I haven't yet
sorted out where the problems are, but I'll report them as soon as I
do.
If you can imagine forgoing the luxury of BibTeX, this is probably the
way to go., alternately you could use BibTeX to assure the quailty of
your LaTeX output (print still rules in some quarters), but do manual
citations in using #+HTML markup.

If you want to use BibTeX for your citations, you'd have to have
either: (1) a bibtex engine for HTML (does it exist?) or (2) get org
to cleverly insert fragments of TeX output in HTML, both for each
citation and the bibliography.  This would be ugly even if it were
easy, and I suspect it's not.

With regard to (1), I suppose you could hack together a very
rudimentary substitution engine to replace your \cites with
preformatted citations which were already set up in org markup, and
would therefore export into HTML.  This could be promising if your
citation requirements are simple, and if you do enough work using a
single style guide to make the setup work worth it.

You may find a LaTeX to HTML exporter that can do the trick.  And if
it did, this might be the best of all worlds.

The last option would be working up an org export to 'pandoc', an
extension of Markdown which has a very cool citation mechanism in
development (using Citation Style Language, the same as the Zotero
bibliographic manager, so there are already many citation styles).
It's working (and can use BibTeX databases), but I've not put it to
the test. If you could sucessfully get your work from org to pandoc,
you could then export to either LaTeX or HTML (as well as ODF and
OOXML).  There are some people on this list working on (or musing
over) a generalized org2wiki exporter, and, it might someday be
possible to coax that to export to pandoc/Markdown.  This is, only a
possibility, though, and not free of problems.  I only put it down for
the record.

Scot



On Tue, Feb 10, 2009 at 1:49 PM, Taru Karttunen <taruti@taruti.net> wrote:
> Hello
>
> Is there a good way of writing articles so that citations and
> the bibliography works in both latex and html?
>
> Currently I am using \cite{foobar} in the text and
> have:
>
> #+LATEX: \bibliographystyle{foo}
> #+LATEX: \bibliography{bar}
>
> In the end and a corresponding .bib file. This works nicely with
> latex, but I would like a solution that worked also with html.
>
> How have other people solved this?
>
> - 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] 6+ messages in thread

* Re: Citing articles, bibliography and html export
  2009-02-10 13:49 Citing articles, bibliography and html export Taru Karttunen
  2009-02-10 14:40 ` Scot Becker
@ 2009-02-10 15:37 ` Matthew Lundin
  1 sibling, 0 replies; 6+ messages in thread
From: Matthew Lundin @ 2009-02-10 15:37 UTC (permalink / raw)
  To: Taru Karttunen; +Cc: Org-mode ml


Hi Taru,

Taru Karttunen <taruti@taruti.net> writes:

> Currently I am using \cite{foobar} in the text and
> have:
>
> #+LATEX: \bibliographystyle{foo}
> #+LATEX: \bibliography{bar}
>
> In the end and a corresponding .bib file. This works nicely with 
> latex, but I would like a solution that worked also with html.
>
> How have other people solved this?

I think you'll have to export to TeX and then convert to html using
something like TeX4ht:

http://www.cse.ohio-state.edu/~gurari/TeX4ht/

Best,
Matt

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

* Re: Citing articles, bibliography and html export
  2009-02-10 14:40 ` Scot Becker
@ 2009-02-10 17:33   ` Manuel Hermenegildo
  2009-02-10 18:02     ` David Bremner
  0 siblings, 1 reply; 6+ messages in thread
From: Manuel Hermenegildo @ 2009-02-10 17:33 UTC (permalink / raw)
  To: Scot Becker; +Cc: Org-mode ml


 > If you want to use BibTeX for your citations, you'd have to have
 > either: (1) a bibtex engine for HTML (does it exist?) or (2) get org
 > to cleverly insert fragments of TeX output in HTML, both for each
 > citation and the bibliography.  This would be ugly even if it were
 > easy, and I suspect it's not.

Some time ago I had some success in a similar context (writing an
autodocumenter for the Ciao programming language) where I needed to
generate citations in a format different from latex.  I managed to do
this by writing a new .bst file (the "bibliography style" file that
controls the format in which bibtex formats the references that it
outputs). Hope it helps. --Manuel

-- 
-------------------------------------------------------------------------------
 Manuel Hermenegildo                     | Prof., C.S.Dept., T.U. Madrid (UPM)
 Director, IMDEA-Software and CLIP Group | +34-91-336-7435 (W) -352-4819 (Fax)
-------------------------------------------------------------------------------

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

* Re: Citing articles, bibliography and html export
  2009-02-10 17:33   ` Manuel Hermenegildo
@ 2009-02-10 18:02     ` David Bremner
  2009-02-10 19:35       ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2009-02-10 18:02 UTC (permalink / raw)
  To: Manuel Hermenegildo; +Cc: emacs-orgmode

At Tue, 10 Feb 2009 18:33:31 +0100,
Manuel Hermenegildo wrote:
> 
> Some time ago I had some success in a similar context (writing an
> autodocumenter for the Ciao programming language) where I needed to
> generate citations in a format different from latex.  I managed to do
> this by writing a new .bst file (the "bibliography style" file that
> controls the format in which bibtex formats the references that it
> outputs). Hope it helps. --Manuel
> 

Unless you like forth, bst programming is not much fun. There is also
e.g. the Text::BibTeX perl module, python-bibtex and probably other
options parsing for the bibtex format.

There is also ebib [1], a bibtex editor for emacs, but I'm not sure if 
deals with formatting entries, which is the main issue here.


[1] http://ebib.sourceforge.net/

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

* Re: Citing articles, bibliography and html export
  2009-02-10 18:02     ` David Bremner
@ 2009-02-10 19:35       ` Carsten Dominik
  0 siblings, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2009-02-10 19:35 UTC (permalink / raw)
  To: David Bremner; +Cc: emacs-orgmode


On Feb 10, 2009, at 7:02 PM, David Bremner wrote:

> At Tue, 10 Feb 2009 18:33:31 +0100,
> Manuel Hermenegildo wrote:
>>
>> Some time ago I had some success in a similar context (writing an
>> autodocumenter for the Ciao programming language) where I needed to
>> generate citations in a format different from latex.  I managed to do
>> this by writing a new .bst file (the "bibliography style" file that
>> controls the format in which bibtex formats the references that it
>> outputs). Hope it helps. --Manuel
>>
>
> Unless you like forth, bst programming is not much fun. There is also
> e.g. the Text::BibTeX perl module, python-bibtex and probably other
> options parsing for the bibtex format.
>
> There is also ebib [1], a bibtex editor for emacs, but I'm not sure if
> deals with formatting entries, which is the main issue here.

Both reftex-cite.el and bibtex.el have pretty sophisticated
ways to extract info from bibtex databases.  So with a little
bit of lisp, I am sure it is possible to cook something that
would insert references well enough during HTML export.

- Carsten

P.S. No, I am no writing it :-)

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

end of thread, other threads:[~2009-02-10 19:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-10 13:49 Citing articles, bibliography and html export Taru Karttunen
2009-02-10 14:40 ` Scot Becker
2009-02-10 17:33   ` Manuel Hermenegildo
2009-02-10 18:02     ` David Bremner
2009-02-10 19:35       ` Carsten Dominik
2009-02-10 15:37 ` Matthew Lundin

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