making text look nice

Introduction
Following applet shows how you can make texts with equations look nice. [br][list][*]You don't want terms with coefficient 0 in it.[/*][*]You don't want double signs.[/*][*]You want a proper solution of an equation as an integer if so and if not you don't want a fraction with negative signs for both nominator and denominator.[/*][/list]
How do you do this?
[list][*][b]Equation of a function[/b]: Create:[br]- a slider [b]a[/b] from -4 to 4 with increment 1.[br]- a slider [b]b[/b] from -4 to 4 with increment 1.[br]- a slider [b]c[/b] from -4 to 4 with increment 1.[br]- a function [code]f(x) = a x² + b x + c[/code][br]- a function [code]g(x) = Polynomial(a x² + b x + c)[/code][br]- Show the equations of f and g in a dynamic text and experiment with the sliders.[br]You'll notice that the command [b]Polynomial(< Funcion>)[/b] avoids 0 and 1 as coefficients.[br][br][/*][*][b]Solving equations[/b]: Create:[br]- a slider [b]d[/b] from -5 to 5 with increment 2.[br]- a slider [b]e[/b] from -5 to 5 with increment 2.[br]- a slider [b]h[/b] from -4 to 4 with increment 1.[br]How to show the solving of the equation [code]dx + e = h[/code] nicely?[br]Left you see the Textfield in a 'normal' way, which doesn't always look nice.[br]Right we use some tricks to avoid double signs and to show a nice solution.[/*][/list]
[list][*][b]first row[/b]: [br]- Create a function [code]ff(x) = Polynomial ( d x + e).[br][/code]- use ff in a dynamic text for the left side of the equation to prevent double signs.[/*][*][b]second row[/b]:[br]- Create a function f[code]ff(x) = Polynomial (dx)[/code] to avoid 1 as a coefficient.[br]- Define a text [code]signe = If(e < 0, "+", "")[/code] to use in the right side of the equation and add [code]-e[/code].[br]If e = -3: signe will show a + sign, -e hasn't got a sign on its own, so the right side will show: -4 + 3.[br]Change slider e to 3: signe will be blank and -e will be -3, so the right side will show: - 4 - 3.[/*][*][b]third row[/b]:[br]- Create a dynamic text with the command [code]FractionText((h - e) / d)[/code].[br]This command will show the solution in its most simple form: If the nominator is a multiple of the denominator the solution will be shown as an integer, if not as a fraction. If both nominator and denominator are negative, both signs will be ommitted.[/*][/list]

Information: making text look nice