1

I'm seeing the following error in Sublime Text 3 (on Windows 7) when my cursor is inside an equation:

enter image description here

When I click on "Show Report", a file is opened that contains 1 line

 Failed to convert pdf to png to preview.

When I click on "Check System", a file is opened that contains the the following:

 Program    Location                                             Status     Version
 -------    --------                                             ------     -------
 sublime    C:\Program Files\Sublime Text 3\sublime_text.exe     available  Sublime Text Build 3126
 ...
 gswin32c   None                                                 missing    unavailable

Is there a way to get this working? Or even just disable this feature? I don't care whether the equation is previewed or not.

Any help is greatly appreciated.

2

Well, I figured out how to disable this feature.

Navigate to:

Preferences->Package Settings->LaTeXTools->Settings - User

Insert the following line, save the file and restart Sublime:

"preview_math_mode": "none",
  • Is there any way to access these settings on a Mac? I don't see any file paths like this. Probably they are being hidden somehow by the operating system. – Dan Ramras Apr 27 '18 at 17:58
2

Just to provide the other alternative, the snippet of your system check seems to show that you don't have Ghostscript installed, which is necessary for the equation preview to work. There are some detailed instructions in the README on how to setup the equation preview, but, in brief, you need to:

  1. Install ImageMagick
  2. Install Ghostscript
  3. Ensure both of these are available either on your system PATH or in the path specified as your texpath setting.
2

This Math Preview problem is what I just encountered these days, and I fixed it following the instructions in Error: Failed to run 'pdflatex' to create pdf to preview enter image description here

I can rewrite the fixing process here with more details.

  1. Running the "Show Report", and you will get the log file. It should be like this enter image description here
  2. Copy the content in the red box, and paste them into a new tex file, and run it. You will encounter a package missing problem. If you use the Miktex, then the miktex will tell you missing some particular packages. As for my case, I miss the luatex85 package.

    tex\generic\luatex85\luatex85.sty enter image description here

  3. Install the luatex package or other missing packages in Miktex package manager. enter image description here
  4. Now, we are good! enter image description here
  5. Some additional tips The default size setting of the math preview is kind of small, you can enlarge it by increasing preview_math_density in the setting file, like from 150 (default) to 200. enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.