Editing and compiling latex files


On this page are stata programs I have created and published and are now available to all stata users. These are stata programs I have written and use regularly in my research. Typically these are programs I have created as a means to boost productivity by automating a particular task.

To download the .zip folder containing the .ado file and .sthlp file click on the program name. To use the program, extract the contents to the folder where stata stores additional .ado programs. This is typically 'C:\ado\personal'. Alternatively, if a link is provided to the EconPapers page then that program has been submitted to the ssc archive and can be installed as per any other user written command, by typing 'ssc install' followed by the program name in the stata terminal.


texmerge is a stata module that merges .tex files in a specified order and then compiles the merged .tex file to .pdf using pdflatex. Users can input a selection of files to be merged or can merge all .tex files stored in the same folder. Text can also be added to the beginning of the new merged .tex file and the end of the file. This allows users to include preamble arguments such as '\documentclass[]{}' and '\begin{document}' to the .tex file and to close the file using '\end{document}'.

Suggested use: To merge many tables created using esttab or a similar program into a single .tex document and compile this document to .pdf automatically.

Dependencies: tknz, appendfile, texcompiler.

texcompiler is a stata module that allows users to add text to the beginning and the end of a .tex file and then compiles the document to .pdf using pdflatex. texcompiler creates a new duplicate .tex file with the inputted modifications and compiles this new .tex file. Users can apply texcompiler to a single file, a selection of files, or all .tex files located in a specified folder.

Suggested use: To compile a series of tables stored in separate .tex documents created using a stata program such as esttab.

Dependencies: tknz, appendfile.