Changes

Jump to navigation Jump to search
2,476 bytes added ,  09:05, 22 August 2017
m
no edit summary
=Introduction=
This table mode The preferred way to typeset tables is to use what are called &ldquo;natural tables&rdquo; or (also known as &ldquo;automatic tables.&rdquo; I'd call it or &ldquo;HTML tables,&rdquo; because it's very similar to them). They're are especially suited for [[XML]] conversions. Beware: every element must use <tt>\b</tt> ... <tt>\e</tt>! You find a lot of samples in See the [[manual:enattab.pdf|enattab.pdf]] Willi Egger wrote a [[My Way]] how he set a typesetter's lead type case: [http://dl.contextgarden.net/myway/NaturalTablesmanual for many examples.pdf Use of natural tables]
To place a table use:
</texcode>
Here is a A more elaborate example:
<context source=yes>
</context>
Note that every element must use <tt>\b</tt> ... <tt>\e</tt>.
 
Willi Egger wrote a [[My Way]] how he set a typesetter's lead type case: [http://dl.contextgarden.net/myway/NaturalTables.pdf Use of natural tables]
= Multipage TABLEs =
\stoptext
</texcode>
 
== Changing split location ==
 
Sometimes in multipage tables you have cells that have to stay together:
 
<texcode>
\bTABLE[split=yes]
\dorecurse{10}{\bTR \bTD xxx \eTD \eTR}
\bTR[after=\page] \bTD yyy \eTD \eTR
\dorecurse{10}{\bTR \bTD xxx \eTD \eTR}
\eTABLE
</texcode>
 
Note that the table is split after the yyy row.
= Tables in multiple columns =
\stoptext
</texcode>
 
== Row Offset/Gap ==
 
Rows, just like columns, can be drawn with a gap.
As above, this can be achieved using:
<texcode>
\bTABLE[spaceinbetween=2cm]
...
\eTABLE
</texcode>
 
A gap differs from an offset as can be seen when drawing
cells using a background and/or a frame.
 
Note that offsets can be uniform <tt>[offset=dimension]</tt>,
or asymmetric
<tt>[toffset=dimension,boffset=dimension,loffset=dimension,roffset=dimension]</tt>
 
=== Gaps for individual cells ===
 
One might want to produce gaps between specific rows and/or specific columns.
This can be achieved using a white frame, for example,
as shown in the following (incomplete) fragment:
 
<texcode>
\bTABLE[frame=off,columndistance=.5em]
...
\bTR[topframe=on,framecolor=white,rulethickness=.5em]
...
\eTR
...
\eTABLE
</texcode>
 
Note that the <tt>rulethickness</tt> was set for the particular row
and not for the entire table; otherwise, it would enter into the
calculation of the cell dimensions (and interplay with other parameters
such as <tt>columndistance</tt>).
 
More complicated situations, for example, mixing frames, colored cell backgrounds, special gaps, ..., can be achieved using MetaPost graphics as a <tt>background</tt>.
== Make a cell bold ==
\eTABLE
\stoptext
</context>
 
= Footnotes in TABLEs =
 
From this conversation on the mailing list[https://mailman.ntg.nl/pipermail/ntg-context/2017/089097.html]. In order to get global footnotes printing after tables (without using the local footnotes trick):
 
<texcode>
Text\footnote{Normal Footnote}
\bTABLE[split=repeat,align=normal]
\bTR\bTD Something\postponenotes\footnote[x]{bla bla}\eTD\eTR
\bTR\bTD Foo\note[x] \eTD\eTR
\eTABLE
\flushnotes
More Text\footnote{Another Normal Footnote}
</texcode>
<context mode=mkiv source=no>
\setupnote[footnote][location=text]
\setupnotations[alternative=serried]
\starttext
Text\footnote{Normal Footnote}
\bTABLE[split=repeat,align=normal]
\bTR\bTD Something\postponenotes\footnote[x]{bla bla}\eTD\eTR
\bTR\bTD Foo\note[x] \eTD\eTR
\eTABLE
\flushnotes
More Text\footnote{Another Normal Footnote}
Note that the context wiki is eating the footnote numbers, but that they are there anyways.
\placefootnotes
\stoptext
 
 
</context>
4

edits

Navigation menu