Difference between revisions of "TableText Command"

From GeoGebra Manual
Jump to: navigation, search
(my 2 pences)
Line 24: Line 24:
 
* column separators, using the symbol |  
 
* column separators, using the symbol |  
  
: {{Example|1=<br/>
+
<math> \begin{array}{|c|c|} \hline 1 & 2 \\ \hline 3 & 4 \\ \hline \end{array}  </math>
:* <code>TableText[&#123;{1,2},{3,4}&#125;,"c()"]</code> creates the text <math>\left( \begin{array}{} 1 & 2 \\ 3 & 4 \\ \end{array}  \right) </math>;
+
 
:* <code>TableText[&#123;{1,2},{3,4}&#125;,"c&#124;_"]</code> creates the text <math> \begin{array}{|c|c|} \hline 1 & 2 \\ \hline 3 & 4 \\ \hline \end{array}  </math>;
+
: {{Examples|1=<br/>
:* <code>TableText[&#123;{1,2},{3,4}&#125;,"c&#124;&#124;"]</code> creates the text <math> \left\vert \begin{array}{} 1 & 2 \\ 3 & 4 \\ \end{array} \right\vert </math>;
+
:* <code>TableText[{1,2},{3,4},"c&#124;_"]</code> creates the text above  ;
:* <code>TableText[&#123;{1,2},{3,4}&#125;,"c&#124;&#124;&#124;&#124;"]</code> creates the text <math> \left\Vert \begin{array}{} 1 & 2 \\ 3 & 4 \\ \end{array}  \right\Vert </math> .}}
+
:* <code>TableText[{1,2},{3,4},"c&#124;&#124;&#124;&#124;"]</code> creates the text <math> \left\Vert \begin{array}{} 1 & 2 \\ 3 & 4 \\ \end{array}  \right\Vert </math> ;
 +
:* <code>TableText[{1,2},{3,4},"c()"]</code> creates the text <math>\left( \begin{array}{} 1 & 2 \\ 3 & 4 \\ \end{array}   \right) </math> ;
 +
:* <code>TableText[{1,2},{3,4},"c&#124;&#124;"]</code> creates the text <math> \left\vert \begin{array}{} 1 & 2 \\ 3 & 4 \\ \end{array}  \right\vert </math>.}}

Revision as of 19:26, 3 February 2013


TableText[List 1, List 2, List 3,...]
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.
Example:
  • 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 1, List 2, List 3,..., "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
Example:
  • 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 |

\begin{array}{|c|c|} \hline 1 & 2 \\ \hline 3 & 4 \\ \hline \end{array}

Examples:
  • TableText[{1,2},{3,4},"c|_"] creates the text above ;
  • TableText[{1,2},{3,4},"c||||"] creates the text \left\Vert \begin{array}{} 1 & 2 \\ 3 & 4 \\ \end{array} \right\Vert  ;
  • TableText[{1,2},{3,4},"c()"] creates the text \left( \begin{array}{} 1 & 2 \\ 3 & 4 \\ \end{array} \right)  ;
  • TableText[{1,2},{3,4},"c||"] creates the text \left\vert \begin{array}{} 1 & 2 \\ 3 & 4 \\ \end{array} \right\vert .
© 2022 International GeoGebra Institute