Re: [O] Blank equation when exported to HTML using dvipng
From: Puneeth Chaganti [mailto:puncha...@gmail.com] Sent: Sunday, May 27, 2012 10:48 PM To: Richard Stanton Subject: Re: [O] Blank equation when exported to HTML using dvipng On Mon, May 28, 2012 at 11:13 AM, Richard Stanton stan...@haas.berkeley.edu wrote: Here's a very simple ORG file: #+OPTIONS: LaTeX:dvipng * Test file \begin{equation} x=\sqrt{b} \end{equation} -- When I export this to HTML (Org-mode version 7.8.11 (release_7.8.11-12- gc55405 @ c:/emacs/site-lisp/org-mode/lisp/)), the equation comes out blank. The HTML file contains the following code: img src=ltxpng/test_660c6efb146974e9d77e2de45f258385867ef389.png alt=\begin{equation} x=\sqrt{b} \end{equation}/ However, directory ltxpng is empty. I'm running Emacs 24.0.97 under Windows Vista with MikTeX 2.09 installed and PATH set so that I can call pdflatex, dvipng, etc. from the command line just fine. Any thoughts about what might be going wrong? Do you get any error messages? Do you have dvipng installed? -- Puneeth The *Messages* buffer shows the following: Exporting... Loading reftex...done Creating LaTeX image 1 Failed to create dvi file from c:/Users/stanton/AppData/Local/Temp/orgtex5660EuC.tex Exporting... image ltxpng/test_660c6efb146974e9d77e2de45f258385867ef389.png t Saving file c:/projects/texintro/web/test.html... Wrote c:/projects/texintro/web/test.html HTML export done, pushed to kill ring and clipboard Investigating further, the log file associated with the tex file listed above shows the following: Package ifplatform Warning: shell escape is disabled, so I can only detect \ifwindows. ) \minted@bgbox=\box31 \minted@code=\write4 \@float@every@listing=\toks22 \c@listing=\count106 ) ! Package minted Error: You must invoke LaTeX with the -shell-escape flag. See the minted package documentation for explanation. Type H return for immediate help. ... l.7 \usepackage [latin1]{inputenc} ? ! Emergency stop. ... l.7 \usepackage [latin1]{inputenc} Pass the -shell-escape flag to LaTeX. Refer to the minted.sty documentation for more information. So now I can see what the problem is, but how do I tell org-mode to call latex with the -shell-escape flag?
Re: [O] Blank equation when exported to HTML using dvipng
Richard Stanton stan...@haas.berkeley.edu wrote: ... So now I can see what the problem is, but how do I tell org-mode to call latex with the -shell-escape flag? You can customize org-latex-to-pdf-process (or org-e-latex-pdf-process[fn:1] if you are using the new exporter). In my case, I have , | org-latex-to-pdf-process is a variable defined in `org-latex.el'. | Its value is (texi2dvi --pdf %f) | Original value was | (pdflatex -interaction nonstopmode -output-directory %o %f pdflatex -interaction nonstopmode -output-directory %o %f pdflatex -interaction nonstopmode -output-directory %o %f) ` but texi2dvi probably does not exist on windows (and you still have to patch it even on linux). Just add --shell-escape after every pdflatex (or whatever command is invoked on windows). Nick Footnotes: [fn:1] NB: different spelling in the two cases - not only the added e- but also the missing -to.
Re: [O] Blank equation when exported to HTML using dvipng
In my init.el, I have (setq org-latex-to-pdf-process '(pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f)) The problem is that when I export to HTML with the dvipng option, it's calling latex, not pdflatex, so I don't think this option has an effect. -Original Message- From: nicholas.do...@hp.com [mailto:nicholas.do...@hp.com] Sent: Monday, May 28, 2012 7:08 AM To: Richard Stanton Cc: Puneeth Chaganti; emacs-orgmode@gnu.org Subject: Re: [O] Blank equation when exported to HTML using dvipng Richard Stanton stan...@haas.berkeley.edu wrote: ... So now I can see what the problem is, but how do I tell org-mode to call latex with the -shell-escape flag? You can customize org-latex-to-pdf-process (or org-e-latex-pdf- process[fn:1] if you are using the new exporter). In my case, I have , | org-latex-to-pdf-process is a variable defined in `org-latex.el'. | Its value is (texi2dvi --pdf %f) | Original value was | (pdflatex -interaction nonstopmode -output-directory %o %f pdflatex | -interaction nonstopmode -output-directory %o %f pdflatex | -interaction nonstopmode -output-directory %o %f) ` but texi2dvi probably does not exist on windows (and you still have to patch it even on linux). Just add --shell-escape after every pdflatex (or whatever command is invoked on windows). Nick Footnotes: [fn:1] NB: different spelling in the two cases - not only the added e- but also the missing -to.
Re: [O] Blank equation when exported to HTML using dvipng
Richard Stanton stan...@haas.berkeley.edu wrote: In my init.el, I have (setq org-latex-to-pdf-process '(pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f)) The problem is that when I export to HTML with the dvipng option, it's calling latex, not pdflatex, so I don't think this option has an effect. Ah, right: that's hardwired and needs source code changes. The call is in org.el:org-create-formula-image-with-dvipng. This was reported by Ista Zahn (see http://thread.gmane.org/gmane.emacs.orgmode/50533). I would encourage you to submit a patch for this[fn:1] - maybe make it conditional on the value of org-export-latex-listings. Nick Footnotes: [fn:1] Unfortunately I cannot.
[O] Blank equation when exported to HTML using dvipng
Here's a very simple ORG file: #+OPTIONS: LaTeX:dvipng * Test file \begin{equation} x=\sqrt{b} \end{equation} -- When I export this to HTML (Org-mode version 7.8.11 (release_7.8.11-12-gc55405 @ c:/emacs/site-lisp/org-mode/lisp/)), the equation comes out blank. The HTML file contains the following code: img src=ltxpng/test_660c6efb146974e9d77e2de45f258385867ef389.png alt=\begin{equation} x=\sqrt{b} \end{equation}/ However, directory ltxpng is empty. I'm running Emacs 24.0.97 under Windows Vista with MikTeX 2.09 installed and PATH set so that I can call pdflatex, dvipng, etc. from the command line just fine. Any thoughts about what might be going wrong?