.
. /***
> An Example File
> ===============
>
> Some preliminary text.
>
> Some unevaluated code:
>
> ~~~
> regress mpg weight
> ~~~
>
> Some code, evaluted:
> ***/
. sysuse auto
(1978 Automobile Data)

. regress mpg weight

      Source |       SS           df       MS      Number of obs   =        74
-------------+----------------------------------   F(1, 72)        =    134.62
       Model |   1591.9902         1   1591.9902   Prob > F        =    0.0000
    Residual |  851.469256        72  11.8259619   R-squared       =    0.6515
-------------+----------------------------------   Adj R-squared   =    0.6467
       Total |  2443.45946        73  33.4720474   Root MSE        =    3.4389

-------------+----------------------------------------------------------------
          mpg |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      weight |   -.0060087    .0005179    -11.60    0.000     -.0070411    -.0049763
       _cons |    39.44028    1.614003     24.44    0.000      36.22283     42.65774
-------------+----------------------------------------------------------------

.
. * Comment 1
. /* Comment 2 */
. summarize mpg weight

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
         mpg |         74     21.2973    5.785503         12         41
      weight |         74    3019.459    777.1936       1760       4840

.
. /***
> ## 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