Difference between revisions of "FractionText Command"
From GeoGebra Manual
m (indentation and general polishing) |
|||
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|text}} | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|text}} | ||
− | ; FractionText( <Number> ): Converts the number to a fraction, | + | ; FractionText( <Number> ): Converts the number to a fraction, and displays it as a LaTeX text in the [[File:Menu view graphics.svg|link=|16px]] [[Graphics View]]. |
− | : {{Example| 1=If ''a: y = 1.5 x + 2'' is a line, then <code>FractionText(Slope(a))</code> | + | : {{Example| 1=If ''a: y = 1.5 x + 2'' is a line, then <code>FractionText(Slope(a))</code> creates the LaTeX text <math>\frac{3}{2}</math>.}} |
; FractionText( <Point> ) | ; FractionText( <Point> ) | ||
− | : | + | : Converts the coordinates of the point in fraction form, and displays them as a LaTeX text in the [[File:Menu view graphics.svg|link=|16px]] [[Graphics View]]. |
− | : {{Example| 1=If ''A=(1.33,0.8)'' is a point, then <code>FractionText(A)</code> | + | : {{Example| 1=If ''A=(1.33,0.8)'' is a point, then <code>FractionText(A)</code> creates the LaTeX text ''<math> \left( \frac{133}{100} ,\frac{4}{5} \right) </math>''.}} |
− | ; FractionText( <Number>, <Boolean>): Converts the number to a fraction, | + | ; FractionText( <Number>, <Boolean>): Converts the number to a fraction, and displays it as a LaTeX text in the [[File:Menu view graphics.svg|link=|16px]] [[Graphics View]]. |
− | The boolean sets the position of a possible negative sign of the fraction. If ''true'', the minus sign will be displayed in the numerator, if ''false'' the minus sign will be displayed in front of the fraction. | + | :The boolean sets the position of a possible negative sign of the fraction. If ''true'', the minus sign will be displayed in the numerator, if ''false'' the minus sign will be displayed in front of the fraction. |
:{{examples|1=<div> If ''n = -0.8 '' is a number, then | :{{examples|1=<div> If ''n = -0.8 '' is a number, then | ||
− | :*<code><nowiki>FractionText(n, true)</nowiki></code> | + | :*<code><nowiki>FractionText(n, true)</nowiki></code> creates the LaTeX text <math>\frac{- 4}{5}</math>. |
− | :*<code><nowiki>FractionText(n, false)</nowiki></code> | + | :*<code><nowiki>FractionText(n, false)</nowiki></code> creates the LaTeX text <math>-\frac{4}{5}</math>.</div>}} |
{{Note|1= See also [[SurdText Command|SurdText]] command.}} | {{Note|1= See also [[SurdText Command|SurdText]] command.}} |
Revision as of 11:43, 29 January 2023
- FractionText( <Number> )
- Converts the number to a fraction, and displays it as a LaTeX text in the Graphics View.
- Example: If a: y = 1.5 x + 2 is a line, then
FractionText(Slope(a))
creates the LaTeX text \frac{3}{2}.
- FractionText( <Point> )
- Converts the coordinates of the point in fraction form, and displays them as a LaTeX text in the Graphics View.
- Example: If A=(1.33,0.8) is a point, then
FractionText(A)
creates the LaTeX text \left( \frac{133}{100} ,\frac{4}{5} \right) .
- FractionText( <Number>, <Boolean>)
- Converts the number to a fraction, and displays it as a LaTeX text in the Graphics View.
- The boolean sets the position of a possible negative sign of the fraction. If true, the minus sign will be displayed in the numerator, if false the minus sign will be displayed in front of the fraction.
- Examples:If n = -0.8 is a number, then
FractionText(n, true)
creates the LaTeX text \frac{- 4}{5}.FractionText(n, false)
creates the LaTeX text -\frac{4}{5}.
Note: See also SurdText command.