{smcl} {.-} help for {cmd:listtex} {right:(Roger Newson)} {.-} {title:List a variable list to a file or to the log for inclusion in a TeX, HTML or word processor table} {p 8 21 2} {cmd:listtex} [ {varlist} ] [ {helpb using} {it:filename} ] {ifin} [ , {cmdab:b:egin}{cmd:(}{it:string}{cmd:)} {cmdab:d:elimiter}{cmd:(}{it:string}{cmd:)} {cmdab:e:nd}{cmd:(}{it:string}{cmd:)} {cmdab:m:issnum}{cmd:(}{it:string}{cmd:)} {cmdab:rs:tyle}{cmd:(}{it:rowstyle}{cmd:)} {cmdab:he:adlines}{cmd:(}{it:string_list}{cmd:)} {cmdab:fo:otlines}{cmd:(}{it:string_list}{cmd:)} {cmdab:nol:abel} {cmdab:t:ype} {cmdab:replace:} {cmdab:ap:pendto}{cmd:(}{it:filename}{cmd:)} {cmdab:ha:ndle}{cmd:(}{it:handle_name}{cmd:)} ] {title:Description} {pstd} {cmd:listtex} lists the variables in the {varlist} (or all variables, if {varlist} is absent) to the Stata log, or to a file (or files) specified by {helpb using}, {cmd:appendto()} or {cmd:handle()}, in a format with one line per observation and the values of different variables separated by a delimiter string. Optionally, the user may specify a list of header lines before the data lines and/or a list of footer lines after the data lines. The log or output file can then be cut and pasted, or linked or embedded (eg with the TeX {cmd:\input} command), into a TeX, HTML or word processor table. Values of numeric variables are output according to their display formats or value labels (if non-missing), or as the missing value string specified by {cmd:missnum()} (if missing). {title:Options} {p 4 8 2}{cmd:begin(}{it:string}{cmd:)} specifies a string to be output at the beginning of every output line corresponding to an observation. If absent, it is set to an empty string. {p 4 8 2}{cmd:delimiter(}{it:string}{cmd:)} specifies the delimiter between values in an observation. If absent, it is set to "&". {p 4 8 2}{cmd:end(}{it:string}{cmd:)} specifies a string to be output at the end of every output line corresponding to an observation. If absent, it is set to an empty string. {p 4 8 2}{cmd:missnum(}{it:string}{cmd:)} specifies a string to be output for numeric missing values. If absent, it is set to an empty string. {p 4 8 2}{cmd:rstyle(}{it:rowstyle}{cmd:)} specifies a row style for the table rows. A row style is a named combination of values for the {cmd:begin()}, {cmd:end()}, {cmd:delimiter()} and {cmd:missnum()} options. It may be {cmd:html}, {cmd:htmlhead}, {cmd:tabular}, {cmd:halign}, {cmd:settabs} or {cmd:tabdelim}. Row styles are specified under {hi:Row styles} below. The options set by a row style may be overridden by the {cmd:begin()}, {cmd:end()}, {cmd:delimiter()} and {cmd:missnum()} options. {p 4 8 2}{cmd:headlines(}{it:string_list}{cmd:)} specifies a list of lines of text to appear before the first of the table rows in the output. This option enables the user to add table preludes and/or headers. {p 4 8 2}{cmd:footlines(}{it:string_list}{cmd:)} specifies a list of lines of text to appear after the last of the table rows in the output. This option enables the user to add table postludes. {p 4 8 2}{cmd:nolabel} specifies that numeric variables with variable labels are to be output as numbers and not as labels. {p 4 8 2}{cmd:type} specifies that the output from {cmd:listtex} must be typed to the Stata log (or to the Results window). The data can then be cut and pasted from the Stata log (or from the Results window) to a TeX, HTML or word processor file. {p 4 8 2}{cmd:replace} specifies that any existing file with the same name as the {helpb using} file must be overwritten. {p 4 8 2}{cmd:appendto(}{it:filename}{cmd:)} specifies the name of a file, to which the output from {cmd:listtex} will be appended. {p 4 8 2}{cmd:handle(}{it:handle_name}{cmd:)} specifies the name of a file handle, specifying a file that is already open for output as a text file, to which the output from {cmd:listtex} will be added, without closing the file. See help for {helpb file} for details about file handles, This option allows the user to use {cmd:listtex} together with {helpb file} as a low-level output utility, possibly combining {cmd:listtex} output with other output. {p 4 8 2}Note that the user must specify the {helpb using} qualifier and/or the {cmd:type} option and/or the {cmd:appendto()} option and/or the {cmd:handle()} option. {title:Row styles} {pstd} A row style is a combination of the {cmd:begin()}, {cmd:end()}, {cmd:delimiter()} and {cmd:missnum()} options. Each row style produces rows for a particular type of table (HTML, TeX or word processor). The row styles available are as follows: {cmd:Row style} {cmd:begin} {cmd:delimiter} {cmd:end} {cmd:missnum} {cmd:Description} {cmd:html} "
Make | Weight (lbs) | Mileage (mpg) |
---|