Export figure to eps or pdf: latex font is no longer embedded
조회 수: 18 (최근 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
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
2024년 9월 17일
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Printing and Saving에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!