From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: [ANN] Bibliography support ODT + JabRef Date: Mon, 29 Jul 2013 10:01:00 +0530 Message-ID: <871u6ixa0r.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3f5G-00014M-Kd for emacs-orgmode@gnu.org; Mon, 29 Jul 2013 00:29:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3f5C-0006Xh-0Y for emacs-orgmode@gnu.org; Mon, 29 Jul 2013 00:29:22 -0400 Received: from plane.gmane.org ([80.91.229.3]:40886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3f5B-0006XV-Mm for emacs-orgmode@gnu.org; Mon, 29 Jul 2013 00:29:17 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V3f5A-00039q-Qf for emacs-orgmode@gnu.org; Mon, 29 Jul 2013 06:29:16 +0200 Received: from 115.242.178.162 ([115.242.178.162]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Jul 2013 06:29:16 +0200 Received: from kjambunathan by 115.242.178.162 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Jul 2013 06:29:16 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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 writes: > On Mon, Jul 29, 2013 at 3:48 AM, Jambunathan K > 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 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 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 Run Fetcher, e.g. > "--fetch=Medline:cancer" > >> | -o, --output Output or export file: filename[,export > format] > >> | -p, --primp Import preferences from file > >> | -n, --nogui No GUI. Only process command line > options. > >> | -a, --aux Subdatabase from aux: file[.aux],new[.bib] > >> | -h, --help Display help on command line options > >> | -b, --blank Do not open any files at startup > >> | --importToOpen Import to open tab > >> | -i, --import Import file: filename[,import format] > >> | -s, --nosplash Do not show splash window at startup > >> | -x, --prexp Export preferences to file > >> | -d, --prdef Reset preferences (key1,key2,... or ' > all') > >> | -v, --version Display version > >> | -m, --exportMatches [field]searchTerm,outputFile: > file[,exportFormat > >> | -l, --loads 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 writes: > >> > >>> I tested this patch and found that it can't work well with > Chinese > >>> character: > >>> > >>> the output xml file like this: > >>> #+begin_example > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> \u29482?\u20843?\u25106?. > >>> 2005. > >>> > \u35770?\u27969?\u20307?\u39135?\u29289?\u30340?\u25345?\u20037?\u20445? > \u23384?. Masters > >>> thesis, \u24191?\u23506?\u23467?\u22823?\u23398?. > >>> > >>> > >>> > >>> > >>> #+end_example >