Mathjax prime superscript problem in Hexo theme

Prime superscript problem (e.g. x’_i) in Mathjax

When I was using Mathjax to create math formula in my blog post, I typed
((q_1, q_2), a, (q'_1, q'_2)) \in S \times \Sigma_{int} \times S and it rendered as

$((q_1, q_2), a, (q’_1, q’2)) \in S \times \Sigma{int} \times S$

However, when ((q_1, q_2), a, (q'_1, q'_2)) & \in S \times \Sigma_{int} \times S are seperated, they rendered properly.

$$((q_1, q_2), a, (q’_1, q’_2))$$

$$\in S \times \Sigma_{int} \times S$$

Maybe I should use \left and \right for (), just like \lbrace and \rbrace for {}?

So I typed \left( \left( q_1, q_2 \right), a, \left( q'_1, q'_2 \right) \right) \in S \times \Sigma_{int} \times S, didn’t work out:

$\left( \left( q_1, q_2 \right), a, \left( q’_1, q’2 \right) \right) \in S \times \Sigma{int} \times S$

Source of error

Problem definitely comes from the first half of the formula, since second half are all variables.

Turns out there may be an issue with how the prime symbol are being handled.

For simple formula, q'_1 and q_1' are considered the identical.
However, for more complicated formula, the only q_1' can be rendered correctly:

$$((q_1, q_2), a, (q_1’, q_2’)) \in S \times \Sigma_{int} \times S$$

Solutions

Afterwards, I found people reported similar issue before.

Two basic solutions:

  1. Stick to the format x_{Subscript}^{Superscript}, but for prime symbol ', use it as x_{Subscript}'

  2. Simply use {\prime} for every situation, e.g. x_{i}^{\prime}.

Mathjax prime superscript problem in Hexo theme

https://greenmeeple.github.io/site/hexo-mathjax/

Author

Alex Li

Posted on

2024-10-09

Updated on

2025-04-03

Licensed under

Comments

Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×