Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+6 votes
474 views
in Plugins by

For writing math equations in LaTeX, there are two writing modes: the inline mode and the display mode. The inline mode is used to write formulas that are part of the text and the display mode is used to write expressions that are not part of the text and hence are put on different lines.

Question https://www.question2answer.org/qa/1996/how-can-i-configure-q2a-to-support-mathtex-or-latex answers how to configure MathJax to configure LaTeX for display mode, but not inline mode.

I want to use the Markdown Editor plugin to support LaTeX in both display and inline mode.  

1 Answer

+2 votes
by
edited by

To configure Markdown Editor to support LaTeX, do the following:

1. In the Admin -> Layout page, check Custom HTML in <HEAD> section of every page and paste in the following code:

<script>
MathJax = {
  tex: {
    inlineMath: [['$', '$'], ['\\(', '\\)']]
  },
  svg: {
    fontCache: 'global'
  }
};
</script>
<script type="text/javascript" id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.1.0/es5/tex-svg.js">
</script>

2. In the Admin -> Posting page, make Markdown Editor the default editor for both questions and answers.

Now your website is ready for LaTeX notation.

Reference:
http://docs.mathjax.org/en/latest/web/configuration.html#configuration-using-an-in-line-script

by
Can We change default font size?
...