Dear xAct and TexAct users,
> On 2018-11-12 23:25, user657 wrote:
> Dear Thomas,
> Thanks for your example again. I have a question about the notebook
> you shared. I get an error when I
> implement TexPrintAlignedEquations@longequation. I get the following
> messages:
>
> DeleteFile: Directory or file TexActWidthTest.log not found.
> Tex Error: could not delete temporary files
> Tex Error:
> Throw: Uncaught Throw[Tex Error] returned to top level.
>
> Hold[Throw[Tex Error]]
>
> I'm not sure why I get these errors. Could you point out what I'd need
> to do to rectify it?
>
> Thank you for your help.
I recently faced the same problem as described in the above message with
Mathematica11.0.1.0 under Ubuntu 18.04.3. It quickly appeared that, in my
case, it was not due to a failure of TexAct in identifying the correct pdflatex
executable. Instead, it was related to a version
incompatibility between the libz library (libz.so.1) used by default in
Mathematica and the libpng system library (here libpng16.so.16), preventing
pdflatex to work properly. The simplest solution I thought of, i.e. upgrading
Mathematica to version 12, having been helpless, I had to force Mathematica to
resort to the standard system libraries whenever calling pdflatex. This can be
achieved by changing locally the environment variable LD_LIBRARY_PATH.
More precisely, here are the modifications I suggest:
In TexView:
Module[{TexOut, errorpos, templdlib = Environment["LD_LIBRARY_PATH"]},
[...]
TexOut = ReadList[
StringJoin["!" <> $LatexExecutable <> " ", file, ".tex"], String];
If[Length@TexOut == 0, SetEnvironment["LD_LIBRARY_PATH" -> ""];
TexOut = ReadList[
StringJoin["!" <> $LatexExecutable <> " ", file, ".tex"], String];
SetEnvironment["LD_LIBRARY_PATH" -> templdlib]];
If[Length@TexOut == 0,
"Could not find Latex. Check if $LatexExecutable contains the correct name and path."];
[...]
In TexWidths:
Module[{TexOut, errorpos, templdlib = Environment["LD_LIBRARY_PATH"]},
[...]
TexOut = ReadList["!" <> $LatexExecutable <> " TexActWidthTest.tex",
String];
If[Length@TexOut == 0, SetEnvironment["LD_LIBRARY_PATH" -> ""];
TexOut = ReadList["!" <> $LatexExecutable <> " TexActWidthTest.tex",
String];
SetEnvironment[
"LD_LIBRARY_PATH" ->
templdlib]];
If[
Length@TexOut ==
0, "Could not find Latex. Check if $LatexExecutable contains the correct name and path."];
[...]
I did not check whether similar corrections had to be applied in other places,
but at least TexView becomes fully operational after the previous patches.
Hoping that those considerations may be useful for some of you,
Yours,
Guillaume