Browse code

Add MathJax AsciiMath support

Robert Cranston authored on 12/06/2020 14:58:36
Showing 1 changed files
... ...
@@ -15,7 +15,19 @@ To make this the default HTML template, symlink (or rename)
15 15
 one you need to use [`--standalone`][].
16 16
 
17 17
 Options you probably want include [`--toc`][], and perhaps
18
-[`--toc-depth`][]`=6`. Another nice option is [`--mathjax`][].
18
+[`--toc-depth`][]`=6`. Another nice option is [`--mathjax`][], which can take a
19
+URL. The pandoc default is something like the TeX only
20
+
21
+```
22
+https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_CHTML-full
23
+```
24
+
25
+to also have AsciiMath available (with `%%` delimiters) use instead something
26
+like
27
+
28
+```
29
+https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML-full
30
+```
19 31
 
20 32
 [pandoc]: https://pandoc.org
21 33
 [template]: https://pandoc.org/MANUAL.html#templates
Browse code

Add pandoc default HTML5 template

Generated with `pandoc -D html5`.

Robert Cranston authored on 28/09/2019 12:15:25
Showing 1 changed files
... ...
@@ -3,10 +3,30 @@
3 3
 A single-file [pandoc][] HTML5 [template][] using [Bootstrap 4.3][] and
4 4
 [Tocbot][].
5 5
 
6
+Place [`bootstrap-toc.html`](bootstrap-toc.html) in the `templates` directory
7
+(optionally in a subdirectory) in your pandoc [`--data-dir`][] (which defaults
8
+to `$XDG_DATA_HOME/pandoc`, `$HOME/.local/share/pandoc` or `$HOME/.pandoc` on
9
+Unix-like systems) and invoke pandoc with [`--template`][]`=bootstrap-toc.html`
10
+( [`--template`][] implies [`--standalone`][]).
11
+
12
+To make this the default HTML template, symlink (or rename)
13
+`bootstrap-toc.html` to `$data_dir/default.html` (and
14
+`$data_dir/default.html5`). To enable templating without explicitly specifying
15
+one you need to use [`--standalone`][].
16
+
17
+Options you probably want include [`--toc`][], and perhaps
18
+[`--toc-depth`][]`=6`. Another nice option is [`--mathjax`][].
19
+
6 20
 [pandoc]: https://pandoc.org
7 21
 [template]: https://pandoc.org/MANUAL.html#templates
8 22
 [Bootstrap 4.3]: https://getbootstrap.com/docs/4.3
9 23
 [Tocbot]: https://tscanlin.github.io/tocbot
24
+[`--data-dir`]: https://pandoc.org/MANUAL.html#option--data-dir
25
+[`--template`]: https://pandoc.org/MANUAL.html#option--template
26
+[`--standalone`]: https://pandoc.org/MANUAL.html#option--standalone
27
+[`--toc`]: https://pandoc.org/MANUAL.html#option--toc
28
+[`--toc-depth`]: https://pandoc.org/MANUAL.html#option--toc-depth
29
+[`--mathjax`]: https://pandoc.org/MANUAL.html#option--mathjax
10 30
 
11 31
 ## License
12 32
 
Browse code

Add license

Robert Cranston authored on 30/09/2019 08:46:36
Showing 1 changed files
... ...
@@ -7,3 +7,9 @@ A single-file [pandoc][] HTML5 [template][] using [Bootstrap 4.3][] and
7 7
 [template]: https://pandoc.org/MANUAL.html#templates
8 8
 [Bootstrap 4.3]: https://getbootstrap.com/docs/4.3
9 9
 [Tocbot]: https://tscanlin.github.io/tocbot
10
+
11
+## License
12
+
13
+Licensed under the [ISC license][], see the [`LICENSE`](LICENSE) file.
14
+
15
+[ISC license]: https://en.wikipedia.org/wiki/ISC_license
Browse code

Add readme

Robert Cranston authored on 28/09/2019 11:50:33
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,9 @@
1
+# `pandoc-template-bootstrap-toc`
2
+
3
+A single-file [pandoc][] HTML5 [template][] using [Bootstrap 4.3][] and
4
+[Tocbot][].
5
+
6
+[pandoc]: https://pandoc.org
7
+[template]: https://pandoc.org/MANUAL.html#templates
8
+[Bootstrap 4.3]: https://getbootstrap.com/docs/4.3
9
+[Tocbot]: https://tscanlin.github.io/tocbot