Command line guide#

You can get direct help from the command line with svg2tikz -h

Class to convert a svg to tikz code

usage: svg2tikz [-h] [--output OUTPUT] [--id IDS]
                [--selected-nodes SELECTED_NODES]
                [--codeoutput {standalone,codeonly,figonly}]
                [-t {math,escape,raw,attribute}]
                [--texmode-attribute TEXMODE_ATTRIBUTE]
                [--markings {ignore,include,interpret,arrows}]
                [--arrow {latex,stealth,to,>}]
                [--output-unit {mm,cm,m,in,pt,px,Q,pc}] [--crop CROP]
                [--clipboard CLIPBOARD] [--wrap WRAP] [--indent INDENT]
                [--round-number ROUND_NUMBER] [--latexpathtype LATEXPATHTYPE]
                [--noreversey NOREVERSEY] [--removeabsolute REMOVEABSOLUTE]
                [--returnstring] [--tab TAB] [-m {output,effect,cli}]
                [--notext IGNORE_TEXT] [--scale SCALE] [--verbose VERBOSE]
                [INPUT_FILE]

Positional Arguments#

INPUT_FILE

Filename of the input file (default is stdin)

Named Arguments#

--output

Optional output filename for saving the result (default is stdout).

--id

id attribute of object to manipulate

Default: []

--selected-nodes

id:subpath:position of selected nodes, if any

Default: []

--codeoutput

Possible choices: standalone, codeonly, figonly

Amount of boilerplate code (standalone, figonly, codeonly).

Default: “standalone”

-t, --texmode

Possible choices: math, escape, raw, attribute

Set text mode (escape, math, raw, attribute). Defaults to ‘escape’

Default: “escape”

--texmode-attribute

The SVG attribute that specifies how to handle text

--markings

Possible choices: ignore, include, interpret, arrows

Set markings mode. Defaults to ‘ignore’

Default: “arrows”

--arrow

Possible choices: latex, stealth, to, >

Set arrow style for markings mode arrow. Defaults to ‘latex’

Default: “latex”

--output-unit

Possible choices: mm, cm, m, in, pt, px, Q, pc

Set output units. Defaults to ‘cm’

Default: “cm”

--crop

Use the preview package to crop the tikzpicture

Default: False

--clipboard

Export to clipboard

Default: False

--wrap

Wrap long lines

Default: False

--indent

Indent lines

Default: True

--round-number

Number of significative number after the decimal

Default: 4

--latexpathtype

Allow path modification for image

Default: True

--noreversey

Do not reverse the y axis (Inkscape axis)

Default: False

--removeabsolute

Remove the value of removeabsolute from image path

Default: “”

--returnstring

Return as string

Default: False

--tab
-m, --mode

Possible choices: output, effect, cli

Extension mode (effect default)

Default: “cli”

--notext

Ignore all text

Default: False

--scale

Apply scale to resulting image, defaults to 1.0

Default: 1

--verbose

Verbose output (useful for debugging)

Default: False