-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Enable LaTex mathematical equations format for MkDocs (#304)
* enable latex capabilities * fix spelling * fix spelling --------- Co-authored-by: Stefano Cunego <93382903+kukkok3@users.noreply.github.com>
- Loading branch information
Showing
3 changed files
with
52 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!-- cspell: words infty --> | ||
|
||
# LaTex formulas | ||
|
||
Simple formula as a separate block: | ||
\begin{equation} | ||
5 = 2 + 3 | ||
\end{equation} | ||
|
||
Simple formula inside the sentence: $5 = 2 + 3$. | ||
|
||
More complex examples: | ||
|
||
\begin{equation} | ||
e^{ix} = cox(x) + i sin(x) | ||
\end{equation} | ||
|
||
\begin{equation} | ||
cos(x) = \frac{e^{ix} + e^{-ix}}{2} | ||
\end{equation} | ||
|
||
\begin{equation} | ||
sin(x) = \frac{e^{ix} - e^{-ix}}{2i} | ||
\end{equation} | ||
|
||
\begin{equation} | ||
f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} (a_n cos(nx) + b_n sin(nx)) | ||
\end{equation} |
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,21 @@ | ||
// cspell: words arithmatex | ||
|
||
window.MathJax = { | ||
tex: { | ||
inlineMath: [ ["\\(","\\)"] ], | ||
displayMath: [ ["\\[","\\]"] ], | ||
processEscapes: true, | ||
processEnvironments: true | ||
}, | ||
options: { | ||
ignoreHtmlClass: ".*", | ||
processHtmlClass: "arithmatex" | ||
} | ||
}; | ||
|
||
document$.subscribe(() => { | ||
MathJax.startup.output.clearCache() | ||
MathJax.typesetClear() | ||
MathJax.texReset() | ||
MathJax.typesetPromise() | ||
}) |
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