Re: [O] problems with LaTex/BibTex
> -Original Message- > From: emacs-orgmode-bounces+mlt=gmx...@gnu.org [mailto:emacs-orgmode- > bounces+mlt=gmx...@gnu.org] On Behalf Of Eric Fraga > Sent: Wednesday, April 25, 2012 6:21 AM > To: Alan E. Davis > Cc: Julian Burgos; emacs-orgmode@gnu.org > Subject: Re: [O] problems with LaTex/BibTex > > "Alan E. Davis" writes: > > > I would have a use for this. I am curious, though... > > > > Suppose I use this as a standard init-file declaration for > > org-latex-to-pdf-process . Does that mean that bibtex will always be run, > > every time, during the generation of PDFs via LaTex export? > > Yes but you can easily customise this variable on a per file basis. If > you seldom use bibtex, have the default be to run pdflatex just > once. Then, for any org file that needs bibtex, simply put in the > following line (or a variation thereof): > > #+BIND: org-latex-to-pdf-process ("pdflatex %b" "bibtex %b" "pdflatex %b" > "pdflatex %b") Also, if you are on Windows with MikTeX, you can use texify, otherwise latexmk can save you some time when it is not necessary to rebuild index and/or bibliography. M.
Re: [O] problems with LaTex/BibTex
"Alan E. Davis" writes: > I would have a use for this. I am curious, though... > > Suppose I use this as a standard init-file declaration for > org-latex-to-pdf-process . Does that mean that bibtex will always be run, > every time, during the generation of PDFs via LaTex export? Yes but you can easily customise this variable on a per file basis. If you seldom use bibtex, have the default be to run pdflatex just once. Then, for any org file that needs bibtex, simply put in the following line (or a variation thereof): #+BIND: org-latex-to-pdf-process ("pdflatex %b" "bibtex %b" "pdflatex %b" "pdflatex %b") -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1 : using Org-mode version 7.8.06 (release_7.8.06.181.g67694.dirty)
Re: [O] problems with LaTex/BibTex
Alan E. Davis wrote: > I would have a use for this. I am curious, though... > > Suppose I use this as a standard init-file declaration for > org-latex-to-pdf-process . Does that > mean that bibtex will always be run, every time, during the generation of > PDFs via LaTex export? > I believe so. I think the best way to deal with the mess of programs that you have to run for complicated latex productions (at least on linux) is to use texi2dvi, which is supposed to figure out these dependencies and run the "correct" sequence of programs the "correct" number of times (it does this by parsing error messages in the log file, I believe). The trouble is that, as currently distributed, texi2dvi has a bug that causes an error with recent versions of egrep. That's why the default value of org-latex-to-pdf-process is not texi2dvi. C-h v org-latex-to-pdf-process RET for more details. You might try it and see if you get the error: try ``texi2dvi --pdf somefile.tex'' The symptom is the message egrep: Invalid range end If you get the error, then you can forget about texi2dvi for now. OTOH, if you are willing to live with the consequences of actually fixing the bug in your version of texi2dvi, that's pretty easy. The danger is that you are going to pull an update which might revert texi2dvi to its unpatched state. But if you have patched it once, it's easy to patch it again. The change is around line 1713 of /usr/bin/texi2dvi. The original says echo "$command_line_filename" | $EGREP '^(/|[A-z]:/)' >&6 \ || command_line_filename="./$command_line_filename" and the fixed version is echo "$command_line_filename" | $EGREP '^(/|[A-Za-z]:/)' >&6 \ || command_line_filename="./$command_line_filename" just changing the egrep pattern. The fixed version is not exactly equivalent to the original version but the difference is academic, unless you run Windows and you have lots of drives. FWIW, I've fixed my texi2dvi as above, and have set org-latex-to-pdf-process to a custom shell command: texi2dvi --pdf --batch %f. Org provides a texi2dvi customize option for org-latex-to-pdf-process that also sets the build mode to ``clean'' which gets rid of the extra files that a latex run produces, but I prefer leaving all the "junk" files around and clean them up once at the end. Nick > Alan > > On Fri, Mar 30, 2012 at 4:54 AM, Julian Burgos wrote: > > Yes! That was it. Thanks!! > > On fös 30.mar 2012 08:05, suvayu ali wrote: > > Hey Julian, > > On Fri, Mar 30, 2012 at 03:41, Julian Burgos wrote: > > The "References.bib" is a BibTex file in the same folder as the > test file. > The citations were entered using RefTex with no problem. But > when > exporting to pdf, I get the following message in the minibuffer: > "Exporting to PDF...done, with some errors: [undefined > citations]". The > pdf produced had, of course, question marks where the citations > should be. > > Did you customise your org-latex-to-pdf-process to include bibtex? I > use > something like this: > > (setq org-latex-to-pdf-process '("pdflatex -interaction nonstopmode > %b" > "/usr/bin/bibtex %b" > "pdflatex -interaction nonstopmode %b" > "pdflatex -interaction nonstopmode > %b")) > > -- > Julian Mariano Burgos, PhD > Hafrannsóknastofnunin/Marine Research Institute > Skúlagata 4, 121 Reykjavík, Iceland > Sími/Telephone : +354-5752037 > Bréfsími/Telefax: +354-5752001 > Netfang/Email: jul...@hafro.is > > > > Alternatives: > >
Re: [O] problems with LaTex/BibTex
I would have a use for this. I am curious, though... Suppose I use this as a standard init-file declaration for org-latex-to-pdf-process . Does that mean that bibtex will always be run, every time, during the generation of PDFs via LaTex export? Alan On Fri, Mar 30, 2012 at 4:54 AM, Julian Burgos wrote: > Yes! That was it. Thanks!! > > > On fös 30.mar 2012 08:05, suvayu ali wrote: > >> Hey Julian, >> >> On Fri, Mar 30, 2012 at 03:41, Julian Burgos wrote: >> >>> The "References.bib" is a BibTex file in the same folder as the test >>> file. >>> The citations were entered using RefTex with no problem. But when >>> exporting to pdf, I get the following message in the minibuffer: >>> "Exporting to PDF...done, with some errors: [undefined citations]". The >>> pdf produced had, of course, question marks where the citations should >>> be. >>> >> Did you customise your org-latex-to-pdf-process to include bibtex? I use >> something like this: >> >> (setq org-latex-to-pdf-process '("pdflatex -interaction nonstopmode %b" >> "/usr/bin/bibtex %b" >> "pdflatex -interaction nonstopmode %b" >> "pdflatex -interaction nonstopmode %b")) >> >> > > -- > Julian Mariano Burgos, PhD > Hafrannsóknastofnunin/Marine Research Institute > Skúlagata 4, 121 Reykjavík, Iceland > Sími/Telephone : +354-5752037 > Bréfsími/Telefax: +354-5752001 > Netfang/Email: jul...@hafro.is > > >
Re: [O] problems with LaTex/BibTex
Yes! That was it. Thanks!! On fös 30.mar 2012 08:05, suvayu ali wrote: Hey Julian, On Fri, Mar 30, 2012 at 03:41, Julian Burgos wrote: The "References.bib" is a BibTex file in the same folder as the test file. The citations were entered using RefTex with no problem. But when exporting to pdf, I get the following message in the minibuffer: "Exporting to PDF...done, with some errors: [undefined citations]". The pdf produced had, of course, question marks where the citations should be. Did you customise your org-latex-to-pdf-process to include bibtex? I use something like this: (setq org-latex-to-pdf-process '("pdflatex -interaction nonstopmode %b" "/usr/bin/bibtex %b" "pdflatex -interaction nonstopmode %b" "pdflatex -interaction nonstopmode %b")) -- Julian Mariano Burgos, PhD Hafrannsóknastofnunin/Marine Research Institute Skúlagata 4, 121 Reykjavík, Iceland Sími/Telephone : +354-5752037 Bréfsími/Telefax: +354-5752001 Netfang/Email: jul...@hafro.is
Re: [O] problems with LaTex/BibTex
Hey Julian, On Fri, Mar 30, 2012 at 03:41, Julian Burgos wrote: > The "References.bib" is a BibTex file in the same folder as the test file. > The citations were entered using RefTex with no problem. But when > exporting to pdf, I get the following message in the minibuffer: > "Exporting to PDF...done, with some errors: [undefined citations]". The > pdf produced had, of course, question marks where the citations should be. Did you customise your org-latex-to-pdf-process to include bibtex? I use something like this: (setq org-latex-to-pdf-process '("pdflatex -interaction nonstopmode %b" "/usr/bin/bibtex %b" "pdflatex -interaction nonstopmode %b" "pdflatex -interaction nonstopmode %b")) -- Suvayu Open source is the future. It sets us free.
[O] problems with LaTex/BibTex
Dear list, I'm having some problems with LaTex exporting and reference lists. This is my a quick test: -- start of org mode file #+TITLE: This is a test * Heading 1 Some text, some text \cite{Steiniger2009a}. * Heading 2 Some other text \cite{Harrington2007}. \bibliographystyle{plain} \bibliography{References.bib} -- end of org mode file The "References.bib" is a BibTex file in the same folder as the test file. The citations were entered using RefTex with no problem. But when exporting to pdf, I get the following message in the minibuffer: "Exporting to PDF...done, with some errors: [undefined citations]". The pdf produced had, of course, question marks where the citations should be. I am using org mode 7.8.06 and Emacs 23.3.1 in Fedora 16 (not sure if that makes any difference). Any ideas? Thanks, Julian Julian Mariano Burgos, PhD Hafrannsóknastofnunin/Marine Research Institute Skúlagata 4, 121 Reykjavík, Iceland Sími/Telephone : +354-5752037 Bréfsími/Telefax: +354-5752001 Netfang/Email: jul...@hafro.is Exporting to PDF...done, with some errors: [undefined citation]