emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Can't get dvipng to work
@ 2013-09-16 21:21 Williams, Ken
  2013-09-16 22:04 ` Rasmus
  0 siblings, 1 reply; 9+ messages in thread
From: Williams, Ken @ 2013-09-16 21:21 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1425 bytes --]

Hi,

I have a small orgmode document with a \begin{align} section for a few equations.  I can successfully export to HTML using MathJax, but I need a nice little self-contained document, so I'm trying to use dvipng.  Unfortunately it keeps exporting with MathJax.

Here's my document:

=========================================
#+TITLE: Test Doc
#+AUTHOR: Ken Williams
#+PROPERTY: results output
#+PROPERTY: exports both
#+OPTIONS: tex:dvipng

Some math:

\begin{align}
a_{11}& =b_{11}&
a_{12}& =b_{12}\\
a_{21}& =b_{21}&
a_{22}& =b_{22}+c_{22}
\end{align}
=========================================

The value of my "org-latex-create-formula-image-program" variable is dvipng - I set it manually from within the editor by doing "set-variable org-latex-create-formula-image-program dvipng".

Any hints?  There are no clues in the *Messages* buffer.

My org-mode is Org-mode version 7.9.4.


--
Ken Williams, Senior Research Scientist
WindLogics
http://windlogics.com


________________________________

CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of any kind is strictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and destroy all copies of the original message. Thank you.

[-- Attachment #2: Type: text/html, Size: 3433 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Can't get dvipng to work
  2013-09-16 21:21 Can't get dvipng to work Williams, Ken
@ 2013-09-16 22:04 ` Rasmus
  2013-09-18 16:37   ` Ken Williams
  0 siblings, 1 reply; 9+ messages in thread
From: Rasmus @ 2013-09-16 22:04 UTC (permalink / raw)
  To: emacs-orgmode


Hi Ken,

So in short I think the easiest course of action is upgrading to the
newest release, e.g. using ELPA (M-x list-packages).

"Williams, Ken" <Ken.Williams@windlogics.com> writes:

> I have a small orgmode document with a \begin{align} section for a few
> equations.  I can successfully export to HTML using MathJax, but I
> need a nice little self-contained document, so I'm trying to use
> dvipng.  Unfortunately it keeps exporting with MathJax.

I cannot reproduce using emacs -q.

Does it work as expected when you try from emacs -q?

Are you using the new exporter?  It's named ox now, but it might be
org-export in your version.  In v8 you'd need to require ox-html.

Have you tried your document with v8?

> Here's my document:
>
> =========================================
> #+TITLE: Test Doc
> #+AUTHOR: Ken Williams
> #+PROPERTY: results output
> #+PROPERTY: exports both
> #+OPTIONS: tex:dvipng
>
> Some math:
>
> \begin{align}
> a_{11}& =b_{11}&
> a_{12}& =b_{12}\\
> a_{21}& =b_{21}&
> a_{22}& =b_{22}+c_{22}
> \end{align}
> =========================================
>
> The value of my "org-latex-create-formula-image-program" variable is
> dvipng - I set it manually from within the editor by doing
> "set-variable org-latex-create-formula-image-program dvipng".

Do you have dvipng installed?  I install it via texlive, e.g.

   tlmgr install dvipng

> Any hints?  There are no clues in the *Messages* buffer.
>
> My org-mode is Org-mode version 7.9.4.

Mine is: 

Org-mode version 8.1.2 (release_8.1.2 @
/usr/share/emacs/site-lisp/org/)

–Rasmus

-- 
Summon the Mothership!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Can't get dvipng to work
  2013-09-16 22:04 ` Rasmus
@ 2013-09-18 16:37   ` Ken Williams
  2013-09-18 18:29     ` Ken Williams
  0 siblings, 1 reply; 9+ messages in thread
From: Ken Williams @ 2013-09-18 16:37 UTC (permalink / raw)
  To: emacs-orgmode

Rasmus <rasmus <at> gmx.us> writes:
> 
> So in short I think the easiest course of action is upgrading to the
> newest release, e.g. using ELPA (M-x list-packages).

I agree - I'm trying to update now.  I hadn't used ELPA before, so I tried 
that route and I'm getting a ton of 'ox-*' related errors like this:

------------------
Compiling file c:/Users/kwilliams/.emacs.d/elpa/org-20130916/ox-ascii.el at 
Wed Sep 18 11:30:24 2013
ox-ascii.el:41:1:Error: Symbol's value as variable is void: org-list-allow-
alphabetical

Compiling file c:/Users/kwilliams/.emacs.d/elpa/org-20130916/ox-beamer.el at 
Wed Sep 18 11:30:24 2013
ox-beamer.el:117:1:Error: Symbol's value as variable is void: org-list-
allow-alphabetical

Compiling file c:/Users/kwilliams/.emacs.d/elpa/org-20130916/ox-html.el at 
Wed Sep 18 11:30:24 2013
ox-html.el:37:1:Error: Symbol's value as variable is void: org-list-allow-
alphabetical
...
------------------

I can try installing manually but it would be great if I could get ELPA 
working.

 -Ken

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Can't get dvipng to work
  2013-09-18 16:37   ` Ken Williams
@ 2013-09-18 18:29     ` Ken Williams
  2013-09-19  1:43       ` Nick Dokos
  0 siblings, 1 reply; 9+ messages in thread
From: Ken Williams @ 2013-09-18 18:29 UTC (permalink / raw)
  To: emacs-orgmode

Ken Williams <kenahoo <at> gmail.com> writes:

> I can try installing manually but it would be great if I could get ELPA 
> working.

So I installed org-8.1.2 manually and now it does seem to be *trying* to 
process the images through LaTeX.  But it's not succeeding.  In the *Messages* 
buffer, I see this:

--------------------
Creating LaTeX Image...
Failed to create dvi file from 
c:/Users/KWILLI~1/AppData/Local/Temp/orgtex6488Qq2.tex
--------------------

I pasted the contents of ~/AppData/Local/Temp/orgtex6488Qq2.log here, but I 
don't see anything strange in it:

https://gist.github.com/kenahoo/6613374

 -Ken

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Can't get dvipng to work
  2013-09-18 18:29     ` Ken Williams
@ 2013-09-19  1:43       ` Nick Dokos
  2013-09-19 21:24         ` Ken Williams
  0 siblings, 1 reply; 9+ messages in thread
From: Nick Dokos @ 2013-09-19  1:43 UTC (permalink / raw)
  To: emacs-orgmode

Ken Williams <kenahoo@gmail.com> writes:

> Ken Williams <kenahoo <at> gmail.com> writes:
>
>> I can try installing manually but it would be great if I could get ELPA 
>> working.
>
> So I installed org-8.1.2 manually and now it does seem to be *trying* to 
> process the images through LaTeX.  But it's not succeeding.  In the *Messages* 
> buffer, I see this:
>
> --------------------
> Creating LaTeX Image...
> Failed to create dvi file from 
> c:/Users/KWILLI~1/AppData/Local/Temp/orgtex6488Qq2.tex
> --------------------
>
> I pasted the contents of ~/AppData/Local/Temp/orgtex6488Qq2.log here, but I 
> don't see anything strange in it:
>
> https://gist.github.com/kenahoo/6613374
>

What happens if you run latex on the tex file by hand?

On Linux, I would say

   cd .../Local/Temp
   latex orgtex6488Qq2.tex

I presume something similar would work on Windows.

-- 
Nick

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Can't get dvipng to work
  2013-09-19  1:43       ` Nick Dokos
@ 2013-09-19 21:24         ` Ken Williams
  2013-09-19 22:22           ` Rasmus
  0 siblings, 1 reply; 9+ messages in thread
From: Ken Williams @ 2013-09-19 21:24 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <ndokos <at> gmail.com> writes:

> 
> Ken Williams <kenahoo <at> gmail.com> writes:
> 
> > I pasted the contents of ~/AppData/Local/Temp/orgtex6488Qq2.log here, but 
I 
> > don't see anything strange in it:
> >
> > https://gist.github.com/kenahoo/6613374
> >
> 
> What happens if you run latex on the tex file by hand?
> 

It succeeds: 

 % latex orgtex6488Qq2.tex
 ...
 Output written on orgtex6488Qq2.dvi (1 page, 1304 bytes).
 Transcript written on orgtex6488Qq2.log.

Additionally, if I run pdflatex manually on the tex file, the output is 
sensible.

I don't know how to verify that the tex/latex Emacs is running is the same as 
the one I get at the command line - nor whether the failure is during 
tex/latex or during dvipng.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Can't get dvipng to work
  2013-09-19 21:24         ` Ken Williams
@ 2013-09-19 22:22           ` Rasmus
  2013-09-20 15:04             ` Ken Williams
  0 siblings, 1 reply; 9+ messages in thread
From: Rasmus @ 2013-09-19 22:22 UTC (permalink / raw)
  To: emacs-orgmode

Ken Williams <kenahoo@gmail.com> writes:

> Nick Dokos <ndokos <at> gmail.com> writes:
> It succeeds: 
>
>  % latex orgtex6488Qq2.tex
>  ...
>  Output written on orgtex6488Qq2.dvi (1 page, 1304 bytes).
>  Transcript written on orgtex6488Qq2.log.

Then try to run dvipng FILE.dvi or perhaps just dvipng FILE.  Does
this work?

–Rasmus 

-- 
May the Force be with you

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Can't get dvipng to work
  2013-09-19 22:22           ` Rasmus
@ 2013-09-20 15:04             ` Ken Williams
  2013-09-20 18:48               ` Rasmus
  0 siblings, 1 reply; 9+ messages in thread
From: Ken Williams @ 2013-09-20 15:04 UTC (permalink / raw)
  To: emacs-orgmode

Rasmus <rasmus <at> gmx.us> writes:
> 
> Then try to run dvipng FILE.dvi or perhaps just dvipng FILE.  Does
> this work?

Yes, it produces a proper output PNG that looks good, but note that the base 
filename has a '1' appended:

% dvipng orgtex6488Qq2.dvi
This is dvipng 1.14 Copyright 2002-2010 Jan-Ake Larsson
[1]

% ls -ltr orgtex6488Qq2*
-rwx------+ 1 Administrators  1317 Sep 18 13:21 orgtex6488Qq2.tex*
-rw-r--r--+ 1 kwilliams      75721 Sep 19 16:17 orgtex6488Qq2.pdf
-rw-r--r--+ 1 kwilliams          8 Sep 19 16:20 orgtex6488Qq2.aux
-rw-r--r--+ 1 kwilliams       1304 Sep 19 16:20 orgtex6488Qq2.dvi
-rwx------+ 1 Administrators 17216 Sep 19 16:22 orgtex6488Qq2.log*
-rw-r--r--+ 1 kwilliams       3883 Sep 20 09:51 orgtex6488Qq21.png


This would probably be a lot easier to debug if the emacs logs included the 
command line strings that are being run.

 -Ken

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Can't get dvipng to work
  2013-09-20 15:04             ` Ken Williams
@ 2013-09-20 18:48               ` Rasmus
  0 siblings, 0 replies; 9+ messages in thread
From: Rasmus @ 2013-09-20 18:48 UTC (permalink / raw)
  To: emacs-orgmode

Ken Williams <kenahoo@gmail.com> writes:

> Rasmus <rasmus <at> gmx.us> writes:
>>
>> Then try to run dvipng FILE.dvi or perhaps just dvipng FILE.  Does
>> this work?
>
> Yes, it produces a proper output PNG that looks good, but note that the base
> filename has a '1' appended:

That's weird, but I can reproduce it here.  It's follows from the
manpage

 -o name
     Send output to the file name. A single occurrence of %d or
     %01d, ..., %09d will be exchanged for the physical page
     number (this can be changed, see the --dvinum switch). The
     default output filename is file%d.png where the input DVI
     file was file.dvi.

> This would probably be a lot easier to debug if the emacs logs included the
> command line strings that are being run.

This is untested, but try to do:

C-h f org-create-formula-image-with-dvipng

click on org.el link

with the cursor on the within the defun do
M-x edebug-defun

Create simple document an make Org call dvipng.

–Rasmus

--
If you can mix business and politics wonderful things can happen!

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-09-20 18:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-16 21:21 Can't get dvipng to work Williams, Ken
2013-09-16 22:04 ` Rasmus
2013-09-18 16:37   ` Ken Williams
2013-09-18 18:29     ` Ken Williams
2013-09-19  1:43       ` Nick Dokos
2013-09-19 21:24         ` Ken Williams
2013-09-19 22:22           ` Rasmus
2013-09-20 15:04             ` Ken Williams
2013-09-20 18:48               ` Rasmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).