Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: RE: SSC Archive help files now available in HTML


From   "Newson, Roger B" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: RE: SSC Archive help files now available in HTML
Date   Sun, 29 Mar 2009 17:31:47 +0100

Thanks to Kit for the info. What we need now (as Maarten says, and in case any StataCorp people are listening) is a way to translate a group of .sthlp files to .html, translating the .smcl hyperrefs to corresponding .html hyperrefs. That would be particularly helpful for people like me, who typically document a large comprehensive package with a whole tree of .sthlp files referring to each other. I do not know how feasible this is.

Roger

Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: [email protected] 
Web page: http://www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/

Opinions expressed are those of the author, not of the institution.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Kit Baum
Sent: 29 March 2009 16:15
To: [email protected]
Subject: st: RE: SSC Archive help files now available in HTML

<>
Roger said

This is very impressive. Are there any plans to distribute a  
conversion package from .sthlp to .html on SSC? (Or even in official  
Stata, in case any StataCorp people are listening?)


You don't need one. Just do

log html foo.sthlp foo.html

which is all that my routine is doing in processing these files. This  
is the same trick used by -log2html-, which has been around for quite  
a while.


Here is a Mata function that converts all .hlp and .sthlp in the  
current working directory:

-----------------
version 10.1
mata:
void function genhlpfiles()
{
         helpfiles = dir(".","files","*.*hlp")
         if (rows(helpfiles) > 0) {
             helpnames = substr(helpfiles, 1,  
(strpos(helpfiles,".") :- 1))
         for(i=1; i<=rows(helpfiles); i++) {
         cmd = "log html "+helpfiles[i]+" "+helpnames[i]+".html,  
replace"
         cmd
         stata(cmd)
         }
     }
}
end
----------------

Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.org/e/pba1.html
                               An Introduction to Stata Programming   
|   http://www.stata-press.com/books/isp.html
    An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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