[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" <>
To   "''" <>
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 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
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Web page:
Departmental Web page:

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

-----Original Message-----
From: [] On Behalf Of Kit Baum
Sent: 29 March 2009 16:15
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
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,  

Kit Baum   |   Boston College Economics & DIW Berlin   |
                               An Introduction to Stata Programming   
    An Introduction to Modern Econometrics Using Stata  |

*   For searches and help try:

*   For searches and help try:

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