Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: aliases for help files


From   "Ben Jann" <ben.jann@soz.gess.ethz.ch>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: aliases for help files
Date   Mon, 22 May 2006 10:06:45 +0200

Thank you, Uli and Nick, for your suggestions. I think, Uli's idea would
be very nice if there was some way to cause Stata doing the extraction
automatically. I think it would be great in general if Stata would be
able to download packages as a single (compressed) file and then
internally extract the package and store the files in the right places.
This seems much more efficient and less error-prone to me than
downloading each file of a package separately. 

Concerning my initial problem: I think what I will do is just deleting
the individual alias help files from the package. This seems reasonable
to me because -moremata- comes with a table of contents
("moremata.hlp"). Thus one can simply type

 . help moremata

and then click oneself through (at least this is what I usually do
instead of typing something complicated like -help mata mm_whatever()-
or -help mf_mm_whatever-). In addition the new -hsearch- command should
make it easy to find the relevant help entries for moremata functions.

ben 

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
> Sent: Friday, May 19, 2006 4:52 PM
> To: statalist@hsphsun2.harvard.edu
> Subject: RE: st: aliases for help files
> 
> Ulrich's neat idea can breed happily with mine.
> 
> 1. Maintain "one big" alias-like file your end.
> 
> 2. Each time you revise your package,
> run the extraction program to create the
> set of individual files.
> 
> 3. That way, SSC (in your case) and users
> get all the files, but most of your maintenance
> can be on fewer files.
> 
> Nick
> n.j.cox@durham.ac.uk
> 
> Ulrich Kohler
> 
> > Hi Ben,
> >
> > I have an idea and leave it up to discussion whether it is a
> > good one.
> >
> > Consider you write the aliases into one file like this:
> >
> > --------------------moremata.hlp.alias---
> > x whatever
> > y and
> > z some
> > t more
> > -----------------------------------------
> >
> > Consider also you write a program -hextract- which read something
like
> > this:
> >
> > -----------------------hextract.ado-----
> > ...
> > file open extract using moremata.hlp.alias, read
> > file read extract line
> > while r(eof)==0 {
> > 	tokenize `line'
> > 	file open handle using `1'  .hlp, write
> > 	file write handle ".`2'" _n
> > 	file close handle
> > 	file read extract line
> > }
> > ...
> > -------------------------------------------
> >
> > You can than distribute the alias file togehter with
> > hextract. -hextract- will
> > "extract" the lines of the alias-file into the singular help
> > files on the
> > user side.
> >
> > This would makes it easier for you to maintain the aliases,
> > and would also
> > diminish the download time. The downside would be that you
> > have to ask the
> > user to run hextract after installation, which would be
> > rather uncommon in
> > Stata world.
> >
> > Uli
> >
> > On Friday 19 May 2006 14:38, Ben Jann wrote:
> > > Hi, I asked Stata Tech Support about whether it is possible
> > for users to
> > >
> > > create aliases for help files:
> > > > Stata 9 has files containing helpfile aliases (e.g.
> > > > "ahelp_alias.maint"). My question is whether there is any way to
> > >
> > > provide
> > >
> > > > such alias-files in user packages. The background is as
> > follows: My
> > > > -moremata- package (see -ssc d moremata-) contains some
> > 50 functions
> > >
> > > or
> > >
> > > > so and keeps on growing. For each function there is a
> > sourcefile and a
> > > > helpfile. However only about 20 helpfiles or so are
> > "real" helpfiles.
> > > > The remaining helpfiles just point to another helpfile
> > (i.e. contain
> > >
> > > ".h
> > >
> > > > whatever" to point to whatever.hlp). It would be great to
> > be able to
> > > > gather together these aliases in just one file and thus reduce
the
> > > > number of files in the package.
> > >
> > > Stata Tech Support replied:
> > > > Unfortunately, there isn't a way for users to create
> > their own aliases
> > >
> > > for
> > >
> > > > help files, etc.  You might want to post your question to
> > Stata's list
> > > > server (Statalist) to see what other authors have done in
> > the past.
> > >
> > > So this is what I do now. Does anyone have suggestions?

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index