Eliminate manual steps such as hand-editing documents
Produce a blog article from a dynamic Markdown document
<<dd_do>>
sysuse auto
regress weight displacement
<</dd_do>>
. sysuse auto
(1978 Automobile Data)
. regress weight displacement
Source | SS df MS Number of obs = 74
-------------+---------------------------------- F(1, 72) = 289.52
Model | 35312313.3 1 35312313.3 Prob > F = 0.0000
Residual | 8781865.08 72 121970.348 R-squared = 0.8008
-------------+---------------------------------- Adj R-squared = 0.7981
Total | 44094178.4 73 604029.841 Root MSE = 349.24
------------------------------------------------------------------------------
weight | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
displacement | 7.573261 .4450891 17.02 0.000 6.685992 8.46053
_cons | 1525.276 96.74555 15.77 0.000 1332.417 1718.134
------------------------------------------------------------------------------
Attributes change a tag's behavior
<<dd_do:quietly>>
matrix define eb = e(b)
<</dd_do>>
<<dd_do:quietly>>
scatter weight displacement, mcolor(%30)
<</dd_do>>
<<dd_graph>>
Produce a .docx document from a do-file
Produce Markdown tables from commands, including
Process dynamic tags in any text files, for example, LaTeX and JavaScript
Produce a .pdf file from a LaTeX file with dynamic tags. It requires pdflatex and Stata command sjlog
dyntext extex.md, sav(extex.tex) replace
!pdflatex extex.tex
The following code generates a scatter plot between mpg and weight
sysuse auto, clear
dyndoc gchart1.txt mpg weight, replace
Produce reveal.js slildes deck use pandoc. It requires pandoc and user written Stata commands dynpandoc and pandocmarkdown.
dynpandoc birds17.md, sav(birds17.html) replace to(revealjs) ///
pargs(-s --template=revealjs.html --standalone ///
--section-divs --variable theme="stata")
Produce a .pdf document from a do-file