emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [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; 8+ 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] 8+ 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; 8+ 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] 8+ 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; 8+ 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] 8+ messages in thread

* Re: [ANN] Bibliography support ODT + JabRef
@ 2013-07-29  4:31 Jambunathan K
  0 siblings, 0 replies; 8+ messages in thread
From: Jambunathan K @ 2013-07-29  4:31 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Nicolas Goaziou


> It can work with Chinese characters now. thanks!

Thanks for confirming this.

> 2. Word "References" should be added to `org-export-dictionary'

I am CCing Ngz.  

Currently Bibliography support in Org is EXPERIMENTAL.  Things will be
in a state of flux until it gets standardized.

I also think the spaces preceding the \cite{ } element should be gobbled
up by the exporter.  In actuality, this is something that ox.el has to
take care as part of standardization effort (I think).

(Ngz can ignore the rest of the message)

> 1. the current issue is that the exported references like: 
>
> References
>
> * .............
> * ..............
> * ..............
>
> instead of :
>
> References
>
> [1] .......
> [2] .......
> [3] ........ 
>
> Is it default setting or a bug?

Do you see numbered list in the ODT file that I sent you.  If yes, then
it is likely that you don't have the new styles file
(etc/styles/OrgOdtStyles.xml) or that the exporter is picking up the old
styles file.

What is the value of 

  (custom-set-variables
   '(org-odt-citation-transcoders
     (quote
      (org-odt-citation-reference/numbered
      . org-jabref-odt-bibliography/numbered))))

You need the above setting for creating numbered entries.  Yes, there
are multiple transcoders that you can use.  One of the transcoders will
NOT use the numbered list.  See custom buffer for details.

If you do

  M-x load-library RET ox-odt.el RET

and subsequently look at *Messages* buffer what styles file is it
using.  It should use the updated styles file.  In my case, I see

  Debug (ox-odt): Using styles under
  /home/kjambunathan/src/org-mode/etc/styles/

If you have "merged" from my git repo, you will have the updated styles
file.  But for some reason it may not be picked up.  In that case,
update your .emacs with this line.  The path below should point to the
parent of the "styles" sub-directory.

  (setq org-odt-data-dir "~/src/org-mode/etc/")

The ODT style that is newly introduced is called "OrgBibliographyList".
If everything is alright, it should be visible as a List Style in
LibreOffice's Stylist.

feng shu <tumashu@gmail.com> writes:

> On Mon, Jul 29, 2013 at 3:48 AM, Jambunathan K
> <kjambunathan@gmail.com> wrote:
>
>     Sorry about spamming you.
>     
>     > s/RTFChars/XMLChars/ is what was needed.
>     
>     If I use XMLChars, then the Chinese characters in content.xml are
>     actually numerically encoded. This would make reading of
>     content.xml
>     and hence debugging of corruption issues very difficult.
>     
>     So, I have used s/XMLChars/FormatChars/ and pushed one more update
>     to
>     the JabRef plugin.
>     
>     The download link below is still the same. It always points to the
>     latest plugin jar.
>     
>     
>
> 2. Word "References" should be added to `org-export-dictionary'
>
>     Jambunathan K <kjambunathan@gmail.com> writes:
>     
>     > OK. I have pushed a fix.
>     >
>     > Here is the direct link to updated JabRef Plugin:
>     >
>     >
>     http://repo.or.cz/w/JabRefChicagoForOrgmode.git/blob_plain/master:/net.
>     sf.jabref.export.Chicago.ODF(English)-1.2.jar
>     >
>     > Git repository (Home Page):
>     > http://repo.or.cz/w/JabRefChicagoForOrgmode.git
>     >
>     > Pull URL:
>     > git://repo.or.cz/JabRefChicagoForOrgmode.git
>     > http://repo.or.cz/r/JabRefChicagoForOrgmode.git
>     >
>     > s/RTFChars/XMLChars/ is what was needed. With export preferences
>     set to
>     > utf-8, I am able to export you *.bib entry. I am attaching the
>     test
>     > case file. They seem OK to my non-chinese eye.
>     >
>     >
>     >
>     >
>     >
>     > Jambunathan K <kjambunathan@gmail.com> writes:
>     >
>     >> Thanks for trying out.
>     >>
>     >> I don't understand JabRef. So both of us are proceeding blindly
>     here.
>     >>
>     >> Possibility 1:
>     >> =============
>     >>
>     >> The original JabRef plugin is actually a RTF exporter.
>     >>
>     >> 1. Identify the type of the Bib entry you are exporting. Looks
>     like the
>     >> entry below is a masterthesis (It could be book, article
>     >> etc). Identify the correspoding layout file. For example,
>     >>
>     >> Chicago.text.mastersthesis.layout
>     >> Chicago.reference.mastersthesis.layout
>     >>
>     >> ,----
>     >> | \begin{author}
>     >> | \format[RTFChars,AuthorLastFirstCommas]{\author}. \end
>     {author}
>     >> | \begin{year}\format[RTFChars]{\year}. \end{year}
>     >> | \begin{title}\format[RTFChars]{\title}. \end{title}Masters
>     thesis,
>     >> | \format[RTFChars]{\school}. \\par\\par
>     >> `----
>     >>
>     >> You can open the Jar file right within Emacs with C-x C-f
>     >> whatever.jar.
>     >>
>     >> 2. Fix up the layout files.
>     >>
>     >> i.e, Replace \format[RTFChars] with \format[XMLChars]. The
>     >> documentation in
>     http://jabref.sourceforge.net/help/CustomExports.php
>     >> is not very clear.
>     >>
>     >> 3. Zip up the Jarfile.
>     >>
>     >> 4. Uninstall the old plugin
>     >>
>     >> 5. Install the new plugin
>     >>
>     >> 6. Re-export.
>     >>
>     >> 7. See whether the output now makes sense.
>     >>
>     >> Possibility 2:
>     >> ==============
>     >>
>     >> ,---- See http://jabref.sourceforge.net/faq.php
>     >> |
>     >> | Q: Does JabRef support Chinese characters?
>     >> |
>     >> | A: Yes. Go to Options->Preferences->General->Default
>     Encoding. Set it to
>     >> | UTF8. At “Appearance” set table font as simsun (or any other
>     Chinese
>     >> | font). At “General”, you can change the UI language to
>     Chinese. More
>     >> | information was available at
>     >> |
>     http://yenlung.math.nccu.edu.tw/~yenlung/notes/latex_in_Windows.pdf,
>     but
>     >> | the link is currently broken.
>     >> |
>     >> `----
>     >>
>     >> See whether this setting makes a differnce.
>     >>
>     >>
>     >> Possibility 3:
>     >> =============
>     >>
>     >> If both 1 and 2, doesn't work, choose some other already
>     existng XML
>     >> based export format. (I see docbook as supported export
>     format). See
>     >> whether you can export entries using GUI.
>     >>
>     >> See *Messages* buffer for how you can export a key via command
>     line or
>     >> use the GUI to check results directly.
>     >>
>     >> ,----
>     >> | kjambunathan@debian-6:~/Downloads$ java -jar JabRef-2.9.2.jar
>     -n true -help
>     >> | Found 5 plugin(s):
>     >> | - net.sf.jabref.core
>     (jar:file:/home/kjambunathan/Downloads/JabRef-2.9.2.jar!/plugins/net.
>     sf.jabref.core/plugin.xml)
>     >> | - net.sf.jabref.export.chicago.ODF
>     (jar:file:/home/kjambunathan/.jabref/plugins/net.sf.jabref.export.Chicago.
>     ODF(English)-1.2.jar!/plugin.xml)
>     >> | - net.sf.jabref.export.chicago
>     (jar:file:/home/kjambunathan/.jabref/plugins/net.sf.jabref.export.Chicago
>     (English)-1.2.jar!/plugin.xml)
>     >> | - net.sf.jabref.oo.ooplugin
>     (jar:file:/home/kjambunathan/.jabref/plugins/net.sf.jabref.oo.ooplugin-
>     0.9.jar!/plugin.xml)
>     >> | - net.sf.jabref.export.misq
>     (jar:file:/home/kjambunathan/Downloads/JabRef-2.9.2.jar!/plugins/net.
>     sf.jabref.export.misq/plugin.xml)
>     >> |
>     >> | jabref [options] [bibtex-file]
>     >> |
>     >> | Option Name Type Description
>     >> |
>     >> | -f, --fetch <STRING> Run Fetcher, e.g.
>     "--fetch=Medline:cancer"
>     >> | -o, --output <STRING> Output or export file: filename[,export
>     format]
>     >> | -p, --primp <STRING> Import preferences from file
>     >> | -n, --nogui <BOOLEAN> No GUI. Only process command line
>     options.
>     >> | -a, --aux <STRING> Subdatabase from aux: file[.aux],new[.bib]
>     >> | -h, --help <BOOLEAN> Display help on command line options
>     >> | -b, --blank <BOOLEAN> Do not open any files at startup
>     >> | --importToOpen <STRING> Import to open tab
>     >> | -i, --import <STRING> Import file: filename[,import format]
>     >> | -s, --nosplash <BOOLEAN> Do not show splash window at startup
>     >> | -x, --prexp <STRING> Export preferences to file
>     >> | -d, --prdef <STRING> Reset preferences (key1,key2,... or '
>     all')
>     >> | -v, --version <BOOLEAN> Display version
>     >> | -m, --exportMatches <STRING> [field]searchTerm,outputFile:
>     file[,exportFormat
>     >> | -l, --loads <BOOLEAN> Load session
>     >> |
>     >> | Available import formats:
>     >> | BibTeXML : bibtexml
>     >> | Biblioscape : biblioscape
>     >> | Biomail : biomail
>     >> | CSA : csa
>     >> | Copac : cpc
>     >> | INSPEC : inspec
>     >> | ISI : isi
>     >> | JStor (tab delimited) : jstor
>     >> | MSBib : msbib
>     >> | Medline : medline
>     >> | Ovid : ovid
>     >> | REPEC New Economic Papers (NEP) : repecnep
>     >> | RIS : ris
>     >> | Refer/Endnote : refer
>     >> | Scifinder : scifinder
>     >> | SilverPlatter : silverplatter
>     >> | Sixpack : sixpack
>     >> | XMP-annotated PDF : xmpannotatedpdf
>     >> |
>     >> | Available export formats: MSBib, bibordf, bibtexml,
>     chicago.ODF.abstract,
>     >> | chicago.ODF.biblio, chicago.ODF.footend,
>     chicago.ODF.footend.short,
>     >> | chicago.ODF.note, chicago.ODF.reference, chicago.ODF.text,
>     >> | chicago.abstract, chicago.biblio, chicago.footend,
>     >> | chicago.footend.short, chicago.note, chicago.reference,
>     chicago.text,
>     >> | din1505, docbook, endnote, harvard, html, listrefs, misq,
>     mods, mysql,
>     >> | ods, oocalc, oocsv, ooxml.reference, postgresql, ris,
>     simplehtml,
>     >> | tablerefs, tablerefsabsbib.
>     >> | kjambunathan@debian-6:~/Downloads$
>     >> `----
>     >>
>     >>
>     >> Possibility 4:
>     >> ==============
>     >>
>     >> May be I have to setup coding-system for read and write within
>     the
>     >> ox-jabref.el.
>     >>
>     >> Possibility 5: Last resort :-)
>     >> ==============
>     >>
>     >> Send me the Chinese *.bib file. I will try my best where the
>     issue
>     >> could be.
>     >>
>     >>
>     >>
>     >> Feng Shu <tumashu@gmail.com> writes:
>     >>
>     >>> I tested this patch and found that it can't work well with
>     Chinese
>     >>> character:
>     >>>
>     >>> the output xml file like this:
>     >>> #+begin_example
>     >>> <!-- BEGIN JABREF - CHICAGO ODF REFERENCE -->
>     >>>
>     >>> <text:p text:style-name="Bibliography">
>     >>> <text:bookmark text:name="zhubajie"/>
>     >>> <text:bookmark-start text:name="cite-zhubajie"/>
>     >>>
>     >>>
>     >>> \u29482?\u20843?\u25106?.
>     >>> 2005.
>     >>>
>     \u35770?\u27969?\u20307?\u39135?\u29289?\u30340?\u25345?\u20037?\u20445?
>     \u23384?. Masters
>     >>> thesis, \u24191?\u23506?\u23467?\u22823?\u23398?.
>     >>>
>     >>> <text:bookmark-end text:name="cite-zhubajie"/>
>     >>> </text:p><!-- END JABREF - CHICAGO ODF REFERENCE -->
>     >>>
>     >>> #+end_example
>     

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

* Re: [ANN] Bibliography support ODT + JabRef
       [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
  0 siblings, 2 replies; 8+ messages in thread
From: Jambunathan K @ 2013-07-30  5:07 UTC (permalink / raw)
  To: feng shu; +Cc: emacs-orgmode, Nicolas Goaziou


Nicolas, just jump to the last para.

Feng Shu

Please CC the mailing list.  I don't mind receiving or replying to
one-to-one mails but things that we exchange will be of interest to
other members.

feng shu <tumashu@gmail.com> writes:

> 1. When I add (setq org-odt-data-dir "~/project/org-mode/etc/") to my .
> emacs file, it works properly, Thanks!
>
> 2. Two question:
> 1. How can I get uppercite: test^[1] instead of test[1]?
> 2. How can I get compressed cite,like: test^[3, 5, 7-10, 16]

Thanks for the requests.  

Numbering is done by ox-jabref.el and not by JabRef application, so
these requests can indeed be met with 5-15 minute of effort.  But I
hesitate to 

The main problem is there are just too many styles a Bibliographic
Reference can be typeset - right from what some standard says, to what
my university wants to what I prefer myself.  

This is where some sort of common agreement - even just among the
members of the community - will help.  I will keep listening to the
conversation and hopefully an opinion will emerge during the course of
time.

> Forgot to mention:

> The speed of converting bib to xml is slow, may be we should introduce
> a cache system.

If you use "Numbered" transcoders, then the citekeys are processed one
by one.  So if there are 10 citekeys, then there will be 20 invocations
of command line.

One way of dealing with this is to choose a transcoder, that doesn't
enumerate.  In that case the Bibliographic Reference is created enbloc.
So the number of command line invocations will reduce to 11 = 10 + 1.
The ASCII document that I circulated gives examples of such transcoders.

> just like previewing latex snippet.

Caching of citekey->XML or whatever transformation is one option.
Another option is to just disable citations for casual exports and
enable it one for the final output.

Something like

   cite:t 

for #+OPTIONS.

For now you can customize `org-odt-citation-transcoders' so that
citation processing is disabled.

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

* Re: [ANN] Bibliography support ODT + JabRef
  2013-07-30  5:07                 ` Jambunathan K
@ 2013-07-30  9:39                   ` Rasmus
  2013-07-30  9:56                   ` feng shu
  1 sibling, 0 replies; 8+ messages in thread
From: Rasmus @ 2013-07-30  9:39 UTC (permalink / raw)
  To: emacs-orgmode

Jambunathan K <kjambunathan@gmail.com> writes:

> feng shu <tumashu@gmail.com> writes:
>
>> 1. When I add (setq org-odt-data-dir "~/project/org-mode/etc/") to my .
>> emacs file, it works properly, Thanks!
>>
>> 2. Two question:
>> 1. How can I get uppercite: test^[1] instead of test[1]?
>> 2. How can I get compressed cite,like: test^[3, 5, 7-10, 16]
>
> Thanks for the requests.  
>
> Numbering is done by ox-jabref.el and not by JabRef application, so
> these requests can indeed be met with 5-15 minute of effort.  But I
> hesitate to 
>
> The main problem is there are just too many styles a Bibliographic
> Reference can be typeset - right from what some standard says, to what
> my university wants to what I prefer myself.  
>
> This is where some sort of common agreement - even just among the
> members of the community - will help.  I will keep listening to the
> conversation and hopefully an opinion will emerge during the course of
> time.

Aren't these "just" a question of the style file used from Jabref (but
currently written by Jambunathan)?  More to the point, can someone
with reasonable effort write a new style?  If that's the case a less
styles can shipped and more styles can be user-submission
(e.g. org-cite-styles in elpa?).

IMO authordate, numeric (using names from table below) should be
included.  I agree with Feng that comp variations are nice.
Alphabetic, verbose and authortitle are nice to have, but I wouldn't
use them.

Also, what are the limitations of the complexity that can be handled
by this scheme?  Can one have a distinction between style and type of
citation, e.g. combine a inline-citation style with a bibliography
citation style?

Is something like footcite a property of the citation or of the style?

Just for the reference, these are the default in-text citation styles
of biblatex (section 3.3.1).  So in Biblatex-terms Feng is asking for
numeric-comp with \supercite{·}.

NAME                 STYLE
========================================================================
numeric              [8, 3, 1, 7, 2]
numeric-comp         [1–3, 7, 8]
numeric-verb         [2]; [5]; [6]
alphabetic           [Doe92; Doe95; Jon98]
alphabetic-verb      [Doe92]; [Doe95]; [Jon98]
authoryear           Doe 1995b; Doe 1992; Jones 1998; Doe 1995a
authoryear-comp      Doe 1992, 1995a,b; Jones 1998
alphabetic-verb      Doe 1992, 1995a,b; Jones 1998
authoryear-ibid      replaces repeated citations by the abbreviation 
                     ibidem
authortitle          Doe, First title; Doe, Second title
authortitle-comp     Doe,First title, Second title
authortitle-ibid     replaces repeated citations by the abbreviation
                     ibidem
authortitle-icomp    A style combining the features
authortitle-terse    authortitle but only prints the title 
                     if the bibliography contains more than one work
authortitle-tcomp    authortitle-comp and authortitle-terse. 
authortitle-ticomp   authortitle-tcomp style with an ibidem feature.
verbose              full citation as bibliography entry then short 
                     citation in footnote
verbose-ibid         replaces repeated citations by the abbreviation
                     ibidem
verbose-note         short citation is a pointer to the footnote with 
                     the full citation
verbose-inote        verbose-note with ibidem
verbose-trad1:       verbose butt uses the scholarly abbreviations
                     ibidem, idem, op. cit., and loc. cit. 
verbose-trad2        ibidem and idem in repeated citations. 
verbose-trad3        useses op. cit. in a slightly different way.
draft                entry keys in citations
========================================================================


-- 
There are known knowns; there are things we know that we know.

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

* Re: [ANN] Bibliography support ODT + JabRef
  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
  1 sibling, 1 reply; 8+ messages in thread
From: feng shu @ 2013-07-30  9:56 UTC (permalink / raw)
  To: Jambunathan K; +Cc: emacs-orgmode@gnu.org

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

On Tue, Jul 30, 2013 at 1:07 PM, Jambunathan K <kjambunathan@gmail.com>wrote:

>
> Nicolas, just jump to the last para.
>
> Feng Shu
>
> Please CC the mailing list.  I don't mind receiving or replying to
> one-to-one mails but things that we exchange will be of interest to
> other members.
>
> feng shu <tumashu@gmail.com> writes:
>
> > 1. When I add (setq org-odt-data-dir "~/project/org-mode/etc/") to my .
> > emacs file, it works properly, Thanks!
> >
> > 2. Two question:
> > 1. How can I get uppercite: test^[1] instead of test[1]?
> > 2. How can I get compressed cite,like: test^[3, 5, 7-10, 16]
>
> Thanks for the requests.
>
> Numbering is done by ox-jabref.el and not by JabRef application, so
> these requests can indeed be met with 5-15 minute of effort.  But I
> hesitate to
>
> The main problem is there are just too many styles a Bibliographic
> Reference can be typeset - right from what some standard says, to what
> my university wants to what I prefer myself.
>
> This is where some sort of common agreement - even just among the
> members of the community - will help.  I will keep listening to the
> conversation and hopefully an opinion will emerge during the course of
> time.
>

We don't need include all the styles, but we should make the feature easy
hack for end users. we can introduce hook and filter!


>
> > Forgot to mention:
>
> > The speed of converting bib to xml is slow, may be we should introduce
> > a cache system.
>
> If you use "Numbered" transcoders, then the citekeys are processed one
> by one.  So if there are 10 citekeys, then there will be 20 invocations
> of command line.
>
> One way of dealing with this is to choose a transcoder, that doesn't
> enumerate.  In that case the Bibliographic Reference is created enbloc.
> So the number of command line invocations will reduce to 11 = 10 + 1.
> The ASCII document that I circulated gives examples of such transcoders.
>
> > just like previewing latex snippet.
>
> Caching of citekey->XML or whatever transformation is one option.
> Another option is to just disable citations for casual exports and
> enable it one for the final output.
>
> Something like
>
>    cite:t
>
> for #+OPTIONS.
>
> For now you can customize `org-odt-citation-transcoders' so that
> citation processing is disabled.
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 3099 bytes --]

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

* Re: [ANN] Bibliography support ODT + JabRef
  2013-07-30  9:56                   ` feng shu
@ 2013-07-30 13:25                     ` Feng Shu
  0 siblings, 0 replies; 8+ messages in thread
From: Feng Shu @ 2013-07-30 13:25 UTC (permalink / raw)
  To: emacs-orgmode

>     Caching of citekey->XML or whatever transformation is one option.
>     Another option is to just disable citations for casual exports and
>     enable it one for the final output.
>     
>     Something like
>     
>     cite:t
>     
>     for #+OPTIONS.
>     
>     For now you can customize `org-odt-citation-transcoders' so that
>     citation processing is disabled.
I prefer cache system, the reason may sound a bit funny:

My thesis has more than 50 reference. I use exporting and viewing reference output
to check  my thesis reference. this method very simple, but if exporting speed
is too slow, this method nearly useless. 

-- 

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

end of thread, other threads:[~2013-07-30 13:37 UTC | newest]

Thread overview: 8+ 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
  -- strict thread matches above, loose matches on Subject: below --
2013-07-29  4:31 Jambunathan K

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