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

st: Maximum length of -listtex- headline

From   Friedrich Huebler <[email protected]>
To   [email protected]
Subject   st: Maximum length of -listtex- headline
Date   Mon, 21 Mar 2005 12:54:00 -0800 (PST)

I use -listtex- from SSC to save tables in tab-delimited text files
and would like to add the complete variable labels with the
headline() option. My labels are quite long and I am hitting some
limit of -listtex- or the Windows operating system. After a certain
number of characters (this number varies from 400 to 500 in my
experience), the headline is broken and text that follows is listed
on additional lines with one to two words per line. You can reproduce
the problem with the code below; in that case the headline is broken
after 502 characters on my computer.

The solution is of course to abbreviate the variable labels. I am
writing to the list in the hope that someone can explain this limit
and describe a way around it. Thank you.

Friedrich Huebler

#delimit ;
sysuse auto, clear;
local i = 1;
foreach var of varlist make-foreign {;
  local lab`i' : variable label `var';
  local lab`i' "`lab`i'' `lab`i'' `lab`i'' `lab`i''";
  local i = `i' + 1;
local tab = char(9);
listtex make-foreign using "table.txt",
  rstyle(tabdelim) replace;

Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site! 
*   For searches and help try:

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