diff options
author | Norbert Preining <norbert@preining.info> | 2021-03-31 03:01:24 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-03-31 03:01:24 +0000 |
commit | d7fa794917856c6236da25ad082a9a52f2e73ffc (patch) | |
tree | 2de4151885f2dd8197b3041099af17b257a7899b /support/tikztosvg/README.md | |
parent | 93809c868bf15852ddc7b50542713131a5d8c05f (diff) |
CTAN sync 202103310301
Diffstat (limited to 'support/tikztosvg/README.md')
-rw-r--r-- | support/tikztosvg/README.md | 60 |
1 files changed, 41 insertions, 19 deletions
diff --git a/support/tikztosvg/README.md b/support/tikztosvg/README.md index ac986ae747..866e73b690 100644 --- a/support/tikztosvg/README.md +++ b/support/tikztosvg/README.md @@ -1,22 +1,30 @@ # tikztosvg(1) -Pablo Emilio Escobar Gaviria <<pablo-escobar@riseup.net>> - -The `tikztosvg(1)` command renders TikZ diagrams to SVG, using [`xetex`](http://xetex.sourceforge.net/) and [`pdf2svg`](https://github.com/dawbarton/pdf2svg). +The `tikztosvg(1)` command renders TikZ diagrams to SVG, using +[XeTeX](http://xetex.sourceforge.net/) and +[pdf2svg](https://github.com/dawbarton/pdf2svg). ## Usage - tikztosvg [OPTION]... INPUT_PATH +``` sh +$ 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. +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. +Include `\usepackage{PACKAGE}` when rendering the diagram. The tikz, tikz-cd, +pgfplots, amsmath and amssymb packages are always included by default. + +**-l, --library**=+*LIBRARY* +Include `\usetikzlibrary{LIBRARY}` when rendering the diagram. **-q, --quiet** Silence application log messages and script warnings. @@ -33,35 +41,49 @@ Let’s say you want to convert the file `example.tikz` to SVG: ``` latex \begin{tikzcd} - G \arrow[r, "\varphi"] \arrow[d, "\psi"', two heads] & H \\ - \sfrac{G}{\ker \varphi} \arrow[ru, dotted] & + G \arrow[r, "\varphi"] \arrow[d, "\psi"', two heads] & H \\ + \mathlarger{\sfrac{G}{\ker \varphi}} \arrow[ru, dotted] & \end{tikzcd} ``` -You could achieve that by running the following command: +You could achieve this by running: +``` sh +# xfrac and relsize are only there so that we can +# call \sfrac and \mathlarger +$ tikztosvg -p xfrac -p relsize example.tikz +``` - tikztosvg -p tikz-cd -p xfrac example.tikz +The results will be stored in the file `example.svg`. -The results will be stored in the file `example.svg`: +## Installation -![example](examples/example.svg) +The `tikztosvg(1)` command and it’s man page can be installed in Unix systems +by running -## Installation +``` sh +$ curl -s https://git.sr.ht/~pablo-pie/tikztosvg/blob/master/install.sh | sudo sh +``` -The `tikztosvg(1)` command and it’s man page can be installed in Unix systems by running: +or it can be installed via Git with - $ curl -s https://gitlab.com/pablo-escobar/tikztosvg/-/raw/master/install.sh | sudo sh +``` sh +$ git clone https://git.sr.ht/~pablo-pie/tikztosvg +$ cd tikztosvg +$ sudo make install +``` -The executable is installed in `$HOME/.local/bin/` and the man-page is installed in `$HOME/.local/share/man/man1/`. +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 Emilio Escobar Gaviria](mailto:pablo-escobar@riseup.net). +**tikztosvg** was written by [Pablo](mailto:pablo-escobar@riseup.net). -**pdf2svg** was written by [David Barton](mailto:davebarton@cityinthesky.co.uk) and [Matthew Flaschen](mailto:matthew.flaschen@gatech.edu). +**pdf2svg** was written by [David Barton](mailto:davebarton@cityinthesky.co.uk) +and [Matthew Flaschen](mailto:matthew.flaschen@gatech.edu). ## License -© 2020 Pablo Emilio Escobar Gaviria. +© 2021 Pablo. Free use of this software is granted under the terms of the GPL-3.0 License. |