{smcl} {* 8jun2006}{...} {hline} help for {hi:log2html}{right:SSC distribution 8 June 2006} {hline} {title:Translate a SMCL log file into HTML} {p 8 17 2}{cmd:log2html} {it:smclfile} [{cmd:,} {cmd:replace} {cmd:erase} {cmdab:ti:tle}{cmd:(}{it:string}{cmd:)} {cmdab:line:size(}{it:#}{cmd:)}{break} {cmdab:per:centsize(}{it:integer}{cmd:)} {cmd:bold}{break} {cmdab:sch:eme}{cmd:(}{it:string}{cmd:)} {cmd:css(}{it:string}{cmd:)}{break} {cmdab:in:put}{cmd:(}{it:string}{cmd:)} {cmdab:r:esult}{cmd:(}{it:string}{cmd:)} {cmdab:err:or}{cmd:(}{it:string}{cmd:)} {cmdab:te:xt}{cmd:(}{it:string}{cmd:)} {cmd:bg(}{it:string}{cmd:)} ] {title:Description} {p 4 4 2}{cmd:log2html} translates Stata log files or other files in SMCL to HTML. {title:Remarks} {p 4 4 2}{cmd:log2html} is primarily for use after {cmd:log}; see {help log}. {p 4 4 2}{cmd:log2html} makes use of an undocumented command in Stata version 7 up, {cmd:log html}, which generates HTML files from SMCL (e.g. 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:log2html} on log files, 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 4 4 2}{cmd:log2html} requires only the base name of a 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 4 4 2}{cmd:log2html} requires Stata version 8 at least. {p 4 4 2}{cmd:loghtml} produces a complete HTML page (i.e. with and
tags). By default, the page will have a white background; input lines (those resulting from user input) are rendered in RGB color "CC6600" (a shade of brown); and highlighted result-window lines are rendered in RGB color "000099" (a shade of blue). The options permit other choices for these three colors. For best results, one of the 216 "web safe" colors that display properly in web browsers on all computers in 256-color mode should be used. Also note that some combinations of colors are not workable; e.g. a black ("000000") background will cause all normally-rendered text to disappear. {p 4 4 2}Colors are specified as hexadecimal RGB colors ranging from 000000 (black) to FFFFFF (white), where FF0000 is red, 00FF00 is green, and 0000FF is blue. It is best to use web-safe colors, where both digits of each color pair match and are divisible by 3 (i.e. 00 33 66 99 CC or FF). {p 4 4 2}Those wanting to include the CSS classes used by {cmd:log2html} should make an HTML file with the CSS option, and then look at the resulting page in a text editor. It will give more insight than any explanation here could give. {title:Options} {p 4 8 2}{cmd:replace} specifies that if the HTML file exists, it is to be replaced. {p 4 8 2}{cmd:erase} specifies that the SMCL log file is to be erased (deleted) after processing. {p 4 8 2}{cmd:title()} specifies a string to be placed in the