# 1.1 LaTeX

## Summary

The LaTeX app can be used to insert LaTeX objects in worksheet cells, graph axes titles, legends and text labels.

We have the online meterials below to help you to learn how to use this app for different cases. In this tutorial, we only illustrate two cases: insert the formula of Gaussian function and a skeletal structure diagram of a molecule.

## Tutorial

1. Start this tutorial with the app LaTeX installed. If you have not installed this app, please click Add Apps button in Apps Gallery to open App Center to search and install the app.
2. Download the sample project fisrtly. Unzip the file and open the project file "LaTeX v2_3 Blog.opj".
3. Open the project, we are going to add the formula of Gaussian function and a skeletal structure diagram of a molecule as below:
4. With the graph window activated, click the app icon of LaTeX to open the LaTeX Equation Editor.
5. Enter the markup below into the top panel, and click Preview button to preview the equation:
y=y0+\frac{A\mathrm{e}^\frac{-4\ln\left(2\right)\left(x-x_c\right)^2}{w^2}}{w\sqrt{\frac{\pi}{4\ln\left(2\right)}}}

 Note: If you want to insert a built-in function or user-defined function stored in Origin, you can click the button to expand the funtion categories and select the function. The equation will be loaded into the top panel, you can click OK button to preview and insert it into the graph.
6. Click OK button to insert this equation into the graph. Next, let's add a skeletal structure diagram with LaTeX app.
7. Click the app icon again, in the opened dialog, enter the markup below into the top panel:
\documentclass{article}
\usepackage{chemfig}
\pagestyle{empty}
\begin{document}
\large
\setchemfig{atom sep=2.25em}
\chemfig[line width=1.1pt]{
CH_3-[:30]-[:90]\chemabove{N}{+}*6(=(-[:-30]=[:30]-[:-30]=[:30]*6(-\charge{[circle]90=:}{N}(-[:-90]-[:-30]CH_3)-*6(=-=-=)--=-))-=-*6(=-=-=)--)
}