[XeTeX] Making nice tables

John Was john.was at ntlworld.com
Thu Nov 22 09:52:35 CET 2007


Hi

Those of us who use plain TeX rather than LaTeX varieties would just 
surround tables (including their titles and any footnotes that go with the 
table) with \midinsert and \endinsert.  I don't know if LaTeX prohibits 
that.  If you want a table to go on a page by itself, then it's \pageinsert 
rather than \midinsert, and if you want it to go to the top of a page (as is 
traditionally recommended for longish tables), then \topinsert.

Footnotes to floating tables should be operating on a different system from 
the normal consecutively numbered footnotes of the book, since integrating 
them with the main series of footnotes will cause disruptions if tables move 
around.  I usually just do it manually - e.g. superior letters as cues in 
the body of a table, and a bank of small-type footnotes set beneath it: 
then the whole bunch simply floats around together.

Tables too long for a single page do have to be anchored, though, so that 
the page-breaks can occur wherever they need to, and in those cases it's 
probably best to use the ordinary numbered footnote style.

Incidentally, because of the floatability it is _not_ recommended to refer 
to 'the table above' or 'the table below' or 'the following table' etc. in 
the surrounding text.  If you don't monitor this carefully you could end up 
saying 'below' when in fact it has appeared just above.  That rule was 
formulated many decades ago (it's in Hart's Rules, for example).  Just use 
the table's reference number for safety's sake.

I'm sure the documentation on the various LaTeX packages being invoked (and 
recommended by others) will solve the remaining problems.  If the JPG shows 
what happened when you just did an automated conversion to TeX, there really 
isn't that much further to go in terms of tweaking the source files to 
produce satisfactory output, but I think the tweaking can only be done 
competently if you spend a little time familiarizing yourself with the macro 
packages involved.

What I think you want to keep to a minimum is manual intervention in the 
page-breaking process:  if you force page-breaks you will probably run into 
problems if you later want to alter something earlier in the chapter. 
Besides, it's rather against the spirit of TeX, which is to give the program 
all the rules it needs to make up the book for you, and then let it get on 
with it.  (I say this with some feeling since I'm currently forcing breaks 
in an edition of over a thousand pages where we have Latin on one side and 
English translation on the other:  to keep the two in tandem there is no 
alternative but it's a very tricky and slow business and, as I say, against 
the spirit of TeX.)



John






----- Original Message ----- 
From: "Mike Maxwell" <maxwell at umiacs.umd.edu>
To: "Unicode-based TeX for Mac OS X and other platforms" <xetex at tug.org>
Sent: Thursday, November 22, 2007 6:20 AM
Subject: JunkEmail: Re: [XeTeX] Making nice tables


> Will Robertson wrote:
>> LaTeX
>> also doesn't agree with the idea of leaving gaping holes in the text;
>> you'll need to force them with \newpage if you want that.
>
> My problem is that the *tex code is created automatically from the
> DocBook source by the dblatex program, and I don't want to have to go in
> to fix things by hand.  (It needs to run in turnkey mode.)
>
>>> But even more surprising to me is the mess that *tex makes of last line
>>> of this broken table.  I realize tables are hard, and footnotes make the
>>> problem of page layout still harder, but I would have thought it would
>>> get this right.
>>
>> Well, typesetting Urdu wasn't exactly in the spec when longtable was
>> written >10 years ago! :)
>
> Actually, this is Bengali text, which is left-to-right. So I wouldn't
> expect it to be any worse than a Latin text (except of course that *tex
> can't be expected to hyphenate it).
>
>> You might also like to try the supertabular, which uses a different
>> algorithm to do the same thing as longtable. Actually I just looked it
>> up and it seems that xtab is an improved version of supertabular:
>>   <http://www.ctan.org/tex-archive/help/Catalogue/entries/xtab.html>
>
> Hmm.  I tried changing all the \longtable to \xtab, but it chokes part
> way through with the error:
> ------------
> ! LaTeX Error: Environment xtab undefined.
>
> See the LaTeX manual or LaTeX Companion for explanation.
> Type  H <return>  for immediate help.
>  ...
>
> l.561 \begin{xtab}
>                   {lll}\hline
> ------------
> This is the first place xtab is actually used (apart from the
> \usepackage{xtab} command).  If I'm understanding correctly, xetex isn't
> finding this package.  Which is odd, because the file xtab.sty seems to
> be in my TEXINPUTS path (at least, /usr/share/texmf// is, and xtab.sty
> is in  /usr/share/texmf/tex/latex/misc/); or am I misunderstanding what
> xetex needs to find??
>
>> To look at changing the way your footnotes work, check out both
>> footmisc and bigfoot.
>
> Will do, but it's 1 AM here...maybe tomorrow.  Thanks for the help (and
> thanks to Ross Moore, who is apparently somewhere on the other side of
> the Earth from me; I'll look at his advice tomorrow, too).
>
> Oh, and xetex finds supertabular (unlike xtab), but then supertabular
> complains about a \caption being located outside a float.  Maybe tomorrow.
> -- 
> Mike Maxwell
> maxwell at umiacs.umd.edu
> "For over a thousand years, the British Empire was the guardian
> of good grammar and the English language.
> Before the dark times.  Before the Americans."
> --Bob Kenobi (Ben Kenobi's younger brother)
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex
> 


More information about the XeTeX mailing list