feat: Add mathjax

This commit is contained in:
jstoobysmith 2024-12-06 06:52:44 +00:00
parent 00d1076356
commit 91ac919067
3 changed files with 25 additions and 6 deletions

View file

@ -125,6 +125,20 @@ def codeButton : String := "
}
</style>
"
def mathJaxScript : String := "
<!-- MathJax code -->
<script type=\"text/javascript\">
window.MathJax = {
tex: {
inlineMath: [['$', '$']], // Use $...$ for inline math
displayMath: [['$$', '$$']] // Use $$...$$ for block math
}
};
</script>
<script type=\"text/javascript\" id=\"MathJax-script\" async
src=\"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js\">
</script>
"
/-- The header to the html code. -/
def headerHTML : String :=
@ -133,7 +147,7 @@ layout: default
---
<!DOCTYPE html>
<html>
<head>" ++ codeBlockHTML ++ informalDefStyle ++ codeButton ++ "</head>
<head>" ++ codeBlockHTML ++ mathJaxScript ++ informalDefStyle ++ codeButton ++ "</head>
</head>
<body>"
@ -147,11 +161,11 @@ def titleHTML : String :=
def leanNote : String := "
<br>
<div style=\"border: 1px solid black; padding: 10px;\">
<p>Note: These are are not ordinary notes. They are created using an interactive theorem
<p>Note: These are not ordinary notes. They are created using an interactive theorem
prover called <a href=\"https://lean-lang.org\">Lean</a>.
Lean formally checks definitions, theorems and proofs for correctness.
These notes are part of a much larger project called
<a href=\"https://github.com/HEPLean/HepLean\">HepLean</a>., which aims to digitalize
<a href=\"https://github.com/HEPLean/HepLean\">HepLean</a>, which aims to digitalize
high energy physics into Lean. Please consider contributing to this project.
<br><br>
Please provide feedback or suggestions for improvements by creating a GitHub issue