xblahoud / tikzmagic

A Jupyter extension for compiling and displaying images described by the TikZ language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tikzmagic

A Jupyter extension for compiling and displaying images described by the TikZ language. Fork of github.com/robjstan/tikzmagic.

Requirements

  • IPython/Jupyter
  • LaTeX distribution in your path
  • ImageMagick
  • Wand library

Installation

pip install git+git://github.com/xblahoud/tikzmagic.git

You might require to change priviliges to convert PDF for ImageMagick

Usage

In an iPython notebook cell: import tikzmagic or %load_ext tikzmagic. You can also call function tikmagic.tikz()

Optional arguments

  • -p or --latex_packages
  • -x or --latex_preamble
  • -l or --tikz_libraries
  • -i or --input_file
  • -s or --scale, default=1 (corresponding to 300dpi)
  • -b or --border, default=4
  • --engine, path to LaTeX engine to run, default xelatex
  • --log prints engines log on latex error

Example

Example iPython notebook

About

A Jupyter extension for compiling and displaying images described by the TikZ language.

License:MIT License


Languages

Language:Jupyter Notebook 81.4%Language:Python 18.6%