Lauren Samuels, lauren.samuels@vumc.org
26 May 2020
In general, I would recommend having these things be the first two lines of your file.
<<dd_version: 2>>
From the Stata Reporting manual:
The dd version tag specifies the minimum version required to convert the source file. The version number is independent of Stata’s version command… The current version, and the default, is 2, and it is introduced as of the release of Stata 16. The current version number is also stored in c(dyndoc version).
<<dd_include: header.txt >>
If there are stylistic elements you want to use in all your reports, you might want to store them in a header file that you can use across projects.
Stata’s standard header file can be found at http://www.stata-press.com/data/r16/reporting/header.txt.
The header file specifies a particular css (cascading style sheet).
Stata’s standard css can be found at http://www.stata-press.com/data/r16/reporting/stmarkdown.css.
If you don’t like that one, you can modify it, or you can look for other css’s on the web. There are a lot out there. Here’s one website you can try: https://markdowncss.github.io.
Markdown is designed to be easy to learn and use. You can find a “cheat sheet” at Markdown Cheat Sheet, and a more detailed description of the basic syntax and best practices at Basic Syntax.
Note that there are several “flavors” of Markdown out there, so if you try something from the Markdown Guide and it doesn’t work in Stata, don’t give up. Many of the differences in “flavors” have to do with spaces surrounding symbols and/or blank lines preceding or following text, so fiddling with those things can be helpful if you’re having problems.