-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optionally use KaTeX for math in html
- Detect when KaTeX is available and use it. Add the variables KATEX, KATEX_FLAGS, and KATEX_CSS for configuration. Add KaTeX definitions for macros needed for compatibility. Mf-stex, math/Makefile, math/katexmacros - Add --use-katex, --katex-css-link-file, and --katex-finished to html-prep. Use <!DOCTYPE html>. Emit a link to katex.css when applicable. Adjust emit-math and punt-to-latex for KaTeX backend. Report lack of support for \epsfbox{} and the eqnarray* environment when using KaTeX. Add special handling for the "ghost" \Rightarrow so that it will match the selected backend's \Rightarrow. src/html-prep.ss, inputs/scheme.hsty - Adjust \schemedisplay{} to preserve the existing layout with the switch to <!DOCTYPE html>. inputs/scheme.hsty, doc/stex.css - Support the macros \LaTeX and \KaTeX. inputs/scheme.sty, inputs/scheme.hsty - Update documentation and build with KaTeX. Add .gitignore to avoid committing generated intermediate files. Makefile.template, doc/Makefile, doc/stex.stex, doc/stex.pdf, doc/stex.html, doc/stex.katex-css-link, doc/.gitignore - Increment version to 1.3. src/VERSION
- Loading branch information
1 parent
9d18c2d
commit 188d0ea
Showing
15 changed files
with
426 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
gifs/ | ||
math/ | ||
*.tex | ||
*.log | ||
*[.h]aux | ||
*[.h]toc | ||
*[.h]firstrun | ||
*[.h]secondrun | ||
*[.h]thirdrun | ||
*.hfourthrun | ||
*.mathrun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- | ||
A built copy of stex.html is checked in to the Git repository, and it | ||
ought to be readable without having to install or use stex (since it tells | ||
you how to do that). However, checking in the fonts needed for KaTeX would | ||
roughly double the size of the stex repository, even though the fonts are | ||
not especially large in absolute terms. | ||
|
||
Instead, this file overrides the default link to katex.css to load it, and | ||
the fonts it uses, externally. The `KATEX_CSS=no` line in the makefile | ||
accordingly instructs stex not to copy the CSS and fonts into the build. | ||
|
||
Under other circumstances, the default behavior of stex is preferrable: in | ||
particular, it ensures that the version of katex.css matches the version | ||
of KaTeX used to typeset the document. | ||
|
||
Another option would be to define `KATEX_FLAGS=--format mathml` and rely | ||
solely on the native support in recent browsers and operating systems. | ||
--> | ||
<link rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.css" | ||
integrity="sha384-OH8qNTHoMMVNVcKdKewlipV4SErXqccxxlg6HC9Cwjr5oZu2AdBej1TndeCirael" | ||
crossorigin="anonymous" /> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
\mbox:\text{#1} | ||
\emph:\textit{#1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.2 | ||
1.3 |
Oops, something went wrong.