When using the includesvg
macro that is provided by the svg
package to include an svg
image, all "text components" of the image (see the manual) are separated into a pdf_tex
file (which is basically a tex
file), while the rest of the image is converted into a pdf
file.
Then the includesvg
macro somehow merges the pdf
file and the pdf_tex
file at the place where the svg
is included in the document, but the result of this isn't always that great, since when the text components are extracted from the svg
files, the different font sizes of the different text components are lost and they will all get the same font size in the document they are included in.
So my question is: Is there any way when using the includesvg
macro not to extract the text components into a pdf_tex
file, but put it in the pdf
file that is generated, in order to preserve the original appearance of the text?
I do realize that it is possible to manually open the svg file in Inkscape and save it as a pdf without using the PDF+LaTeX option and then include the pdf using the graphicx
package, but I was looking for a way in which includesvg could do this work for you.
Best Answer
Use the
inkscapelatex=false
option.Behind the scenes, includesvg uses Inkscape's
--export-latex
option, which causes inkscape to generate a PDF without texts, and a LaTex snippet containing all texts, to be included in the document. This allows to put formulae in the SVG, and have them rendered by LaTex on top of the graphics.inkscapelatex=false
disables this, causing the texts (and fonts, if i remember correctly) to be included int the PDF export.