* [WIP/RFC] Bibliography support ODT + JabRef
@ 2013-07-18 20:01 Jambunathan K
2013-07-24 14:53 ` [ANN] " Jambunathan K
0 siblings, 1 reply; 7+ messages in thread
From: Jambunathan K @ 2013-07-18 20:01 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1504 bytes --]
[WIP/RFC] Bibliography support ODT + JabRef
I need some quick feedback on how this works out. Look at the Org and
ODT file and tell me to what extent it will suffice.
I am not interested in Org syntax at the moment. But I am willing to
exchange notes with anyone who wants to "canonicalize" some Citation
support in Org. For now, the keys are referenced with \cite{key1, key2}
I am dumping
1. messages buffer. Shows how JabRef can be invoked on the command
line.
--8<---------------cut here---------------start------------->8---
Extracting Citation Reference (suzuki_studies_1998)
Running java -jar /home/kjambunathan/Downloads/JabRef-2.9.2.jar -n true -m suzuki_studies_1998,jabref-16048-fF.xml,ooxml.reference MyLibrary.bib
Extracting Citation Reference (blyth_zen_1966)
Running java -jar /home/kjambunathan/Downloads/JabRef-2.9.2.jar -n true -m blyth_zen_1966,jabref-16048LqL.xml,ooxml.reference MyLibrary.bib
Extracting Citation Reference (watts_way_1999)
Running java -jar /home/kjambunathan/Downloads/JabRef-2.9.2.jar -n true -m watts_way_1999,jabref-16048Y0R.xml,ooxml.reference MyLibrary.bib
--8<---------------cut here---------------end--------------->8---
2. JabRef's jstyle and layout files split out from the Jstyle.
The jstyle is the one that comes with Jabref's OOplugin itself ->
Default Style (numerical citations).
The layout files were broken apart from the Jstyle for the purpose of
org-odt export. The files may not be perfect but gets the job done.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: cite.org --]
[-- Type: text/x-org, Size: 490 bytes --]
* Some section
This paragraph has some footnote references[fn:1] and cites some
bibliographic references \cite{watts_way_1999,blyth_zen_1966}. There
are more bibliographic references. \cite{suzuki_studies_1998}. Here I
re-cite an earlier book \cite{watts_way_1999}. Here is another footnote.[fn:2]
#+ATTR_ODT: :style custom
#+BIBLIOGRAPHY: MyLibrary plain option:-d
* Another section
So on and so forth.
* Footnotes
[fn:1] This is a footnote.
[fn:2] This is another footnote.
[-- Attachment #3: cite.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 10798 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: MyLibrary.bib --]
[-- Type: text/x-bibtex, Size: 3106 bytes --]
@misc{_101_????,
title = {101 Zen Stories},
url = {http://www.101zenstories.com/},
urldate = {2013-06-10},
file = {101 Zen Stories:/home/kjambunathan/.mozilla/firefox/htr1myi9.default/zotero/storage/67EHBZZ6/www.101zenstories.com.html:text/html}
},
@book{blyth_zen_1966,
edition = {{1St} Edition},
title = {Zen and Zen Classics Volume 4 Mumonkan},
publisher = {The Hokuseido Press},
author = {Blyth, R. H.},
year = {1966}
},
@book{watts_way_1999,
title = {The Way of Zen},
isbn = {0375705104},
publisher = {Vintage},
author = {Watts, Alan W.},
month = jan,
year = {1999}
},
@misc{center_for_history_and_new_media_zotero_????,
title = {Zotero Quick Start Guide},
url = {http://zotero.org/support/quick_start_guide},
author = {{Center for History and New Media}},
annote = {Welcome to {Zotero!View} the Quick Start Guide to learn how to begin collecting, managing, citing, and sharing your research {sources.Thanks} for installing Zotero.}
},
@book{besserman_crazy_1991,
title = {Crazy Clouds: Zen radicals, rebels, and reformers},
isbn = {9780877735434},
shorttitle = {Crazy Clouds},
language = {en},
publisher = {Shambhala},
author = {Besserman, Perle and Steger, Manfred},
month = may,
year = {1991},
keywords = {Philosophy / General, Philosophy / Zen, Priests, Zen, Religion / Buddhism / General, Religion / Buddhism / Zen, Religion / General, Zen priests, Zen priests/ Biography}
},
@misc{_believing_????,
title = {{ON} {BELIEVING} {IN} {MIND} ({SHINJIN-NO-MEI)} by Seng-t'san},
url = {http://home.primusonline.com.au/peony/faith_in_mind.htm},
urldate = {2013-06-10},
file = {ON BELIEVING IN MIND (SHINJIN-NO-MEI) by Seng-t'san:/home/kjambunathan/.mozilla/firefox/htr1myi9.default/zotero/storage/SD4HNP5X/faith_in_mind.html:text/html}
},
@book{suzuki_studies_1998,
title = {Studies in Zen},
isbn = {0802216781},
publisher = {Chartwell Books {Inc.,U.S.}},
author = {Suzuki},
month = dec,
year = {1998}
},
@misc{_gateless_????,
title = {The Gateless Gate Index},
url = {http://www.sacred-texts.com/bud/glg/index.htm},
urldate = {2013-06-10},
file = {The Gateless Gate Index:/home/kjambunathan/.mozilla/firefox/htr1myi9.default/zotero/storage/WWH3MDSG/index.html:text/html}
},
@book{blyth_zen_1970,
title = {Zen and Zen classics},
language = {en},
publisher = {Hokuseido Press},
author = {Blyth, Reginald Horace},
year = {1970},
keywords = {Philosophy / Zen, Religion / Buddhism / General, Religion / Buddhism / Zen, Zen Buddhism}
},
@book{blofeld_zen_1994,
edition = {First Evergreen Edition},
title = {The Zen Teaching of Huang-Po: On the Transmission of Mind},
isbn = {0802150926},
shorttitle = {The Zen Teaching of Huang-Po},
publisher = {Grove Press},
translator = {Blofeld, John Eaton Calthorpe},
month = jan,
year = {1994}
},
@book{blofeld_zen_1994-1,
edition = {First Evergreen Edition},
title = {The Zen Teaching of Huang-Po: On the Transmission of Mind},
isbn = {0802150926},
shorttitle = {The Zen Teaching of Huang-Po},
publisher = {Grove Press},
translator = {Blofeld, John Eaton Calthorpe},
month = jan,
year = {1994}
}
[-- Attachment #5: ooxml.text.article.layout --]
[-- Type: text/plain, Size: 291 bytes --]
<text:span text:style-name="Bold">\format[Authors(LastFirst,Semicolon)]{\author}</text:span> (<text:span text:style-name="Bold">\year\uniq</text:span>). <text:span text:style-name="Emphasis">\title</text:span>, \journal \volume\begin{pages} : \format[FormatPagesForHTML]{\pages}\end{pages}.
[-- Attachment #6: ooxml.text.book.layout --]
[-- Type: text/plain, Size: 288 bytes --]
\format[Authors(LastFirst,Semicolon)]{\author}\begin{editor}\format[AuthorLastFirst,AuthorAbbreviator,AuthorAndsReplacer]{\editor} (Ed.)\end{editor}, <text:span text:style-name="Bold">\year\uniq</text:span>. <text:span text:style-name="Emphasis">\title</text:span>. \publisher, \address.
[-- Attachment #7: ooxml.text.inbook.layout --]
[-- Type: text/plain, Size: 319 bytes --]
\format[Authors(LastFirst,Semicolon)]{\author} (<text:span text:style-name="Bold">\year\uniq</text:span>). <text:span text:style-name="Emphasis">\chapter</text:span>. In: \format[AuthorLastFirst,AuthorAbbreviator,AuthorAndsReplacer]{\editor} (Ed.), <text:span text:style-name="Emphasis">\title</text:span>, \publisher.
[-- Attachment #8: ooxml.text.incollection.layout --]
[-- Type: text/plain, Size: 321 bytes --]
\format[Authors(LastFirst,Semicolon)]{\author} (<text:span text:style-name="Bold">\year\uniq</text:span>). <text:span text:style-name="Emphasis">\title</text:span>. In: \format[AuthorLastFirst,AuthorAbbreviator,AuthorAndsReplacer]{\editor} (Ed.), <text:span text:style-name="Emphasis">\booktitle</text:span>, \publisher.
[-- Attachment #9: ooxml.text.layout --]
[-- Type: text/plain, Size: 245 bytes --]
\format[Authors(LastFirst,Semicolon)]{\author} (<text:span text:style-name="Bold">\year\uniq</text:span>). <text:span text:style-name="Emphasis">\title</text:span>, \journal \volume\begin{pages} : \format[FormatPagesForHTML]{\pages}\end{pages}.
[-- Attachment #10: ooxml.text.phdthesis.layout --]
[-- Type: text/plain, Size: 173 bytes --]
\format[Authors(LastFirst,Semicolon)]{\author} (<text:span text:style-name="Bold">\year\uniq</text:span>). <text:span text:style-name="Emphasis">\title</text:span>, \school.
[-- Attachment #11: ooxml.numbered.jstyle --]
[-- Type: text/plain, Size: 1707 bytes --]
# Written by Morten O. Alver.
# This file is licensed under the terms of the GPL version 2 (or later).
NAME
Example style file for JabRef-oo plugin.
JOURNALS
Journal name 1
Journal name 2
PROPERTIES
Title="References"
IsSortByPosition="true"
IsNumberEntries="true"
ReferenceParagraphFormat="Text body"
ReferenceHeaderParagraphFormat="Heading 2"
CITATION
BracketBefore="["
BracketAfter="]"
BracketBeforeInList="["
BracketAfterInList="] "
CitationSeparator="; "
UniquefierSeparator=","
GroupedNumbersSeparator="-"
MinimumGroupingCount="3"
FormatCitations="false"
CitationCharacterFormat="Default"
PageInfoSeparator="; "
LAYOUT
article=<b>\format[Authors(LastFirst,Semicolon)]{\author}</b> (<b>\year\uniq</b>). <i>\title</i>, \journal \volume\begin{pages} : \format[FormatPagesForHTML]{\pages}\end{pages}.
book=\format[Authors(LastFirst,Semicolon)]{\author}\begin{editor}\format[AuthorLastFirst,AuthorAbbreviator,AuthorAndsReplacer]{\editor} (Ed.)\end{editor}, <b>\year\uniq</b>. <i>\title</i>. \publisher, \address.
incollection=\format[Authors(LastFirst,Semicolon)]{\author} (<b>\year\uniq</b>). <i>\title</i>. In: \format[AuthorLastFirst,AuthorAbbreviator,AuthorAndsReplacer]{\editor} (Ed.), <i>\booktitle</i>, \publisher.
inbook=\format[Authors(LastFirst,Semicolon)]{\author} (<b>\year\uniq</b>). <i>\chapter</i>. In: \format[AuthorLastFirst,AuthorAbbreviator,AuthorAndsReplacer]{\editor} (Ed.), <i>\title</i>, \publisher.
phdthesis=\format[Authors(LastFirst,Semicolon)]{\author} (<b>\year\uniq</b>). <i>\title</i>, \school.
default=\format[Authors(LastFirst,Semicolon)]{\author} (<b>\year\uniq</b>). <i>\title</i>, \journal \volume\begin{pages} : \format[FormatPagesForHTML]{\pages}\end{pages}.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ANN] Bibliography support ODT + JabRef
2013-07-18 20:01 [WIP/RFC] Bibliography support ODT + JabRef Jambunathan K
@ 2013-07-24 14:53 ` Jambunathan K
2013-07-26 5:01 ` Jambunathan K
[not found] ` <87vc3uonao.fsf@gmail.com>
0 siblings, 2 replies; 7+ messages in thread
From: Jambunathan K @ 2013-07-24 14:53 UTC (permalink / raw)
To: emacs-orgmode; +Cc: Nicolas Goaziou
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].
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ANN] Bibliography support ODT + JabRef
2013-07-24 14:53 ` [ANN] " Jambunathan K
@ 2013-07-26 5:01 ` Jambunathan K
[not found] ` <87vc3uonao.fsf@gmail.com>
1 sibling, 0 replies; 7+ messages in thread
From: Jambunathan K @ 2013-07-26 5:01 UTC (permalink / raw)
To: emacs-orgmode; +Cc: Nicolas Goaziou
> 2. Install the JabRef plugin [Chicago Export filters for Org-mode].
> [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
This is a port of Chicago plugin for JabRef. Search for Chicago in the
below page.
http://jabref.sourceforge.net/resources.php#plugins
There is a PDF file in there which I have copied over to
http://repo.or.cz/w/JabRefChicagoForOrgmode.git/blob_plain/refs/heads/master:/Chicago_export_filters.pdf
M-: org-jabref-export-formats
=> (("odt"
("Chicago Manual of Style (author-date)"
:in-text "chicago.ODF.text" :bibliography
"chicago.ODF.reference")))
Remembers the layout filters are for RTF. There are multiple formats in
that plugin. But "text" and "reference" are the only filters I have
"fixed" (i.e, a dirty job) to get satisfactory XML output. So if
someone is interested in other formats and willing to educate me on how
the ODT document should look like, let me know.
Here is some quick notes on that pdf file.
| Entry types |
|---------------|
| article |
| book |
| conference |
| electronic |
| inproceedings |
| incollection |
| masterthesis |
| phdthesis |
| unpublished |
| System | Parts | files |
|--------------------+-------------------------------+-----------------------|
| author-date | reference list for | Chicago.reference |
| | complete list of sources | |
|--------------------+-------------------------------+-----------------------|
| | text citations in parenthesis | Chicago.text |
|--------------------+-------------------------------+-----------------------|
| notes and | biblio for bibliographies | Chicago.biblio |
| bibliography | | |
|--------------------+-------------------------------+-----------------------|
| | footend for footnotes | Chicago.footend |
| | and endnotes | |
|--------------------+-------------------------------+-----------------------|
| | footend short for subsequent | Chicago.footend.short |
| | notes or works with | |
| | full bibliographies | |
|--------------------+-------------------------------+-----------------------|
| abstract and note | | Chicago.abstract |
| (follows notes and | | Chicago.note |
| biblio style) | | |
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <87vc3uonao.fsf@gmail.com>]
end of thread, other threads:[~2013-07-30 13:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-18 20:01 [WIP/RFC] Bibliography support ODT + JabRef Jambunathan K
2013-07-24 14:53 ` [ANN] " Jambunathan K
2013-07-26 5:01 ` 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
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).