I have a little problem, and hope, with your help, I'll be able to solve it.
As you got from the title, I have some trouble with TeX in Mathematica. Imagine, I want to output a nice DisplayFormula, such that it would represent a function, which evaluates piecewise. In TeX it would look like this (Let's take a uniform distribution for example)
$$\left\{ \begin{aligned} &0,& t\leq x_{\min} \\ &\frac{t-x_{\min}}{x_{\max}-x_{\min}},&x_{\min}<t\leq x_{\max} \\ &1,& t>x_{\max} \end{aligned} \right.$$
So what's the best way to create that exact output in Mathematica?
I've tried TraditionalForm[CDF[UniformDistribution[{x_ {min}, x_ {max}}], t]]
, but that gives me almost the same output, but without the zero part.
I do know, it's not significant whether to write or not the 0 part in the piecewise function.
So it works well for CDF, but with PDF there's an extraneous part is shown at the end
TraditionalForm[CDF[UniformDistribution[{x_ {min}, x_ {max}}], t]]
So in the CDF Mathematica's decided not to output the 0 part, but in the PDF it's shown.
I've also tried to use
TraditionalForm[
Piecewise[
{{0, t <= Subscript[x, min]},
{(t - Subscript[x, min])/(Subscript[x, max] - Subscript[x, min]),
Subscript[x, min] < t <= Subscript[x, max]},
{1, t > Subscript[x, max]}},
t
]
]
But that variant also reveals the part that I haven't specified.
The last thing I've tried to use is ToExpression["TeX source",TeXForm]
, but this one can't parse the simple TeX source with aligned environment (or I haven't found a way to make it work).