Text Commands

FormulaText

FormulaText[Object]: Returns the formula for the object as a LaTeX text. 
Example: If a = 2 and f(x) = a x2, then FormulaText[f] returns 2 x2 (as a LaTeX text).

FormulaText[Object, Boolean]: Returns the formula for the object as LaTeX text. The Boolean variable determines if values are substituted for variables (true) or if variable names are shown in the text (false).           
Examples: If a = 2 and f(x) = a x2, then

FormulaText[f, true] returns 2 x2 (as a LaTeX text).

FormulaText[f, false] returns a x2 (as a LaTeX text).

FractionText

FractionText[Number]: Converts the number to a fraction, which is displayed as a (LaTeX) text object in the Graphics View.          
Example: If a: y = 1.5 x + 2 is a line, then FractionText[Slope[a]] gives you the fraction 3/2 as a text.

LetterToUnicode

LetterToUnicode["Letter"]: Turns a single letter into its Unicode number         
Note: The letter needs to be in between a set of quotation marks.           
Example: LetterToUnicode["a"] returns the number 97

Name

Name[Object]: Returns the name of an object as a text in the Graphics View.
Note: Use this command in dynamic text for objects that might be renamed. The Name command is the opposite of the Object command.

Object

Object[Name of Object as Text]: Returns the object for a given name. The result is always a dependent object.            
Note: The Object command is the opposite of the Name command.        
Example: If points A1, A2, ... , A20 exist and slider n = 2, then Object["A" + n] gives you a copy of point A2.

TableText

TableText[List 1, List 2, List 3,...]: Creates a text that contains a table of the list objects.   
Note: By default, every list is displayed in a new column 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 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           

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.

Text

Text[Object]: Returns the formula for the object as a text object.     
Note: By default, values are substituted for variables.       
Example: If a = 2 and c = a2, then Text[c] returns the text "4".

Text[Object, Boolean]: Returns the formula for the object as a text object. The Boolean variable determines if values are substituted for variables (true) or if variable names are shown in the text (false).
Example: If a = 2 and c = a2, then

Text[c, true] returns the text "4".

Text[c, false] returns the text "a2".

Text[Object, Point]: Returns the formula for the object as a text object at the position of the given point.           
Example: Text["hello", (2, 3)] draws the text at the position (2, 3).

Text[Object, Point, Boolean]: Returns the formula for the object as a text object at the position of the given point. The Boolean variable determines if values are substituted for variables (true) or if variable names are shown in the text (false).

TextToUnicode

TextToUnicode["Text"]: Turns the text into a list of Unicode numbers, one for each character. 
Examples:

·        TextToUnicode["Some text"] gives you the list of Unicode numbers
{83, 111, 109, 101, 32, 116, 101, 120, 116}.

·        If text1 is "hello", then TextToUnicode[text1] gives you the list of Unicode numbers {104, 101, 108, 108, 111}.

UnicodeToLetter

UnicodeToLetter[Integer]: Converts the integer Unicode number back into a letter which is displayed as a text object in the Graphics View.     
Example: UnicodeToLetter[97] gives you the text "a".

UnicodeToText

UnicodeToText[List of Integers]: Converts the integer Unicode numbers back into text.     
Example: UnicodeToText[{104, 101, 108, 108, 111}] gives you the text "hello".


www.geogebra.org