Thanks as always to Kit Baum, a new version of the listtab package is now available for download from SSC. In Stata, use the ssc command to do this, or adoupdate if you already have an old version of listtab.
The listtab package is described as below on my website, and superseded the old listtex package many years ago, although a lot of people still seem too download the old listtex. The new version adds an option rstyle(bbcode), allowing the user to specify a row style for BBcode tables for posting on Statalist and other bulletin boards. So, if the user types, in Stata,
then Stata outputs to the log file, and/oror to the Results window, some alien-looking code, which the user can cut and paste into a Statalist posting to create a table like this:
I would like to thank the Statalist organisers for providing the Sandbox, in which I tried out this new option.
Best wishes
Roger
---------------------------------------------------------------------------------
package listtab from http://www.imperial.ac.uk/nhli/r.newson/stata11
---------------------------------------------------------------------------------
TITLE
listtab: List variables as rows of a TeX, HTML or word processor table
DESCRIPTION/AUTHOR(S)
listtab outputs a list of variables to the Stata log or to a file as TeX,
HTML or word processor table rows, which can then be inserted into a TeX,
HTML or word processor table by cutting and pasting and/or file linking
and/or embedding (eg using the TeX \input command). listtab produces the
table rows, but may also produce a set of header lines before the table
rows and/or footer lines after the table rows, containing preambles and/or
table definitions and/or table headers and/or table footers, as specified
by the user.
Author: Roger Newson
Distribution-Date: 08october2015
Stata-Version: 11
INSTALLATION FILES (click here to install)
listtab.ado
listtab_vars.ado
listtab_rstyle.ado
listtab.sthlp
listtab_vars.sthlp
listtab_rstyle.sthlp
---------------------------------------------------------------------------------
(click here to return to the previous screen)
The listtab package is described as below on my website, and superseded the old listtex package many years ago, although a lot of people still seem too download the old listtex. The new version adds an option rstyle(bbcode), allowing the user to specify a row style for BBcode tables for posting on Statalist and other bulletin boards. So, if the user types, in Stata,
Code:
sysuse auto, clear;
desc, fu;
listtab_vars make weight mpg, rstyle(bbcode) sub(varlab) lo(tabhead);
listtab make weight mpg if foreign, type rstyle(bbcode)
head("");
Make and Model | Weight (lbs.) | Mileage (mpg) |
Audi 5000 | 2,830 | 17 |
Audi Fox | 2,070 | 23 |
BMW 320i | 2,650 | 25 |
Datsun 200 | 2,370 | 23 |
Datsun 210 | 2,020 | 35 |
Datsun 510 | 2,280 | 24 |
Datsun 810 | 2,750 | 21 |
Fiat Strada | 2,130 | 21 |
Honda Accord | 2,240 | 25 |
Honda Civic | 1,760 | 28 |
Mazda GLC | 1,980 | 30 |
Peugeot 604 | 3,420 | 14 |
Renault Le Car | 1,830 | 26 |
Subaru | 2,050 | 35 |
Toyota Celica | 2,410 | 18 |
Toyota Corolla | 2,200 | 31 |
Toyota Corona | 2,670 | 18 |
VW Dasher | 2,160 | 23 |
VW Diesel | 2,040 | 41 |
VW Rabbit | 1,930 | 25 |
VW Scirocco | 1,990 | 25 |
Volvo 260 | 3,170 | 17 |
I would like to thank the Statalist organisers for providing the Sandbox, in which I tried out this new option.
Best wishes
Roger
---------------------------------------------------------------------------------
package listtab from http://www.imperial.ac.uk/nhli/r.newson/stata11
---------------------------------------------------------------------------------
TITLE
listtab: List variables as rows of a TeX, HTML or word processor table
DESCRIPTION/AUTHOR(S)
listtab outputs a list of variables to the Stata log or to a file as TeX,
HTML or word processor table rows, which can then be inserted into a TeX,
HTML or word processor table by cutting and pasting and/or file linking
and/or embedding (eg using the TeX \input command). listtab produces the
table rows, but may also produce a set of header lines before the table
rows and/or footer lines after the table rows, containing preambles and/or
table definitions and/or table headers and/or table footers, as specified
by the user.
Author: Roger Newson
Distribution-Date: 08october2015
Stata-Version: 11
INSTALLATION FILES (click here to install)
listtab.ado
listtab_vars.ado
listtab_rstyle.ado
listtab.sthlp
listtab_vars.sthlp
listtab_rstyle.sthlp
---------------------------------------------------------------------------------
(click here to return to the previous screen)
Comment