[XeTeX] table indentation

maxwell maxwell at umiacs.umd.edu
Wed Nov 25 23:05:21 CET 2009


On Mon, 23 Nov 2009 17:09:50 +0100, Wolfgang Schuster
<schuster.wolfgang at googlemail.com> wrote:
> Am 23.11.2009 um 16:59 schrieb Andy Black:
> 
>> I, too, would be most interested in (and indebted) to anyone who could
>> create a package that would automagically adjust column widths to make
>> the table fit on the page.
> ...
> ConTeXt’s table environments (namely Table and TABLE) can do this.
> 
> http://wiki.contextgarden.net/Tables_Overview

It appears to me (from what I can see in this wiki--I haven't found more
comprehensive documentation), that \setupTABLE[option=stretch] only allows
for stretching a narrow table to fit the width of a table.  That is, how to
get fat.  But my original posting (not sure about Andy's) was requesting a
way to fit a wide table on a narrower page (getting skinny).  It looks like
the \setTableToWidth[\textwidth] cmd might do this, by narrowing all the
columns.  That might work for some tables, but it doesn't in my case (I
have words in foreign languages which cannot be hyphenated, and some of
them are quite long).

The solutions I can think of that work in this context (need to set wide
tables on a narrower page, without narrowing the columns) are:
1) Reduce the whitespace between colums (the opposite of \setTableToWidth)
2) Reduce the font size
3) Set the table in landscape mode

I also commonly have the problem that a table may need to float, or it may
need to continue onto the next page.  I'm pretty sure that the common table
packages in LaTeX allow you to do one or the other, but not both with the
same command.  And since the data is generated automatically, I don't want
to go in manually and choose one or the other package.  So here the options
are
4) Put the table *here*, if it makes sense
5) Float the table, assuming it will fit on the next page
6) If it won't fit on the next page, start the table *here*, if there is
room for at least a few rows, and continue it on to the next page
7) Else if we're too close to the bottom of the page, and it's a
multi-page table, start it at the top of the next page, and let it continue
on to multiple pages.

So what I'm asking for is probably a new package, call it SmartTable. 
(And yes, this list may not be the appropriate one, but I haven't had any
better luck on other lists.  Besides, the people here are nice :-).)  This
package would automatically decide which of the above solutions to use (and
the user would probably need to specify in a preamble which solutions are
acceptable, e.g. reducing the font size might be unacceptable under certain
circumstances).

I also notice that some of the above solutions are incompatible, e.g.
setting a table in landscape mode and continuing it on the next page.  In
such a case, SmartTable would throw up its figurative hands and issue a
warning or error msg, I suppose.

   Mike Maxwell


More information about the XeTeX mailing list