I am playing with MaTeX to include an image. It works but it also displays the path of the image in the output which messes things out.
Here is a MWE (on windows with 11.3)
<< MaTeX`
SetOptions[MaTeX, "Preamble" -> {"\\usepackage{graphicx}"}];
MaTeX["This is a test \\includegraphics[width=.5\\textwidth]{C:/Program Files/Wolfram Research/Mathematica/11.3/Documentation/English/System/ExampleData/pearls.png} with data"]
which gives
I'd like the path of the images not to show in the text output.
Is there a way to do that?
MaTeX Version 1.7.4, Mathematica 11.3 on windows 10.
Could someone on windows 10 please try to see if they can reproduce this?
Updated
I also tried using \text{}
<<MaTeX`
MaTeX["\\text{Test \\includegraphics[width=.5\\textwidth]{C:/Program Files/Wolfram Research/Mathematica/11.3/Documentation/English/System/ExampleData/pearls.png} image}","Preamble"->{"\\usepackage{graphicx}"}]
\text{}
? Does it work then? $\endgroup$ClearMaTeXCache[]
before theMaTeX
call and add the option"TeXFileFunction" -> Print
. This will show you the TeX source that MaTeX generates. As a first simplification, replace the\MaTeX{ ... }
with simply$ ... $
. Then you can remove most of the preamble (which just serves to define\MaTeX
). $\endgroup$