ClickHelp User Manual
Embed Math Equations
From this topic, you'll learn how to embed math equations. There are different ways to do it. If you have a picture, you can just insert it: Insert Images.
Otherwise, you can use MathML. For this purpose, you need to add the MathJax script to your portal:
- Open Projects page.
- Go to Topic Master Page.
-
Add the following code to the Additional tags field:
HTML
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<script type="text/x-mathjax-config" data-aspx-savednextwhitespace="%0A">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script> -
Click Save Changes.
Now MathJax is added to your ClickHelp portal.
You can create math equations using a third-party tool like MathType or Mathcha and add them to your topics. To do it, follow the steps:
- Copy the code of your math equation. For example:HTML
<p>When `a != 0`, there are two solutions to `ax^2 + bx + c = 0` and
they are</p>
<p style="text-align:center">
`x = (-b +- sqrt(b^2-4ac))/(2a) .`
</p>
<!-- Alternatively, you can use another notation -->
When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ - Click OK.
- Open your topic in ClickHelp.
-
Go to the Insert tab and click Custom HTML.
-
Paste the code.
- Click OK.
-
Here is the result:
Note | |
The MathML code will render when you click the Unlock&View button or select the Preview mode. |
You can learn more about embedding MathJax in their own documentation: Getting Started — MathJax 2.7 documentation.