Skip to content
This repository has been archived by the owner on Aug 15, 2020. It is now read-only.

GarkGarcia/tikztosvg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tikztosvg(1)

The tikztosvg(1) command renders TikZ diagrams to SVG, using xetex and pdf2svg.

WARNING ⚠️⚠️⚠️

The project has migrated to GitLab. This repository is no longer used. Please visit the new repository for the latest updates.

Usage

tikztosvg [OPTION]... INPUT_PATH

If INPUT_PATH is set to - the input will be read from stdin.

Options

-o, --output=OUTPUT_PATH

Write output to file OUTPUT_PATH. If set to - the output will be written to stdout. Defaults to the base name of the input file suffixed with the .svg extension. The file is resolved relative to the working directory.

-p, --package=+PACKAGE

Include \usepackage{PACKAGE} when rendering the diagram.

-q, --quiet

Silence application log messages and script warnings.

-h, --help

Print a help message.

-v, --version

Print version information.

Example

Let’s say you want to convert the file exemple.tikz to SVG:

\begin{tikzcd}
    G \arrow[r, "\varphi"] \arrow[d, "\psi"', two heads] & H \\
    \sfrac{G}{\ker \varphi} \arrow[ru, dotted]           &
\end{tikzcd}

You could achieve that by running the following command:

tikztosvg -p tikz-cd -p xfrac example.tikz

The results will be stored in the file example.svg:

example

Installation

The tikztosvg(1) command and it’s man page can be installed in Unix systems by running:

$ curl -s https://raw.githubusercontent.com/GarkGarcia/tikztosvg/master/install.sh | sudo sh

The executable is installed in $HOME/.local/bin/ and the man-page is installed in $HOME/.local/share/man/man1/.

Authors

TikzToSvg was written by Pablo Emílio Escobar Gavira.

pdf2svg was written by David Barton and Matthew Flaschen.

License

© 2020 Pablo Emílio Escobar Gaviria.

Free use of this software is granted under the terms of the GPL-3.0 License.