Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: fix for (gr)log2html


From   "David Elliott" <[email protected]>
To   [email protected]
Subject   Re: st: fix for (gr)log2html
Date   Mon, 12 Jan 2009 10:14:42 -0400

Nikos

Thank you for your interest in grlog2html.ado.  I have been working on
the routine sporadically and have actually addressed the problem
"upstream" of that code section through use of a series of
-filefilter- statements that get rid of continuation lines (to a
certain extent) before the SMCL file is converted to HTML.  If you
wish a copy of the revised routine, contact me offlist.

DCE

2009/1/12 Nikos Askitas <[email protected]>:
> 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 "`" "&#96;", all
>    local line: ///
>  subinstr local line "{" "&#123;", all
>    local line: ///
>  subinstr local line `"""' "&#34;", 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/
>



-- 
David Elliott
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index