LaTeX code display

Previous

MathGraph32 allows the user to display mathematics formulas written in LaTeX code in text displays et in LaTeX displays.


To display LaTeX code in a text display (even in a text display with several lines), get the LaTeX code surrounded by two characters $.


To display LaTeX code in a LaTeX display, simply write the LaTeX code.


In both cases, the result is visible and blinking when you type the LaTeX display in the dialog box.


Buttons at the top of the edit dialog box allow the user to get the most usual LaTeX codes. You just have to complete the code inside the brackets. Pressing the TAB key will send the caret inside the next pair of brackets.


MathGraph32 uses three specific LaTeX codes :



To be noticed : the name of these specific LaTeX functions begin with a upper case character.


\Val : To dynamically display a value in a LaTeX formula.


This LaTeX function allows you to dynamically display the value of a calculus (real or complex) or a variable in a MaTeX formula.


If you want to dynamically display another numerical object (a measure for example), create first a calculus containing this value.


Let us assume that num is a calculus or a variable already defined and you wish to display a fraction with num as numerator and 2 as denominator.


Click on icon to create a display of a LaTeX formula.


Click on button that inserts code LaTeX \frac{ }{ }.

Set the caret position inside the last pair of brackets and type 2, the set the caret position inside the first pair of brackets and press button Dynamic value insertion.

Click on num and validate.You get the following LaTeX code :  \frac{\Val{num} {2}} that will display the display of num value as numerator for the fraction with two digits.


You can also get another number of digits or get a + sign beofre the value when it is positive.

For example, code will display a fraction with num as numerator (with three digits) and a + sign at the beginning if the value is positive.


A more sophisticated use is available :


\FracRed : To display a rational fraction in the most simple way.


The syntax is as follows :


\FracRed {num, den} ou \FracRed {num, den, code}


Both will display an irreducible fraction equaling fraction of numerator num and denominator den.

If the fraction equals an integer number, this integer number will be displayed (not a fraction).

If num or den are not the names of calculuses, or are nor of integer value, or if den value is 0, Frac Error will be displayed.


If code equals +0, the fraction will be preceded with a + sign when the result is positive and will disappear when the result is 0.

If code equals 0, the fraction will disappear when the result is zero.

If code equals +1, the fraction the fraction will be preceded by a + sign when the result is positive and a - sign when it is negative.

If code equals 1, the fraction will disappear when the result equals 1 and will be replaced by a - sign when the result is -1.


\If : to create a conditional display of LaTeX code inside a LaTeX display.


The syntax is : \If {test} {code1} {code2} where test is a real calculus or a variable already created.

If test value is 1 then LaTeX code code1 is dispalyed et otherwise  LaTeX code code2 is displayed.


code1 et code2 may themselves use the command \If and this with a some interweaving level.


\For : to create the display of the formula of a calculation or function (complex or real).


The syntax is : \For {calc} where calc is the name of a calculation or a function.


\ForSimp : Pour afficher dynamiquement la formule simplifiée d'un calcul ou d'une fonction (réel ou complexe).


La syntaxe est la suivante : \ForSimp {calc} où calc est un calcul ou une fonction précédemment défini.

The calls to variables or calculations are replaced by their numerical value and the  formula displayed is simplfied as much as possible (for example the null terms of a sum are dismissed and 1*x is replaced with x).


\Calc : To display the inline formula of a calculation or a function.


The syntax is : \Calc {calc} where calc is the name of a calculation or a function.


\CalcSimp : To display the simplified inline formula of a calculation or a function.


The syntax is : \CalcSimp {calc} where calc is the name of a calculation or a function.

The calls to variables or calculations are replaced by their numerical value and the  formula displayed is simplfied as much as possible (for example the null terms of a sum are dismissed and 1*x is replaced with x).



Created with the Personal Edition of HelpNDoc: Free help authoring environment