{smcl} {com}{sf}{ul off}{txt} {com}. . /*** > An Example File > =============== > > Some preliminary text. > > Some unevaluated code: > > ~~~ > regress mpg weight > ~~~ > > Some code, evaluted: > ***/ . sysuse auto {txt}(1978 Automobile Data) {com}. regress mpg weight {txt} Source {c |} SS df MS Number of obs ={res} 74 {txt}{hline 13}{c +}{hline 34} F(1, 72) = {res} 134.62 {txt} Model {c |} {res} 1591.9902 1 1591.9902 {txt}Prob > F ={res} 0.0000 {txt} Residual {c |} {res} 851.469256 72 11.8259619 {txt}R-squared ={res} 0.6515 {txt}{hline 13}{c +}{hline 34} Adj R-squared ={res} 0.6467 {txt} Total {c |} {res} 2443.45946 73 33.4720474 {txt}Root MSE = {res} 3.4389 {txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12} {col 1} mpg{col 14}{c |} Coef.{col 26} Std. Err.{col 38} t{col 46} P>|t|{col 54} [95% Con{col 67}f. Interval] {hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12} {space 6}weight {c |}{col 14}{res}{space 2}-.0060087{col 26}{space 2} .0005179{col 37}{space 1} -11.60{col 46}{space 3}0.000{col 54}{space 4}-.0070411{col 67}{space 3}-.0049763 {txt}{space 7}_cons {c |}{col 14}{res}{space 2} 39.44028{col 26}{space 2} 1.614003{col 37}{space 1} 24.44{col 46}{space 3}0.000{col 54}{space 4} 36.22283{col 67}{space 3} 42.65774 {txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12} {res}{txt} {com}. . * Comment 1 . /* Comment 2 */ . summarize mpg weight {txt} Variable {c |} Obs Mean Std. Dev. Min Max {hline 13}{c +}{hline 57} {space 9}mpg {c |}{res} 74 21.2973 5.785503 12 41 {txt}{space 6}weight {c |}{res} 74 3019.459 777.1936 1760 4840 {txt} {com}. . /*** > ## Some Notes > - Requires two more Stata packages (Weaver and Statax) > - Requires pandoc and may require pandoc's location > - Using backticks as code fences for unevaluated > code is problematic, > although the issue is reported as fixed? > - log commands should be prefixed "quietly", > or they will appear in you document, > and `quietly log close` appears unless it > is specified "qui log c". > - The document text is written in comment blocks, > rather than the dynamic content appearing in > code blocks, as in other dynamic markdown > implementations. > - Ordinary comments disappear from your document. > - You could actually build a document interactively, > piece by piece. > ***/ . . *quietly log close . qui log c {smcl} {com}{sf}{ul off}