TABLE: 'distance' override?
Hello, In my quest for tables similar to what the 'booktabs' package in LaTeX produces, I have run into a problem: something like '\bTABLE[distance=7.5pt]' will give me the sought for gaps in horizontal lines, but I have trouble implementing an uninterrupted topframe for the first and bottomframe for the last row. Is there any way of overriding the 'distance' parameter locally, so that for example the topframe of the first (header) row is uninterrupted, while the bottomframe comes with the 'distance' dictated gaps? For clarification see the attached file. While the gaps are desired for 'bottomframe' of the header row(s), the 'topframe' should be continuous. It would be even more marvelous if I could modify bottomframe- and topframe-rule thickness independently ... A recent proposal on this list to achieve the desired effect involved putting the whole table into a frame and displaying it's top- and bottomframe. However, that doesn't work for tables to be split over multiple pages and I'm hunting for the most generic of all mechanisms ... Thanks for any thoughts on this, Joh
Johannes Graumann wrote:
Hello,
In my quest for tables similar to what the 'booktabs' package in LaTeX
what does booktab do then Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen wrote:
what does booktab do then
Have a look at http://www.idyll.org:8081/JohSite/context/table1.jpg/view I write there:
A table formated with the package 'booktabs' in LaTeX. Notice the heavier, continuous '\toprule' and '\bottomrule' as well as the lighter and interrupted lines seperating table-header and table body. Notice as well, that the table rules ar flush on the left and right with the table entries.
I had emulated the continuous top- and bottomrule (while using 'distance' for the others) with a frame around the whole thing, but that prevents the table from being splitable ... I have not come across any ConTeXt solution yet making the rules on the left and right edge of the table flush with the Text. Joh
After sleeping on this I realize that a more mechanistical answer to this may be more interesting. When coding a table in LaTeX with 'booktabs' as the one shown in http://www.idyll.org:8081/JohSite/context/table1.jpg/view, booktabs mainly provides the commands '\bottomrule' and '\toprule', creating the heavier start and end lines. The interrupted lines separating the table header from the table body are coded explicitly (with a command I'm not sure is even provided by 'booktabs'): '\cmidrule(r){1-1}\cmidrule(lr){2-2}\cmidrule(l {3-3}' for a three-columned table. Bottomline is that while with the distance solution in ConTeXt natural TABLEs the whole table is modified, a solution like this only modifies the horizontal line targeted - and that very flexible: the firs '\cmidrule' call anly shortens the rule on the right ('(r)'), the second one on both sides ('(lr)') and the last one on the left ('(l)'). In order to emulate my table style with TABLE there would be 4 things necessary: 1) possibility to have top- and bottomframe formated independently (different width - top heavy, bottom light; one continuous, one interrupted (see 2.)) 2) a new frame mode ('int'?) which interrupts a 'bottomframe=int' between table columns with an automatism recognizing whether this is the first or last column and only shortening the line on the right or left respectively. 3) Booktabs also provides an '\addlinespace' command for groupseparation ... see separation between first and second body line in http://www.idyll.org:8081/JohSite/context/table1.jpg/view 4) When defining tables in LaTeX, a definition like \tabular{@{}lll@{}} yields horizontal lines terminating on the left and right flush with the table content and not reaching to a column separation border beyond that. If you wonder where I got all theses crazy ideas ;0): http://www.tug.org/tex-archive/info/german/tabsatz/tabsatz.pdf by Axel Reichert is the inspiring document (sorry - German only). I'm not asking for this to be implemented, but I believe ConTeXt would benefit from this. Joh Hans Hagen wrote:
Johannes Graumann wrote:
Hello,
In my quest for tables similar to what the 'booktabs' package in LaTeX
what does booktab do then
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Johannes Graumann wrote:
When coding a table in LaTeX with 'booktabs' as the one shown in http://www.idyll.org:8081/JohSite/context/table1.jpg/view, booktabs mainly
but that's a typical example of a \begintable ... \endtable kind of table (a quick hack into TABLE is to use backgrounds drawn by mp (which is what we do when we need to make real fancy ones with shaded and colors and whatever) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Johannes Graumann wrote:
1) possibility to have top- and bottomframe formated independently (different width - top heavy, bottom light; one continuous, one interrupted (see 2.))
maybe in the future, when we have a bigger tex (would slow down the core \framed to much and as a result many other aspects of context) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Johannes Graumann