*! version 2.0.1

Title

boilerplate, create -- Create new templates for the boilerplate command.

Description

As a mimimum you can create a new template by creating a .do file with the
boilerplate code you want, then type in Stata
boilerplate, create(that_do_file). Based on that .do file
boilerplate will create the template, and the corresponding help file.

You can also the following tags, to your .do file:

<stata_version> will be replaced by the Stata version

<date> will be replaced by the date

<fn> will be replaced by the file name

<stub> will be replaced by the file name without the suffix

<abbrev> will be replaced by the file name without the suffix up to the last underscore

<basedir> will be replaced by the directory in which the file is saved

<as of #> will include whatever comes after that tag only if the Stata version is # or higher

You can also add meta information in the heaer. Within the header you can add f
ive types of meta data:

<mkproject> Indicates that this is a template, and the word after it can
be either project or boilerplate, to indicate whether this is a
mkproject or boilerplate template. You can specify it in your text
file or if you don't specify it, boilerplate, create() will add it for you.

<version> Indicates which version of boilerplate is used to create this
template. boilerplate uses that information to ensure backwards compatability;
if a new version of boilerplate becomes available, you can install that
without fearing that it will break your older templates. You can specify it
yourself, or if you don't specify it, boilerplate, create() will set it to
the current version of boilerplate

<label> gives the short description of your template, that will be shown
with boilerplate, query

<reqs> specifies a community contributed package that is required for this
template.

The lines between <description> and </description> give a longer
description of the template as it will appear in the help-fearing. It may contain
smcl tags.

Example

Below is the template for excer.
You can look at the source code for any template by typing boilerplate, query,
click on any template you are interested in, that opens a help-file, and at the
bottom there is a link that will show the source code for that template in the
viewer.

--------------- begin template -------------------
<header>
<mkproject> boilerplate
<version> 2.0.0
<label> course exercise
<description>
{pstd}
This a a template for a .do file that a student can use to do an
exercise in a course.
</description>
</header>
capture log close
log using <stub>.txt, replace text

// ---------------------------------------------------------------------------
// course :
// exercise :
// name :
// student number:
// ---------------------------------------------------------------------------

version <stata_version>
clear all
<as of 16>frames reset
macro drop _all

*use [original_data_file.dta]

// exercise 1 ................................................................

/*
Answer
*/

// exercise 2 ................................................................

/*
Answer
*/

log close
exit
-------------- end template --------------------