Create Word documents from Stata
Create webpages from Stata
Intermix text, regressions, results, graphs, etc.
Intermix the full output of Stata commands
Intermix individual values from the results of Stata commands
Create tables in Word or HTML from the results of Stata commands
Changes in data or commands are automatically reflected in the document or webpage
Have you ever wanted to create Word, PDF, or HTML files that report on what you have done? Stata provides commands for doing that:
|Create Word documents or HTML from Markdown
|Create Word documents
|Create PDF files
Here we tell you about dyndoc.
You first create a file containing text to be formatted using the Markdown text-formatting language intermixed with Stata commands that produce the output you want in your final document. Markdown is a simple, standardized text-formatting language that you can read about at Wikipedia. You mix Markdown with Stata commands that create the output you want. Think of the file you create as being a do-file on steroids.
You then run dyndoc to produce a Word document (.docx) or webpage—an HTML file. The resulting file will contain formatted text along with the Stata output and graphs that your commands produced.
The examples below on this webpage were created using that approach!
They are called dynamic documents, which means that if the data ever change, we can run the original source document back through dyndoc to create an updated webpage.
dyndoc can substitute output, substitute results in-line, substitute graphs, and create tables from the results of some Stata commands. All of this can be saved as a Word document or an HTML file.
Learn more about Stata's reporting features.