:fig table
instruction and concluded with the done.
instruction. Each line of the body of a table describes one row. Cells in a row are separated by the #
sign. The first row of a table is interpreted as the row of column titles, unless specified otherwise using a table option.The # separator should be surrounded by spaces. |
The following Grafstate code generates a table (shown below)∶ |
Code |
---|
:fig table Heading 1 # Heading 2 Column 1, row 1 # Column 2, row 1 Column 1, row 2 # Column 2, row 2 done. |
Heading 1 | Heading 2 |
---|---|
Column 1, row 1 | Column 2, row 1 |
Column 1, row 2 | Column 2, row 2 |
:fig table
instruction (surrounded by spaces), followed by the list of options (separated by a space.Description | Grafstate code |
---|---|
Center the table | >< |
Set the table width | w=n , where n represents a percentage of the width of the screen. |
Description | Grafstate code |
---|---|
Center every cell | cell>< |
Do not draw a border around the table or around individual cells | noborder |
Do not format a title or a row of headings | nohead |
Add a title | title |
Add a caption | cap |
title
option (see above). Begin the table description with a line that starts with the instruction title
and is followed by the text of the title.If a title is added to a table, then the first line of the table contents will not be interpreted as a row of column headings. If you want the cells on the first row to be bolded or centered, then see the cell options below. |
cap
option (see above). Begin the table description with a line that starts with the instruction cap
and is followed by the text of the caption.If your table has both a title and a caption, then it does not matter whether the title line or the cap line is first; they must be lines 1 and 2 of of the table body code. |
The following code creates a table using options (shown below)∶ |
Code |
---|
:fig table : >< cell>< title cap w=60 noborder title This is a title cap This is a caption x # y # z a # b # c done. |
This is a title | ||
---|---|---|
x | y | z |
a | b | c |
:()
command at the beginning of the cell, and include the list of options (separated by a space) inside the parentheses.Description | Grafstate code |
---|---|
Center text in the cell | >< |
Set the background color of the cell | bg=color , where color is one of the predefined colors (see below). |
Set the width of the bottom border | bbw=n , where n is the width of the bottom border of the cell. |
Set the width of the left border | blw=n , where n is the width of the left border of the cell. |
Set the width of the right border | brw=n , where n is the width of the right border of the cell. |
Set the width of the top border | btw=n , where n is the width of the top border of the cell. |
Set the number of columns to span | cs=n , where n is the number of columns to be spanned by this cell. |
The following predefined colors are available∶ |
Red |
orange |
yellow |
green |
blue |
The following code creates a table using options and text formatting for individual cells (shown below)∶ |
Code |
---|
:fig table : nohead >< w=60 cap cap Formatting cells **{Bold} # ::(bg=green) *{Italics} # !{Highlight} ::(cs=2) >< Wide # ::(bbw=.2 btw=.2 brw=.2 blw=.2) Border done. |
Bold | Italics | Highlight | |
Border |