Don-Chris / Plot2LaTeX

Fork of Plot2LaTex.m by Jan de Jong
GNU Affero General Public License v3.0
4 stars 1 forks source link

Plot2Latex not working with Matlab2023a #1

Closed Krib89 closed 1 year ago

Krib89 commented 1 year ago

Hi Chris,

Plot2Latex is not working properly for me with Matlab 2023a. When the function comes to "Restoring text in .svg file." The warning "Plot2LaTeX.m: No text elements found and updated. Please check if no text is used or if the Renderer is "painters"." pops up. Using Plot2Latex with Matlab 2020b and the same code, which I used in the 2023 version, works perfectly fine for me. I attached the command window outputs for you. Matlab2023a Matlab2020b

Do you know what the problem is?

Thanky you very much and best regards!

Don-Chris commented 1 year ago

I had the same problem with some figures in Matlab 2016b and it worked in Matlab 2020b. Unfortunately, I haven't found a solution. The underlying problem is that the exported svg file doesn't have the text as -elements, and that's why the program can't modify it. It seems like a bug in the svg-exporter. It should be fixed when using the painters option but it doesn't always work as expected.

Don-Chris commented 1 year ago

I found the issue. If text elements in the figure are using non supported characters such as "\" the text can't be exported correctly. This bug is fixed In the new version. Thank you for reporting :)