Path: utzoo!censor!geac!jtsv16!uunet!dino!uxc.cso.uiuc.edu!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.text Subject: Re: LaTeX table environment problem Message-ID: <18950@mimsy.UUCP> Date: 9 Aug 89 10:12:27 GMT References: <1989Aug9.031120.3028@ee.rochester.edu> Distribution: usa Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 31 In article <1989Aug9.031120.3028@ee.rochester.edu> cheng@ee.rochester.edu (Bruce Cheng) writes: >I am writing a program that generate LaTeX files. There is a part >that I wanted to generate tabels using latex "tabular" environment. >The problem is if my table grew longer than textheight, I need to > 1) end the table environment; > 2) begin a new page and start another table environment on > the new page and continue the table. >... I am using art10.sty. Do I need to change the style sheet in order >to acheive this? How? You have tackled a hard problem. There are no standard general solutions. Multi-page `tables' (which are not really tables; tables are unbreakable objects, which is why they are normally put inside floats) are an odd sort of creature and appear only rarely, so the usual approach is to consider what is in the `table' and make something up on the spot. For instance, if all the entries are short, simply choose some size and allocate that much space to each column. (Each could get its own different size.) Assemble one line at a time, and insert page breaks as each page fills. If one of the entries is bigger than its column, change it (either the entry or the column). In LaTeX or raw TeX, the most straightforward way to do this would be to stack \hbox es on top of each other until the page gets full. It cannot be done directly with the tabular environment; the description in the LaTeXbook that the result of a tabular is `like one big character' is a good clue here: TeX cannot split characters. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris