$LatexExecutable = "/opt/local/bin/pdflatex"
Typesetting OK.
Opening file: TexActView.pdf
and then I got a neatly formatted pdf of the original equation.
I would suggest that if TexView receives directly something which is not a string then you automatically call TexPrint and AddEquationMarks on that input. Then TexView[tensor_expression] would show a formatted pdf, which would be so very useful.
Thanks again Thomas.
Cheers,
Jose.
Thomas, this is so very nice! It is great that you know simultaneously so much Mathematica and LaTeX.
The TexView command is amazing. Let me mention here two things:
The first one is that, in my unix environment, your code didn't work directly for me. But it was very simple to fix: I went to the command line and wrote
jose$ which pdflatex/opt/local/bin/pdflatex
so I copied in Mathematica, with TexAct already loaded:
$LatexExecutable = "/opt/local/bin/pdflatex"
Then everything worked fine. I know I could configure some paths somewhere, but this is simpler.
The second thing is that in order to use TexView one needs to go through three steps (correct me if I'm wrong):
...Out[]= <big equation>
In[]:= TexPrint[%]Out[]= <a latex string>
In[]:= AddEquationMarks[%, "equation*"]Out[]= <another latex string>
In[]:= TexView[%]Typesetting OK.
Opening file: TexActView.pdfand then I got a neatly formatted pdf of the original equation.
I would suggest that if TexView receives directly something which is not a string then you automatically call TexPrint and AddEquationMarks on that input. Then TexView[tensor_expression] would show a formatted pdf, which would be so very useful.
Typesetting OK.
Opening file: TexActView.pdf