📄 usersite.hlp
字号:
{col 30}contents of menu
{cmd:.dlg}{...}
{col 30}code describing dialog box
{cmd:.idlg}{...}
{col 30}include file sometimes used by {cmd:.dlg} files
{cmd:.scheme}{...}
{col 30}graphics scheme used by {cmd:graph}
{cmd:.style}{...}
{col 30}graphics style used by {cmd:graph}
{hline 62}
{pstd}
In addition, you can force other filetypes to be installed rather than
categorized as ancillary by coding {cmd:F} rather than {cmd:f} in the
package file. This is sometimes done with {cmd:.dta} datasets that are
used by the ado-files.
{marker remarks6}{...}
{title:The full details of package files}
{cmd:v 3} line:
{p 8 8 2}{cmd:v} indicates version -- specify {cmd:v 3}; old-style pkg files do
not have this.
blank lines:
{p 8 8 2}Put in as many as you wish; they are ignored.
{cmd:*} lines:
{p 8 12 2}Lines starting with {cmd:*} are comment lines.{p_end}
{p 8 12 2}They are also ignored.
{cmd:d} lines:
{p 8 12 2}Lines starting with {cmd:d} are description lines.{p_end}
{p 8 12 2}The first {cmd:d} line is considered the title.{p_end}
{p 8 12 2}Subsequent {cmd:d} lines are considered to be the description text.{p_end}
{p 8 12 2}You may code {cmd:d} followed by nothing to display a blank line.
{cmd:f} lines:
{p 8 8 2}Lines starting with {cmd:f} name the files that the package is to
provide. The syntax is
{p 16 35 2}First type {space 7} {cmd:f}{p_end}
{p 16 35 2}next type {space 8} one or more blanks{p_end}
{p 16 35 2}finally type {space 5} the name of a file
{pmore}For instance, you might code
{cmd:f myprog.ado}
{cmd:f myprog.hlp}
{cmd:f myprog.dta}
{pmore}or you might organize your files into subdirectories:
{cmd:f myprog/myprog.ado}
{cmd:f myprog/myprog.hlp}
{cmd:f myprog/myprog.dta}
{cmd:F} lines:
{p 8 8 2}Lines starting with {cmd:F} are a variation on {cmd:f} lines. The
difference is that, when the file is installed, it will be copied to the
system directories (and not the current directory) in all cases.
{pmore}With {cmd:f} lines, the determination on where the file is to be
installed is made on the basis of the file's suffix. For instance, xyz.ado
would be installed in the system directories whereas xyz.dta would be
installed in the current directory.
{pmore}Coding "{cmd:F xyz.ado}" would have the same result as
"{cmd:f xyz.ado}". Coding "{cmd:F xyz.dta}", however, would state xyz.dta is
to be installed in the system directories.
{cmd:g} lines:
{pmore}Lines starting with {cmd:g} are also a variation of {cmd:f} lines.
The syntax is
{p 16 35 2}First type {space 7} {cmd:g}{p_end}
{p 16 35 2}next type {space 8} one or more blanks{p_end}
{p 16 35 2}then type {space 8} a {it:platformname}{p_end}
{p 16 35 2}next type {space 8} one or more blanks{p_end}
{p 16 35 2}finally type {space 5} the name of a file
{pmore}{cmd:g} specifies that the file is only to be installed if the user's
computer is of type {it:platformname}; otherwise the file is ignored. The
platform names are {cmd:WIN} for Windows, {cmd:MAC} for Macintosh, and
{cmd:AIX}, {cmd:DECALPHA}, {cmd:HP}, {cmd:IRIX}, {cmd:LINUX}, {cmd:SOLARIS},
{cmd:SOL64}, and {cmd:SOLX86} for Unix.
{pmore}Additionally, a second filename may be specified. In this case, the
first filename is the name of the file on the server (the file to be copied),
and the second filename is to be the name of the file on the user's system.
For example, you might code
{cmd:g WIN mydll.forwin mydll.spg}
{cmd:g LINUX mydll.forlinux mydll.spg}
{pmore}When you specify one filename, the result is the same as specifying
two identical filenames.
{cmd:G} lines:
{pmore}{cmd:G} is a variation on {cmd:g} in the same way that {cmd:F} is a
variation of {cmd:f}. The file, if not ignored, is to be installed in the
system directories.
{cmd:h} lines:
{pmore}Lines beginning with {cmd:h} are used to indicate that a file must
be loaded or else the entire package is not to be installed. The syntax is
{p 16 35 2}First type {space 7} {cmd:h}{p_end}
{p 16 35 2}next type {space 8} one or more blanks{p_end}
{p 16 35 2}finally type {space 5} the name of a file
{pmore}For instance, you might code
{cmd:G WIN mydll.forwin mydll.spg}
{cmd:G LINUX mydll.forlinux mydll.spg}
{cmd:h mydll.spg}
{pmore}if you were offering the plugin mydll.spg for Windows and Linux
only.
{cmd:e} lines:
{p 8 12 2}A line starting with {cmd:e} means stop reading input from the file.{p_end}
{p 8 12 2}An {cmd:e} line is optional.
{marker remarks7}{...}
{title:The full details of content files}
{cmd:v 3} line:
{pmore}{cmd:v} indicates version -- specify {cmd:v 3}; old-style pkg files do
not have this.
blank lines:
{pmore}Put in as many as you wish; they are ignored.
{cmd:*} lines:
{phang2}Lines starting with {cmd:*} are comment lines.{p_end}
{phang2}They are also ignored.
{cmd:d} lines:
{phang2}Lines starting with {cmd:d} are description lines.{p_end}
{phang2}The first {cmd:d} line is considered the title.{p_end}
{phang2}Subsequent {cmd:d} lines are considered to be the description text.{p_end}
{phang2}You may code {cmd:d} followed by nothing to display a blank line.
{cmd:t} lines:
{pmore}Lines starting with {cmd:t} are links to other subdirectories
containing other stata.toc lines. The syntax is
{p 16 35 2}First type {space 7} {cmd:t}{p_end}
{p 16 35 2}next type {space 8} one or more blanks{p_end}
{p 16 35 2}then type {space 8} the name of the subdirectory{p_end}
{p 16 35 2}next type {space 8} one or more blanks{p_end}
{p 16 35 2}finally type {space 5} any description you wish
{pmore}For instance, you might code:
{cmd:t stats Statistics programs I have written}
{cmd:t dm Data management programs}
{pmore}To understand what this does, pretend X is the directory containing
your home page. Then directory X/stats contains another stata.toc file, and
presumably other things, and directory X/dm contains a stata.toc file along
with its associated pieces.
{pmore}The idea here is to nest pieces into categories if you have a large
site.
{cmd:l} lines
{pmore}Lines starting with {cmd:l} are links to other sites or links to other
places on your site that are not just subdirectories. The syntax is
{p 16 35 2}First type {space 7} {cmd:l} (lowercase letter ell){p_end}
{p 16 35 2}next type {space 8} one or more blanks{p_end}
{p 16 35 2}then type {space 8} a short name of your choosing{p_end}
{p 16 35 2}next type {space 8} one or more blanks{p_end}
{p 16 35 2}then type {space 8} the full URL of the link{p_end}
{p 16 35 2}next type {space 8} one or more blanks{p_end}
{p 16 35 2}finally type {space 5} any description you wish
{pmore}For instance, you could include a link to StataCorp by coding
{cmd:l stata http://www.stata.com StataCorp}
{cmd:p} lines
{pmore}Lines starting with {cmd:p} describe a package or, more technically,
plant a link to a package file. The syntax is
{p 16 35 2}First type {space 7} {cmd:p}{p_end}
{p 16 35 2}next type {space 8} one or more blanks{p_end}
{p 16 35 2}next type {space 8} the name of the .pkg file{p_end}
{p 16 35 2}next type {space 8} one or more blanks{p_end}
{p 16 35 2}finally type {space 5} any description you wish
For example,
{cmd:p xyregression xyreg.pkg XY-style regression}
or
{cmd:p xyregression xyreg XY-style regression}
{phang2}Stata will understand xyreg to mean xyreg.pkg.{p_end}
{phang2}Package files must be in the same directory as the contents file.{p_end}
{phang2}Do NOT code "f xyregression xyreg/xyreg.pkg XY-style regression"
{marker remarks8}{...}
{title:SMCL in content and package-description files}
{pstd}
The text listed on the second and subsequent {cmd:d} lines in both stata.toc
and {it:pkgname}.pkg may contain SMCL as long as you include {cmd:v 3}
(or {cmd:v 2}); see {help smcl}.
{marker remarks9}{...}
{title:Error-free file delivery}
{pstd}
Most people transport files over the Internet and never worry about the
file being corrupted in the process. They do that because corruption rarely
occurs. If, however, it is of great importance to you that the files be
delivered perfectly or not at all, you can include checksum files in the
directory.
{pstd}
For instance, say that included in your package is {hi:big.dta} and it is
of great importance that it be sent perfectly. First use Stata to make the
checksum file for {hi:big.dta}:
{cmd:. checksum big.dta, save}
{pstd}
That creates a small file called {hi:big.sum}; see {helpb checksum}.
Then copy both {hi:big.dta} and {hi:big.sum} to your homepage. That is all
there is to do. Stata will now automatically verify that when {hi:big.dta}
is copied it is copied without error.
{pstd}
Whenever you change {hi:big.dta} remember to also create a new
{hi:big.sum}.
{title:Also see}
{psee}
Manual: {bf:[R] net}
{psee}
Online: {helpb net}; {helpb checksum}, {helpb copy},
{helpb search},
{help sj},
{help smcl},
{helpb ssc},
{help stb},
{helpb update},
{help usersite}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -