I followed this answer to use a svg image in my LaTeX document, but LaTeX changes the font I used when I created the image. How can I keep the "original" I set in Inkscape?
2 Answers
\includesvg apparently treats text in your figure independently, so that it is rendered by LATEX by default.
Probably the best way to solve this is to change the option inkscapelatex to false. Quote from the documentation:
If option
inkscapelatex=trueis set, the output is split into a seperate PDF/EPS/PS file (see optioninkscapeformat) and a corresponding LATEX file. This is the default setting. Settinginkscapelatex=falsewill result in a single PDF/EPS/PS file, where any contained text won’t be rendered by LATEX.
Example: \includesvg[inkscapelatex=false,<other params>]{svgfile}.
- 325
If you don't want to use the same font as the main document, you should just export the SVG file directly as a PDF (without the --export-latex option) and \includegraphics the PDF file. (The linked answer in your original question is specifically about how to export the graphics part into a PDF file and the text part separately into a TeX file that can be treated using LaTeX to produce a consistent font choice.)
(Above answer copied from comment)
- 24,733
- 8
- 74
- 106
--export-latexI get a warning:(inkscape:9326): Gtk-WARNING **: 13:32:30.778: Impossibile trovare il motore del tema in module_path: «hcengine»,, which in English means something like "couldn't find the theme engine in module_path «hcengine»,". Is it a problem? – Ntakwetet Sep 05 '19 at 11:34