{smcl} {* 12 Dec 2001/25 March 2003}{...} {hline} help for {hi:log2html7}{right:SSC distribution 25 March 2003} {hline} {title:Translate a SMCL log file into HTML} {p 8 12}{cmd:log2html7} {it:smclfile} [{cmd:,} {cmd:replace} {cmdab:ti:tle}{cmd:(}{it:string}{cmd:)} {cmdab:in:put}{cmd:(}{it:string}{cmd:)} {cmdab:r:esult}{cmd:(}{it:string}{cmd:)} {cmd:bg(}{it:string}{cmd:)} ] {title:Description} {p} {cmd:log2html7} is for use after {cmd:log}; see {help log}. If you are using Stata 8 or later, use {cmd:log2html} instead. {p} {cmd:log2html7} makes use of an undocumented command in Stata version 7, {cmd:log html}, which generates HTML log files from SMCL log files. SMCL, the Stata Markup and Control Language {help smcl}, is the default log file format introduced with version 7, and contains markup (similar to HTML) around elements of the log file. To use {cmd:log2html7}, you must first generate the default SMCL log file, not a text log file, with the file extension {cmd:.smcl}. Thus if you have {cmd:set logtype text} to prevent the generation of SMCL log files, you must either turn it off or explicitly state that a SMCL log file is to be produced, as by {cmd: log using my.smcl}. {p} {cmd:log2html7} requires only the base name of the logfile: e.g. {cmd:my}, if the logfile is named {cmd:my.smcl}. The name of the HTML file produced will be this base name with {cmd:.html} appended, e.g. {cmd:my.html}. {p} {cmd:log2html7} requires that at least the 6 December 2001 update to Stata version 7 be installed. If a message "Invalid syntax" is encountered, please ensure that {cmd:query born} returns a date no earlier than 06 Dec 2001. {title:Limitation} {p} {cmd:log2html7} cannot reliably echo {it:names} of local or global macros given on command lines in the log. This is because before being passed to the Stata command {cmd:file}, which does most of the hard work within {cmd:log2html7}, they are caught by Stata's parser and substituted with their current {it:contents}, if any. The usual result is to replace macro names with empty strings, although on occasion you may be fortunate enough to have the correct contents of a macro substituted, or unfortunate enough to have something quite different substituted, if the contents of a macro have changed since the log was created. This behavior is outside the control of the program authors, who know of no work-around in Stata 7. The limitation does not apply to {cmd:log2html} used in conjunction with Stata 8 or higher. {title:Options} {p 0 4} {cmd:replace} specifies that if the HTML file exists, it is to be replaced. {p 0 4} {cmd:title()} specifies a string to be placed in the