cheng@ee.rochester.edu (Bruce Cheng) (08/09/89)
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. \begin{tabular} .... .... many many entries. \end{tabular} I am using art10.sty. Do I need to change the style sheet in order to acheive this? How? Reference to TeXbook and LaTeX books are welcome. Thanks. -Bruce -- Wai Shun Bruce Cheng Home Phone: 716-271-7305 US Mail: BOX 30002, UUCP: rochester!ur-valhalla!cheng River Station, Internet: cheng@ee.rochester.edu Rochester, NY14627
chris@mimsy.UUCP (Chris Torek) (08/09/89)
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
mcdonald@uxe.cso.uiuc.edu (08/11/89)
(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? Chris Torek replies: >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. Well, there is a Latex multi-page tabular environment that works well. It is available from the Clarkson Latex-style archives (sun.soe.clarkson.edu). I seem to recall that it is called "supertabular.sty". Doug McDonald
chris@mimsy.UUCP (Chris Torek) (08/12/89)
In article <47700063@uxe.cso.uiuc.edu> mcdonald@uxe.cso.uiuc.edu writes: >Well, there is a Latex multi-page tabular environment that works >well. It is available from the Clarkson Latex-style archives >(sun.soe.clarkson.edu). I seem to recall that it is called >"supertabular.sty". `supertab' (I just found it in the stuff I copied down a week or two ago). It is another ad-hoc approach: it simply counts lines. If you try to set paragraph entries (with something like \begin{supertabular}{|lp{4in}} for instance), it will assume that each paragraph will be one line high---presumably false, else why did you use a p format? -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris