Pandoc understands metadata. Just start your file with three lines that begin with a
and correspond to the author, title and date. The title may span more than one line,
and multiple authors can have a line each, provided continuation lines start with a space.
Please see the Pandoc manual
for full details. The date may be inserted using inline code to retrieve Stata's current date,
as in the example below.
% Metadata in Stata Markdown % Germán Rodríguez % `s c(current_date)` The main document starts here.
And this is how it is rendered by the command
markdown using metadata
The main document starts here.
In addition to including the title, author and date as headings at level 1 to 3, Pandoc generates a title tag and a meta tag to list the author(s) as metadata, a feature not shown on this page.
An alternative way to enter metadata is through YAML blocks, which include not only title, author and date, but may be used to provide other information to Pandoc, including bibliographic information for resolving citations as explained here, or an abtract that is used in PDF documents via LaTeX. For an example using both features see this paper.