I just joined the list so I hope I am doing this right.
I recently needed an integrated quick pdf report of stata analysis
together with
graphs to communicate to my coauthor and came across grlog2html. I did
the necessary
code archeology handpicking and fixing the code from here
http://www.stata.com/statalist/archive/2006-05/msg00656.html
and after one or two successful test runs it died on me with the
unbalanced quotes error.
I am writing because of this post below (do2htm mentioned therein
appears to inherit the problem)
http://www.stata.com/statalist/archive/2008-11/msg00723.html
I fixed the problem for me. The code is below.
I added the fix right before the comment line "// catch continuation
lines". What it does is
it substitutes any of ` { and " with their html codes. I suppose this
avoids the "inadequate
stata code" in log2html or grlog2html which must be somewhere afterwards
and is responsible
for the errors. My ideas was: if it is going to become html anyway we
might as well html-ize
the "difficult" chars early on....
// fix
local line: ///
subinstr local line "`" "`", all
local line: ///
subinstr local line "{" "{", all
local line: ///
subinstr local line `"""' """, all
// fix
// catch continuation lines
Nikos
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/