There is at least one highlighter in your sense for Stata, log2html
, to be installed from SSC. Given a do.file, you could do this
. ssc inst log2html
. log using mydo.smcl
. type mydo.do
. log close
. log2html mydo.smcl
and you have an HTML file. You need to edit out some lines and the style choices may not suit. Systematic variations would be a matter for a decent text editor or scripting language. The installation using ssc
need only be done once.
Incidentally, for other readers if not yourself, the line
. capture erase stateLevel`yearStart'-`yearEnd'.dta
would make no sense without prior definition of the local macros used within the same .do file.