Zim

ZIM Equation Plugin Windows Error Message

Bug #1237909 reported by Simon Theis on 2013-10-10
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Zim
Undecided
Unassigned

Bug Description

Hi,

I am running Zim release 0.60 on a Windows 7 - 64 bit host. I'd like to use the plugin 'Insert Equation'. To do so, I have installed the basic Miktex package release 2.9.4813. I can activate the plugin in the plugins list, since the dependencies are fulfilled (latex and dvipng are installed). Now when I want to insert an equation the following happens:

a) I click on 'Preview': An empty graph with a red cross is created
b) I click on 'OK': An error message pops up: 'An error occurred while generating the image. Do you want to save the source text anyway?'

I have tried different Zim releases without success. Do you have any ideas? Maybe I have to modify the Windows path variables (https://answers.launchpad.net/zim/+question/99561)? If so, what do I have exactly to do?

Thanks for your help,
Simon

I don't think the path variable is the problem -- if the plugin can be
enabled, it found the applications.

When you generate a preview, can you open the latex log in the dialog to
see if there is any error there?

If not check %TMP%/zim.log to see if there is an error output there.

Regards,

Jaap

On Thu, Oct 10, 2013 at 12:14 PM, Simon Theis <
<email address hidden>> wrote:

> Public bug reported:
>
> Hi,
>
> I am running Zim release 0.60 on a Windows 7 - 64 bit host. I'd like to
> use the plugin 'Insert Equation'. To do so, I have installed the basic
> Miktex package release 2.9.4813. I can activate the plugin in the
> plugins list, since the dependencies are fulfilled (latex and dvipng are
> installed). Now when I want to insert an equation the following happens:
>
> a) I click on 'Preview': An empty graph with a red cross is created
> b) I click on 'OK': An error message pops up: 'An error occurred while
> generating the image. Do you want to save the source text anyway?'
>
> I have tried different Zim releases without success. Do you have any
> ideas? Maybe I have to modify the Windows path variables
> (https://answers.launchpad.net/zim/+question/99561)? If so, what do I
> have exactly to do?
>
> Thanks for your help,
> Simon
>
> ** Affects: zim
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to Zim.
> https://bugs.launchpad.net/bugs/1237909
>
> Title:
> ZIM Equation Plugin Windows Error Message
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/zim/+bug/1237909/+subscriptions
>

Simon Theis (simon-theissing) wrote :

Thanks for your immediate reply. I cannot find a Miktex log file. Here is the output of the %TMP%/zim.log:

INFO: Starting async index update
INFO: Open page: <FileStorePage: Home> (<HistoryPath: Home>)
INFO: Index update done
INFO: Running: ['latex', '-no-shell-escape', '-halt-on-error', 'equation.tex'] (cwd: c:\users\simon\appdata\local\temp\zim-Simon)
INFO: Running: ['dvipng', '-q', '-bg', 'Transparent', '-T', 'tight', '-o', 'c:\\users\\simon\\appdata\\local\\temp\\zim-Simon\\equation.png', 'c:\\users\\simon\\appdata\\local\\temp\\zim-Simon\\equation.dvi'] (cwd: None)
ERROR: Could not generate image
Traceback (most recent call last):
  File "zim\gui\imagegeneratordialog.pyo", line 210, in generate_image
  File "C:\Program Files (x86)\Zim Desktop Wiki\zim\plugins\equationeditor.py", line 132, in generate_image
  File "zim\applications.pyo", line 178, in run
ApplicationError: Failed to run application: dvipng

dvipng "-q" "-bg" "Transparent" "-T" "tight" "-o" "c:\users\simon\appdata\local\temp\zim-Simon\equation.png" "c:\users\simon\appdata\local\temp\zim-Simon\equation.dvi"
returned non-zero exit status 1

Obviously, there is a problem with the dvipng.

Might be that not all of the options used are supported in your version?

Try calling dvipng from a dos commandline with the given options and see
what happens.

Regards,

Jaap

On Thu, Oct 10, 2013 at 4:56 PM, Simon Theis <<email address hidden>
> wrote:

> Thanks for your immediate reply. I cannot find a Miktex log file. Here
> is the output of the %TMP%/zim.log:
>
> INFO: Starting async index update
> INFO: Open page: <FileStorePage: Home> (<HistoryPath: Home>)
> INFO: Index update done
> INFO: Running: ['latex', '-no-shell-escape', '-halt-on-error',
> 'equation.tex'] (cwd: c:\users\simon\appdata\local\temp\zim-Simon)
> INFO: Running: ['dvipng', '-q', '-bg', 'Transparent', '-T', 'tight', '-o',
> 'c:\\users\\simon\\appdata\\local\\temp\\zim-Simon\\equation.png',
> 'c:\\users\\simon\\appdata\\local\\temp\\zim-Simon\\equation.dvi'] (cwd:
> None)
> ERROR: Could not generate image
> Traceback (most recent call last):
> File "zim\gui\imagegeneratordialog.pyo", line 210, in generate_image
> File "C:\Program Files (x86)\Zim Desktop
> Wiki\zim\plugins\equationeditor.py", line 132, in generate_image
> File "zim\applications.pyo", line 178, in run
> ApplicationError: Failed to run application: dvipng
>
> dvipng "-q" "-bg" "Transparent" "-T" "tight" "-o"
> "c:\users\simon\appdata\local\temp\zim-Simon\equation.png"
> "c:\users\simon\appdata\local\temp\zim-Simon\equation.dvi"
> returned non-zero exit status 1
>
> Obviously, there is a problem with the dvipng.
>
> --
> You received this bug notification because you are subscribed to Zim.
> https://bugs.launchpad.net/bugs/1237909
>
> Title:
> ZIM Equation Plugin Windows Error Message
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/zim/+bug/1237909/+subscriptions
>

Simon Theis (simon-theissing) wrote :

Solved.

I executed

dvipng "-q" "-bg" "Transparent" "-T" "tight" "-o" "c:\users\simon\appdata\local\temp\zim-Simon\equation.png" "c:\users\simon\appdata\local\temp\zim-Simon\equation.dvi"

in the command line. Then a window popped up, telling me that some font was not installed. I was also asked, whether I wanted to install the missing font. So I installed the it and now everything works fine; i.e. I can use equations.

Thanks for your help and thanks for the great tool,
Simon

Derek Posselt (dposselt) wrote :

Simon and Jaap,

Would you mind telling me which fonts you ended up installing? I just encountered the same error and ran the same set of commands on my equation, but did not get the pop-up window offering to install the fonts.

Thanks,

Derek

@Derek Did the command run and succeed to generate the png image, or did it
also give an error.

-- Jaap

On Sat, Dec 14, 2013 at 6:53 AM, Derek Posselt <email address hidden> wrote:

> Simon and Jaap,
>
> Would you mind telling me which fonts you ended up installing? I just
> encountered the same error and ran the same set of commands on my
> equation, but did not get the pop-up window offering to install the
> fonts.
>
> Thanks,
>
> Derek
>
> --
> You received this bug notification because you are subscribed to Zim.
> https://bugs.launchpad.net/bugs/1237909
>
> Title:
> ZIM Equation Plugin Windows Error Message
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/zim/+bug/1237909/+subscriptions
>

Simon Theis (simon-theissing) wrote :

Dear Derek,

I cannot remember what fonts I had to install.

The reason why the window popped up is because of the tool Miktex (http://www.miktex.org). So I suggest you install Miktex and then you run the command as described in my previous post again. Of course you have to adapt the paths for

"c:\users\simon\appdata\local\temp\zim-Simon\equation.png"

and

"c:\users\simon\appdata\local\temp\zim-Simon\equation.dvi"

Good luck,
Simon

Shih-Yuan Liu (stephen-liu-60) wrote :

Derek, Simon:

I had the same problem with Simon on a Windows 8 64bit machine with a freshly installed MikTeX 2.9.
I walked through the same process (manually running the dvipng command in the command line and let MikTeX install the missing package). Now the equations can be generated properly.

The missing thing pointed out by MikTeX was:

fonts\map\tt2pf\ttfonts.map

which is a part of the zhmetrics package.

Hope this helps.

Cheers,

Shih-Yuan

Thanks.

-------- Ursprüngliche Nachricht --------
Von: Shih-Yuan Liu <email address hidden>
Datum:
An: <email address hidden>
Betreff: [Bug 1237909] Re: ZIM Equation Plugin Windows Error Message

Derek, Simon:

I had the same problem with Simon on a Windows 8 64bit machine with a freshly installed MikTeX 2.9.
I walked through the same process (manually running the dvipng command in the command line and let MikTeX install the missing package). Now the equations can be generated properly.

The missing thing pointed out by MikTeX was:

fonts\map\tt2pf\ttfonts.map

which is a part of the zhmetrics  package.

Hope this helps.

Cheers,

Shih-Yuan

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1237909

Title:
  ZIM Equation Plugin Windows Error Message

Status in Zim desktop wiki:
  New

Bug description:
  Hi,

  I am running Zim release 0.60 on a Windows 7 - 64 bit host. I'd like
  to use the plugin 'Insert Equation'. To do so, I have installed the
  basic Miktex package release 2.9.4813. I can activate the plugin in
  the plugins list, since the dependencies are fulfilled (latex and
  dvipng are installed). Now when I want to insert an equation the
  following happens:

  a) I click on 'Preview': An empty graph with a red cross is created
  b) I click on 'OK': An error message pops up: 'An error occurred while generating the image. Do you want to save the source text anyway?'

  I have tried different Zim releases without success. Do you have any
  ideas? Maybe I have to modify the Windows path variables
  (https://answers.launchpad.net/zim/+question/99561)? If so, what do I
  have exactly to do?

  Thanks for your help,
  Simon

To manage notifications about this bug go to:
https://bugs.launchpad.net/zim/+bug/1237909/+subscriptions

Changed in zim:
status: New → Invalid
jb (jbv) wrote :

Hi!

I had the same problem and the solution was installing the missing font, as reported above. May I suggest to include a comment in the Zim web page in "Equation Editor plugin" so that people is aware that they have to manually install this font before using the plugin?

Great tool!

JB

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers