aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: e805d169238a88e51af8b59bd3442ac547790b7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!-- SPDX-License-Identifier: GPL-2.0-only -->

# ASAP

A browser extension that adds LaTeX and code support to Pronto.

To bundle the extension, run `nix build` in the root of this repository.  The
result will be available at `result/asap.zip`.

## Guide

`\(`, `\[`, `$`, `$$` and the `equation`, `align`, `alignat`, `gather`, `CD`
environments invoke KaTeX.  For example,

```tex
This is text and \(\pi \in \mathbb R\).
\begin{align}
\sum_{n = 1}^{10} n & = \frac{10 \cdot 11} 2 \\
& = 55
\end{align}
```

Code blocks are delimited by pairs of ```` ``` ````.

````md
```
let x = "What language is this?";
```
````

Highlight.js guesses the language, but you can also specify it after the first
```` ``` ````:

````md
```bash
echo 'I know this one!'
```
````

Inline code is delimited by pairs of `` ` `` (e.g., `` `x = 2` ``).  Syntax
highlighting still occurs.  The language can be specified like so: `` `import
math`{:.python}``.

## Development

The extension can be tested by [temporarily installing it in
Firefox](about:debugging#/runtime/this-firefox) or by [installing it in
Chromium-based browsers](chrome://extensions).

## License

All the files in this repository except `licenses/`, `hljs/` and `katex/` are
licensed under the GNU General Public License v2.0 only.  A copy of the GNU
General Public License v2.0 is available in this repository at
`licenses/GPL-2.0`.

`hljs/` is licensed under the 3-Clause BSD License.  A copy of the 3-Clause BSD
License is available in this repository at `licenses/HIGHLIGHT-JS-BSD-3-CLAUSE`.

`katex/` is licensed under the MIT License.  A copy of the MIT License is
available in this repository at `licenses/KATEX-MIT`.