Skip to content

Commit

Permalink
test with latest MathJax & KaTeX
Browse files Browse the repository at this point in the history
  • Loading branch information
SaswatPadhi committed May 28, 2023
1 parent 4fad213 commit 19f4dad
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 28 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,19 @@ pseudocode.js can render math formulas using either
Include the following in the `<head>` of your page:

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.js"
integrity="sha256-F/Xda58SPdcUCr+xhSGz9MA2zQBPb0ASEYKohl8UCHc=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.js"
integrity="sha512-EKW5YvKU3hpyyOcN6jQnAxO/L8gts+YdYV6Yymtl8pk9YlYFtqJgihORuRoBXK8/cOIlappdU6Ms8KdK6yBCgA=="
crossorigin="anonymous" referrerpolicy="no-referrer">
</script>
```

#### Step 1B &middot; For MathJax 2.x users
Include the following in the `<head>` of your page:

```html
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_CHTML'>
<script src="https://cdn.jsdelivr.net/npm/mathjax@2.7.9/MathJax.js?config=TeX-AMS_CHTML"
integrity="sha256-DViIOMYdwlM/axqoGDPeUyf0urLoHMN4QACBKyB58Uw="
crossorigin="anonymous" referrerpolicy="no-referrer">
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
Expand Down Expand Up @@ -68,8 +71,9 @@ Include the following in the `<head>` of your page:
}
}
</script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3.0.0/es5/tex-chtml.js"
integrity="sha256-3Fdoa5wQb+JYfEmTpQHx9sc/GuwpfC/0R9EpBki+mf8=" crossorigin>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-chtml.js"
integrity="sha256-Cm3tWrvOEzMWWN0jnzQ4Kr0GSSx0txth6MqoES7FX6U="
crossorigin="anonymous" referrerpolicy="no-referrer">
</script>
```

Expand Down
22 changes: 12 additions & 10 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@

<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/pygment_trac.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.0/css/all.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/styles/default.min.css"
integrity="sha256-zcunqSn1llgADaIPFyzrQ8USIjX2VpuxHzUwYisOwo8=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/default.min.css"
integrity="sha512-hasIneQUHlh06VNBe7f6ZcHmeRTLIaQWFd43YriJ0UND19bvYRauxthDg8E4eVNPm9bRUhr5JGeqH7FRFXQu5g=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="pseudocode.css">

<!--[if lt IE 9]>
<script src="javascripts/html5.js"></script>
<![endif]-->
<script src="javascripts/autosize.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"
integrity="sha256-eOgo0OtLL4cdq7RdwRUiGKLX9XsIJ7nGhWEKbohmVAQ=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"
integrity="sha512-rdhY3cbXURo13l/WU9VlaRyaIYeJ/KBakckXIvJNAQde8DgpOmE+eZf7ha4vdqVjTtwQt69bD2wH2LXob/LB7Q=="
crossorigin="anonymous" referrerpolicy="no-referrer">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.js"
integrity="sha256-F/Xda58SPdcUCr+xhSGz9MA2zQBPb0ASEYKohl8UCHc=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.js"
integrity="sha512-EKW5YvKU3hpyyOcN6jQnAxO/L8gts+YdYV6Yymtl8pk9YlYFtqJgihORuRoBXK8/cOIlappdU6Ms8KdK6yBCgA=="
crossorigin="anonymous" referrerpolicy="no-referrer">
</script>
<script src="pseudocode.js"></script>

Expand Down
5 changes: 3 additions & 2 deletions docs/katex-samples.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
<title>pseudocode.js Samples with KaTeX</title>

<!-- Setup KaTeX -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.js"
integrity="sha256-F/Xda58SPdcUCr+xhSGz9MA2zQBPb0ASEYKohl8UCHc=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.js"
integrity="sha512-EKW5YvKU3hpyyOcN6jQnAxO/L8gts+YdYV6Yymtl8pk9YlYFtqJgihORuRoBXK8/cOIlappdU6Ms8KdK6yBCgA=="
crossorigin="anonymous" referrerpolicy="no-referrer">
</script>

<!-- Pseudocode -->
Expand Down
4 changes: 3 additions & 1 deletion docs/mathjax-v2-samples.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<title>pseudocode.js Samples with MathJax</title>

<!-- Setup MathJax -->
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_CHTML'>
<script src="https://cdn.jsdelivr.net/npm/mathjax@2.7.9/MathJax.js?config=TeX-AMS_CHTML"
integrity="sha256-DViIOMYdwlM/axqoGDPeUyf0urLoHMN4QACBKyB58Uw="
crossorigin="anonymous" referrerpolicy="no-referrer">
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
Expand Down
5 changes: 3 additions & 2 deletions docs/mathjax-v3-samples.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
}
}
</script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3.0.0/es5/tex-chtml.js"
integrity="sha256-3Fdoa5wQb+JYfEmTpQHx9sc/GuwpfC/0R9EpBki+mf8=" crossorigin>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-chtml.js"
integrity="sha256-Cm3tWrvOEzMWWN0jnzQ4Kr0GSSx0txth6MqoES7FX6U="
crossorigin="anonymous" referrerpolicy="no-referrer">
</script>

<!-- Pseudocode -->
Expand Down
2 changes: 1 addition & 1 deletion docs/pseudocode.css

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"browserify": "^17.0.0",
"clean-css-cli": "^5.3.0",
"eslint": "^8.25.0",
"katex": "^0.16.3",
"katex": "^0.16.7",
"uglify-js": "^3.17.4",
"watchify": "^4.0.0",
"clean-css": "^5.2.4"
Expand Down
5 changes: 3 additions & 2 deletions static/katex.html.part
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
<title>pseudocode.js Samples with KaTeX</title>

<!-- Setup KaTeX -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.js"
integrity="sha256-F/Xda58SPdcUCr+xhSGz9MA2zQBPb0ASEYKohl8UCHc=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.js"
integrity="sha512-EKW5YvKU3hpyyOcN6jQnAxO/L8gts+YdYV6Yymtl8pk9YlYFtqJgihORuRoBXK8/cOIlappdU6Ms8KdK6yBCgA=="
crossorigin="anonymous" referrerpolicy="no-referrer">
</script>

<!-- Pseudocode -->
Expand Down
4 changes: 3 additions & 1 deletion static/mathjax-v2.html.part
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<title>pseudocode.js Samples with MathJax</title>

<!-- Setup MathJax -->
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_CHTML'>
<script src="https://cdn.jsdelivr.net/npm/mathjax@2.7.9/MathJax.js?config=TeX-AMS_CHTML"
integrity="sha256-DViIOMYdwlM/axqoGDPeUyf0urLoHMN4QACBKyB58Uw="
crossorigin="anonymous" referrerpolicy="no-referrer">
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
Expand Down
5 changes: 3 additions & 2 deletions static/mathjax-v3.html.part
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
}
}
</script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3.0.0/es5/tex-chtml.js"
integrity="sha256-3Fdoa5wQb+JYfEmTpQHx9sc/GuwpfC/0R9EpBki+mf8=" crossorigin>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-chtml.js"
integrity="sha256-Cm3tWrvOEzMWWN0jnzQ4Kr0GSSx0txth6MqoES7FX6U="
crossorigin="anonymous" referrerpolicy="no-referrer">
</script>

<!-- Pseudocode -->
Expand Down
2 changes: 1 addition & 1 deletion static/pseudocode.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import url('https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css');
@import url('https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.css');

.ps-root {
font-family: KaTeX_Main, 'Times New Roman', Times, serif;
Expand Down

0 comments on commit 19f4dad

Please sign in to comment.