emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: emacs-orgmode@gnu.org
Cc: Nicolas Goaziou <n.goaziou@gmail.com>
Subject: Re: [ANN] Bibliography support ODT + JabRef
Date: Wed, 24 Jul 2013 20:23:38 +0530	[thread overview]
Message-ID: <87vc40nh59.fsf@gmail.com> (raw)
In-Reply-To: <87fvvbzlgr.fsf@gmail.com> (Jambunathan K.'s message of "Fri, 19 Jul 2013 01:31:24 +0530")


I have finalized the JabRef + ODT export.  The changes can be pulled
from my own repo at

        HomePage: http://repo.or.cz/w/org-mode/org-kjn.git

        Pull URL: git://repo.or.cz/org-mode/org-kjn.git
                  http://repo.or.cz/r/org-mode/org-kjn.git

For purposes of quick testing, the files attached in the parent should
be good enough.

Here goes the commmit log.

    ox-odt: Add support for JabRef

    * contrib/lisp/ox-jabref.el: New file.

    * lisp/org.el (org-modules): Add ox-jabref.

    * etc/styles/OrgOdtStyles.xml (Bibliography_20_Heading)
    (Bibliography, OrgBibliographyList): New styles.

    * lisp/ox-odt.el (org-export-define-backend): New non-standard
    element `citation-reference'.  Register
    `org-odt--translate-cite-fragments'.
    (org-odt--translate-cite-fragments):  New filter.
    (org-odt-citation-transcoders): New user option.
    (org-odt-citation-reference, org-odt-citation-reference/numbered):
    Stock transcoders for `citation-reference' elements.
    (org-odt-keyword): Handle BIBLIOGRAPHY.
    (org-odt--export-wrap): Make the condition case debuggable.

    Also add autoloads for citation transcoders provided by
    ox-jabref.el.

    NOTE: Review all the above changes once ox.el provides standard
    tools for handling citaitons.

----------------------------------------------------------------

                            _______________

                               ORG-JABREF

                             Jambunathan K
                            _______________


Table of Contents
_________________

1 Quick start guide:
2 Developer (or Implementation) notes


1 Quick start guide:
====================

  1. Install [JabRef]

     This module is tested with version JabRef-2.9.2.jar.

  2. Install the JabRef plugin [Chicago Export filters for Org-mode].

  3. Configure ox-jabref.el

     ,----
     | M-x customize-group RET org-jabref RET
     `----

     Review the settings.

  4. Configure ox-odt.el

     ,----
     | M-x customize-variable RET org-odt-citation-transcoders RET
     `----

     Following settings are recommended.

     1. No citation support

        ,----
        | (setq org-odt-citation-transcoders
        |       '(org-odt-latex-fragment . ignore))
        `----

        This is the default setting.

        - #+BIBLIOGRAPHY is ignored.
        - \cite{} directives are typeset as plain text.

     2. Numeric Citations

        ,----
        | (setq org-odt-citation-transcoders
        |       '(org-odt-citation-reference/numbered
        |       . org-jabref-odt-bibliography/numbered))
        `----

        - #+BIBLIOGRAPHY is replaced with numerical listing of
          Bibliographic entries.  The listing includes only cited keys
          and is sorted on the order in which the cite keys are seen in
          the Org file.

        - \cite{} directives are replaced with numeric links to the
          associated Bibliographic entry.

     3. Unnumbered (or Text) Citations with Filtered Bibliography

        ,----
        | (setq org-odt-citation-transcoders
        |       '(org-jabref-odt-citation-reference/text
        |       . org-jabref-odt-bibliography/filtered))
        `----

        - #+BIBLIOGRAPHY is replaced with listing of Bibliographic
          entries.  The listing is limited to just the cited keys.  The
          listing is sorted based on the order chosen by JabRef engine.

        - \cite{} directives are replaced with textual links to the
          associated Bibliographic entry.

     4. Unnumbered (or Text) Citations with Filtered Bibliography

        ,----
        | (setq org-odt-citation-transcoders
        |       '(org-jabref-odt-citation-reference/text
        |       . org-jabref-odt-bibliography/unfiltered))
        `----

        - #+BIBLIOGRAPHY is replaced with listing of *all* Bibliographic
          entries.  The listing is limited to just the cited keys.  The
          listing is sorted based on the order chosen by JabRef engine.

        - \cite{} directives are replaced with textual links to the
          associated Bibliographic entry.

     5. Add the following line to your Org file and export.

        ,----
        | #+BIBLIOGRAPHY: MyLibrary.bib
        `----


  [JabRef] http://jabref.sourceforge.net/

  [Chicago Export filters for Org-mode]
  http://repo.or.cz/w/JabRefChicagoForOrgmode.git/blob_plain/HEAD:/net.sf.jabref.export.Chicago.ODF(English)-1.2.jar


2 Developer (or Implementation) notes
=====================================

  The current #+BIBLIOGRAPHY is defined in contrib/lisp/ox-bibtex.el.
  The syntax defined therein, is specific to a particular Citation
  Processor (i.e., bibtex2html) and cannot be expected to be honored by
  all backends AND citation processors[1].

  1. So having a "style" specification in a keyword line that is shared
     across all backends is absurd.[2]

  2. It is unclear how well a "limit: " option can be honored by *ALL*
     citation processors.

  To keep things simple (and flexible), ox-jabref.el resorts to the
  following:

  1. *Always* use the first found style registered for the current
     backend in `org-jabref-export-formats'

  2. "Limit"-ed (or non-"limit"-ed) export of Bibliographic entries can
     be achieved by using a different transcoder. See ""Quick start
     guide" above.



Footnotes
_________

[1] Note that the same Citation Processor (for example, JabRef) can be
used for catering to *both* HTML, ODT and even ASCII backends.

[2] *If* one settles for Org-wide styles, a possible translation from
Org-specific style to Citation-specific style needs to be done by each
backend.  This is the sole purpose of `org-jabref-export-formats'.

Having an Org-wide styles is well-neigh impossible.  In that case, the
best option is to settle for a specification like

,----
| #+ATTR_HTML: :bib2html-style "plain"
| #+ATTR_ODT: :jabref-style "Chicago (author-date)"
| #+BIBLIOGRAPHY: MyLibrary.bib
`----

Note the keywords in #+ATTR_BACKEND lines are prefixed with the
Citation Processor.  This is important in light of earlier comments
[1].

  reply	other threads:[~2013-07-24 14:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-18 20:01 [WIP/RFC] Bibliography support ODT + JabRef Jambunathan K
2013-07-24 14:53 ` Jambunathan K [this message]
2013-07-26  5:01   ` [ANN] " Jambunathan K
     [not found]   ` <87vc3uonao.fsf@gmail.com>
     [not found]     ` <87ehaihhts.fsf@gmail.com>
     [not found]       ` <87vc3uwo80.fsf@gmail.com>
     [not found]         ` <87ob9mfotu.fsf@gmail.com>
     [not found]           ` <CAJpRBmekaaeV58KoHet=HpmHJD3Ua8THw5bpACVfWngYKTQCQg@mail.gmail.com>
     [not found]             ` <87li4q9dt6.fsf@gmail.com>
     [not found]               ` <CAJpRBmewo+q8Dc-AeTQ0F=u-6_nFbRTWW_9gOF9Dn9SB8fXCnw@mail.gmail.com>
2013-07-30  5:07                 ` Jambunathan K
2013-07-30  9:39                   ` Rasmus
2013-07-30  9:56                   ` feng shu
2013-07-30 13:25                     ` Feng Shu
  -- strict thread matches above, loose matches on Subject: below --
2013-07-29  4:31 Jambunathan K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vc40nh59.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).