0

I am using Overleaf with LuaLaTex as my compiler. I have an svg which renders properly in a browser and looks like this:

this is an example of working svg

However, when using the command \includesvg[width=\colwidth]{image.svg}, the svg does not render properly and produces the following:

this is an example of it not rendering properly

Is this something to do with the compiler perhaps? With overleaf? I would prefer not to convert the svg to a png or pdf in order to maintain the best possible resolution.

  • 1
    Looks like a font issue: LaTeX thinks the font for (sans-serif) black-circled numbers ➊ ➋ ➌ ➍ ➎ ➏ ➐ ➑ ➒ ➓ is missing. Could you provide that svg file or its simplified version, perhaps through an overleaf sharing link? – muzimuzhi Z Mar 19 '24 at 04:07
  • @muzimuzhiZ https://www.overleaf.com/read/nxypyvtfwgsy#57bccb the file is in figures/poster-cluster-matrix.svg – codeing_monkey Mar 19 '24 at 04:48
  • Why do you think printing or exporting the svg as pdf and including via package graphicx results in low resolution? – MS-SPO Mar 19 '24 at 05:58
  • 1
    Bad news. From content of that svg, the black-circled numbers are consist of characters with Private Use Area codepoint from Wingdings font and filled white circle. For example <path d="..." fill="#FFFFFF" fill-rule="evenodd"/><text font-family="Wingdings,Wingdings_MSFontService,sans-serif" font-weight="400" font-size="138" transform="matrix(1 0 0 1 1334.64 814)"></text> uses character U+F08D. Problem solved if it's possible to convert it to vector graphics in PDF. For this specific simple svg, maybe redraw it with Inkscape or even tikz? – muzimuzhi Z Mar 19 '24 at 06:30
  • 1
    If you don't want LaTeX to process the text within the SVG file, run the Inkscape export without additional "LaTeX magic" via \includesvg[width=\colwidth,inkscapelatex=false]{image.svg} – mrpiggi Mar 19 '24 at 07:24
  • Or if you want some text to be processed with LaTeX but not the circled numbers, convert the latter to paths in the svg. – schtandard Mar 19 '24 at 10:29
  • @MS-SPO I don't know, but even if I wanted to, I couldn't. The svg I am dealing with was created in MS PPT and evidently neither Wingdings nor "tables" are not recognized by any svg to pdf conversion tool so I just get garbage out each time. – codeing_monkey Mar 19 '24 at 14:17
  • Thank you. So IF it renders ok in a browser, AND you have a pdf printer installed ... just print it to pdf. Next check \includegraphics from package graphicx. // If that fails, either revert to MS PPT if possible, or redo it in Tikz (it's not too difficult). // IF you can edit the svg beforehand to remove all those circled digits: remove them, save/print/export as pdf, have a look at package tikz-imagelabels (example: https://tex.stackexchange.com/a/579177/245790) – MS-SPO Mar 19 '24 at 14:47
  • 1
    Duh, oops forgot that I could print as pdf in Chrome. That worked (still have to jump through some hoops). Thank you! @MS-SPO – codeing_monkey Mar 19 '24 at 15:30

0 Answers0