Difference between revisions of "TableText Command"
From GeoGebra Manual
(typo and added note about the object's style bar) |
(added example : colouring) |
||
Line 25: | Line 25: | ||
* line separators, using the symbol _ | * line separators, using the symbol _ | ||
* column separators, using the symbol | | * column separators, using the symbol | | ||
+ | * different colourings | ||
: {{Examples|1=<br/> | : {{Examples|1=<br/> | ||
Line 33: | Line 34: | ||
:* <code><nowiki>TableText[{{"2x+3y=5","5x+8y=12"}},"{v"]</nowiki></code> creates the text <math> \left\{\begin{matrix} 2x+3y=1\\ x-2y=-5 \end{matrix}\right.</math> | :* <code><nowiki>TableText[{{"2x+3y=5","5x+8y=12"}},"{v"]</nowiki></code> creates the text <math> \left\{\begin{matrix} 2x+3y=1\\ x-2y=-5 \end{matrix}\right.</math> | ||
:* <code><nowiki>TableText[{{1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}}, "-/|_v"]</nowiki></code> creates a table with border and no separation lines | :* <code><nowiki>TableText[{{1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}}, "-/|_v"]</nowiki></code> creates a table with border and no separation lines | ||
− | :* <code><nowiki>TableText[{{1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}}, "|11001 _110001 h"]</nowiki></code>creates a table with border and one separation line to the right of the first column and under the first row of contents. The value 1 in the syntax means that there is a separation line between the numbers and the value 0 means that there is no separation line or border. }} | + | :* <code><nowiki>TableText[{{1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}}, "|11001 _110001 h"]</nowiki></code>creates a table with border and one separation line to the right of the first column and under the first row of contents. The value 1 in the syntax means that there is a separation line between the numbers and the value 0 means that there is no separation line or border. |
− | {{Note|Clicking on a ''TableText'' object displays its style bar, which allows the user to customize the object's appearance, background and text colour, text and lines style | + | :*<code><nowiki>TableText[{{"\blue{0, 1, 2, 3, 4}", "\red{4, 3, 2, 1, 0}"}}, "v"]</nowiki></code> creates a table having the objects in the first row coloured in blue, the ones in the second row coloured in red.}} |
+ | {{Note|Clicking on a ''TableText'' object displays its style bar, which allows the user to customize the object's appearance, background and text colour, text and lines style. }} |
Revision as of 10:07, 4 January 2014
- TableText[ <List>, <List>, ... ]
- Creates a text that contains a table of the list objects.
- Note: By default, each list is displayed in its own row of the table.
- Examples:
TableText[{x^2, 4}, {x^3, 8}, {x^4, 16}]
creates a table as a text object with three rows and two columns. All items of the table are left aligned.TableText[Sequence[i^2, i, 1, 10]]
creates a table as a text object with one row. All items of the table are left aligned.
- TableText[ <List>, <List>, ..., <Alignment of Text> ]
- Creates a text that contains a table of the list objects. The optional text “Alignment of text” controls the orientation and alignment of the table text.
- Note: Possible values are "vl", "vc", "vr", "v", "h", "hl", "hc", "hr". Default is "hl".
- "v" = vertical, i. e. lists are columns
- "h" = horizontal, i. e. lists are rows
- "l" = left aligned
- "r" = right aligned
- "c" = centered
- Examples:
TableText[{1, 2, 3, 4}, {1, 4, 9, 16}, "v"]
creates a text with two columns and four rows whose elements are left aligned.TableText[{1, 2, 3, 4}, {1, 4, 9, 16}, "h"]
creates a text with two rows and four columns whose elements are left aligned.TableText[{11.2, 123.1, 32423.9, "234.0"}, "vr"]
creates a text with one column whose elements are right aligned.
It's now possible to insert:
- different types of brackets, using the following symbols ||||, ||, {}, [] or ()
- line separators, using the symbol _
- column separators, using the symbol |
- different colourings
- Examples:
TableText[{1, 2}, {3, 4}, "c()"]
creates the text \begin{pmatrix}{} 1 & 2 \\ 3 & 4 \\ \end{pmatrix}TableText[{1, 2}, {3, 4}, "c|_"]
creates the textTableText[{1, 2}, {3, 4}, "||"]
creates the text \begin{vmatrix}{} 1 & 2 \\ 3 & 4 \\ \end{vmatrix}TableText[{1, 2}, {3, 4}, "||||"]
creates the text \begin{Vmatrix}{} 1 & 2 \\ 3 & 4 \\ \end{Vmatrix}TableText[{{"2x+3y=5","5x+8y=12"}},"{v"]
creates the text \left\{\begin{matrix} 2x+3y=1\\ x-2y=-5 \end{matrix}\right.TableText[{{1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}}, "-/|_v"]
creates a table with border and no separation linesTableText[{{1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}}, "|11001 _110001 h"]
creates a table with border and one separation line to the right of the first column and under the first row of contents. The value 1 in the syntax means that there is a separation line between the numbers and the value 0 means that there is no separation line or border.TableText[{{"\blue{0, 1, 2, 3, 4}", "\red{4, 3, 2, 1, 0}"}}, "v"]
creates a table having the objects in the first row coloured in blue, the ones in the second row coloured in red.
Note: Clicking on a TableText object displays its style bar, which allows the user to customize the object's appearance, background and text colour, text and lines style.