jkitchin / org-ref

org-mode modules for citations, cross-references, bibliographies in org-mode and useful bibtex tools to go with it.
GNU General Public License v3.0
1.36k stars 243 forks source link

Cannot export citations in org-ref.org to LaTeX #58

Closed Spauldo closed 9 years ago

Spauldo commented 9 years ago

I've installed org-ref via el-get.

To test it out, I tried exporting org-ref.org to html and pdf. The html export seems to work fine.

The pdf export, on the other hand, does not. The citations end up as question marks in the text, and the bibliography section is empty.

For some reason I can't attach the tex output or the command output as .txt files here. I've put them on my server at http://sarnet.mooo.com/org-error/

My org-mode setup is below. I appreciate any advice you can give me.

;; Org Mode

(require 'org)

;; yasnippet support (add-hook 'org-mode-hook (let ((original-command (lookup-key org-mode-map [tab]))) `(lambda () (setq yas-fallback-behavior '(apply ,original-command)) (local-set-key [tab] 'yas-expand))))

;; latex export (require 'ox-latex) (unless (boundp 'org-latex-classes) (setq org-latex-classes nil))

(add-to-list 'org-latex-classes '("IEEEtran" "\documentclass[10pt,journal]{IEEEtran}" ("\section{%s}" . "\section{%s}") ("\subsection{%s}" . "\subsection{%s}") ("\subsubsection{%s}" . "\subsubsection*{%s}")))

;; Syntax highlighting (require 'htmlize) (require 'ox-latex) (setq org-src-fontify-natively t) (setq org-latex-create-formula-image-program 'imagemagick) (setq org-latex-listings 'minted) (add-to-list 'org-latex-packages-alist '("" "minted")) (setq org-latex-pdf-process (list "pdflatex -interaction nonstopmode -shell-escape -output-directory %o %f" "pdflatex -interaction nonstopmode -shell-escape -output-directory %o %f" "pdflatex -interaction nonstopmode -shell-escape -output-directory %o %f"))

;; org-ref

(require 'org-ref) (require 'doi-utils) (require 'jmax-bibtex) (require 'pubmed) (require 'arxiv) (require 'sci-id) (require 'helm-bibtex)

(setq reftex-default-bibliography '("~/school/misc/bib/references.bib"))

(setq org-ref-bibliography-notes "~/school/misc/bib/notes.org" org-ref-default-bibliography '("~/school/misc/bib/references.bib") org-ref-pdf-directory "~/school/misc/bib/pdf/")

(setq org-latex-pdf-process '("pdflatex -interaction nonstopmode -shell-escape -output-directory %o %f" "bibtex %b" "pdflatex -interaction nonstopmode -shell-escape -output-directory %o %f" "pdflatex -interaction nonstopmode -shell-escape -output-directory %o %f"))

;; helm-bibtex

(setq helm-bibtex-bibliography "~/school/misc/bib/references.bib") (setq helm-bibtex-library-path "~/school/misc/bib/pdf")

(setq helm-bibtex-pdf-open-function (lambda (fpath) (start-process "open" "open" "open" fpath)))

(setq helm-bibtex-notes-path "~/school/misc/bib/helm-bibtex-notes")

jkitchin commented 9 years ago

I can confirm that is an issue. It is easy to fix. You need to add a bibliographystyle, otherwise LaTeX/bibtex can't format the bibiliography.

jkitchin commented 9 years ago

Could you share your el-get recipe?

Spauldo commented 9 years ago

That did the trick, thanks! If you could put a note about it in the documentation, that would help people like me who are new to all this.

I only use the default el-get recipe. It is as follows:

(:name org-ref :website "https://github.com/jkitchin/org-ref" :description "org-mode modules for citations, cross-references, bibliographies in org-mode and useful bibtex tools to go with it." :type github :pkgname "jkitchin/org-ref" :depends (dash helm helm-bibtex hydra key-chord))

jkitchin commented 9 years ago

Thanks, I think I have added that and pushed it to that document.

nayakprakash commented 8 years ago

The doi Utils and pdf auto citations don't work well on Windows install of Emacs 24.5. Must one add the follwing to .emacs file?

(require 'org-ref) ;; (require 'org-ref-pdf) ;; (require 'org-ref-autoloads) ;; (require 'org-ref-bibtex) ;; (require 'org-ref-pubmed) ;; (require 'org-ref-glossary) ;; (require 'org-ref-isbn) ;; (require 'org-ref-latex) ;; (require 'org-ref-scopus) ;; (require 'org-ref-pkg) ;; (require 'org-ref-scifinder) ;; (require 'org-ref-sci-id) ;; (require 'org-ref-url-utils) ;; (require 'org-ref-wos) ;; (require 'x2bib) ;; (require 'doi-utils) ;; (require 'org-ref-arxiv)

I have commented out the section below Org-ref as it throws a ''do not call error'' on loading Emacs.

I am a Emacs newbie and would appreciate any help!

Thank you for the extremely useful package.

jkitchin commented 8 years ago

I think the issue is (require 'org-ref-autoloads), which usually should not be required. Also (require 'org-ref-pkg) should not be required. everything else should be fine.

What doesn't work?

John


Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu

On Mon, Feb 8, 2016 at 3:06 PM, Prakash Nayak notifications@github.com wrote:

The doi Utils and pdf auto citations don't work well on Windows install of Emacs 24.5. Must one add the follwing to .emacs file?

(require 'org-ref) ;; (require 'org-ref-pdf) ;; (require 'org-ref-autoloads) ;; (require 'org-ref-bibtex) ;; (require 'org-ref-pubmed) ;; (require 'org-ref-glossary) ;; (require 'org-ref-isbn) ;; (require 'org-ref-latex) ;; (require 'org-ref-scopus) ;; (require 'org-ref-pkg) ;; (require 'org-ref-scifinder) ;; (require 'org-ref-sci-id) ;; (require 'org-ref-url-utils) ;; (require 'org-ref-wos) ;; (require 'x2bib) ;; (require 'doi-utils) ;; (require 'org-ref-arxiv)

I have commented out the section below Org-ref as it throws a ''do not call error'' on loading Emacs.

I am a Emacs newbie and would appreciate any help!

Thank you for the extremely useful package.

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/org-ref/issues/58#issuecomment-181508260.

nayakprakash commented 8 years ago

The bibtex buffer does not process the doi paste. It throws a wrong argument error. (may be because I have commented out doi-utils?)

Also, is there a way to link existing pdfs to their bibtex entries? The open pdf link in helm seems to work only when a pdf is dropped into the bibtex buffer.

Thank you again.

Prakash Nayak On 8 Feb 2016 16:18, "John Kitchin" notifications@github.com wrote:

I think the issue is (require 'org-ref-autoloads), which usually should not be required. Also (require 'org-ref-pkg) should not be required. everything else should be fine.

What doesn't work?

John


Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu

On Mon, Feb 8, 2016 at 3:06 PM, Prakash Nayak notifications@github.com wrote:

The doi Utils and pdf auto citations don't work well on Windows install of Emacs 24.5. Must one add the follwing to .emacs file?

(require 'org-ref) ;; (require 'org-ref-pdf) ;; (require 'org-ref-autoloads) ;; (require 'org-ref-bibtex) ;; (require 'org-ref-pubmed) ;; (require 'org-ref-glossary) ;; (require 'org-ref-isbn) ;; (require 'org-ref-latex) ;; (require 'org-ref-scopus) ;; (require 'org-ref-pkg) ;; (require 'org-ref-scifinder) ;; (require 'org-ref-sci-id) ;; (require 'org-ref-url-utils) ;; (require 'org-ref-wos) ;; (require 'x2bib) ;; (require 'doi-utils) ;; (require 'org-ref-arxiv)

I have commented out the section below Org-ref as it throws a ''do not call error'' on loading Emacs.

I am a Emacs newbie and would appreciate any help!

Thank you for the extremely useful package.

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/org-ref/issues/58#issuecomment-181508260.

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/org-ref/issues/58#issuecomment-181548387.

jkitchin commented 8 years ago

Prakash Nayak writes:

The bibtex buffer does not process the doi paste. It throws a wrong argument error. (may be because I have commented out doi-utils?)

It is hard to say with so little information.

Also, is there a way to link existing pdfs to their bibtex entries? The open pdf link in helm seems to work only when a pdf is dropped into the bibtex buffer.

it will only work when the pdf has the name of the bibtex key and is in the pdf directory. there are some possibilities to change how the pdf is looked up. see https://github.com/jkitchin/org-ref/blob/master/org-ref.el#L175.

Thank you again.

Prakash Nayak On 8 Feb 2016 16:18, "John Kitchin" notifications@github.com wrote:

I think the issue is (require 'org-ref-autoloads), which usually should not be required. Also (require 'org-ref-pkg) should not be required. everything else should be fine.

What doesn't work?

John


Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu

On Mon, Feb 8, 2016 at 3:06 PM, Prakash Nayak notifications@github.com wrote:

The doi Utils and pdf auto citations don't work well on Windows install of Emacs 24.5. Must one add the follwing to .emacs file?

(require 'org-ref) ;; (require 'org-ref-pdf) ;; (require 'org-ref-autoloads) ;; (require 'org-ref-bibtex) ;; (require 'org-ref-pubmed) ;; (require 'org-ref-glossary) ;; (require 'org-ref-isbn) ;; (require 'org-ref-latex) ;; (require 'org-ref-scopus) ;; (require 'org-ref-pkg) ;; (require 'org-ref-scifinder) ;; (require 'org-ref-sci-id) ;; (require 'org-ref-url-utils) ;; (require 'org-ref-wos) ;; (require 'x2bib) ;; (require 'doi-utils) ;; (require 'org-ref-arxiv)

I have commented out the section below Org-ref as it throws a ''do not call error'' on loading Emacs.

I am a Emacs newbie and would appreciate any help!

Thank you for the extremely useful package.

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/org-ref/issues/58#issuecomment-181508260.

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/org-ref/issues/58#issuecomment-181548387.


Reply to this email directly or view it on GitHub: https://github.com/jkitchin/org-ref/issues/58#issuecomment-181625086

Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu

nayakprakash commented 8 years ago

On Mon, Feb 8, 2016 at 6:54 PM, John Kitchin notifications@github.com wrote:

It is hard to say with so little information.

​Thank you so much , I shall revert with accurate info after .emacs update on DOI . The pdf links now work well! Thank you so much.​

Prakash Nayak

nayakprakash commented 8 years ago

helm-bibtex-get-entry1: Search failed: "^@([^^\"@\&$#%',={}() ])[[:space:]][({][[:space:]]_nguyen11:_radiat_expos_from_imagintests[[:space:]],"

This is the error in I get in the message buffer with M-x doi-add-entry (10.1586%2Ferc.10.184 is the doi used for the entry). It fails to add the bibtex. I have no idea what this means and how I can avoid it.

Sorry for the bother.

Prakash Nayak

On Mon, Feb 8, 2016 at 6:54 PM, John Kitchin notifications@github.com wrote:

Prakash Nayak writes:

The bibtex buffer does not process the doi paste. It throws a wrong argument error. (may be because I have commented out doi-utils?)

It is hard to say with so little information.

Also, is there a way to link existing pdfs to their bibtex entries? The open pdf link in helm seems to work only when a pdf is dropped into the bibtex buffer.

it will only work when the pdf has the name of the bibtex key and is in the pdf directory. there are some possibilities to change how the pdf is looked up. see https://github.com/jkitchin/org-ref/blob/master/org-ref.el#L175.

Thank you again.

Prakash Nayak On 8 Feb 2016 16:18, "John Kitchin" notifications@github.com wrote:

I think the issue is (require 'org-ref-autoloads), which usually should not be required. Also (require 'org-ref-pkg) should not be required. everything else should be fine.

What doesn't work?

John


Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu

On Mon, Feb 8, 2016 at 3:06 PM, Prakash Nayak <notifications@github.com

wrote:

The doi Utils and pdf auto citations don't work well on Windows install of Emacs 24.5. Must one add the follwing to .emacs file?

(require 'org-ref) ;; (require 'org-ref-pdf) ;; (require 'org-ref-autoloads) ;; (require 'org-ref-bibtex) ;; (require 'org-ref-pubmed) ;; (require 'org-ref-glossary) ;; (require 'org-ref-isbn) ;; (require 'org-ref-latex) ;; (require 'org-ref-scopus) ;; (require 'org-ref-pkg) ;; (require 'org-ref-scifinder) ;; (require 'org-ref-sci-id) ;; (require 'org-ref-url-utils) ;; (require 'org-ref-wos) ;; (require 'x2bib) ;; (require 'doi-utils) ;; (require 'org-ref-arxiv)

I have commented out the section below Org-ref as it throws a ''do not call error'' on loading Emacs.

I am a Emacs newbie and would appreciate any help!

Thank you for the extremely useful package.

— Reply to this email directly or view it on GitHub <https://github.com/jkitchin/org-ref/issues/58#issuecomment-181508260 .

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/org-ref/issues/58#issuecomment-181548387.


Reply to this email directly or view it on GitHub: https://github.com/jkitchin/org-ref/issues/58#issuecomment-181625086

Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/org-ref/issues/58#issuecomment-181630440.

jkitchin commented 8 years ago

I am not sure what could be causing this. It looks like an error in helm-bibtex. Are you still seeing it?