Export figure to eps or pdf: latex font is no longer embedded

26 次查看(过去 30 天)
Sometimes it is useful to edit text-elements in former Matlab figures with a graphic design software; for this purpose, I am used to the following workflow:
Take a matlab figure *.fig à export the figure as *.pdf or *.eps file à import the file to a graphic design software (adobe acrobat, corel designer etc) à modify the text (labels, legend, etc.) as desired;
This worked well, independently of the chosen font or interpreter. Lately however, the following problem occurs:
When the interpreter is set to latex, the text is no longer embedded as text element of a certain font in the exported *.pdf or *.eps file. Each letter appears just as ordinary (vector graphics) curve.
The problem occurs for Matlab versions 2017a and 2017b on different machines. The problem did not occur before October 2020. The problem does not occur with version 2015b.
Did anybody experience the same problem and can provide a solution (or at least an explanation)?
Does this problem show up in newer versions of MATLAB as well?
Thanks in advance!
  1 个评论
Mehrdad Jafari
Mehrdad Jafari 2022-11-16
编辑:Mehrdad Jafari 2022-11-16
I assume you may have resolved this issue, but I also encounter the same problem of not having the fonts embedded in the .eps or .pdf exports.
However, you can still export to a vector file (.svg) with the embeded fonts.
I think that anoder advantage of exporting to a .svg file is that, if you have access to graphic design softwares, such as Adobe Illustrator, you can then export a copy of the figure in pdf, whose edges match the edges of the figure (whilst making other desirable adjustusments such as removing the background colour). This is so that when you're using the figure, it can align nicely in the document, without having to crop the pdf file.

请先登录,再进行评论。

回答(1 个)

Hitesh
Hitesh 2024-9-17,12:23
Hi Florian Klinger,
I too have encountered the similar error. The workaround that worked for me was ensuring that the EPS file header information was correctly placed at the top of the file. Without this, the text was treated as regular text. Ensure to place the header at the top, which looks similar as shown in the following points for the EPS file.
  • Starting Line: %!PS-Adobe-3.0 EPSF-3.0
  • Ending Line: %%BoundingBox:  -177    98   773   744 and %%EndComments
Now the text will be treated as latex text, you will get the special characters on the top of the figure.
Hope this helps to resolve the issue.

类别

Help CenterFile Exchange 中查找有关 Printing and Saving 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by