# How not to extract text when using \includesvg?

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.

• What do you mean by "text"? Does the svg have a `<text>` element? Or a `<foreignObject>` with a text element? Or do you perhaps mean the svg file itself? svg files are made of text... – morbusg Nov 22 '14 at 16:38
• The `svg` package manual speaks about a text component, this is what I mean. I will update my question. – StrawberryFieldsForever Nov 22 '14 at 18:13
• I found: "Only PDFLaTeX supports importing a single page of a graphics file, so only PDF backend gets interleaved text/graphics". So maybe try with EPS? – morbusg Nov 22 '14 at 19:37
• Why the package svg extracts and the re-embeds the text really baffles me. This "feature" means that the text almost never works right. I'd love to know a solution to this. – Heisenberg Sep 29 '15 at 19:45

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.
• @TeXnician 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 formulas 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 – NicolaF_ Oct 24 '18 at 8:36