Skip to content

Commit

Permalink
mathjax: Use svg output to avoid missing fonts
Browse files Browse the repository at this point in the history
Signed-off-by: Paul-Elliot <[email protected]>
  • Loading branch information
panglesd committed Jan 26, 2024
1 parent 1d8c1ec commit 49637be
Show file tree
Hide file tree
Showing 13 changed files with 832 additions and 320 deletions.
1,069 changes: 767 additions & 302 deletions compiler/data/data_contents.ml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion compiler/data/data_files.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let string_of_file = function
| Slipshow_js -> "slipshow.cdn.min.js.crunch"
| Slip_css -> "slip.css.crunch"
| Theorem_css -> "theorem.css.crunch"
| Mathjax_js -> "tex-chtml.js.crunch"
| Mathjax_js -> "tex-svg.js.crunch"
| Tailwind_css -> "tailwindcss.js.crunch"
| Highlight_css -> "highlight-js.css.crunch"
| Highlight_js -> "highlight-js.js.crunch"
Expand Down
4 changes: 2 additions & 2 deletions compiler/data/dune
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
(copy %{deps} %{target})))

(rule
(deps %{project_root}/node_modules/mathjax/es5/tex-chtml.js)
(target "tex-chtml.js.crunch")
(deps %{project_root}/node_modules/mathjax/es5/tex-svg.js)
(target "tex-svg.js.crunch")
(enabled_if
(= %{profile} "with-bundle"))
(mode promote)
Expand Down
2 changes: 1 addition & 1 deletion compiler/data/slipshow.cdn.min.js.crunch

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion compiler/data/tex-chtml.js

This file was deleted.

2 changes: 1 addition & 1 deletion compiler/data/tex-chtml.js.crunch

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions compiler/data/tex-svg.js.crunch

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions compiler/test/simple.t/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ Blibli.

And {pause} [standalone][emph] inlines2

And some $(\sqrt{m})_a^t\cdot h$.
62 changes: 54 additions & 8 deletions staged_dist/slipshow.cdn.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion staged_dist/slipshow.cdn.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion staged_dist/slipshow.cdn.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion staged_dist/slipshow.cdn.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion staged_dist/slipshow.js.map

Large diffs are not rendered by default.

0 comments on commit 49637be

Please sign in to comment.