Guest User

Untitled

a guest
Feb 11th, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | None | 0 0
  1. documentclass{article}
  2. usepackage{svg}
  3. usepackage{amsmath}
  4. begin{document}
  5.  
  6. begin{figure}[htbp]
  7. centering
  8. includesvg{_Images/image}
  9. caption{svg image}
  10. end{figure}
  11.  
  12. end{document}
  13.  
  14. 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:
  15.  
  16. "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"
  17.  
  18. "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"
  19.  
  20. ! Package svg Error: File `imagefilename_svg-tex.pdf' is missing etc. etc.
  21.  
  22. Package svg Info: Calling Inkscape on input line ##.
  23. runsystem(inkscape -z -D --export-latex --file="_Images/image.svg" --export-pdf="image_svg-tex.pdf" )...executed
  24.  
  25. 'inkscape' is not recognized as an internal or external command, operable program or batch file.
  26.  
  27. ! Package svg Error: File 'imagefilename_svg-tex.pdf' is missing.
  28.  
  29. Access is denied. Access is denied. Access is denied.
  30.  
  31. "Package svg Warning: The key 'svgpath' is deprecated. It's recommended to use 'svgpath' instead on input line ##"
  32.  
  33. listfiles
  34. documentclass[]{scrreprt}% Test
  35. usepackage[T1]{fontenc}
  36. %usepackage{amsmath}
  37. usepackage{hyperref}
  38. usepackage{subcaption}
  39.  
  40. usepackage[]{graphicx}
  41. % usepackage[options]{graphicx} % if used [with or without options], this package must be before {svg} see readme
  42. usepackage{svg} % Version 2 will run inkscape -z -D --export-latex --file="filename.svg" --export-pdf="filename_svg-tex.pdf
  43. % 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
  44. % usepackage[inkscapeexe=/Applications/Inkscape.app/Contents/Resources/bin/inkscape]{svg}
  45.  
  46. usepackage{svg-extract} % as and when required
  47. % svgsetup{clean=true} % remove temporary files
  48. providecommand{transparent}[1]{} % see manual
  49. % pdfsuppresswarningpagegroup=1 % hot fix if required, see manual
  50. usepackage{relsize} % required for adjusting text using relscale
  51.  
  52. % we can change the input folder to a group of alternative locations & here one is the subdir _Images/ as requested
  53. svgpath{{_Images/}{/usr/local/svg/}{/MyDocs/MySVGs/}} % paths must be / terminated and IF a subdir NOT start with /
  54. % 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
  55.  
  56. begin{document}
  57.  
  58. begin{figure}
  59. begin{minipage}{.5linewidth}
  60.  
  61. includesvg[width=linewidth]{svg-example}%
  62. subcaption{Default text is too large!}
  63.  
  64. end{minipage}%
  65. begin{minipage}{.5linewidth}
  66.  
  67. includesvg[width=linewidth,pretex=relscale{0.6}]{svg-example}%
  68. subcaption{This scaled text fits better.}
  69.  
  70. end{minipage}
  71. caption{An example figure with LaTeX~support}label{fig:svg-example}
  72. end{figure}
  73.  
  74. begin{figure}
  75. begin{minipage}{.5linewidth}
  76.  
  77. includesvg[inkscapelatex=false,extractformat={pdf,eps}]{svg-example}
  78. subcaption{Above example figure without LaTeX~support}%
  79.  
  80. end{minipage}
  81. begin{minipage}{.5linewidth}centering
  82. includesvg[width=1.2linewidth,pretex=relscale{0.85},angle=-10]{root}
  83. subcaption{Rendering of a ROOT plot, even @ an angle}label{fig:root}
  84. end{minipage}
  85. end{figure}
  86.  
  87. end{document}
Add Comment
Please, Sign In to add comment