1

I am trying to include a nice vector graphic in my LaTeX document. Obviously, I am doing this, because I don't want the quality of my figures to decrease when zooming in. Is there an easy way to do this?

Here is what I was thinking: I have created a figure in Inkscape. I have saved the figure as .svg. I have also saved the figure as .pdf_tex (this file is auto-generated by inkscape when saving the figure as .pdf).

Now I am trying to include the .pdf_tex figure in my document:

\begin{figure}[h]
    \centering
    \def\svgwidth{\linewidth}
    \input{figures/network.pdf_tex}
    \caption{Graphical Representation of Scenario.}
    \label{Scenario}
\end{figure}

I am using a customized template. In the options I have included the following line, since I get the error message Package pdftex.def Error: File `network.pdf' not found. ...cs[width=\unitlength,page=1]{network.pdf}}

\graphicspath{{./figures}}

Right, I forgot to mention: the same error message still occurs. Why does this happen?

closed as off-topic by user36296, TeXnician, Stefan Pinnow, dexteritas, Milo Aug 3 '18 at 11:55

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Welcome to TeX SX! I guess the extension .pdf_tex is not known to graphicx, hence it is looking for a simple .pdf graphic file, which it doesn't find. I suggest you change the extension given by svg to .pdf. – Bernard Jul 8 '18 at 10:38
  • Thx for your reply, Bernard! - But I'm afraid this is not solving the issue. I have included the figure just the way it is described here: mirrors.ibiblio.org/CTAN/info/svg-inkscape/InkscapePDFLaTeX.pdf .. I have changed {graphicspath{{figures/}} , and of course I tried out your solution by simply renaming the ending to .pdf – user503842 Jul 8 '18 at 10:52
  • 1
    Maybe you should give a try to the svg package? – Bernard Jul 8 '18 at 11:02
  • Open network.pdf_tex with an editor, and in lines 5 -- 6 you will read: " %% To include the image in your LaTeX document, write %% \input{<filename>.pdf_tex} " Your tex document needs at minimum to load a document class and packages color and graphicx. – djnavas Jul 8 '18 at 11:09
  • 4
    I'm voting to close this question as solved in comments – user36296 Aug 3 '18 at 10:13

Browse other questions tagged or ask your own question.