The Improved LaTeX App (Version 2.3)

Note:Origin 2023b includes built-in LaTeX support so LaTeX App and MiKTeX installations are no longer required.


Starting with Origin 2016 SR2, the LaTeX App has undergone considerable improvement. If you’ve already been using the App, make sure update your Origin to the latest version and then choose Tools: App Center menu and select Updates tab to update to this newer version. You only need to download and install the newer version of the App; there is no need to reinstall either MiKTeX or OAutotrace.

Note: If you haven’t used the LaTeX App before, please read Introducing the LaTeX App. It discusses the steps necessary to install the App the first time along with basic App usage.

So what’s new? First, the App handles the temporary files it creates better. But this isn’t so interesting. What’s interesting is that you can now enter complete LaTeX documents if you wish and not just equation markup as mentioned in Introducing the LaTeX App. In this blog post, I’ll show you two things you can do with the new version of the App that you couldn’t do before:

  • Change the font of an equation.
  • Add a skeletal structure diagram of a molecule to a graph.

Here is a graph showing this thing:

Figure 1 (click to enlarge)
Figure 1 (click to enlarge)

It is the UV-Vis spectrum of the linear conjugated dye 1,1′-Diethyl-2,2′-carbocyanine chloride (pinacyanol chloride). The peaks are fitted with the Gaussian fitting function. I added the formula for the Gaussian function Origin uses to the graph along with a skeletal structure of the molecule.. Keep reading to find out how I did it.  To download the files associated with this post click here. Note: the *.tex file in the zipped folder can be opened in Notepad or another plain text editor. While you can view the OPJU in Origin, you will need OriginPro to rerun or edit the fitting operation.

Note: If you have previously installed the earlier version 1.2, you need to first uninstall it and shut down Origin. Then go to a folder under your user name, C:\Users\<User Name>\AppData\Local\OriginLab\93\TMP\textemp\, and delete the temporary files in that folder. Then install the new version of the App.

Change the Equation Font

By default LaTeX and the LaTeX App use Computer Modern as the font for equations. However, because the new version of the App allows you to enter a complete LaTeX document, you can include additional packages such as the mathptmx package. That package lets you use Times New Roman as the equation font. Here is the markup to enter into the LaTeX App:


When you click the OK button in the App dialog, the typesetting engine MiKTeX may prompt you to download one or more packages. You should allow it to do so! While MiKTeX is downloading the packages, the App will pause. If for some reason the App reports an error, simply close it, reopen it, and try again. Sometimes it takes longer than anticipated for MiKTeX to download and install packages.

Add a Skeletal Structure Diagram to a Graph

Just like how we can use a complete LaTeX document to change the equation font, we can create a skeletal structure diagram of a molecule using the LaTeX App. The chemfig package is specifically designed to do this. I won’t get into the markup that chemfig uses but here is an excellent and detailed introduction. This time MiKTeX will likely have to install quite a few packages, so there may be considerable delay while it does so. This should only happen the first time you run the LaTeX App using the chemfig package. Here is the markup to enter into the App:

\setchemfig{atom sep=2.25em}

\chemfig[line width=1.1pt]{
\chemfig[line width=1.1pt]{

Note: When creating molecules with the LaTeX App, you should expect that it will take some time to render it onto a graph. Both MiKTeX and the App itself mush go through several complex steps which are even more complex with output like this.


So you can see that the improvement to Origin’s LaTeX App opens the door to much more than just adding generic equations to graphs. You can customize fonts and do many other things not possible with the earlier version of the App.

Thanks for reading!

About Chris Drozdowski

Chris Drozdowski is a Product Support Engineer at OriginLab. He loves to talk to customers and educate them. He particularly relishes diagnosing and solving difficult, edge-case issues. As well, he contributes code to help solve problems or enhance user experience. In his down time at work, he likes to research and write about esoteric product features. Outside of work, he enjoys spending time with his family, having fun with C++, working on his aquarium, and exploring craft beers.

View all posts by Chris Drozdowski →

5 Comments on “The Improved LaTeX App (Version 2.3)”

  1. Hello, Chris.
    I wasn’t sure if you were still following this thread. The latest version (2023b) includes built-in LaTeX support, but it seems to make it impossible to enter complete LaTeX documents, and therefore it is impossible to change math fonts and insert chemical structure diagrams. I don’t know if I haven’t explored the correct usage of the new version of the software yet, or if it’s just not possible to achieve the personalized LaTeX effects mentioned above.

    1. Hello,

      This is Snow of OriginLab.
      Do you mean the complete LaTeX doc works with our old App but not with the built-in one?
      Do you mind share some of problematic LaTeX doc so we can check?

      Thanks, Snow

    1. Hi,

      In the column for the Y data, set the Long Name to be \q(e=mc^2) where e=mc^2 is the LaTeX. That is, put the LaTeX into the \q() escape sequence. Then turn on Rich Text for the Long Name row.

      1. Sorry for not being clear, I intended to ask for converting the tick labels as well into latex fonts. Thanks, for your reply.

Leave a Reply

Your email address will not be published. Required fields are marked *