Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with bibliography while exporting with org mode 9.5 #85

Open
lazzalazza opened this issue Nov 9, 2021 · 11 comments
Open

Issue with bibliography while exporting with org mode 9.5 #85

lazzalazza opened this issue Nov 9, 2021 · 11 comments

Comments

@lazzalazza
Copy link

Hi,

I get a "Wrong type argument, stringp, ("/path/to/bibliography.bib")" error every time I try to export via pandoc: as a result, I am not able to export anymore.

I have already written to the org mode mantainers but apparently the problem is upstream and has to do rather with this package specifically...

Here's the backtrace of the error:

Debugger entered--Lisp error: (wrong-type-argument stringp ("/Users/test/Dropbox/ciao.bib" "/Dropbox/Standard/Bibliografia/bibliografia_gener..."))
split-string(("/Users/test/Dropbox/ciao.bib" "
/Dropbox/Standard/Bibliografia/bibliografia_gener...") "\n")
#f(compiled-function (it) #<bytecode 0x1a35aa0a79e6febf>)((bibliography . :bibliography))

  • org-pandoc-template(#("#+bibliography: ciao.bib\n\n* Firs..." 28 43 (:parent (headline (:raw-value "First paragraph" :begin 43 :end 86 :pre-blank 0 :contents-begin 62 :contents-end 85 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 43 ...) (section ... ...))) 44 59 (:parent (paragraph (:begin 62 :end 85 :contents-begin 62 :contents-end 85 :post-blank 0 :post-affiliated 62 :parent ...) #("Text text text." 0 15 ...) (footnote-reference ...) #("\n" 0 1 ...)))) (:export-options nil :back-end #s(org-export-backend :name pandoc :parent org :transcoders ((latex-environment . org-pandoc-latex-environ) (link . org-pandoc-link) (table . org-pandoc-table) (template . org-pandoc-template) (paragraph . org-pandoc-paragraph) (src-block . org-pandoc-src-block)) :options ((:pandoc-options "PANDOC_OPTIONS" nil nil space) (:pandoc-extensions "PANDOC_EXTENSIONS" nil nil space) (:pandoc-metadata "PANDOC_METADATA" nil nil space) (:pandoc-variables "PANDOC_VARIABLES" nil nil space) (:epub-chapter-level "EPUB_CHAPTER_LEVEL" nil nil t) (:epub-cover-image "EPUB_COVER" nil nil t) (:epub-stylesheet "EPUB_STYLESHEET" nil nil t) (:epub-embed-font "EPUB_EMBED_FONT" nil nil newline) (:epub-meta "EPUB_META" nil nil newline) (:epub-css "EPUB_CSS" nil nil newline) (:epub-rights "EPUB_RIGHTS" nil nil newline) (:bibliography "BIBLIOGRAPHY")) :filters nil :blocks nil :menu (112 "export via pandoc" (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...))) :translate-alist ((latex-environment . org-pandoc-latex-environ) (link . org-pandoc-link) (table . org-pandoc-table) (template . org-pandoc-template) (paragraph . org-pandoc-paragraph) (src-block . org-pandoc-src-block) (babel-call . org-org-identity) (bold . org-org-identity) (center-block . org-org-identity) (clock . org-org-identity) (code . org-org-identity) (diary-sexp . org-org-identity) (drawer . org-org-identity) (dynamic-block . org-org-identity) (entity . org-org-identity) (example-block . org-org-identity) (export-block . org-org-export-block) (fixed-width . org-org-identity) (footnote-definition . ignore) (footnote-reference . org-org-identity) (headline . org-org-headline) (horizontal-rule . org-org-identity) (inline-babel-call . org-org-identity) (inline-src-block . org-org-identity) (inlinetask . org-org-identity) (italic . org-org-identity) (item . org-org-identity) (keyword . org-org-keyword) (latex-environment . org-org-identity) (latex-fragment . org-org-identity) (line-break . org-org-identity) (link . org-org-link) ...) :exported-data #<hash-table eq 17/4001 0x1ff11ec3ad5f> :input-buffer "prova.org" :input-file "/Users/test/Dropbox/prova.org" :pandoc-options nil :pandoc-extensions nil :pandoc-metadata nil :pandoc-variables nil :epub-chapter-level nil :epub-cover-image nil :epub-stylesheet nil :epub-embed-font nil :epub-meta nil :epub-css nil ...))
    org-export-as(pandoc nil nil nil (:output-file "prova.tmpPDzJxT.org"))
    org-export-to-file(pandoc "prova.tmpPDzJxT.org" nil nil nil nil nil #f(compiled-function (f) #<bytecode 0xb0002599e44c2eb>))
    org-pandoc-export(docx nil nil nil nil nil 0)
    org-pandoc-export-to-docx-and-open(nil nil nil nil)
    org-export-dispatch(nil)
    funcall-interactively(org-export-dispatch nil)
    command-execute(org-export-dispatch)

Thank you so much,

Andrea.

@a-fent
Copy link

a-fent commented Nov 15, 2021

Thank you for the report. With Org 9.5 having in-built citation support, the way the BIBLIOGRAPHY option is handled is now incompatible between org and pandoc. There are multiple ways citations could be handled (by org-mode itself, by pandoc, or by the latex processor). I need to work out which are possible and how to support them. There are also some changes needed in pandoc to catch up: jgm/pandoc#7329

I have it on top of my list on the maintained fork of ox-pandoc. Feel free to comment there.

For now, you'll either have to use Org 9.4 or use Org 9.5 with the built-in export backends, not ox-pandoc.

@lazzalazza
Copy link
Author

@a-fent Thank you so much for your reply and for your effort: ox-pandoc is such an amazing package and I can't wait to see it fully working again!

@lazzalazza
Copy link
Author

PS. I have played a little with the code and tryed feeding the split-string function with (nth 0 value), to see if I could temporarily patch the problem... It didn't work. The bibliography item was not recognized and simply printed as a link in the output file (a .docx in my case).

@a-fent
Copy link

a-fent commented Nov 17, 2021

Yes, there are a few things that need to be changed in option handling and processing. I have got as far as having ox-pandoc pass through the bibliography if on 9.5, so it will let Org mode handle citations. So you can use "basic" or "biblatex" (for example) and have it work.

It's on a branch if you want to try it. https://github.com/emacsorphanage/ox-pandoc/tree/citations-org9.5

@lazzalazza
Copy link
Author

Thanks! Sorry, when you say "you can use "basic" or "biblatex" (for example) and have it work", what do you refer to exactly? I have tried the code, it doesn't give me any problem while exporting, but the result is not formatted (i still get a link that says "cite:&bibliographyitem" in my .docx file). Probably this was meant to be, being this an early stage of development of the branch...

@a-fent
Copy link

a-fent commented Nov 17, 2021

Thank you, I appreciate you taking the time to try it out.

I should have been clearer: I meant that if you put a #+CITE_EXPORT header in the document, Org 9.5+ should process the citations in the way described in the Org manual

However I have only tried the biblatex and basic processors. If you are exporting to docx you probably will want to use the CSL exporter.

@lazzalazza
Copy link
Author

lazzalazza commented Nov 17, 2021 via email

@a-fent
Copy link

a-fent commented Nov 17, 2021

Not 100% sure, I haven't worked that much yet with the new citation system. But looks right. My test document sets it in the org-mode header line. #+CITE_EXPORT: biblatex which produces an \autocite (IIRC).

@lazzalazza
Copy link
Author

Hi! Is there any update on the treatment of org 9.5 citations? I see that a new release appeared on MELPA in the meanwhile, but the exporting of citations via csl still seems impossible. Am I doing anything wrong or the development is still on its way? Thank you so much!

@a-fent
Copy link

a-fent commented Dec 1, 2021

Please could you post a minimal example at the thread emacsorphanage#1 together with any error messages?

It should work in theory, but it's still experimental and more reports on the CSL export in particular would help.

@lazzalazza
Copy link
Author

lazzalazza commented Dec 1, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants