# Importing .tex file in LaTeX

I am working on an econometric thesis, and I need to import my stata regression output to LaTeX. I have saved the results as a `.tex` file on my desktop, but the `\include` or `\import` commands don't seem to get the data into my LaTeX doc. Is there any alternate command that I should be using instead?

• how do you use the commands? – naphaneal Jul 24 '17 at 17:08
• Without much context we can't answer this well. Are you sure when using `\include{foo.tex}` the file `foo.tex` is in the root directory of your project folder? – TheIncredibleZ1 Jul 24 '17 at 17:17
• What is the real data format of the saved file? Changing the file extension does not change the data format. – Heiko Oberdiek Jul 24 '17 at 17:20
• `\import` isn't provided by the LaTeX kernel (so you'd need to say which package you tried to use it with). If you simply want the contents of the `.tex` file inserted into the document, then `\input` is more appropriate than `\include`. (See When should I use \input vs. \include?.) If your results file is on the desktop, are you trying to add the full path to it? (I'm guessing your document code isn't also on the desktop.) Do you get any error messages? – Nicola Talbot Jul 24 '17 at 18:00
• you should almost certainly be using `\input` not `\include` (assuming the file is in fact tex syntax) – David Carlisle Jul 24 '17 at 18:38

According to your question, you have saved the regression results as a `.tex` file on your desktop. However, it is not clear if the result is Latex source code or another data representation. You must check what is the content of the file.
As mentioned by David Beauchemin, you can produce Latex files inside Stata using the `texdoc` module/command. You may check many websites and slides explaining how to produce latex content using that module.
Once you have a file in Latex, you may "import" that file using `\input`. There is an import latex module that adds supports for the mentioned commands `\import` and `\subimport`. However, if you are not creating very complex documents, you may import the file without using this module.