# Exporting to TeX

Exporting to TeX is quick and easy. By using the elements of the sketch, an image is created using the package GasTeX.
To export the sketch to TeX, select Export.. and then Export to TeX from the main menu. Choose the desired location and input the name of the TeX file in the dialog box.
The TeX file will then automatically be created. Should an error occur, an error message will be displayed.

## Caveats

As users generally require the sketch in a larger document, the sketch is exported without the TeX preamble. For full functionality, this preamble needs to be included in the file.
As well, because the sketch is exported to TeX using the GasTeX package, the gastex.sty style needs to be included in any file using the exported image, and the gastex.pro file needs to be added to the TeX directory. To download this free package, visit the GasTex website.

Once downloaded, the statement:
\usepackage{gastex}
should be included in the preamble of the TeX file, before beginning the document.

Because the GasTeX package creates postscript code, users should first convert the TeX file to postscript, with conversion to pdf occurring from this intermediary file.