[Tex/LaTex] Import Stata 15 output into Latex

outputtables

I know you may have seen this question dozens of times, but I still didn't find a helpful answer. I have to display some stata tables (descriptives, regressions, …) in my uni research, but I don't know if there is a general way to do this. I do not have any command I can show you since I really don't know where to start from. I checked the estout command, but I should display the output exactly as it is in stata. I don't really want to do a screenshot of the output and import it in latex with \includegraphics.

I have a .dta stata file and I wrote the necessary codes in my .do file. I wonder if there is a package I can use to let latex read the stata codes. I read that I have to define the .dta file in latex and then type the .do file codes in latex to let him generate the appropriate output. Does anyone know how to do this?

Again, sorry for not providing any code.

Best Answer

Since STATA seems to be able to provide text output, use the minted or listings packages to display the content of the STATA file in your document, as it could be done for source code.

More specifically, with the listings package, do something like

\documentclass{article}
\usepackage{listings}

\begin{document}
\lstinputlisting{yourstatafile.extension}
\end{document}

See this website for more information