Why isn't the text on a figure selectable when using 'Latex' as interpreter?

6 Ansichten (letzte 30 Tage)
It is sought to use 'Latex' as interpreter in order to obtain scientific notation and text on figures generated in MATLAB and then insert them in a scientific document. However, the text is no longer selectable when using 'Latex' as interpreter on the generated svg-files, but it rather appears as an editable shape. The issue is that I would like to have the text exported as text within the svg-file in order to manually edit its font etc.
Why isn't the text on a figure selectable when using 'Latex' as interpreter?

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 16 Mär. 2021
When using 'Latex' as interpreter, the text is LaTeX-interpreted by default to account for scientific notation and symbols as within a LaTeX document. This text is not editable, as the font of mathematical operators and other symbols does not have a unique universal definition (different tools have different fonts accordingly).
As a workaround, consider using 'tex' as interpreter for the LaTeX figures to have the text exported as actual text that can be interpreted by a LaTeX editor (such as Texmaker). In this way, the text will appear as text on the generated svg-files. The following workflow can then be followed to obtain the same font for the text on the figures as the rest of the text, provided that the scientific document is written in LaTeX:
1.) use 'tex' as interpreter to create your figures in MATLAB so that the text can be imported as text when editing your figure in Inkscape,
2.) Inkscape gives you the option to export the pdf as pdf_tex by omitting the actual text on the figure.
3.) when you save your figure with the latter option through Inkscape, then you will obtain two files: a pdf and a pdf_tex-file. Then, what happens is that the generated pdf-file contains only the graphics and the pdf_tex-file contains the corresponding text as an additional tex-file that is placed in the right locations according to where your actual text is placed on the figure,
4.) in your LaTeX files of your publication you can then include the figure using \import command in your actual LaTeX files.
After performing these steps, the text on the figures will inherit the exact font and size as the rest of your LaTeX document, because it is being interpreted directly in your LaTeX document.

Weitere Antworten (0)

Tags

Noch keine Tags eingegeben.

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by