*! version 4.0.2 15Mar2022 MLB

Title

smclpres -- Create a .smcl presentation from a .do file

Syntax

smclpres
using filename [,
options]

replace files created by smclpres will replace files with the
same name if they already exist

dir(directory_name) specifies the directory in which the presentation
is to be stored. The default is the current working directory.

Commands that can be used in the .do file. These commands have to be the first
word on their line.

commands

Main
//version sets the version of smclpres

//slide start a new slide

//endslide ends that slide

//titlepage start a titlepage

//endtitlepage ends that titlepage

//anc start an ancillary slide, a slide that is not part of the regular
flow of the presentation, but can only be accessed through the index slide

//endanc end the ancillary slide

//digr start a digression slide, a slide that is not part of the
regular flow of the presentation, but can be accessed through a special link in
a textblock on the previous slide

//enddigr ends that digression slide

/*digr*/ will put a link to the next slide if it is a digression
slide. it has to appear in a textblock and does not have to be the first word on
the line.

//bib start a bibliography slide

//endbib ends that bibliography slide

//title title The title that appears on currently open
slide

//txt text will write text on the current slide

/*txt and txt*/ lines between these two commands will be
written on the currently open slide.

/*cite key [key] [...] */ adds a reference of style
"(last_name year)". The keys refer to the entries in the bibtex file
specified in //layout bib bibfile()

//ex[label] and //endex Lines between these two commands are an
example. They will appear on the current slide bold and indented. In addition, a
.do file will be created containing those lines. On the slide below the example
a link will be shown that wil do that .do file. If a label is specified, it will
be used to label that .do file in the index when specifying //layout tocfiles on.

//label label Each slide will contain a link to the next slide.
label will be used to refer to the currently open slide, when
//layout bottombar label has been specified. The default is "next".

//section section_name Start a new section called
section_name

//subsection subsection_name Starts a new sub-section called
subsection_name

//toctitle title The title that appears on the index slide,
which also contains the table of contents

/*toctitle and toctitle*/ lines between these two commands
will appear as the title on the index slide.

/*toctxt and toctxt*/ lines between these two commands will
be written on the index slide.

//tocfile mark filename label adds filename to the index slide
when //layout tocfiles on is specified in the group of files mark and
the label label

//file filename looks for filename in the source directory
and copies it to the directory specified in the dir() option.

//dir directory adds directory to the destination directory.

//bib_here adds the bibliography at that place on the bibliography slide

/*bib library in bibtex format bib*/ enables one to
write the bibtex library inside the presentation instead of refering to an external
bibtex library using //layout bib bibfile()

//include include another.do file

Options for including content from other .do files
//dofile filename ["]label["] adds a link in the .smcl
presentation that opens file filename in the do file editor and called
label and adds output from runing filename to the .html handout

//apdofile filename ["]label["] adds a link to .smcl
presentation opening filename in the do file editor and called label.
In the .html handout it adds an appendix slide at the end of the presentation
containing output from runing filename and adds a link in the html with
label label.

//codefile filename ["]label["] adds link that opens
filename called label in the do file editor and adds content of
filename to the .html handout

//apcodefile filename ["]label["] adds a link to .smcl
presentation opening filename in the do file editor and called label.
In the .html handout it adds an appendix slide at the end of the presentation
containing the content of filename and adds a link in the html with
label label.

//db dbname filename ["]label["] adds a link to
the .smcl presentation opening the dialog box dbname and called it label.
It adds the output from running filename to the .html handout.

Options for the .html handout
//graph name adds the graph name to the
.html handout

//ho_ignore ignores this line in the .html handout

Setting the overall layout
//layout title options options determining the layout of the
titles

//layout topbar options options determining the layout of the
top bar on each slide

//layout bottombar options options determining the layout of
the bottom bar on each slide

//layout toc options options determining the layout of the
index slide

//layout tocfiles options options determining whether or not
and how additional files used in the presentation are listed on the index slide

//layout bib options options governing the bibliography

//layout digress options options determining the layout of the
link to digression slides

//layout example options option determining the layout of the
link that runs the examples

//layout tabs option option how to treat tabs

layout options

//layout title
pos(pos) justification of the title

hline(what) determines whether a horizontal is displayed line(s) at
the top or bottom of the title. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is hline(notop nobottom)

font(font) specifies font for title

//layout topbar
off suppress the bar at the top of the slide

on display the bar at the top of the slide, the default

nosubsec only display the section name

hline(what) determines whether a horizontal is displayed line(s) at
the top or bottom of the topbar. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is hline(top bottom)

secfont(font) specifies font for section title

subsecfont(font) specifies font for subsection title

sep(string) separator between the section and subsection, default
is " {hline 2} "

//layout bottombar
arrow the bottom bar will contain three links: back, index slide,
and forward in the form << index
>>. This is the default.

label the bottom bar will contain two links index slide, and forward
in the form index next

next(left|right) specifies whether the link to the
nextslide will apear left or right if //layout bottombar label has been
specified.

nextname(name) specifies the default label used for the link to the next
slide if //layout bottombar label has been specified. The default is
"next".

index(name) specifies the label used for the link to the index
slide

toc display the bottombar on the index slide

hline(what) determines whether a horizontal is displayed line at
the top or bottom of the bottombar. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is hline(top bottom)

//layout toc
link(section|subsection|subsubsection) specifies
whether on the index slide the section names, the subsection names, or the
subsubsection names are links to the appropriate place in the presentation.

title(subsection|subsubsection|notitle) specifies that
the slide title is also a subsection, subsubsection, or neither.
title(subsection) will also set //layout topbar nosubsec.

itemize specifies that on the index slide the section names are
preceded by a "o ", the subsection names are preceded by a "- ", and the
subsubsection by a ". ".

anc(name) ancillary slides will always appear as a link in the index,
with the title of the ancillary slide. additionally, they will be marked with
(name). The default name is "ancillary".

nodigr do not display digression slides in the table of content

sechline(what) determines whether a horizontal is displayed line at
the top or bottom of each section in the table of contents. what can be top,
bottom, notop, and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is sechline(notop nobottom)

secfont(font) specifies font for section title

subsecfont(font) specifies font for subsection title

subsubsecfont(font) specifies font for subsubsection title

subsubsubsecfont(font) specifies font for subsubsubsection title

subtitle(string) if //layout tocfiles on is specified, then the index
slide will consist of two parts: the index of slides followed by an index of
files used in the presentation. string will be used as a title for the index
of slides. The default is "Slide table of contents"

subtitlepos(pos) specifies justification of the subtitle

subtitlefont(font) specifies font for subtitle

subtitlehline(what) determines whether a horizontal is displayed line at
the top or bottom of the subtitle. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is subtitlehline(top bottom)

//layout tocfiles
off do not display a list of files used in the presentation in the
index slide, the default

on display a list of files used in the presentation in the index
slide

name(string) string will be used as a subtitle on the index
slide for the part displaying files. The default is "Supporting materials"

exname(string) if no label was specified for an example then the
default will be to display "example #; on slide #". with this option you can
change "example" to the string of your choice.

where(string) all file labels will include an indication on which
slide the file is used, the default is "; on slide #". with this option you can
change "; on slide " to the string of your choice.

doname(string) all example .do files and files who got the mark
"do" at //tocfile will be displayed together and
will get the section heading string. The default is "Do files"

adoname(string) all files that got the mark "ado" at
//tocfile will be displayed together and will
get the section heading string. The default is "Ado files"

dataname(string) all files that got the mark "data" at
//tocfile will be displayed together and will get the
section heading string. The default is "Datasets"

classname(string) all files that got the mark "class" at
//tocfile will be displayed together and will get the
section heading string. The default is "Classes"

stylename(string) all files that got the mark "style" at
//tocfile will be displayed together and will get the
section heading string. The default is "Styles"

graphname(string) all files that got the mark "graph" at
//tocfile will be displayed together and will get the
section heading string. The default is "Graphs"

grecname(string) all files that got the mark "grec" at
//tocfile will be displayed together and will get the
section heading string. The default is "Graph editor recordings"

irfname(string) all files that got the mark "irf" at
//tocfile will be displayed together and will get the
section heading string. The default is "Impulse-response function datasets"

mataname(string) all files that got the mark "mata" at
//tocfile will be displayed together and will get the
section heading string. The default is "Mata files"

bcname(string) all files that got the mark "bc" at
//tocfile will be displayed together and will get the
section heading string. The default is "Business calendars"

stername(string) all files that got the mark "ster" at
//tocfile will be displayed together and will get the
section heading string. The default is "Saved estimates"

tracename(string) all files that got the mark "trace" at
//tocfile will be displayed together and will get the
section heading string. The default is "Parameter-trace files"

semname(string) all files that got the mark "sem" at
//tocfile will be displayed together and will get the
section heading string. The default is "SEM builder files"

swmname(string) all files that got the mark "swm" at
//tocfile will be displayed together and will get the
section heading string. The default is "Spatial weighting matrices"

customname(mark label [; mark label]) specify a
custom mark or marks with their section headings.

doedit(string) all filenames with an extension that appears in
string will be displayed as a link that will open the file in the
do file editor. The default is "do ado dct class scheme style"

view(string) all filenames with an extension that appears in
string will appear as a link that will open the file in the viewer. The
default is "smcl log hlp sthlp".

gruse(string) all files with filenames with an extension that
appears in string will appear as a link which will open a
Stata graph. The default is "gph"

euse(string) all files with filenames with an extension that
appears in string will appear as a link which will open
saved estimates. the default is "ster"

use(string) all files with filenames with an extension that
appears in string will appear as alink which will open it as a
Stata data set. The default is "dta"

p2(# # # #) sets column spacing for the table of files.
The first # specifies the beginning position of the first column, the
second # specifies the placement of the second column, the third #
specifies the placement for subsequent lines of the second column, and the
last # specifies the number to indent from the right-hand side for the
second column. The default is "5 25 26 0"

//layout bib
bibfile(filename) specifies the bibtex library that is to be used
for the bibliography

stylefile(filename) specifies the style file file that governs the
way the bibliography is formatted

and(string) specifies what is to be used for the word "and" when
a reference contains multiple authors. The default is "and"

authorstyle("first last" | "last first") specifies whether the
authors in the bibliography are writen as "first_name last_name" or
"last_name, first_name". The default is "first last"

write("cited" | "all") specifies whether the bibliography contains
only the references cited in the presentation or all references present in the
bibtex library. The default is "cited"

//layout digress
name(string) name used for the link to the digression slide when //label
has not been specified. The default is "digression"

prefix(string) prefix to the name used for the link. The default
is ">> "

//layout example
name(string) name used for the link that runs the example. The
default is "{it:click to run}"

//layout tabs
spaces(#) number of spaces used for each tab, default is 4

Description

A .smcl presentation is a series of linked .smcl files that open in
the viewer inside Stata (like help-files). They are interactive. Click
on links to execute .do files or move from one slide to the next. They are
particularly useful for talks that focus on how to do things in Stata, like a
lecture on graphs in Stata or a talk at a Stata Users' Group meeting. Preparing
for such a talk typically starts with preparing the examples using a .do file.
The purpose of smclpres is to streamline the process of turning that .do
file into a .smcl presentation.

Once a .smcl presentation is created it can be turned into a .html handout using
pres2html.

A typical slide created by smclpres will start with a bar at the top showing
the section and subsection to which that slide belongs. This is followed by the
title of that slide. After that the actual contents of the slide starts. This could
be any combination of text and examples. An example is a set of commands shown
in bold text, with below it a link that will execute a .do file with those exact
same commands. So one can discuss the commands in the example, click on that link,
and show the output of those commands. The slide ends with a bar at the bottom,
which will contain a link to the next slide, a link to index slide, and the
previous slide.

smclpres knows 6 different types of slides:

the titlepage is the first slide. It does not contain a topbar, and the bottombar only
points to the index slide and the first regular slide.

the index slide is the second slide if a titlepage is defined, or the first slide
otherwise. It contains a list of sections and subsections and optionally all
slides. Either the section, subsection, or individual slide listings are links. So
one can use the index slide to jump around in the presentation.

The index slide may also contain a listing of files used in the presentation. The
.do files created for the examples are automatically included, all other files
have to be explicitly mentioned using the //tocfile command.

The index slide does not contain a topbar, and by default, no bottombar. One can
add a textblock to the index slide, which can be useful when the index slide also
functions as the titlepage.

The regular slides are there for the main content of the presentation. The order
of the slides is determined by the order in which they appear in the master .do file.

The digression slides are there for a side thought. They are not part of the main
flow of the presentation. A regular slide may contain a link in a text block to
a digression slide. The link to the next slide in the bottom bar will link to the
next regular slide, and will thus skip the digression slide. So during the
presentation, the presenter can easily decide whether or not to skip the digression
slide. The bottom bar of the digression only contains a link back to the regular slide
that linked to it and the index slide. The topbar will not contain the section
and subsection, but "Digression" or whatever has been specified in
//layout digr name().

The ancillary slides are the appendix. They are also not part of the main flow of
the presentation. They can only be accessed through the index slide.

The bibliography slide contains the bibliography. A reference on another slide
will create a link to this slide, and the bibliography slide can be accessed via
the index slide.

Options

options for the smclpres command

replace files created by smclpres will replace files with the
same name if they already exist.

If the .do file is called
presentation.do then the following files will be created:
presentation.smcl, slide1.smcl, slide2.smcl, etc. presentation.smcl will
be the first slide and contain the title page, or when no titlepage was
defined, the table of content. If a titlepage was defined, the index slide
will also be created and called index.smcl. In addition, if slide2.smcl
contains two examples, then the following files will also be created:
slide2ex1.do and slide2ex2.do.

dir(directory_name) specifies the directory in which the presentation is to
be stored. The default is the current working directory.

Commands in .do file

//version version Sets the version of smclpres that is to be used to create
the presentation. So if you start your .do file with //version 4.0.0 and you need
to recreate the presentation at some later time when a new version of smclpres
may have been released, then none of the changes in the new version will break your
presentation. This protection starts at version 4.0.0.

//slide Starts a new slide. Anything appearing afterwards will be ignored.
So one can specify //slide ------------ to indicate more clearly
in the .do file where the new slides begin. However, notice the space
between //slide and -------.

//endslide Ends the slide. As with //slide everything afterwards will
be ignored.

//titlepage starts the first slide, the titlepage. If this is not specified
the index slide will be the first slide.

//endtitlepage ends the titlepage.

//anc starts an ancillary slide, that is, a slide that is not part of the
regular flow of the presentation, but can only be accessed through the
index slide.

//endanc ends the ancillary slide

//digr starts a digression slide. Such a slide is not part of the regular flow
of the presentation, but can be accessed from a link inside a textblock
on the previous slide. Once on a digression slide one can only return to
the previous slide (or the index slide).

//enddigr ends the digression slide

/*digr*/ puts a link to the next slide, which has to be a digression slide.
This has to appear in a textblock, but unlike other commands does not
have to be the first word on a line. If the digression slide has a
//label then the link will appear as
>>label, otherwise as
>>digression. The prefix and the default label
can be changed using //layout digress name() prefix().

//bib starts the bibliography slide.

//endbib ends the bibliography slide.

//bib_here specifies that the bibliography is to appear here. This can only
be used on a bibliography slide. This is necessary when using an external bibtex
file, i.e. using //layout bib bibfile some_bibtex_file.bib.

/*bib bibliography in bibtex format bib*/ enables one to type
bibtex file in the presentation instead of an external file. This also indicates
the place where the bibliography will appear on the bibliography slide. As a
consequence, this has to appear on a bibliography slide.

//title title specifies the title that appears on the current slide

//txt text will write text on the current slide. This text may
contain smcl directives.

/*txt and txt*/ lines between these two commands will be written on
the currently open slide. This text may contain smcl directives.

/*cite [{prefix}] key [{postfix}]
[[{prefix}] key [{postfix}]] [...] */
Adds a reference in the style (prefix last_name year postfix).
The keys refer to entries in the bibtex file. The prefix could be
something like e.g. and the postfix something like p. 12.

If you cite multiple
references, then between the keys the first matching pair of curly braces (which
could contain nothing) is the postfix for the left key and the second pair of
matching braces contains the prefix of the right key.

//ex [label] and //endex Lines between these two commands are
an example. They will appear on the current slide bold and indented. In
addition, a .do file will be created containing those lines. On the
slide below the example a link will be shown that wil do that .do file.
If //layout tocfiles on is specified, then the .do files will be
automatically included with the mark "do".
label will be used to describe the .do file. The default label is
determined by //layout tocfiles exname() where().

//label label each slide will contain a link to the next slide. If
//layout bottombar label is specified label will
be used to refer to the current slide. The default is "next". Regardless
of what is specified in //layout bottombar, label will be used
to refer to digression slides. In that case the default is specified in
//layout digress name().

//section section_name Starts a new section named section_name.
This will appear in the table of content and on top of the slides in that
section.

//subsection subsection_name Starts a new subsection named
subsection_name. This will appear in the table of content and on
top of the slides in that section. The sub-sections will be ignored if
//layout toc title(subsection) was specified, as in that case the
slide titles are the sub-sections.

//toctitle title The title that appears on the index slide

/*toctxt and toctxt*/ lines between these two commands will appear on
the index slide

//tocfile mark filename label specifies a file that will be listed in
the index slide if //layout tocfiles on has been specified. All files
with the same mark will be listed together in the order in which they
appear in the master do-file. label will appear after the filename in
the index slide to describe that file.

//include filename Includeds filename in the presentation .do file
as if it was one big .do file. When making a big presentation, the source .do file
can become very long, and it can be convenient to break it up into smaller .do files
and use //include to bring them together in one presentation.

//file filename looks for filename in the source directory
and copies it to the directory specified in the dir() option. This does
nothing	when the dir() option is not specified. Specifying //file
can be useful to make sure that for example datasets used in examples are
available to the presentation.

//dir directory adds directory to the destination
directory. By default, the destination directory is the source directory, unless
the dir() option has been specified. Working with directories is something
many students have trouble with, so showing how to work with them is often part
of a course. So I often want a given directorystructure to illustrate that in my
course material.

//dofile filename ["]label["] adds a link to the .smcl presentation
that opens filename in the do file editor called label and adds output
from runing filename to the .html handout. filename is assumed to be
in the source directory. If the dir() option is specified, then
filename will be copied into that directory. This has to appear inside a
textblock.

//apdofile filename ["]label["] adds a link to the .smcl presentation
that opens filename in the do file editor called label and adds an
appendix slide at the end of the .html handout containing output from runing
filename. filename is assumed to be in the source directory. If the
dir() option is specified, then filename will be copied into that
directory. This has to appear inside a textblock.

//codefile filename ["]label["] adds a link to the .smcl presentation
that opens filename in the do file editor called label and adds
content of filename to the .html handout. filename is assumed to be in
the source directory. If the dir() option is specified, then filename
will be copied into that directory. This has to appear inside a
textblock.

//apcodefile filename ["]label["] adds a link to the .smcl presentation
that opens filename in the do file editor called label and adds an
appendix slide at the end of the .html handout containing the content of
filename. filename is assumed to be in the source directory. If the
dir() option is specified, then filename will be copied into that
directory. This has to appear inside a textblock.

//db dbname filename ["]label["] adds a link to the .smcl presentation
that opens the dialog box dbname and calls that link label. It adds output
from runing filename to the .html handout. .dlg and filename
are assumed to be in the source directory. If the dir() option is specified, then
dbname.dlg and filename will be copied into that directory. This has
to appear inside a textblock.

//graph name specifies the graph(s) that will be added
at this point in the .html handout.

//ho_ignore ignores this line in the .html handout

//layout what options specifies global options determining how various
elements will appear in the smcl presentation. what can be title,
topbar, bottombar, toc, tocfiles, digress,
example, tabs, or bib. The available options are listed below.

//layout title options

pos(pos) justification of the title, pos can be left or center. Default is center

hline(what) determines whether a horizontal is displayed line at
the top or bottom of the title. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is hline(notop nobottom)

font(font) Specifies the font used for the title. Can be bold, italic, or regular. The default is bold.

//layout topbar options

off suppress the bar displaying the section and subsection at the top of
the slide

on show a bar on top of each slide displaying the section and subsection,
the default.

nosubsec only display the section name

hline(what) determines whether a horizontal is displayed line at
the top or bottom of the topbar. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is hline(top bottom)

secfont(font) Specifies the font used for the section title. Can be bold, italic, or regular. The default is bold.

subsecfont(font) Specifies the font used for the subsection title. Can be bold, italic, or regular. The default is regular.

sep(string) a string that separates the section from the subsection. The
the default is " {hline 2} ". Examples of possible alternatives
would be "; " or " | "

//layout bottombar options

arrow specifies that the bottombar, which is used to navigate throught the
smcl presentation looks like this:

<< index >>

this is the default

label specifies that the bottombar, which is used to navigate throught the
smcl presentation looks like this:

index label

label is the label for the next slide as specified by //label

next(left|right) specifies whether the link to the next
slide will appear on the left or the right. The default is right.

nextname(name) specifies the label for the next slide when //label
has not been specified. The default is "next".

index(name) specifies the name used for the index slide. The default is "index".

toc specifies that the bottombar will also appear on the indexslide

hline(what) determines whether a horizontal is displayed line at
the top or bottom of the bottombar. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is hline(top bottom)

//layout toc options

link(section|subsection|subsubsection) The index will
contain links to slides. This option determines whether these links will
be the first slide in each section, subsection or subsubsection. The default is
link(section)

title(subsection|subsubsection|notitle) specifies whether
the titles of individual slides will appear as subsections, subsubsections,
or not at all. The default is title(notitle). If
title(subsection) has been specified, then all subsections specified
with //subsection will be ignored. This will also set
//layout topbar nosubsec.

itemize specifies that on the index slide the section names are preceded by
a "o ", the subsection names are preceded by a "- ", and the
subsubsection by a ". ". If the secthline or secbhline options
have been specified, then the sections will not be preceded by anything, the
subsections will be preceded by a "o ", etc.

anc(name) ancillary slides will always appear as a link in the index,
with the title of the ancillary slide. additionally, they will be marked with
(name). The default name is "ancillary".

nodigr digression slides do not appear in the index.

sechline(what) determines whether a horizontal is displayed line at
the top or bottom of the section in the table of contents. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is sechline(notop nobottom)

secfont(font) Specifies the font used for the section title. Can be bold, italic, or regular. The default is regular.

subsecfont(font) Specifies the font used for the subsection title. Can be bold, italic, or regular. The default is regular.

subsubsecfont(font) Specifies the font used for the subsubsection title. Can be bold, italic, or regular. The default is regular.

A subsubsections will be the titles of individual slides when the option
title(subsubsection) has been specified.

subsubsubsecfont(font) Specifies the font used for the subsubsubsection title. Can be bold, italic, or regular. The default is regular.

A subsubsubsection will be a digression slide when the title(subsubsection)
options has been specified

subtitle(string) if //layout tocfiles on is specified, then the index
slide will consist of two parts: the index of slides followed by an index of
files used in the presentation. string will be used as a title for
the index of slides. The default is "Slide table of contents"

subtitlepos(left|center) specifies whether the subtitle
will be left justified or centered

subtitlefont(font) Specifies the font used for the subtitle. Can be bold, italic, or regular. The default is bold.

subtitlehline(what) determines whether a horizontal is displayed line at
the top or bottom of the subtitle. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is subtitlehline(top bottom)

//layout tocfiles options

off do not display a list of files used in the presentation, the default.

on show a list of files used in the presentation.

name(title) the subtitle used on the index slide. The default is
"Supporting materials"

exname(string) The do-files for examples are automatically included in the
list of files under the mark do. If no label label was specified in //ex
then the default label for that do file is "example #; on slide #". With this
option the "example" can be changed.

where(string) all file labels will include an indication on which
slide the file is used, the default is "; on slide #". with this option you can
change "; on slide " to the string of your choice.

whatname(string) Files will be grouped together depending
on the mark given to them at //tocfile. This option specifies
the section heading for each group. what is the mark and can be
do, ado, data, class, style, graph,
grec, irf, mata, bc, ster, trace,
sem, or swm. The defaults are:

do "Do files"

ado "Ado files"

data "Datasets"

class "Classes"

style "Styles"

graph "Graphs"

grec "Graph editor recordings"

irf "Impulse-response function datasets"

mata "Mata files"

bc "Business calendars"

ster "Saved estimates"

trace "Parameter-trace files"

sem "Sem builder files"

swm "Spatial weighting matrices"

customname(mark label [; mark label) allows the specification
of custom marks and their section headings.

For example, your presentation contains excercises and you include .do files with
the solutions. In that case you could write
//layout tocfiles customname(sol Solutions) to define the mark sol and its
section heading. In the presentation you can include the solutionfile sol1.do in
the index with //tocfile sol sol1.do

doedit(extensions) all filenames with an extension that appears in
extensions will be displayed as a link that will open the file in the
do file editor. The default is "do ado dct class scheme style"

view(extensions) all filenames with an extension that appears in
estensions will be displayed as a link that will open the file in the
viewer. The default is "smcl log hlp sthlp"

gruse(extensions) all filenames with an extension that appears in
extensions will be displayed as a link that will open that file as a
Stata graph. The default is "gph"

euse(extensions) all filenames with an extension that appears in
extentions will be displayed as a link that will open the file a
saved result. The default is "ster"

use(extensions) all filenames with an extension that appears in
extensions will be displayed as a link that will open the file as a
Stata dataset. The default is "dta"

p2(# # # #) sets column spacing for the table of files. The first #
specifies the beginning position of the first column, the second # specifies the
placement of the second column, the third # specifies the placement for subsequent
lines of the second column, and the last # specifies the number to indent from
the right-hand side for the second column. The default is "5 25 26 0"

//layout bib options

bibfile(filename) specifies the bibliography that is to be used in this
presentation. filename has to be a BibTex file. A limitation is that
values of the fields are expected to be surrounded by curly braces. Here is
an example:

@book{cox14,
title = ,
author = ,
publisher = ,
address = ,
year = {2014}
}

/*cite key [key] [...] */ adds a reference of style
"(last_name year)". The keys refer to the entries in the bibtex file
specified in //layout bib bibfile()

//ex[label] and //endex Lines between these two commands are an
example. They will appear on the current slide bold and indented. In addition, a
.do file will be created containing those lines. On the slide below the example
a link will be shown that wil do that .do file. If a label is specified, it will
be used to label that .do file in the index when specifying //layout tocfiles on.

//label label Each slide will contain a link to the next slide.
label will be used to refer to the currently open slide, when
//layout bottombar label has been specified. The default is "next".

//section section_name Start a new section called
section_name

//subsection subsection_name Starts a new sub-section called
subsection_name

//toctitle title The title that appears on the index slide,
which also contains the table of contents

/*toctitle and toctitle*/ lines between these two commands
will appear as the title on the index slide.

/*toctxt and toctxt*/ lines between these two commands will
be written on the index slide.

//tocfile mark filename label adds filename to the index slide
when //layout tocfiles on is specified in the group of files mark and
the label label

//file filename looks for filename in the source directory
and copies it to the directory specified in the dir() option.

//dir directory adds directory to the destination directory.

//bib_here adds the bibliography at that place on the bibliography slide

/*bib library in bibtex format bib*/ enables one to
write the bibtex library inside the presentation instead of refering to an external
bibtex library using //layout bib bibfile()

//include include another.do file

Options for including content from other .do files
//dofile filename ["]label["] adds a link in the .smcl
presentation that opens file filename in the do file editor and called
label and adds output from runing filename to the .html handout

//apdofile filename ["]label["] adds a link to .smcl
presentation opening filename in the do file editor and called label.
In the .html handout it adds an appendix slide at the end of the presentation
containing output from runing filename and adds a link in the html with
label label.

//codefile filename ["]label["] adds link that opens
filename called label in the do file editor and adds content of
filename to the .html handout

//apcodefile filename ["]label["] adds a link to .smcl
presentation opening filename in the do file editor and called label.
In the .html handout it adds an appendix slide at the end of the presentation
containing the content of filename and adds a link in the html with
label label.

//db dbname filename ["]label["] adds a link to
the .smcl presentation opening the dialog box dbname and called it label.
It adds the output from running filename to the .html handout.

Options for the .html handout
//graph name adds the graph name to the
.html handout

//ho_ignore ignores this line in the .html handout

Setting the overall layout
//layout title options options determining the layout of the
titles

//layout topbar options options determining the layout of the
top bar on each slide

//layout bottombar options options determining the layout of
the bottom bar on each slide

//layout toc options options determining the layout of the
index slide

//layout tocfiles options options determining whether or not
and how additional files used in the presentation are listed on the index slide

//layout bib options options governing the bibliography

//layout digress options options determining the layout of the
link to digression slides

//layout example options option determining the layout of the
link that runs the examples

//layout tabs option option how to treat tabs

layout options

//layout title
pos(pos) justification of the title, pos can be left or center. Default is center

hline(what) determines whether a horizontal is displayed line at
the top or bottom of the title. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is hline(notop nobottom)

font(font) specifies font for title, can be bold,italic, or regular. Default is bold

//layout topbar
off suppress the bar at the top of the slide

on display the bar at the top of the slide, the default

nosubsec only display the section name

hline(what) determines whether a horizontal is displayed line at
the top or bottom of the topbar. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is hline(top bottom)

secfont(font) specifies font for section title, can be bold,italic, or regular. Default is bold

subsecfont(font) specifies font for subsection title, can be bold,italic, or regular. Default is regular

sep(string) separator between the section and subsection, default
is " {hline 2} "

//layout bottombar
arrow the bottom bar will contain three links: back, index slide,
and forward in the form << index
>>. This is the default.

label the bottom bar will contain two links index slide, and forward
in the form index next

next(left|right) specifies whether the link to the
nextslide will apear left or right if //layout bottombar label has been
specified.

nextname(name) specifies the default label used for the link to the next
slide if //layout bottombar label has been specified. The default is
"next".

index(name) specifies the label used for the link to the index
slide

toc display the bottombar on the index slide

hline(what) determines whether a horizontal is displayed line at
the top or bottom of the bottombar. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is hline(top bottom)

//layout toc
link(section|subsection|subsubsection) specifies
whether on the index slide the section names, the subsection names, or the
subsubsection names are links to the appropriate place in the presentation.

title(subsection|subsubsection|notitle) specifies that
the slide title is also a subsection, subsubsection, or neither.
title(subsection) will also set //layout topbar nosubsec.

itemize specifies that on the index slide the section names are
preceded by a "o ", the subsection names are preceded by a "- ", and the
subsubsection by a ". ".

anc(name) ancillary slides will always appear as a link in the index,
with the title of the ancillary slide. additionally, they will be marked with
(name). The default name is "ancillary".

nodigr do not display digression slides in the table of content

sechline(what) determines whether a horizontal is displayed line at
the top or bottom of the section title in the table of contents. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is sechline(notop nobottom)

secfont(font) specifies font for section title, can be bold,italic, or regular. Default is regular

subsecfont(font) specifies font for subsection title, can be bold,italic, or regular. Default is regular

subsubsecfont(font) specifies font for subsubsection title, can be bold,italic, or regular. Default is regular

subsubsubsecfont(font) specifies font for subsubsubsection title, can be bold,italic, or regular. Default is regular

subtitle(string) if //layout tocfiles on is specified, then the index
slide will consist of two parts: the index of slides followed by an index of
files used in the presentation. string will be used as a title for the index
of slides. The default is "Slide table of contents"

subtitlepos(pos) specifies justification of the subtitle. pos can be either
left or center. Default is center

subtitlefont(font) specifies font for subtitle, can be bold,italic, or regular. Default is bold

subtitlehline(what) determines whether a horizontal is displayed line at
the top or bottom of the subtitle. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is subtitlehline(top bottom)

//layout tocfiles
off do not display a list of files used in the presentation in the
index slide, the default

on display a list of files used in the presentation in the index
slide

name(string) string will be used as a subtitle on the index
slide for the part displaying files. The default is "Supporting materials"

exname(string) if no label was specified for an example then the
default will be to display "example #; on slide #". with this option you can
change "example" to the string of your choice.

where(string) all file labels will include an indication on which
slide the file is used, the default is "; on slide #". with this option you can
change "; on slide " to the string of your choice.

doname(string) all example .do files and files who got the mark
"do" at //tocfile will be displayed together and
will get the section heading string. The default is "Do files"

adoname(string) all files that got the mark "ado" at
//tocfile will be displayed together and will
get the section heading string. The default is "Ado files"

dataname(string) all files that got the mark "data" at
//tocfile will be displayed together and will get the
section heading string. The default is "Datasets"

classname(string) all files that got the mark "class" at
//tocfile will be displayed together and will get the
section heading string. The default is "Classes"

stylename(string) all files that got the mark "style" at
//tocfile will be displayed together and will get the
section heading string. The default is "Styles"

graphname(string) all files that got the mark "graph" at
//tocfile will be displayed together and will get the
section heading string. The default is "Graphs"

grecname(string) all files that got the mark "grec" at
//tocfile will be displayed together and will get the
section heading string. The default is "Graph editor recordings"

irfname(string) all files that got the mark "irf" at
//tocfile will be displayed together and will get the
section heading string. The default is "Impulse-response function datasets"

mataname(string) all files that got the mark "mata" at
//tocfile will be displayed together and will get the
section heading string. The default is "Mata files"

bcname(string) all files that got the mark "bc" at
//tocfile will be displayed together and will get the
section heading string. The default is "Business calendars"

stername(string) all files that got the mark "ster" at
//tocfile will be displayed together and will get the
section heading string. The default is "Saved estimates"

tracename(string) all files that got the mark "trace" at
//tocfile will be displayed together and will get the
section heading string. The default is "Parameter-trace files"

semname(string) all files that got the mark "sem" at
//tocfile will be displayed together and will get the
section heading string. The default is "SEM builder files"

swmname(string) all files that got the mark "swm" at
//tocfile will be displayed together and will get the
section heading string. The default is "Spatial weighting matrices"

customname(mark label [; mark label]) specify a
custom mark or marks with their section headings.

doedit(string) all filenames with an extension that appears in
string will be displayed as a link that will open the file in the
do file editor. The default is "do ado dct class scheme style"

view(string) all filenames with an extension that appears in
string will appear as a link that will open the file in the viewer. The
default is "smcl log hlp sthlp".

gruse(string) all files with filenames with an extension that
appears in string will appear as a link which will open a
Stata graph. The default is "gph"

euse(string) all files with filenames with an extension that
appears in string will appear as a link which will open
saved estimates. the default is "ster"

use(string) all files with filenames with an extension that
appears in string will appear as alink which will open it as a
Stata data set. The default is "dta"

p2(# # # #) sets column spacing for the table of files.
The first # specifies the beginning position of the first column, the
second # specifies the placement of the second column, the third #
specifies the placement for subsequent lines of the second column, and the
last # specifies the number to indent from the right-hand side for the
second column. The default is "5 25 26 0"

//layout bib
bibfile(filename) specifies the bibtex library that is to be used
for the bibliography

stylefile(filename) specifies the style file file that governs the
way the bibliography is formatted

and(string) specifies what is to be used for the word "and" when
a reference contains multiple authors. The default is "and"

authorstyle("first last" | "last first") specifies whether the
authors in the bibliography are writen as "first_name last_name" or
"last_name, first_name". The default is "first last"

write("cited" | "all") specifies whether the bibliography contains
only the references cited in the presentation or all references present in the
bibtex library. The default is "cited"

//layout digress
name(string) name used for the link to the digression slide when //label
has not been specified. The default is "digression"

prefix(string) prefix to the name used for the link. The default
is ">> "

//layout example
name(string) name used for the link that runs the example. The
default is "{it:click to run}"

//layout tabs
spaces(#) number of spaces used for each tab, default is 4

Description

A .smcl presentation is a series of linked .smcl files that open in
the viewer inside Stata (like help-files). They are interactive. Click
on links to execute .do files or move from one slide to the next. They are
particularly useful for talks that focus on how to do things in Stata, like a
lecture on graphs in Stata or a talk at a Stata Users' Group meeting. Preparing
for such a talk typically starts with preparing the examples using a .do file.
The purpose of smclpres is to streamline the process of turning that .do
file into a .smcl presentation.

Once a .smcl presentation is created it can be turned into a .html handout using
pres2html.

A typical slide created by smclpres will start with a bar at the top showing
the section and subsection to which that slide belongs. This is followed by the
title of that slide. After that the actual contents of the slide starts. This could
be any combination of text and examples. An example is a set of commands shown
in bold text, with below it a link that will execute a .do file with those exact
same commands. So one can discuss the commands in the example, click on that link,
and show the output of those commands. The slide ends with a bar at the bottom,
which will contain a link to the next slide, a link to index slide, and the
previous slide.

smclpres knows 6 different types of slides:

the titlepage is the first slide. It does not contain a topbar, and the bottombar only
points to the index slide and the first regular slide.

the index slide is the second slide if a titlepage is defined, or the first slide
otherwise. It contains a list of sections and subsections and optionally all
slides. Either the section, subsection, or individual slide listings are links. So
one can use the index slide to jump around in the presentation.

The index slide may also contain a listing of files used in the presentation. The
.do files created for the examples are automatically included, all other files
have to be explicitly mentioned using the //tocfile command.

The index slide does not contain a topbar, and by default, no bottombar. One can
add a textblock to the index slide, which can be useful when the index slide also
functions as the titlepage.

The regular slides are there for the main content of the presentation. The order
of the slides is determined by the order in which they appear in the master .do file.

The digression slides are there for a side thought. They are not part of the main
flow of the presentation. A regular slide may contain a link in a text block to
a digression slide. The link to the next slide in the bottom bar will link to the
next regular slide, and will thus skip the digression slide. So during the
presentation, the presenter can easily decide whether or not to skip the digression
slide. The bottom bar of the digression only contains a link back to the regular slide
that linked to it and the index slide. The topbar will not contain the section
and subsection, but "Digression" or whatever has been specified in
//layout digr name().

The ancillary slides are the appendix. They are also not part of the main flow of
the presentation. They can only be accessed through the index slide.

The bibliography slide contains the bibliography. A reference on another slide
will create a link to this slide, and the bibliography slide can be accessed via
the index slide.

Options

options for the smclpres command

replace files created by smclpres will replace files with the
same name if they already exist.

If the .do file is called
presentation.do then the following files will be created:
presentation.smcl, slide1.smcl, slide2.smcl, etc. presentation.smcl will
be the first slide and contain the title page, or when no titlepage was
defined, the table of content. If a titlepage was defined, the index slide
will also be created and called index.smcl. In addition, if slide2.smcl
contains two examples, then the following files will also be created:
slide2ex1.do and slide2ex2.do.

dir(directory_name) specifies the directory in which the presentation is to
be stored. The default is the current working directory.

Commands in .do file

//version version Sets the version of smclpres that is to be used to create
the presentation. So if you start your .do file with //version 4.0.0 and you need
to recreate the presentation at some later time when a new version of smclpres
may have been released, then none of the changes in the new version will break your
presentation. This protection starts at version 4.0.0.

//slide Starts a new slide. Anything appearing afterwards will be ignored.
So one can specify //slide ------------ to indicate more clearly
in the .do file where the new slides begin. However, notice the space
between //slide and -------.

//endslide Ends the slide. As with //slide everything afterwards will
be ignored.

//titlepage starts the first slide, the titlepage. If this is not specified
the index slide will be the first slide.

//endtitlepage ends the titlepage.

//anc starts an ancillary slide, that is, a slide that is not part of the
regular flow of the presentation, but can only be accessed through the
index slide.

//endanc ends the ancillary slide

//digr starts a digression slide. Such a slide is not part of the regular flow
of the presentation, but can be accessed from a link inside a textblock
on the previous slide. Once on a digression slide one can only return to
the previous slide (or the index slide).

//enddigr ends the digression slide

/*digr*/ puts a link to the next slide, which has to be a digression slide.
This has to appear in a textblock, but unlike other commands does not
have to be the first word on a line. If the digression slide has a
//label then the link will appear as
>>label, otherwise as
>>digression. The prefix and the default label
can be changed using //layout digress name() prefix().

//bib starts the bibliography slide.

//endbib ends the bibliography slide.

//bib_here specifies that the bibliography is to appear here. This can only
be used on a bibliography slide. This is necessary when using an external bibtex
file, i.e. using //layout bib bibfile some_bibtex_file.bib.

/*bib bibliography in bibtex format bib*/ enables one to type
bibtex file in the presentation instead of an external file. This also indicates
the place where the bibliography will appear on the bibliography slide. As a
consequence, this has to appear on a bibliography slide.

//title title specifies the title that appears on the current slide

//txt text will write text on the current slide. This text may
contain smcl directives.

/*txt and txt*/ lines between these two commands will be written on
the currently open slide. This text may contain smcl directives.

/*cite [{prefix}] key [{postfix}]
[[{prefix}] key [{postfix}]] [...] */
Adds a reference in the style (prefix last_name year postfix).
The keys refer to entries in the bibtex file. The prefix could be
something like e.g. and the postfix something like p. 12.

If you cite multiple
references, then between the keys the first matching pair of curly braces (which
could contain nothing) is the postfix for the left key and the second pair of
matching braces contains the prefix of the right key.

//ex [label] and //endex Lines between these two commands are
an example. They will appear on the current slide bold and indented. In
addition, a .do file will be created containing those lines. On the
slide below the example a link will be shown that wil do that .do file.
If //layout tocfiles on is specified, then the .do files will be
automatically included with the mark "do".
label will be used to describe the .do file. The default label is
determined by //layout tocfiles exname() where().

//label label each slide will contain a link to the next slide. If
//layout bottombar label is specified label will
be used to refer to the current slide. The default is "next". Regardless
of what is specified in //layout bottombar, label will be used
to refer to digression slides. In that case the default is specified in
//layout digress name().

//section section_name Starts a new section named section_name.
This will appear in the table of content and on top of the slides in that
section.

//subsection subsection_name Starts a new subsection named
subsection_name. This will appear in the table of content and on
top of the slides in that section. The sub-sections will be ignored if
//layout toc title(subsection) was specified, as in that case the
slide titles are the sub-sections.

//toctitle title The title that appears on the index slide

/*toctxt and toctxt*/ lines between these two commands will appear on
the index slide

//tocfile mark filename label specifies a file that will be listed in
the index slide if //layout tocfiles on has been specified. All files
with the same mark will be listed together in the order in which they
appear in the master do-file. label will appear after the filename in
the index slide to describe that file.

//include filename Includeds filename in the presentation .do file
as if it was one big .do file. When making a big presentation, the source .do file
can become very long, and it can be convenient to break it up into smaller .do files
and use //include to bring them together in one presentation.

//file filename looks for filename in the source directory
and copies it to the directory specified in the dir() option. This does
nothing	when the dir() option is not specified. Specifying //file
can be useful to make sure that for example datasets used in examples are
available to the presentation.

//dir directory adds directory to the destination
directory. By default, the destination directory is the source directory, unless
the dir() option has been specified. Working with directories is something
many students have trouble with, so showing how to work with them is often part
of a course. So I often want a given directorystructure to illustrate that in my
course material.

//dofile filename ["]label["] adds a link to the .smcl presentation
that opens filename in the do file editor called label and adds output
from runing filename to the .html handout. filename is assumed to be
in the source directory. If the dir() option is specified, then
filename will be copied into that directory. This has to appear inside a
textblock.

//apdofile filename ["]label["] adds a link to the .smcl presentation
that opens filename in the do file editor called label and adds an
appendix slide at the end of the .html handout containing output from runing
filename. filename is assumed to be in the source directory. If the
dir() option is specified, then filename will be copied into that
directory. This has to appear inside a textblock.

//codefile filename ["]label["] adds a link to the .smcl presentation
that opens filename in the do file editor called label and adds
content of filename to the .html handout. filename is assumed to be in
the source directory. If the dir() option is specified, then filename
will be copied into that directory. This has to appear inside a
textblock.

//apcodefile filename ["]label["] adds a link to the .smcl presentation
that opens filename in the do file editor called label and adds an
appendix slide at the end of the .html handout containing the content of
filename. filename is assumed to be in the source directory. If the
dir() option is specified, then filename will be copied into that
directory. This has to appear inside a textblock.

//db dbname filename ["]label["] adds a link to the .smcl presentation
that opens the dialog box dbname and calls that link label. It adds output
from runing filename to the .html handout. .dlg and filename
are assumed to be in the source directory. If the dir() option is specified, then
dbname.dlg and filename will be copied into that directory. This has
to appear inside a textblock.

//graph name specifies the graph(s) that will be added
at this point in the .html handout.

//ho_ignore ignores this line in the .html handout

//layout what options specifies global options determining how various
elements will appear in the smcl presentation. what can be title,
topbar, bottombar, toc, tocfiles, digress,
example, tabs, or bib. The available options are listed below.

//layout title options

pos(pos) justification of the slide title, pos can be left or center. Default is center

hline(what) determines whether a horizontal is displayed line at
the top or bottom of the title. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is hline(notop nobottom)

font(font) Specifies the font used for the title. Can be bold, italic,
or regular. The default is bold.

//layout topbar options

off suppress the bar displaying the section and subsection at the top of
the slide

on show a bar on top of each slide displaying the section and subsection,
the default.

nosubsec only display the section name

hline(what) determines whether a horizontal is displayed line at
the top or bottom of the topbar. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is hline(top bottom)

secfont(font) Specifies the font used for the subsection. Can be bold, italic,
or regular. The default is bold.

subsecfont(font) Specifies the font used for the title. Can be bold, italic,
or regular. The default is regular.

sep(string) a string that separates the section from the subsection. The
the default is " {hline 2} ". Examples of possible alternatives
would be "; " or " | "

//layout bottombar options

arrow specifies that the bottombar, which is used to navigate throught the
smcl presentation looks like this:

<< index >>

this is the default

label specifies that the bottombar, which is used to navigate throught the
smcl presentation looks like this:

index label

label is the label for the next slide as specified by //label

next(left|right) specifies whether the link to the next
slide will appear on the left or the right. The default is right.

nextname(name) specifies the label for the next slide when //label
has not been specified. The default is "next".

index(name) specifies the name used for the index slide. The default is "index".

toc specifies that the bottombar will also appear on the indexslide

hline(what) determines whether a horizontal is displayed line at
the top or bottom of the bottombar. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is hline(top bottom)

//layout toc options

link(section|subsection|subsubsection) The index will
contain links to slides. This option determines whether these links will
be the first slide in each section, subsection or subsubsection. The default is
link(section)

title(subsection|subsubsection|notitle) specifies whether
the titles of individual slides will appear as subsections, subsubsections,
or not at all. The default is title(notitle). If
title(subsection) has been specified, then all subsections specified
with //subsection will be ignored. This will also set
//layout topbar nosubsec.

itemize specifies that on the index slide the section names are preceded by
a "o ", the subsection names are preceded by a "- ", and the
subsubsection by a ". ". If one specified top and/or bottom in the
sechline() option, then the sections will not be preceded by anything, the
subsections will be preceded by a "o ", etc.

anc(name) ancillary slides will always appear as a link in the index,
with the title of the ancillary slide. additionally, they will be marked with
(name). The default name is "ancillary".

nodigr digression slides do not appear in the index.

sechline(what) determines whether a horizontal is displayed line at
the top or bottom of the section title. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is sechline(notop nobottom)

secfont(font) Specifies the font used for the section name. Can be bold, italic,
or regular. The default is regular.

subsecfont(font) Specifies the font used for the subsection name. Can be bold, italic,
or regular. The default is regular.

subsubsecfont(font) Specifies the font used for the subsubsection name. Can be bold, italic,
or regular. The default is regular.

A subsubsections will be the titles of individual slides when the option
title(subsubsection) has been specified.

subsubsubsecfont(font) Specifies the font used for the subsubsubsection name. Can be bold, italic,
or regular. The default is regular.

A subsubsubsection will be a digression slide when the title(subsubsection)
options has been specified

subtitle(string) if //layout tocfiles on is specified, then the index
slide will consist of two parts: the index of slides followed by an index of
files used in the presentation. string will be used as a title for
the index of slides. The default is "Slide table of contents"

subtitlepos(left|center) specifies whether the subtitle
will be left justified or centered

subtitlefont(font) Specifies the font used for the subtitle. Can be bold, italic,
or regular. The default is bold.

subtitlehline(what) determines whether a horizontal is displayed line at
the top or bottom of the subtitle. what can be top, bottom, notop,
and nobottom. top and notop are mutually exclusive. The same is true
for bottom and nobottom. The default is subtitlehline(top bottom)

//layout tocfiles options

off do not display a list of files used in the presentation, the default.

on show a list of files used in the presentation.

name(title) the subtitle used on the index slide. The default is
"Supporting materials"

exname(string) The do-files for examples are automatically included in the
list of files under the mark do. If no label label was specified in //ex
then the default label for that do file is "example #; on slide #". With this
option the "example" can be changed.

where(string) all file labels will include an indication on which
slide the file is used, the default is "; on slide #". with this option you can
change "; on slide " to the string of your choice.

whatname(string) Files will be grouped together depending
on the mark given to them at //tocfile. This option specifies
the section heading for each group. what is the mark and can be
do, ado, data, class, style, graph,
grec, irf, mata, bc, ster, trace,
sem, or swm. The defaults are:

do "Do files"

ado "Ado files"

data "Datasets"

class "Classes"

style "Styles"

graph "Graphs"

grec "Graph editor recordings"

irf "Impulse-response function datasets"

mata "Mata files"

bc "Business calendars"

ster "Saved estimates"

trace "Parameter-trace files"

sem "Sem builder files"

swm "Spatial weighting matrices"

customname(mark label [; mark label) allows the specification
of custom marks and their section headings.

For example, your presentation contains excercises and you include .do files with
the solutions. In that case you could write
//layout tocfiles customname(sol Solutions) to define the mark sol and its
section heading. In the presentation you can include the solutionfile sol1.do in
the index with //tocfile sol sol1.do

doedit(extensions) all filenames with an extension that appears in
extensions will be displayed as a link that will open the file in the
do file editor. The default is "do ado dct class scheme style"

view(extensions) all filenames with an extension that appears in
estensions will be displayed as a link that will open the file in the
viewer. The default is "smcl log hlp sthlp"

gruse(extensions) all filenames with an extension that appears in
extensions will be displayed as a link that will open that file as a
Stata graph. The default is "gph"

euse(extensions) all filenames with an extension that appears in
extentions will be displayed as a link that will open the file a
saved result. The default is "ster"

use(extensions) all filenames with an extension that appears in
extensions will be displayed as a link that will open the file as a
Stata dataset. The default is "dta"

p2(# # # #) sets column spacing for the table of files. The first #
specifies the beginning position of the first column, the second # specifies the
placement of the second column, the third # specifies the placement for subsequent
lines of the second column, and the last # specifies the number to indent from
the right-hand side for the second column. The default is "5 25 26 0"

//layout bib options

bibfile(filename) specifies the bibliography that is to be used in this
presentation. filename has to be a BibTex file. A limitation is that
values of the fields are expected to be surrounded by curly braces. For example,
smclpres expects author = {Nicholas J. Cox} and not
author = "Nicholas J. Cox" .

stylefile(filename) specifies the style file file that governs the way the
bibliography is formatted. The style file contains an entry for each type of
reference. Each entry starts with a @ followed by the type of entry (a book or
an article) and than in curly brackets the style for that type. The style is just
a smcl text, but replacing fields from the reference by the name of that field in
square brackets.

For example the default style for a book is:

@book{{p 4 8 2}[author] ([year]), {it:[title]}. [address]: [publisher].{p_end}}

and(string) specifies what is to be used for the word "and" when a
reference contains multiple authors. The default is "and".

authorstyle( "first last" | "last first" ) specifies whether
the authors in the bibliography are writen as "John Doe" or "Doe, John". The
default is "first last"

write( "cited" | "all" ) specifies whether only the cited
references are included in the bibliography or all references present in the
bibtex file.

//layout digress options

name(string) name used for the link to the digression slide when //label
has not been specified. The default is "digression". This name will also be used
in the top bar of the digression slide.

prefix(string) prefix to the name used for the link. The default is ">> "

//layout example options

name(string) name used for the link that runs the example. The default is
"{it:click to run}"

//layout tabs options

spaces(#) number of spaces used for each tab, default is 4.

Example

Say if have a .do file called minimalist.do which contains the content
below. We can now type smclpres using minimalist.do, to turn that into a
.smcl presentation.

// This .do-file is intended to be compiled into a smcl presentation using:
// smclpres using minimalist.do
// ============================================================================

//toctitle A minimalist example presentation

/*toctxt

{center:Maarten Buis}
{center:maarten.buis@uni.kn}
toctxt*/

//section First section
//subsection First subsection

//slide -----------------------------------------------------------------------
//title First slide

/*txt
{pstd}Some interesting text about {help regress}{p_end}
txt*/

//ex
sysuse auto, clear
sum price
//endex
//endslide --------------------------------------------------------------------

//subsection Second subsection
//slide -----------------------------------------------------------------------
//title Second slide

/*txt
{phang}Kwaak, kwaak, kikker kwaak. Als ik grote sprongen maak. Doe ik
net zo gek als jij, en ik kwaak er ook nog bij.{p_end}
{phang}Kwaak, kwaak, kwaak maar door. Kom maar in het kikker koor.
Kwaak van dit en kwaak van dat. Kikkers kwaken altijd wat.{p_end}
txt*/
//endslide --------------------------------------------------------------------

//section Second section
//slide -----------------------------------------------------------------------
//title Third slide

/*txt
{phang}
Ia zegt het ezeltje, klim maar op mijn rug. Ik draag jou de hele weg, heen
end weer terug.

{phang}
Ia zegt het ezeltje. Ik loop van hier naar daar, en als je met me mee
wil hoor ik graag, ia ia.
txt*/

//ex
reg price i.rep78
//endex
//endslide --------------------------------------------------------------------

The ancillary files contain two further examples that illustrate more advanced options.

Author

Maarten Buis, University of Konstanz

maarten.buis@uni.kn

Source code

Much of the work inside smclpres is done by a compiled Mata library. The source
code can be found here: https://github.com/maartenteaches/smclpres