Open brrd opened 8 years ago
Katex supports custom delimiters, here is the syntax:
<script>
renderMathInElement(
document.getElementById("test"),
{
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "\\[", right: "\\]", display: true},
{left: "$", right: "$", display: false},
{left: "\\(", right: "\\)", display: false}
]
}
);
</script>
This would be a great feature! As indicated in the issue, it would be very helpful to be able to use both $
and $$
as math delimiters in Abricotine, since Pandoc/Latex requires the single $
for inline math and double for displayed equations.
It can also be achieved in MathJaX:
<!-- Scripts to handle MathJax -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<script async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script async src="http://markdownedit.com/assets/js/mathjax-scripts.js"></script>
What really needed is making difference between Inline Math and Display Math.
If custom delimiters are supported, \begin{equation}
and \end{equation}
would be great to add :smile:
@Hugo-Trentesaux, No need. Once you warp the Math around a label which you guide MathJaX to handle you'll get support for those environments "For Free" (It's built in MathJax).
From #7
More generally, the idea would be to allow the use of any delimiter with a new option in config.
Inline and display math should be supported.