Questions tagged [svg]

SVG, short for Scalable Vector Graphics, is a language used for describing two-dimensional vector graphics.

SVG, short for Scalable Vector Graphics, is a language used for describing two-dimensional vector graphics. It's originally an XML based format, but can also be included inline in HTML using HTML parsing rules.

Sample svg file

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600">
  <style>
    circle { fill: fuchsia; stroke: black; stroke-width:2 }
    text { font: 12px sans-serif }
  </style>
  <circle cx="30" cy="20" r="10"/>
  <text x="10" y="40" transform="rotate(15)">Rotated text</text>
</svg>

Useful links

393 questions
28
votes
4 answers

Compile TeX (directly) into SVG using the command line

Is there a way to directly compile TeX code into the SVG image format (rather than going the detour over TeX => PDF => SVG)? I found this question: Convert LaTeX to SVG online But I don't want to do it online - it should be a command-line call.
8
votes
3 answers

\includesvg works, scaling does not

in my document i got: \begin{figure}[h] \centering \def\svgscale{0.5} \includesvg[svgpath = pictures/]{somefile} \caption{svg image} \end{figure} Which does indeed import the picture, but the pictures size does not change with values like 0.5 or…
8
votes
1 answer

\includesvg does not detect SVG file

Input test.tex: \documentclass{article} \usepackage{svg} \begin{document} \includesvg{my-svg-file} \end{document} my-svg-file.svg (in the same folder): http://ftp.gwdg.de/pub/ctan/info/svg-inkscape/image.svg Error output Process started:…
ComFreek
  • 1,248
  • 2
  • 15
  • 22
5
votes
1 answer

LaTeX: outputting a "tight" svg

Concise Problem Statement Given an input of a *.tex (LaTeX) file, I want to output a "tight" *.svg file. By "tight", I mean a svg file that does not show the full page -- rather, just the rendered TeX file with a minimal border around it. Context I…
user13546
5
votes
1 answer

How to use Inkscape's textext plugin

I am having trouble with the textext plugin in inkscape; even the simplest bit of code, such as \documentclass[12pt]{article} \begin{document} test \end{document} gave an error as follows: LaTeX Warning: Unused global option(s): [a0]. No file…
4
votes
1 answer

Inserting SVG images in Latex

I need to include some SVG graphics in my latex file. The SVG files have been created with a Python program, they don't come from Inkscape (I know that there are a lot of questions answered about the connection Inkscape - SVG file - Latex, but this…
3
votes
0 answers

Very thick text when using svg

I'm using mathcha.io for create some figures. I exported them as svg. If I see on any browser looks perfect. But, if I render this svg at tex file, all text if so thick and I can't solve this, I tried to change some properties of the file like…
Dragg
  • 77
  • 4
2
votes
0 answers

How could I include svg directly into LaTeX?

Possible Duplicate: How to include SVG diagrams in LaTeX? Is there a way to include svg figures directly into LaTeX? This is my current way to include eps file: \clearpage \begin{figure*} \psfig{figure=187947.fig.001.eps} …
1
vote
1 answer

Optimise rendering of multiple copies of the same .svg file

I am using the svg package to include flag emojis as .svg files in my text with \includesvg{}. However, since I need to render a lot of flags which are the same, and each flag takes a lot of time, it hits the Overleaf compile time limit. Is there a…
1
vote
0 answers

Minus sign in SVG rendered as "K"

When generating a basic plot in Maple 2022: Expr := x; with(plots): inequal(Expr < y, x = -3 .. 3, y = -3 .. 3); I get the expected output: But when exporting the plot as an .svg file and adding it to a Latex document, the minus sign is now…
ZA_
  • 13
1
vote
3 answers

Overleaf not interpreting .svg image correctly

I'm trying to add this .svg image to my tex file but for some reason, it's not being interpreted correctly by Overleaf. The image I'm trying to add - Here's the .svg code -
1
vote
0 answers

Simple way to include .svg images

I come to your rescue because I screwed up the only reference I had of an SVG file that I had successfully included in a document (somehow copied the file and it got deleted. Pretty sure I did not "Ctrl+X"d it). the code was really simple and…
GMB
  • 11
1
vote
1 answer

First slide of Beamer to SVG

I have a Beamer presentation. I've always converted it to PDF with: pdflatex -interaction=nonstopmode -halt-on-error slides.tex How can I export the first slide of a Beamer presentation to SVG?
plok
  • 113
1
vote
0 answers

Latex SVG with variable Text

-this question is a dublicate of a stackoverflow-question- I would like to write a document with figures containing variable text. In the combination of SVG and Latex, I tried to acomplish this: In Latex preamble I…
DrMarbuse
  • 111
1
vote
0 answers

Include SVG does not detect file

I am trying to render an .svg image using the svg.sty package in latex. When I run the following code I get three errors. Posted below the code…
1
2