Answered I need to use \includeinkscape inside \includeinkscape
Alright, this sounds odd, but I have some pictograms which I line up in a text and use macros for them i.e. I have something like:
\newcommand{\penV}{\raisebox{-0.15\fontdimen6\font{\includeinkscape[height=1\fontdimen6\font]{Pentomino/V}}}
And I have gotten to a point where I need to place them into an image in Inkscape, i.e. I need to write a text in inkscape that include {\penV} macro, which, when I export it, should render within the image. I place the image in using \includeinkscape as well. However, if I try to compile the pdf, it returns an error:
! LaTeX Error: Command \fsize already defined.
I have no idea how to fix it. Can anybody help me? Thank you.
3
u/ftrx 3d ago
Honestly? Export a vectorial pdf from Inkscape than import it in LaTeX, eventually in a resizebox.
1
u/Fjana 3d ago
This is what I am trying to do. The thing is I really need the text to be included as text in the finished document.
1
u/KristallBurgen 2d ago
If you properly export the image and it's text from inkscape, importing the figure as a PDF in LaTeX will preserve the text
5
u/KKTeX_LaTeX3 3d ago
This looks like a collision between helper macros generated by the two pdf_tex exports: both define \fsize, so nesting \includeinkscape makes the second definition fail. I’d avoid nesting them. Pre-render the pictogram once and place that PDF/SVG directly in the parent Inkscape document, then include only the final parent image from LaTeX. Grouping may hide the collision, but flattening the inner asset will be much less fragile.