Difference between revisions of "FormulaText Command"

From GeoGebra Manual
Jump to: navigation, search
(added example related to CAS View)
(command syntax: changed [ ] into ( ))
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.2}}</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|text}}
{{command|text}}
+
; FormulaText( <Object> )
; FormulaText[ <Object> ]
 
 
: Returns the formula for the object as a LaTeX text.
 
: Returns the formula for the object as a LaTeX text.
: {{Examples|1=<div>
+
: {{Example|1=<div>Let ''a = 2'' and ''f(x) = a x<sup>2</sup>''.  <code>FormulaText(f)</code> returns ''2 x<sup>2</sup>'' (as a LaTeX text).</div>}}
:*Let ''a = 2'' and ''f(x) = a x<sup>2</sup>''.  <code>FormulaText[f]</code> returns ''2 x<sup>2</sup>'' (as a LaTeX text).
 
:*<code>LaTeX[$1]</code> returns the contents of the first row of the [[CAS View]] as a LaTeX text.</div>}}
 
 
: {{Note| By default, values are substituted for variables.}}
 
: {{Note| By default, values are substituted for variables.}}
 
+
; FormulaText( <Object>, <Boolean for Substitution of Variables> )
; FormulaText[ <Object>, <Boolean for Substitution of Variables> ]
 
 
: 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'').
 
: 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=<div>Let ''a = 2'' and ''f(x) = a x<sup>2</sup>''. </div><div> <code>FormulaText[f, true]</code> returns ''2 x<sup>2</sup>'' (as a LaTeX text).</div><div> <code>FormulaText[f, false]</code> returns ''a x<sup>2</sup>'' (as a LaTeX text).</div>}}
+
: {{Example|1=<div>Let ''a = 2'' and ''f(x) = a x<sup>2</sup>''. </div><div> <code>FormulaText(f, true)</code> returns ''2 x<sup>2</sup>'' (as a LaTeX text).</div><div> <code>FormulaText(f, false)</code> returns ''a x<sup>2</sup>'' (as a LaTeX text).</div>}}
 
+
; FormulaText( <Object>, <Boolean for Substitution of Variables>, <Boolean Show Name> )
; FormulaText[ <Object>, <Boolean for Substitution of Variables>, <Boolean Show Name> ]
 
 
:Returns the formula for the object as LaTeX text. The first Boolean variable determines if values are substituted for variables (''true'') or if variable names are shown in the text (''false''), the second Boolean variable determines if the object name is shown in the text (''true'') or not (''false'').
 
:Returns the formula for the object as LaTeX text. The first Boolean variable determines if values are substituted for variables (''true'') or if variable names are shown in the text (''false''), the second Boolean variable determines if the object name is shown in the text (''true'') or not (''false'').
: {{Example|1=<div>Let ''a = 2'' and ''f(x) = a x<sup>2</sup>''.</div><div> <code>FormulaText[f, true, true]</code> returns ''f(x) = 2 x<sup>2</sup>'' (as a LaTeX text). </div><div> <code>FormulaText[f, false, false]</code> returns ''a x<sup>2</sup>'' (as a LaTeX text).</div>}}
+
: {{Example|1=<div>Let ''a = 2'' and ''f(x) = a x<sup>2</sup>''.</div><div> <code>FormulaText(f, true, true)</code> returns ''f(x) = 2 x<sup>2</sup>'' (as a LaTeX text). </div><div> <code>FormulaText(f, false, false)</code> returns ''a x<sup>2</sup>'' (as a LaTeX text).</div>}}

Latest revision as of 12:02, 3 October 2017


FormulaText( <Object> )
Returns the formula for the object as a LaTeX text.
Example:
Let a = 2 and f(x) = a x2. FormulaText(f) returns 2 x2 (as a LaTeX text).
Note: By default, values are substituted for variables.
FormulaText( <Object>, <Boolean for Substitution of Variables> )
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:
Let a = 2 and f(x) = a x2.
FormulaText(f, true) returns 2 x2 (as a LaTeX text).
FormulaText(f, false) returns a x2 (as a LaTeX text).
FormulaText( <Object>, <Boolean for Substitution of Variables>, <Boolean Show Name> )
Returns the formula for the object as LaTeX text. The first Boolean variable determines if values are substituted for variables (true) or if variable names are shown in the text (false), the second Boolean variable determines if the object name is shown in the text (true) or not (false).
Example:
Let a = 2 and f(x) = a x2.
FormulaText(f, true, true) returns f(x) = 2 x2 (as a LaTeX text).
FormulaText(f, false, false) returns a x2 (as a LaTeX text).
© 2024 International GeoGebra Institute