Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{svg}
- usepackage{amsmath}
- begin{document}
- begin{figure}[htbp]
- centering
- includesvg{_Images/image}
- caption{svg image}
- end{figure}
- end{document}
- There's no file 'image.svg' neither in the current directory nor any other searched path given by svgpath or graphicspath. Following folders have additionally been searched:
- "Package svg Warning: You didn't enable 'shell escape' (or 'write18') so it wasn't possible to launch the Inkscape export for '_Images/image.svg' on input line"
- "Package svg Warning: The export with Inkscape failed for file 'yourimagepath/filename.svg' Troubleshooting: Please check in the log file how the invocation of Inkscape took place and try to execute it yourself in the terminal on input line"
- ! Package svg Error: File `imagefilename_svg-tex.pdf' is missing etc. etc.
- Package svg Info: Calling Inkscape on input line ##.
- runsystem(inkscape -z -D --export-latex --file="_Images/image.svg" --export-pdf="image_svg-tex.pdf" )...executed
- 'inkscape' is not recognized as an internal or external command, operable program or batch file.
- ! Package svg Error: File 'imagefilename_svg-tex.pdf' is missing.
- Access is denied. Access is denied. Access is denied.
- "Package svg Warning: The key 'svgpath' is deprecated. It's recommended to use 'svgpath' instead on input line ##"
- listfiles
- documentclass[]{scrreprt}% Test
- usepackage[T1]{fontenc}
- %usepackage{amsmath}
- usepackage{hyperref}
- usepackage{subcaption}
- usepackage[]{graphicx}
- % usepackage[options]{graphicx} % if used [with or without options], this package must be before {svg} see readme
- usepackage{svg} % Version 2 will run inkscape -z -D --export-latex --file="filename.svg" --export-pdf="filename_svg-tex.pdf
- % or comment out above and uncomment alternate next line where we specify the location of the Inkscape binary (Note start with / do not add to the end) this is where I tested a path to a bin containing inkscape. For a Mac it may differ if using the wrapper fix as described at https://github.com/mrpiggi/svg/issues/1
- % usepackage[inkscapeexe=/Applications/Inkscape.app/Contents/Resources/bin/inkscape]{svg}
- usepackage{svg-extract} % as and when required
- % svgsetup{clean=true} % remove temporary files
- providecommand{transparent}[1]{} % see manual
- % pdfsuppresswarningpagegroup=1 % hot fix if required, see manual
- usepackage{relsize} % required for adjusting text using relscale
- % we can change the input folder to a group of alternative locations & here one is the subdir _Images/ as requested
- svgpath{{_Images/}{/usr/local/svg/}{/MyDocs/MySVGs/}} % paths must be / terminated and IF a subdir NOT start with /
- % On success by default the outputs will be in a new subdirectory as svg-inkscape/filename_svg-tex.pdf and filename_svg-tex.pdf_tex
- begin{document}
- begin{figure}
- begin{minipage}{.5linewidth}
- includesvg[width=linewidth]{svg-example}%
- subcaption{Default text is too large!}
- end{minipage}%
- begin{minipage}{.5linewidth}
- includesvg[width=linewidth,pretex=relscale{0.6}]{svg-example}%
- subcaption{This scaled text fits better.}
- end{minipage}
- caption{An example figure with LaTeX~support}label{fig:svg-example}
- end{figure}
- begin{figure}
- begin{minipage}{.5linewidth}
- includesvg[inkscapelatex=false,extractformat={pdf,eps}]{svg-example}
- subcaption{Above example figure without LaTeX~support}%
- end{minipage}
- begin{minipage}{.5linewidth}centering
- includesvg[width=1.2linewidth,pretex=relscale{0.85},angle=-10]{root}
- subcaption{Rendering of a ROOT plot, even @ an angle}label{fig:root}
- end{minipage}
- end{figure}
- end{document}
Add Comment
Please, Sign In to add comment