Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Re: Length of lines with -translate- and -log2html-


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Re: Length of lines with -translate- and -log2html-
Date   Thu, 2 Oct 2003 17:31:07 +0100

Alan Riley

> Friedrich Huebler ([email protected]) asked about
> long lines in SMCL being broken into short lines by
> -translate- (an official Stata command) and -log2html-
> (a user-written command):
> > Is it possible to translate an SMCL log file to a text or
> HTML file
> > without breaking long lines?
> >
> > With -set linesize 150- wide tables can be saved without
> line breaks
> > in log files, both in text and SMCL format. When an SMCL
> log file is
> > converted to a text or HTML file (with -translate- or
> -log2html-) the
> > linesize is limited to 80 characters and the tables are broken. I
> > tried smcl2log and smcl2txt as translator with
> -translate- and also
> > tried -do2htm- as an alternative to -log2html-, but long lines are
> > always broken.
>
> -translate- accepts various "override options" for any given
> translator.  The supported override options may be seen by typing
>
>    . translator query <translator_name>
>
> For the 'smcl2log' and 'smcl2txt' translators, -translator query-
> shows that there is a "linesize" setting.  Thus,
>
>    . translate test.smcl test.txt, linesize(150)
>
> will override the default setting of 79 for the linesize.
>
>
> Nick Cox ([email protected]) wrote, about -log2html-
> > In this respect, and indeed others, -log2html- is merely
> > a wrapper for -log html-.
> >
> > What you are asking, in effect, is that -log html- _not_
> > split such lines. That's for Stata Corp...
>
> -log html- is an undocumented command which translates a file
> from SMCL to HTML format.  This undocumented command has an
> undocumented option, "ll(#)" where # will set the width in
> characters of rendered HTML lines.  # should be in the range
> [40, 255].
>
> Perhaps -log2html- could be modified to accept a -linesize()-
> option (to more closely match the line length option for
> -translate-)
> which value, if specified, could be passed to the -ll()- option of
> -log html-.

Thanks very much. We (the authors of -log2html-) weren't aware of this
undocumented option. But now that we are we'll add this to
-log2html- promptly.

Nick
[email protected]

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



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