Issue with Inline Greek Letters in .rmd for blogdown

Hi Guys,
I just started blogging with Rmarkdown and I'm facing an issue when trying to render inline Greek letters. For some reason this code:

 $ \alpha_{i} $ 

\alpha_{i}

Is not showing Alpha rendered properly, but when using it with double $ works fine.

Could you guys help me? I've read similiar issue in Bookdown when rendering in PDF but they said that in HTML worked, in my case is not working in HTML.

Thanks,

Alfonso

PS. I planned to use reprex, but it seems it doesn't work for this things that are not proper R Code.

What do you mean by "rendered properly?"

Latex's Greek letters are meant for mathematical formulae, so it might not be best for Greek as a language. After some searching, it seems the polyglossia package for LaTeX would be used (page 23) for using fonts from different languages. That'd work for rendering PDF documents.

For HTML, you could look into Unicode.. Here's the chart for Greek characters: https://unicode.org/charts/PDF/U0370.pdf.

Well, I'm not trying to write Greek, I want to use a Math Formula using Greek Letters, for example the alpha sub i showed in the code. And My problem is that instead of showing the expected result the greek letter is just not showing up. This issue just happens when using Inline Math Jax. When using double $ works perfect.

Any help will be deeply appreciated.

I don't have an actual answer, but have you tried searching? I searched for blogdown and MathJax and came up with:

Sounds like it depends on your theme, and whether or not it supports MathJax out of the box, or if you need to add javascript to "turn it on." Note this bit of code in the lithium theme:

Wondering if your theme is using MathJax but in a way that doesn't recognize single $- perhaps you can edit the JS code to make it work the way you want it to?

1 Like

Hi Allison,
Thanks for your answer.
Actually I had already checked those 3 articles.
Because at the beginning I was using markdown files, and I tried the lithium snippet and in my case I also tried Academic documentation that turns out to have a math option to run directly mathjax. They just didn't work.
Then checking some issues in the Academic github page I noticed that moving to .Rmd
and trying the lithium snippet and using backticks could be the solution, it didn't work either.
When I was about to give up I noticed that activating math equals true and using Mathjax without backticks worked perfectly.

And in my case inline maths work fine, so i did all of my article and then I noticed that I was able to render formulas, it is just that for some reacon only greek letters don't show up. That is why I decided to open this new thread. It is something really weird and specific.

Has anyone else experience something weird like this??

Ah if you are using the Hugo Academic theme, I would try posting your problem on the Hugo forums then:

Tag it as support- the theme author is on there regularly: Profile - neutreno - HUGO

But before you do, try the same in a plain markdown file so you can be sure it is not some weird .Rmd issue.

1 Like

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.