emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [ANN] Bibliography support ODT + JabRef


From: Jambunathan K
Subject: Re: [O] [ANN] Bibliography support ODT + JabRef
Date: Mon, 29 Jul 2013 10:01:00 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> 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 <address@hidden> writes:

> On Mon, Jul 29, 2013 at 3:48 AM, Jambunathan K
> <address@hidden> 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 <address@hidden> 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 <address@hidden> 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.
>     >>
>     >> ,----
>     >> | address@hidden:~/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.
>     >> | address@hidden:~/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 <address@hidden> 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
>     




reply via email to

[Prev in Thread] Current Thread [Next in Thread]