I have been researching today the possibility of creating interactive mathematics documents using Mathematica for use in the classroom. I want to be able to use LaTeX typesetting within my notebook for the aesthetics and have downloaded MaTeX.
I have the following code:
MaTeX[Text["f(x) = a_nx^n + Subscript[a, n-1] x^(n-1) + ... + a_1x+a_0"], FontSize -> 40]
that results in
Notice that the left hand side of the equation is typeset differently from the beginning of the right hand side and the same is true for the linear term on the right. I used the typesetting palette for the centerdots. Not as written in the code.
If I remove the Text[]
or change it to Print[]
or remove the quotes or remove Text[]
and quotes all return error messages.
How could I change it to have the entire expression typeset normally? One broader question would be how difficult would it be for Mathematica developers to design $\$math\$$ notation for interpreting as LaTeX? Seems like MathematicaSE quickly picked up on what I intended. If not $ then maybe some other pair of symbols.
expr="f(x)=a_n x^n+a_{n-1} x^(n-1)+ \\dots+a_1 x+a_0"; MaTeX[expr, FontSize -> 40]
and this gives what you want !Mathematica graphics I would not do it the way you are doing it below. $\endgroup$\text{f(x) = }a_nx^n\text{ + }a_{n-1}x^{n-1}\text{ +$\cdot \cdot \cdot $+ }a_1\text{x + }a_0
$\endgroup$