Enable usage of LaTeX SVG package #1
Open
0xBigfish wants to merge 1 commit into
Open
Conversation
…ocker image
The LaTeX svg package requires inkscape to
transform SVGs into PDF which are then
embedded in the document.
The svg package can be used using
\usepackage{svg}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow compilation of documents using the
svgpackageThe
svgpackage (\usepackage{svg}) allows including SVG images into LaTeX documents using\includesvg[widht=\textwidth]{path/to/svg}. This syntax is very similar to including "normal" graphics like JPG or PNG using\includegraphics[widht=\textwidth]{path/to/image}.Under the hood, the
svgpackage usesinkscapeto transform SVG images into PDFs which are then embedded into the document. This pull request addsinkscapeto the image to allow compilation of documents using thesvgpackage.Reproduce Bug
imagesand place an SVG file calledDiagram.drawio.svginto it.Settings for VS Code / Codium to compile the file via LaTeX Workshop using the current version of the dev container
{ "latex-workshop.latex.recipes": [ { "name": "latexmk", "tools": [ "latexmk" ] } ], "latex-workshop.latex.tools": [ { "name": "latexmk", "command": "latexmk", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "--shell-escape", "-pdf", "-outdir=%OUTDIR%", "%DOC%" ] } ], "latex-workshop.synctex.afterBuild.enabled": true, "latex-workshop.view.pdf.trim": 1, "latex-workshop.view.pdf.viewer": "tab", "telemetry.enableTelemetry": false, "latex-workshop.docker.enabled": true, "latex-workshop.docker.image.latex": "ghcr.io/chearix/vscode-devcontainer-latex:main" }Error Log
Note the hints of missing information regarding Inkscape and the missing converted files.
Reproduce Fix
inkscapeis present) and recompile. I called the adjusted imagelatex-workshop.docker.image.latex": "ghcr.io/chearix/vscode-devcontainer-latex:with-inkscapeUpdate this single line in the
.vscode/settings.jsonfile to use the new dev-container image.