| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: RE: RE: Plots: save, log, ...
You are allowed to make many mistakes.
It is the consequences you should
worry about....
More seriously, the bottom line
here is, I think, a question about
whether StataCorp will go the whole hog
and offer HTML logs directly.
The answer, as often given informally
at users' meetings, used to be No.
In essence, SMCL logs inevitably have
to be consistent with output being issued
a line at a time and indefinitely,
and that doesn't match the HTML model.
StataCorp people will be able to explain
that better.
Also, and more delicately, SMCL is
something totally under StataCorp
control and something that they
can make work under all versions
of Stata and on all platforms.
Thus SMCL has changed from Stata
7 to 8 to 9, but any of those can
read any previous SMCL without
difficulty, and SMCL is totally
portable across the platforms on
which Stata runs. Also, StataCorp
can keep going with SMCL as long
as they like.
I guess that people will want to tell
me that most or all of this is also true of
HTML, but there's still a difference
between a mark-up language the company
controls and one it doesn't. Also,
I suppose it's realistic to assume that
people have browsers, or other software
that can read HTML, but StataCorp
don't seem inclined to assume anything
about what other software you have
access to, even if it's not proprietary.
Your own email underlines a yet more
delicate point. Namely, once StataCorp
were to support HTML more directly,
there would endless room for users
wanting it to be done this way or
that way, and so on, and so forth.
In particular, SMCL was originally intended
to be a way of formatting text files
nicely, but with HTML there is of
course a wider set of purposes.
Nick
[email protected]
David Elliott
> Sincere apologies regarding the attachment faux pas. As a list
> newbie, am I allowed one mistake?
>
> I have done some experimenting and it appears that the actual
> conversion of the '<' and '>' entities is done in the -log html- step
> and not by -log2html-. This leaves me wondering if there might be
> another way to approach this rather than trying to write the <img> tag
> HTML at logging time, but rather catching the -graph export- command
> or the subsequent 'file *.png saved' in the log and getting the graph
> filename from it. This would be ideal since it would allow the
> creation of an HTML log output without prior planning or coding for
> the <img> tags.
>
> I am going to persist with this, probably through creating a <img>
> tagging variant of -log2html- since it already does most of the heavy
> lifting ;-)
>
> I should note that a number of packages now natively produce html
> output or as an option. SMCL is only one step away since it now has
> extensive hyperlinking support. Can we be only a version away from
> SMCL logs with graphical output or the ability to create HTML logs?
> On 5/16/06, Nick Cox <[email protected]> wrote:
> > Anyone interested in converting logs to HTML
> > might want to check out -log2html- from SSC
> > if they don't know it already.
> >
> > On a different note: the FAQ is totally explicit.
> > Please do not send attachments to Statalist.
> >
> > Nick
> > [email protected]
> >
> > David Elliott
> >
> > > Some further thoughts. First, I want to make it clear
> that this is a
> > > real kludge, but it works!
> > >
> > > Imagine this:
> > >
> > > log using example.html, replace
> > > --------------------------------------------------------------
> > > -----------------------------------------------
> > > log: W:\data\example.html
> > > log type: text
> > > opened on: 15 May 2006, 20:46:43
> > >
> > > note <pre>
> > >
> > > . [graph command]
> > > . graph export test.png
> > > file test.png saved
> > > . note <img src=test.png>
> > > . note </pre>
> > > . log close
> > > log: W:\data\example.html
> > > log type: text
> > > closed on: 15 May 2006, 20:49:11
> > > --------------------------------------------------------------
> > > -----------------------------------------------
> > >
> > > . winexec "C:\Program Files\Mozilla\Firefox\firefox.exe"
> > > file:///W:/data/example.html
> > >
> > >
> > > What the above does is it writes some truly bastard html that most
> > > browsers will be able to render. Using note, one can insert html
> > > tags. The pre tag tells the browser to treat what follows as
> > > preformatted text. This should cause the browser to include all
> > > spaces, line breaks and such and render in a monospaced font. The
> > > graph export result in a portable network graphics file
> that can be
> > > shown in a browser with the img tag, again inserted using note.
> > > Finally the pre tag is closed and the log is closed.
> > >
> > > If you are using windows, the winexec command followed by
> the path to
> > > your browser and the html log file URL will bring up the
> log in your
> > > browser.
> > >
> > > I don't know if the tags in this example will come through, many
> > > mailers strip HTML. I am attaching a zipped version of
> this message
> > > just in case.
> > >
> > > DCE
> > >
> > > On 5/15/06, David Elliott <[email protected]> wrote:
> > > > There is another possibility here if you want graphs to
> be readily
> > > > accessible from your log file.
> > > >
> > > > Imagine this scenario, saving your log as SMCL:
> > > >
> > > > log using example, replace
> > > >
> > > --------------------------------------------------------------
> > > -----------------------------------------------
> > > > log: W:\data\example.smcl
> > > > log type: smcl
> > > > opened on: 15 May 2006, 20:46:43
> > > >
> > > > . [graph command], saving(test)
> > > >
> > > > file test.gph saved
> > > >
> > > > . di "{stata graph use test:Display test graph}"
> > > > Display test graph
> > > >
> > > > . log close
> > > > log: W:\data\example.smcl
> > > > log type: smcl
> > > > closed on: 15 May 2006, 20:49:11
> > > >
> > > --------------------------------------------------------------
> > > -----------------------------------------------
> > > >
> > > > . view W:\data\example.smcl
> > > >
> > > >
> > > > The viewer will show the log file with a hot link to the
> > > graph itself.
> > > > When you click on the "Display test graph" text, the
> graph will be
> > > > loaded. This process could be easily automated. It
> all depends on
> > > > how exactly you want to use the output.
> > > >
> > > > I look forward to the day when a SMCL to HTML option does
> > > all this for us...
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/