LaTeX To Picture


This procedure file provides three commands.

    * ltxs2p(latexstr, [mmode])
    convert a LaTeX string to a (PDF) picture
        latexstr - string to convert
        mmode - 0 means not a math mode, 1 means enclose in $$
        (default is mmode = 1)
    * ltxn2p(nbkname)
    convert a notebook to a (PDF) picture
        nbkname - string name of notebook to convert
        (assumes the entire notebook is a self-standing LaTeX document)
    * LaTeX2PICT(latexstr, mmode, [fsize, fulldoc, prterr, iname, xpreamble)
    convert a LaTeX string to a (PDF) picture
        latexstr - string to convert
        mmode - 0 means not a math mode, 1 means enclose in $$
        fsize - font size (pt)
        fulldoc - self-standing text
        prterr - print runtime errors if they occur
        (0 default none, 1 store as variables, 2 print to history)
        iname - name for image
        (default is prefix with random number)
        xpreamble - include this as extra preamble before \begin{document}

All three commands must be prefaced by LaTeX2PICT (yes, even the last one).

This compiles the LaTeX code input locally.

A demonstration experiment is included to show the utility.

Install the procedure file in User Procedures.


  • You must have a local TeXLive install.
  • This is macOS only. I await a Windows user to provide the equivalent script commands to run a local install of the tex compiler.


This package is not meant to be a competitor to the LaTeX Pictures package. The three commands provided here require that you are reasonably proficient writing LaTeX code and that you have installed TeXLive locally. The advantages of this package over LaTeX Pictures are that this package compiles locally and that this package will process an entire notebook containing LaTeX code into a PDF picture. The advantage of LaTeX Pictures is that you can quickly create a picture of a math command in various font families and font sizes without knowing the required LaTeX commands themselves.

The initiation of this is code posted some time ago at this link….

Project Details

Current Project Release

Release File: (7.24 KB)
Version: 1.00
Version Date:
Version Major: 1
Version Patch Level: 00
OS Compatibility: Mac-Intel
Release Notes:

This is the first public release.

View All Releases




Igor Pro 9

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More