2

I'm writing a class, that should insert a logo (which i have available as .pdf and .svg) in the header. I thought it would be an elegant solution to just include the file directly in the class, without the need of packaging the class together with an image file.

I tried exporting the .svg to .tex with Inkscape, which works but it says "Please note that this file requires PSTricks extensions", and i just can't seem to find the right extension to make this work. Also the file with the pspicture is enormously long.

Is there a better approach on how to tackle this issue? Are there any conventions for my issue? Does anyone know the PSTricks-extensions that are required?

Thanks in advance.

Tim Hilt
  • 848
  • 6
  • 18
  • 1
    you are aware that TIKZ can draw svg instructions? At my workplace we have a font with logos that cannot be used by LaTeX. I converted that font into SVG and just draw the logos using the SVG data. – daleif Feb 20 '19 at 11:31
  • Wow, no i wasn't aware of this option! My graphic is in xml-Format. I read about draw svg {...}; in the TikZ-manual. Am i supposed to just include the xml there? How did you do it? – Tim Hilt Feb 20 '19 at 11:37
  • 1
    It is the drawing information from the XML file that needs to be copied to the {...} part (aka M2046 1322l-1324 -1321h-722l2046...), and you probably also want the \usetikzlibrary{svg.path} – daleif Feb 20 '19 at 12:00
  • If you look through the latest "FUN" you will see some examples of embedding vector art e.g. https://tex.stackexchange.com/a/474868/170109 and don't forget HMV (davids vector art :-) https://tex.stackexchange.com/a/473314/170109 –  Feb 20 '19 at 13:14
  • 1
    There is also https://tex.stackexchange.com/questions/208819/embedding-images-in-tex-file-as-base64-strings that uses \filecontents together with base64 encoding. – Marijn Feb 20 '19 at 13:39

1 Answers1

1

I chose to convert the image to another format, namely TikZ-code (following this question). There is an Inkscape-extension called svg2tikz, which did the trick for me.

Surprisingly it didn't work correctly for the .svg-file, but exporting the .pdf-File to TikZ finally worked.

Tim Hilt
  • 848
  • 6
  • 18