Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error while using \includesvg to insert a svg file #6

Closed
LeeJZh opened this issue Nov 26, 2018 · 7 comments
Closed

error while using \includesvg to insert a svg file #6

LeeJZh opened this issue Nov 26, 2018 · 7 comments

Comments

@LeeJZh
Copy link

LeeJZh commented Nov 26, 2018

latex code was

\begin{figure}
\includesvg[width=\linewidth, pretex=\relscale{0.6}]{C:/Users/LiJZh/Desktop/app_data/FI}
\end{figure}

getting error

Package svg Error: File FI_svg-tex.pdf' is missing. ...{0.6}]{C:/Users/LiJZh/Desktop/app_data/FI} Package svg Error: File FI_svg-tex.pdf_tex' is missing. ...{0.6}]{C:/Users/LiJZh/Desktop/app_data/FI}

@mrpiggi
Copy link
Owner

mrpiggi commented Nov 26, 2018

I can not replicate your issue. This works as expected:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{svg}
\usepackage{relsize}
\begin{document}

\begin{figure}
\centering
\includesvg[width=.5\textwidth, pretex=\relscale{0.6}]
{C:/texlive/2018/texmf-dist/doc/latex/svg/svg-example}
\end{figure}
\end{document}

Did you run pdflatex with --shell-escape option? Is Inkscape installed and registered to your PATH variable?

@LeeJZh
Copy link
Author

LeeJZh commented Nov 26, 2018

I made a mistake. Sovled

@LeeJZh LeeJZh closed this as completed Nov 26, 2018
@LinqLover
Copy link

@LeeJZh It would be a good manner to tell us what went wrong, at least in a couple of words. I'm just having the same problem, how did you solve it?

@mrpiggi
Copy link
Owner

mrpiggi commented Apr 25, 2020

  1. RTFM
  2. Make the inkscape executable known to your OS by adding its path to PATH variable.
  3. Run (pdf|lua|xe)latex with -shell-escape flag

Edit: enhanced answer

@mrpiggi
Copy link
Owner

mrpiggi commented Apr 27, 2020

@LeeJZh It would be a good manner to tell us what went wrong, at least in a couple of words...

...as well as giving feedback on whether a proposed solution worked or not. :/

@LinqLover
Copy link

Alright, my misunderstanding was that the svg package would work stand-alone such as \includegraphics does. I did not want to additionally install inkscape for this purpose, so I simply converted my svg online into an eps.

@mrpiggi
Copy link
Owner

mrpiggi commented Apr 30, 2020

Well, it's actually the other way around. This package is meant to automate the facilities of exporting LaTeX material with Inkscape. This is mentioned in the description of this repository as well as in README.md and the package documentation.

Maybe a different name for this bundle would be more reasonable, but it was already established when I took over maintenance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants