/
How to solve 'Error rendering 'latex' macro: LaTeX Error: File `preview.sty' not found' error.

How to solve 'Error rendering 'latex' macro: LaTeX Error: File `preview.sty' not found' error.

Problem statement:

LaTeX Math displays an error: Error rendering 'latex' macro: LaTeX Error: File `preview.sty' not found.

Solution:

If you are using a proxy server, then the issue is due to the proxy setting of MikTex.

If you are using MikTex Admin Console, perform the following:

MikTex Admin Console

  1. On the MikTex console page go to Updates.

  2. Click Connection Settings.

  3. Check the Use a proxy server and enter the proxy details.

  4. Click Ok.

 

If you are using other than MikTex Admin Console, perform the following:

General User MikTex Console

  1. On the MikTex console page go to Updates.

  2. Click Install from and select Change…

  3. Click Connection Settings.

  4. Check the Use a proxy server and enter the proxy details.

  5. Click Ok.

For more details, see StackExchange Q&A: MikTeX proxy settings

 

If you are not using a proxy server and your packages are installed correctly according to Configuring an external renderer | Installing LaTeX in Windows, then perform the following:

  1. Go to Configure LaTeX Math page.

  2. Under External Renderer Settings, specify the latex.exe path in the LaTeX executable and Dvipng executable.

Note You must specify the full path for both executable paths.

 

Related content

Latex Math Inline is not loading
Latex Math Inline is not loading
More like this
How to solve 'Please set the paths to external latex executables in LaTeX Math settings' error
How to solve 'Please set the paths to external latex executables in LaTeX Math settings' error
More like this
LaTeX Math does not render any math macros
LaTeX Math does not render any math macros
More like this
LaTeX Math does not render any math macros
LaTeX Math does not render any math macros
More like this
How to solve 'Unable to run latex executable. Process timed out' error
How to solve 'Unable to run latex executable. Process timed out' error
More like this
Configuring an external renderer
Configuring an external renderer
More like this