Changes

Jump to navigation Jump to search
4,021 bytes added ,  16:51, 14 September 2023
Created page with "Documentation for \starttabulate ... \stoptabulate"
<cd:commandgroup name="tabulate" type="environment" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc><!-- a short command summary goes here -->
The environment <tt>\starttabulate ... \stoptabulate</tt> is used for tabular material
</cd:shortdesc>
<cd:variants>
<cd:command category="tables" file="tabl-tbl.mkiv" interfacedate="2020-07-14T09:24" interfacefile="i-tabulation.xml" level="document" name="tabulate" type="environment" variantnumber="1">
<cd:arguments>
<cd:template optional="yes" ordinal="1"></cd:template>
<cd:assignments list="yes" optional="yes" ordinal="2">
<cd:assignmentsdoc></cd:assignmentsdoc>
<cd:inherit name="setuptabulate"></cd:inherit>
</cd:assignments>
</cd:arguments>
</cd:command>
</cd:variants>
<cd:description>For the main article on this subject, see [[Tabulate]].

Tabulate is a table-like environment to place information in rows and columns without placing vertical rules. There is an option to place horizontal rules with the command <code>\HL</code>. The tabulate environment knows left, right and center aligned columns for single line entries. For multiple line entries there is the <code>p</code> (paragraph) type column.

== Keys ==

General keys:

{| class="wikitable"
|-
! Key !! Meaning
|-
| [vertical bar] || column separator
|-
| c || center
|-
| l || flush left
|-
| r || flush right
|-
| p || paragraph
|}

Spacing keys:

{| class="wikitable"
|-
! Key !! Meaning
|-
| i&lt;n&gt; || set space left
|-
| j&lt;n&gt; || set space right
|-
| k&lt;n&gt; || set space around
|}

The n multiplies the amount of space as setup in {{cmd|setuptabulate}}. Default is 0.5em.


The width of a column can be set:
{| class="wikitable"
|-
! Key !! Meaning
|-
| w(d) || set column width at specified value, single line
|-
| p(d) || set column width at specified value, paragraph
|-
| p || use maximum column width for the paragraph
|}


Font switches which apply for a whole column, they can be set in the preamble:

{| class="wikitable"
|-
! Key !! Meaning
|-
| B || bold
|-
| I || italic
|-
| R || roman
|-
| S || slanted
|-
| T || teletype
|-
| m || inline math
|-
| M || display math
|}


Available hooks in the preamble:

{| class="wikitable"
|-
! Key !! Meaning
|-
| f<code>\command</code> || arbitrary fontswitch, defined by <code>\command</code>
|-
| b{ .. } || contents between curley braces is placed before the entry
|-
| a{ .. } || contents between curley braces is placed after the entry
|-
| A{ key } || contents is aligned according to key (example: A{stretch})
|-
| h<code>\command</code> || arbitrary command or macro, defined by <code>\command</code>
|}


Switching columns and rows:

{| class="wikitable"
|-
! Command !! Meaning !! Description
|-
| \NR || next row || make a new row
|-
| \NC || next column || go to next column
|-
| \EQ || next column with columseparator || go to next column
|-
| \HL || horizontal line || draw a horizontal
|}</cd:description>
<cd:examples><cd:example title=""><context source="yes" text="This gives:">
\setuppapersize[A5]
\starttabulate[|l|p|]
\NC question \NC Sometimes it is surprising to notice that writers,
independently of each other, explore the same theme along similar lines.
Three of the four books mentioned here fall into this category. Which
books do not belong in this list? \NC \NR
\stoptabulate

\starttabulate[|b{- }la{.}|l|l|]
\NC A \NC This Perfect Day \NC Ira Levin \NC \NR
\NC B \NC Opstaan op Zaterdag \NC Jan Gerhart Toonder \NC \NR
\NC C \NC Tot waar zal ik je brengen \NC Anton Koolhaas \NC \NR
\NC D \NC The City And The Stars \NC Arthur Clarke \NC \NR
\stoptabulate
</context></cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:commandref name="definetabulate" originator="system"></cd:commandref>
<cd:commandref name="setuptabulate" originator="system"></cd:commandref>
<cd:source file="tabl-tbl.mkiv" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Tables"></cd:wikipage></cd:seealso>
</cd:commandgroup>

Navigation menu