From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: [BUG] [new exporter] \cite and \ref in odt export Date: Sun, 17 Jun 2012 22:57:17 +0200 Message-ID: <87wr35bqs2.fsf@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgMYN-0005FJ-Q0 for emacs-orgmode@gnu.org; Sun, 17 Jun 2012 16:58:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SgMYL-00084E-FO for emacs-orgmode@gnu.org; Sun, 17 Jun 2012 16:58:35 -0400 Received: from plane.gmane.org ([80.91.229.3]:59203) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgMYL-000848-4K for emacs-orgmode@gnu.org; Sun, 17 Jun 2012 16:58:33 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SgMYG-0003O7-Vb for emacs-orgmode@gnu.org; Sun, 17 Jun 2012 22:58:28 +0200 Received: from vpn-2019.gwdg.de ([134.76.2.19]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Jun 2012 22:58:28 +0200 Received: from andreas.leha by vpn-2019.gwdg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Jun 2012 22:58:28 +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 Hi all, I experience problems when using \ref and \cite in documents, and then exporting to odt. I can replace the \ref{uuu} with [[uuu]] (breaking compatibility with the legacy exporter), but how would I replace \cite? My only 'solution' momentarily is to export with #+OPTIONS: LaTeX:nil I guess this is a bug? Regards, Andreas PS: Here follows an example: Use this bib-file: ,----[ literature.bib ] | @article{schulte:2012, | author =3D "Eric Schulte and Dan Davison and Thomas Dye and | Carsten Dominik", | title =3D "A Multi-Language Computing Environment for Literate | Programming and Reproducible Research", | journal =3D "Journal of Statistical Software", | volume =3D "46", | number =3D "3", | pages =3D "1--24", | day =3D "25", | month =3D "1", | year =3D "2012", | CODEN =3D "JSSOBK", | ISSN =3D "1548-7660", | bibdate =3D "2011-10-03", | URL =3D "http://www.jstatsoft.org/v46/i03", | accepted =3D "2011-10-03", | acknowledgement =3D"", | keywords =3D "", | submitted =3D "2010-12-22", | } `---- When I try to export this file to odt: ,---- | #+TITLE: Citations in non-LaTeX=20 |=20 |=20 | * Related Work... | can be found in \cite{schulte:2012}. |=20 |=20 |=20 | #+LATEX_HEADER: \usepackage[natbib,backref,backend=3Dbibtex,style=3Dautho= ryear,isbn=3Dfalse,url=3Dfalse,eprint=3Dfalse]{biblatex} | #+LATEX_HEADER: \bibliography{literature} | #+LATEX_HEADER: \setlength{\bibhang}{1em} | #+LATEX_HEADER: \usepackage{hyperref} `---- I get this backtrace: ,---- | Debugger entered--Lisp error: (wrong-type-argument stringp nil) | expand-file-name(nil "/home/andreas/org/") | (let* ((src-file (expand-file-name path (file-name-directory org-curren= t-export-file))) (target-dir (format "Formula-%04d/" (incf org-e-odt-embedd= ed-formulas-count))) (target-file (concat target-dir "content.xml"))) (mess= age "Embedding %s as %s ..." (substring-no-properties path) target-file) (m= ake-directory target-dir) (org-e-odt-create-manifest-file-entry "applicatio= n/vnd.oasis.opendocument.formula" target-dir "1.2") (case (org-e-odt-is-for= mula-link-p src-file) (mathml (copy-file src-file target-file (quote overwr= ite))) (odf (org-e-odt-zip-extract-one src-file "content.xml" target-dir)) = (t (error "%s is not a formula file" src-file))) (org-e-odt-create-manifest= -file-entry "text/xml" target-file) target-file) | org-e-odt-copy-formula-file(nil) | (file-name-directory (org-e-odt-copy-formula-file src)) | (org-e-odt-format-tags "" "" (file-nam= e-directory (org-e-odt-copy-formula-file src))) | (let* ((src (cond ((eq (org-element-type element) (quote link)) (let* (= (type ...) (raw-path ...)) (cond (... ...) (t raw-path)))) ((member (org-el= ement-type element) (quote (latex-fragment latex-environment))) (let* ((lat= ex-frag ...) (formula-link ...)) (and formula-link (string-match "file:\\([= ^]]*\\)" formula-link) (match-string 1 formula-link)))) (t (error "what is = this?")))) (caption-from (case (org-element-type element) (link (org-export= -get-parent-element element)) (t element))) (captions (org-e-odt-format-lab= el caption-from info (quote definition))) (caption (car captions)) (href (o= rg-e-odt-format-tags "" "" (file-name-dire= ctory (org-e-odt-copy-formula-file src)))) (embed-as (if caption (quote par= agraph) (quote character))) width height) (cond ((eq embed-as (quote charac= ter)) (org-e-odt-format-entity "InlineFormula" href width height)) (t (let = ((table-info nil) (table-info (quote (:alignment ["c" "c"] :column-groups [= nil nil] :row-groups ... :special-column-p nil :width [8 1]))) (org-lparse-= table-ncols 2)) (org-e-odt-list-table (list (list (org-e-odt-format-entity = "CaptionedDisplayFormula" href width height captions) (let* ... ...))) (quo= te (table (:attr_odt ...))) info))))) | org-e-odt-format-formula((latex-fragment (:value "\\cite{schulte:2012}"= :begin 70 :end 89 :post-blank 0 :parent (paragraph (:begin 54 :end 94 :con= tents-begin 54 :contents-end 90 :post-blank 3 :parent (section (:begin 54 := end 336 :contents-begin 54 :contents-end 336 :post-blank 0 :parent (headlin= e (:raw-value "Related Work..." :title ... :begin 36 :end 336 :pre-blank 0 = :hiddenp nil :contents-begin 54 :contents-end 336 :level 1 :priority nil :t= ags nil :todo-keyword nil :todo-type nil :scheduled nil :deadline nil :time= stamp nil :clock nil :post-blank 0 :footnote-section-p nil :archivedp nil := commentedp nil :quotedp nil :category nil :parent ...) #4)) #2 (keyword (:k= ey "LATEX_HEADER" :value "\\usepackage[natbib,backref,backend=3Dbibtex,styl= e=3Dauthoryear,isbn=3Dfalse,url=3Dfalse,eprint=3Dfalse]{biblatex}" :begin 9= 4 :end 214 :post-blank 0 :parent #4)) (keyword (:key "LATEX_HEADER" :value = "\\bibliography{literature}" :begin 214 :end 256 :post-blank 0 :parent #4))= (keyword (:key "LATEX_HEADER" :value "\\setlength{\\bibhang}{1em}" :begin = 256 :end 298 :post-blank 0 :parent #4)) (keyword (:key "LATEX_HEADER" :valu= e "\\usepackage{hyperref}" :begin 298 :end 336 :post-blank 0 :parent #4))))= "can be found in " #0 "."))) (:author "Andreas Leha" :creator "Generated b= y Org mode 7.8.11 in Emacs 24.1.50.1." :date nil :description nil :email "a= ndreas@werner" :exclude-tags ("noexport") :headline-levels 3 :keywords nil = :language "en" :preserve-breaks nil :section-numbers t :select-tags ("expor= t") :time-stamp-file t :title ("Citations in non-LaTeX") :with-archived-tre= es headline :with-author t :with-clocks nil :with-creator comment :with-dra= wers nil :with-email nil :with-emphasize t :with-entities t :with-fixed-wid= th t :with-footnotes t :with-plannings nil ...)) | .... | .... | .... | org-export-dispatch() | call-interactively(org-export-dispatch record nil) | command-execute(org-export-dispatch record) | execute-extended-command(nil "org-export-dispatch") | call-interactively(execute-extended-command nil nil) `----