Skip to content

nschloe/purple-pi

Repository files navigation

Deprecation

Purple Pi is no longer maintained. For math and more on GitHub, use the xhub extension.


Purple Pi

Chrome Web Store version chrome users

gh-actions code style: prettier

Purple Pi is a browser extension for Google Chrome that renders LaTeX-style mathematics on pages that don't otherwise support it. Examples are GitHub READMEs and Wikis or StackOverflow posts.

Simply install the extension from the

and enjoy.

Cauchy's integral formula

Let $U$ be an open subset of the complex plane $\mathbb{C}$, and suppose the closed disk $D$ defined as

$$D = \bigl\{z:|z-z_{0}|\leq r\bigr\}$$

is completely contained in $U$. Let $f: U\to\mathbb{C}$ be a holomorphic function, and let $\gamma$ be the circle, oriented counterclockwise, forming the boundary of $D$. Then for every $a$ in the interior of $D$,

$$f(a) = \frac{1}{2\pi i} \oint _{\gamma}\frac{f(z)}{z-a} dz.$$

Content authors

On GitHub (READMEs, Wikis, Issues etc.), LaTeX inline and display formulas are supported using native syntax, i.e.:

Some inline math: $`x\in R`$.
Some display-style math:
```math
e^i + 1 = 0
```

GitLab uses the same syntax.

Purple Pi also runs on pages which contain the activation link

https://github.com/nschloe/purple-pi?activate

You can then use the classical $...$ notation for inline and $$...$$ for display math. You can add it as an <a> tag

Rendered with <a href="https://github.com/nschloe/purple-pi?activate">Purple Pi</a>.

or as a badge

[![purple-pi](https://img.shields.io/badge/Rendered%20with-Purple%20Pi-bd00ff?style=flat-square)](https://github.com/nschloe/purple-pi?activate)

The extension will then inject KaTeX into the page.

Build instructions

To build the production zip, simply install the dependencies (npm ci), then run

npm run build

Development

npm ci
npm run watch

The unpacked development version of the extension will then be in dist/. Open Google Chrome, go to chrome://extensions and Load unpacked this directory. Reload as necessary.

Not working

Related projects

License

This software is published under the GPLv3 license.