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?

  • 1
    how do you use the commands?
    – naphaneal
    Jul 24, 2017 at 17:08
  • 1
    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? Jul 24, 2017 at 17:17
  • 2
    What is the real data format of the saved file? Changing the file extension does not change the data format. Jul 24, 2017 at 17:20
  • 1
    \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? Jul 24, 2017 at 18:00
  • 2
    you should almost certainly be using \input not \include (assuming the file is in fact tex syntax) Jul 24, 2017 at 18:38

1 Answer 1


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.

If you have a file in another format, you must find which it is. Depending on the format, you may find other Latex modules to include the content in your documents.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.