Difference between revisions of "FormulaText Command"
From GeoGebra Manual
m (1 revision) |
(added v.4 - note/example formatting) |
||
Line 1: | Line 1: | ||
− | <noinclude>{{Manual Page}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude> | + | <noinclude>{{Manual Page|version=4.0}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude> |
{{command|text}} | {{command|text}} | ||
; FormulaText[Object]: Returns the formula for the object as a LaTeX text. | ; FormulaText[Object]: Returns the formula for the object as a LaTeX text. | ||
− | : Note | + | : {{Note| By default, values are substituted for variables.}} |
− | : Example | + | : {{Example| 1=If ''a = 2'' and ''f(x) = a x<sup>2</sup>'', then <tt>FormulaText[f]</tt> returns ''2 x<sup>2</sup>'' (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''). | ; 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''). | ||
− | : | + | : {{Example| 1=If ''a = 2'' and ''f(x) = a x<sup>2</sup>'', then |
: <tt>FormulaText[f, true]</tt> returns ''2 x<sup>2</sup>'' (as a LaTeX text) and | : <tt>FormulaText[f, true]</tt> returns ''2 x<sup>2</sup>'' (as a LaTeX text) and | ||
− | : <tt>FormulaText[f, false]</tt> returns ''a x<sup>2</sup>'' (as a LaTeX text). | + | : <tt>FormulaText[f, false]</tt> returns ''a x<sup>2</sup>'' (as a LaTeX text).}} |
Revision as of 13:13, 14 February 2011
- FormulaText[Object]
- Returns the formula for the object as a LaTeX text.
- Note: By default, values are substituted for variables.
- 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).
- Example: If a = 2 and f(x) = a x2, then
- FormulaText[f, true] returns 2 x2 (as a LaTeX text) and
- FormulaText[f, false] returns a x2 (as a LaTeX text).