Difference between revisions of "FractionText Command"

From GeoGebra Manual
Jump to: navigation, search
 
(16 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.0}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|text}}
{{command|text}}
+
; FractionText( <Number> ): Creates and shows in the [[File:Menu view graphics.svg|link=|16px]] [[Graphics View]] a LaTeX text containing the fraction form of the given number.
; FractionText[ <Number> ]: Converts the number to a fraction, which is displayed as a (LaTeX) text object in the [[Graphics View]].
+
: {{Example| 1=Given line ''a: y = 1.5 x + 2'', <code>FractionText(Slope(a))</code> creates the LaTeX text <math>\frac{3}{2}</math>.}}
: {{Example| 1=If ''a: y = 1.5 x + 2'' is a line, then <code>FractionText[Slope[a]]</code> gives you the fraction ''3/2'' as a text.}}
+
; FractionText( <Point> )
 
+
:  Creates and shows in the [[File:Menu view graphics.svg|link=|16px]] [[Graphics View]] a LaTeX text containing the fraction form of the coordinates of the given point.
{{betamanual|version=4.2|
+
: {{Example| 1=Given point ''A=(1.33,0.8)'', <code>FractionText(A)</code> creates the LaTeX text ''<math> \left( \frac{133}{100} ,\frac{4}{5} \right) </math>''.}}
1=; FractionText[ <Point> ]
+
; FractionText( <Number>, <Boolean Single fraction>): Creates and shows in the [[File:Menu view graphics.svg|link=|16px]] [[Graphics View]] a LaTeX text containing the fraction form of the given number.
: Displays both coordinates of the Point as fractions 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|1=<div> Given the number ''n = -0.8 '', then
 +
:*<code><nowiki>FractionText(n, true)</nowiki></code> creates the LaTeX text <math>\frac{- 4}{5}</math>.
 +
:*<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.}}

Latest revision as of 19:12, 1 February 2023


FractionText( <Number> )
Creates and shows in the Menu view graphics.svg Graphics View a LaTeX text containing the fraction form of the given number.
Example: Given line a: y = 1.5 x + 2, FractionText(Slope(a)) creates the LaTeX text \frac{3}{2}.
FractionText( <Point> )
Creates and shows in the Menu view graphics.svg Graphics View a LaTeX text containing the fraction form of the coordinates of the given point.
Example: Given point A=(1.33,0.8), FractionText(A) creates the LaTeX text \left( \frac{133}{100} ,\frac{4}{5} \right) .
FractionText( <Number>, <Boolean Single fraction>)
Creates and shows in the Menu view graphics.svg Graphics View a LaTeX text containing the fraction form of the given number.
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:
Given the number n = -0.8 , 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.
© 2024 International GeoGebra Institute