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",
head("`lab1'`tab'`lab2'`tab'`lab3'`tab'`lab4'`tab'`lab5'`tab'`lab6'`tab'`lab7'`tab'`lab8'`tab'`lab9'`tab'`lab10'`tab'`lab11'`tab'`lab12'")
  rstyle(tabdelim) replace;



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 
*
*   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