{smcl} {hline} help for {cmd:htmltit} {right:(Roger Newson)} {hline} {title:Generate a document title variable for a HTML filename variable} {p 8 15}{cmd:htmltit} {varname} {ifin} {cmd:,} {opth g:enerate(newvarname)} {title:Description} {pstd} {cmd:htmltit} inputs a string variable, assumed to contain the file names (or paths) of existing readable HTML documents, and outputs a new string variable, to contain the corresponding HTML document titles, if they can be found in the documents. {cmd:htmltit} is designed for use by users who want to create HTML documents containing HTML tables to index (and link to) other HTML documents. This can be done using the {help ssc:SSC} packages {helpb htmlutil} (to generate the HTML documents}, {helpb xdir} (to generate datasets with 1 observation for each of a list of files which may be HTML documents), and {helpb listtab} (to generate the HTML tables). {title:Options} {p 4 8 2} {opth generate(newvarname)} specifies the name of the new string variable, containing the document titles. This option must be present. {title:Remarks} {pstd} {cmd:htmltit} is designed for use in output datasets (or resultssets), with one observation for each of a list of files, created using the {helpb xdir} package, which can be downloaded from {help ssc:SSC}. It inputs a variable containing file names, or file paths, some of which may belong to readable HTML documents. It attempts to find, in each readable document, the HTML document title, and to store that document title (if found) in the generated output variable specified by the {cmd:generate()} option. It does this by searching down the document (if the document is readable), and stopping the search if and when it finds a line of text which (after trimming space characters from the left and the right) begins with a HTML {cmd: