Statalist The Stata Listserver


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

Re: st: aliases for help files


From   Ulrich Kohler <kohler@wz-berlin.de>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: aliases for help files
Date   Fri, 19 May 2006 15:45:56 +0200

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?
>
> Thanks,
> ben
>
> *
> *   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/

-- 
kohler@wz-berlin.de
+49 (0)30 25491-361
*
*   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