Error when rendering a LaTeX equation

Things I have tried

What I’m trying to do

I am trying to preview this LaTeX equation in Obsidian:

$$\sum_{a=a_{RA}}^{a_{max_c}}P_{c,a}\left(\frac{1}{1+r}\right)^{a-a_0} = \sum_{a=a_0}^{a_{RA}-1}C_{c,a}\left(\frac{1}{1+r}\right)^{a-a_0}$$

When I put this equation in MathJax | Beautiful math in all browsers. (live demo) it renders very well. It also works on Typora.

Obsidian shows as result a yellow strip of LaTex code. I have installed the two available Obsidian plugins for MathJax and LaTeX environments but they couldn’t solve this issue.

Note: Obsidian renders simple equations like $$x^2 = b$$. So I don’t know what type of equations work and do not work in Obsidian.

Sorry, I found the solution: it has to do with space before and after the = sign. So this works:


I thought that space didn’t count in LaTeX. Nevertheless, why this only not renders in Obsidian?

But I don’t understand why this renders:

  a &=\text{Age index}\\
  a_0 &=\text{Age of entrance into the labour force}

But this does not:

 a &=\text{Age index}\\
 a_0 &=\text{Age of entrance into the labour force}\\
 a_{RA} &=\text{Retirement age}\\
 a_{max_c} &=\text{Maximum age/end of pension period of cohort \(c\)}\\
 P_{c,a} &=\text{Pension payments to cohort \(c\) at age \(a\)}\\
 r &=\text{internal rate of return}\\
 C_{c,a} &=\text{Contribution payments by cohort \(c\) at age \(a\)}

Finally I (think) I found the solution for this puzzle.
If you have a previous text in LaTeX you have to paste it as text to Obsidian because some &nbsp will remain in your code and the preview can’t be created.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.