• Stars
    star
    342
  • Rank 123,697 (Top 3 %)
  • Language
    JavaScript
  • License
    LaTeX Project Pub...
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

TikZJax is TikZ running under WebAssembly in the browser

TikZJax

TikZJax converts script tags (containing TikZ code) into SVGs.

See a static demo at http://tikzjax.com/

There is a live demo at https://tikzjax-demo.glitch.me/ thanks to @christianp.

Example

In the <head> of your HTML, include

<link rel="stylesheet" type="text/css" href="http://tikzjax.com/v1/fonts.css">
<script src="http://tikzjax.com/v1/tikzjax.js"></script>

Then in the <body>, include TikZ code such as

<script type="text/tikz">
  \begin{tikzpicture}
    \draw (0,0) circle (1in);
  \end{tikzpicture}
</script>

Your TikZ will be compiled into SVGs; the <script> element will be replaced with the corresponding SVG.

How does this work?

Using https://github.com/kisonecat/web2js the Pascal source of tex is compiled to WebAssembly; the latex format is loaded (without all the hyphenation data), and

\documentclass[margin=0pt]{standalone}
\def\pgfsysdriver{pgfsys-ximera.def}
\usepackage{tikz}

is executed. Then core is dumped; the resulting core is compressed, and by reloading the dumped core in the browser, it is possible to very quickly get to a point where TikZ can be executed. By using an SVG driver for PGF along with https://github.com/kisonecat/dvi2html the DVI output is converted to an SVG.

All of this happens in the browser.

More Repositories

1

web2js

Convert TeX's pascal to javascript
xBase
86
star
2

sequences-and-series

Course materials for a Calculus MOOC
TeX
74
star
3

m2o2c2

Multivariable calculus course materials
TeX
55
star
4

corne-case

3-D printed case for Corne keyboard without OLEDs
OpenSCAD
39
star
5

CatNip

Mac OS X application to detect and block cat-like typing
Perl
28
star
6

lerminus

The terminus font but with ligatures
JavaScript
27
star
7

fbpad-eink

A framebuffer-based terminal emulator targetting eink devices (Kobo)
C
17
star
8

ximera-ios

Interactive textbooks for tablet PCs, starting from LaTeX source files
Objective-C
15
star
9

autocut

Automatically cut off the parts of the video where I'm not speaking
Python
15
star
10

tikzwolke

tikzwolke is a cloud-based service converting <script> tags with TikZ code into SVG images
JavaScript
13
star
11

phase-plot

Plot complex functions
JavaScript
10
star
12

data-bootcamp

Some curriculum for a crash course on data science
Jupyter Notebook
7
star
13

beaudiomer

Beamer LaTeX package for an \audio command and a Ruby script for converting a .tex presentation into an .mp4 movie
Python
6
star
14

math5520h

Assigned readings and problem sets for Math 5520H
TeX
6
star
15

reader2maildir

Fetch posts from Google Reader into a local Maildir, propagating marks
Ruby
5
star
16

live-agda

Some tools for making Agda videos with syntax highlighting
Python
4
star
17

ForgetMeNot

SIMBL plugin for Safari; saves session when Safari quits
Objective-C
4
star
18

linearAlgebra

Linear algebra material with Crichton Ogle
TeX
3
star
19

iris-tent-and-bezel

3D models (from OpenSCAD) for a tent and bezel for an Iris keyboard
OpenSCAD
2
star
20

nixos-linux-ck

linux-ck packaged for NixOS
Nix
2
star
21

pdiff

Compare two PDFs via a text comparison and a visual comparison
Go
2
star
22

live-tex

Tools for the live TeX video
Python
2
star
23

ximeraSample

A short sample document demonstrating basic features of Ximera
TeX
2
star
24

math6701

Materials for a course about differential manifolds
TeX
2
star
25

math5801

curriculum for Math 5801, general topology and knot theory
TeX
1
star
26

math5522h

Complex analysis course materials
TeX
1
star
27

chart

Haskell
1
star
28

512-game

like the game 2048, but small enough that it fits into a boot sector
Assembly
1
star
29

subsets-of-reals

JavaScript library to manipulate intervals and other subsets of real numbers
JavaScript
1
star
30

big-history-of-mathematics

An epic narrative of mathematics
TeX
1
star
31

video-faq

Some discussion of how I make videos
1
star
32

pandoc-to-canvas

a script for uploading files to Canvas
Ruby
1
star
33

math7851

Characteristic class course readings and problem sets
TeX
1
star
34

cauchy.quest

play the Cauchy sequence game on a website
CSS
1
star
35

so3hd

Compute an SO(3)-invariant Hausdorff distance
C++
1
star
36

catalan-numbers

A classroom activity involving Catalan numbers
TeX
1
star
37

pondfeet

Design fonts by drawing representative glyphs and let "deep learning" fill in the rest
Python
1
star
38

deep-atari

Predict the output of the Atari 2600 from its RAM
Python
1
star
39

math3345-game

An online game built with lean-make-game for Math 3345H
Lean
1
star
40

are-you-the-javascript

Run through scenarios for the reality show "Are You The One?"
JavaScript
1
star
41

covector-plotter

visualize 1-forms
JavaScript
1
star