You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/output-formats/pdf-basics.qmd
+34-2Lines changed: 34 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -229,10 +229,42 @@ You can learn more about installing `librsvg`{spellcheck="false"} (which provide
229
229
scoop install rsvg-convert
230
230
````
231
231
232
-
::: callout-note
232
+
### Alternative: Using Inkscape
233
+
234
+
If you prefer to use Inkscape instead of `rsvg-convert`, you can disable the default conversion by setting `use-rsvg-convert: false`. This will use the [SVG LaTeX package](https://ctan.org/pkg/svg) to include the svg using `\includesvg{}` which uses Inkscape to convert to PDF. This requires some configuration to opt-in:
235
+
236
+
```yaml
237
+
format:
238
+
pdf:
239
+
use-rsvg-convert: false
240
+
pdf-engine-opts: ["-shell-escape"]
241
+
```
242
+
243
+
Note that this configuration requires:
244
+
245
+
- Inkscape to be installed and available on your system PATH
246
+
- The `-shell-escape` option for your LaTeX engine to allow execution of external programs
247
+
- The SVG LaTeX package (automatically included by Quarto)
248
+
249
+
### Platform Considerations
250
+
251
+
The availability and ease of installation for SVG conversion tools varies by platform:
252
+
253
+
- **Linux/macOS:** `rsvg-convert` is typically available through package managers (`librsvg` package). This is the recommended approach for these platforms.
254
+
- **Windows:** Installing `rsvg-convert` is more challenging. While it can be installed via Scoop (as shown above), most Windows users should consider using PNG format for diagrams rather than SVG.
255
+
- **Inkscape:** Available cross-platform but requires the `-shell-escape` configuration. Consider using this only when you specifically need Inkscape's rendering capabilities.
256
+
257
+
For diagram formats, PNG is generally recommended for best compatibility and ease of use. See the @nt-svg-diagram below for more details.
258
+
259
+
::: {#nte-svg-diagram .callout-note}
233
260
## SVG Format for Diagrams
234
261
235
-
When using Mermaid or Graphviz diagrams in PDF documents, the default PNG format is recommended. While SVG output is possible with `mermaid-format: svg`, it requires `rsvg-convert` and may have rendering issues such as text clipping in diagrams with multi-line labels. See [Diagrams](/docs/authoring/diagrams.qmd#mermaid-formats) for more information.
262
+
When using Mermaid or Graphviz diagrams in PDF documents, the default PNG format is recommended. While SVG output is possible with `mermaid-format: svg`, it requires external tooling:
263
+
264
+
- `rsvg-convert` (default) - See [installation instructions](#svg-images) above
265
+
- Inkscape (alternative) - Requires `use-rsvg-convert: false` and `-shell-escape` configuration
266
+
267
+
SVG format may also have rendering issues such as text clipping in diagrams with multi-line labels. For most users, PNG format provides better compatibility and ease of use. See [Diagrams](/docs/authoring/diagrams.qmd#mermaid-formats) for more information.
0 commit comments