EKsumic's Blog

let today = new Beginning();

Click the left button to use the catalog.

OR

[Tutorial] Step by step teaches you how to use Mathjax3.0 (Part 2)

Previous:[Tutorial] Step by step teaches you how to use Mathjax3.0 (Part 1)

Insert formula[1]

If you are inserting a formula in the text, use $...$.

If the formula is a paragraph by itself, use $$...$$.

Why didn't I mention this method before? That's because the previous display was in a separate line, to be precise, in a separate <p></p> tag.

And if you need to fill in a formula in the middle of the text, in order not to be confused with other symbols, it usually starts and ends with a dollar sign.

But today, I found that only one dollar symbol does not work. You must use 2 to start.

In any case, you need 2 dollar symbols to work. And this has the same effect as the brackets.

Finally, I found that inserting formulas in the text still starts with "escape character + parenthesis", not a single dollar sign.

So, after my improvement, I think the insertion formula should be written like this:

If you are inserting a formula in the text, use \(...\).

If the formula is a paragraph by itself, use $$...$$ or \[...\].

Okay, "{}" was mentioned before. The curly braces cannot be escaped and can only be output normally. Have you thought about why this happens?

The reason is actually very simple. The role of curly braces is to group the operands, for example:

$$x^10$$
$$x^{10}$$

or:

\[x^{10}\]
\[x^10\]

MathJax:

$$x^10$$
$$x^{10}$$

This is why the curly braces are not escaped.

By using curly braces {}, the operand and the symbol are separated to eliminate ambiguity.

Let's see how Benford's law[2] is written (Let's take a look at the specific differences between these 3 types):

\[P(d) = \log _{10}(d+1)- \log _{10}(d) = \log _{10}(\frac{d+1}{d}) =\log _{10}(1+ \frac{1}{d}) \]
$$P(d) = \log _{10}(d+1)- \log _{10}(d) = \log _{10}(\frac{d+1}{d}) =\log _{10}(1+ \frac{1}{d})$$

MathJax:

\[P(d) = \log _{10}(d+1)- \log _{10}(d) = \log _{10}(\frac{d+1}{d}) =\log _{10}(1+ \frac{1}{d}) \]

$$P(d) = \log _{10}(d+1)- \log _{10}(d) = \log _{10}(\frac{d+1}{d}) =\log _{10}(1+ \frac{1}{d})$$


You can also write:

$$(P(d) = \log _{10}(d+1)- \log _{10}(d) = \log _{10}(\frac{d+1}{d}) =\log _{10}(1+ \frac{1}{d}))$$

MathJax:

$$(P(d) = \log _{10}(d+1)- \log _{10}(d) = \log _{10}(\frac{d+1}{d}) =\log _{10}(1+ \frac{1}{d}))$$

 

The original brackets will not adapt to the size of the formula, you need to add \left(…\right) outside the brackets

$$\left( P(d)=\log _{10}(d+1)-\log_{10}(d)=\log _{10}(\frac{d+1}{d})=\log _{10}(1+\frac{1}{d})\right)$$

MathJax:

$$ \left( P(d) = \log _{10}(d+1)- \log _{10}(d) = \log _{10}(\frac{d+1}{d}) =\log _{10}(1+ \frac{1}{d}) \right) $$

 

Next: [Tutorial] Step by step teaches you how to use Mathjax3.0 (Part 3) (Please waiting……If you want to see the next blog as soon as possible, please leave any comments and I will give feedback as soon as possible)

 

References:

[1] https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference

[2] https://en.wikipedia.org/wiki/Benford%27s_law

[3] http://www.mamicode.com/info-detail-899188.html

This article was last edited at 2020-12-09 11:01:45

* *