Formatting issue with inline latex code in learnr/shiny

rmarkdown
shiny
rstudio
#1

I am desperately trying to format an inline equation that contains a hat for estimation. It works when I create a pdf output, but not when I create a learnr shiny prerendered page.
Any idea how to fix this would be appreciated. I tried with all kind of different {}, which seems to have no effect.

Works:

---
 title: "Text"
output: pdf_document
 ---
We estimate the mean $\hat{\mu}$.

Does not work:

---
title: "Text"
output: 
      learnr::tutorial:
        progressive: true
        allow_skip: true
runtime: shiny_prerendered
---
We estimate the mean $\hat{\mu}$.

0 Likes

#2

Hi,

Your code works fine. I guess you have an issue with Mathjax in the html rendering.

I suggest the following:

  1. Check the same in your browser instead of the RStudio browser.

  2. Also try while connected to internet so that Mathjax becomes available. Check browser console for any javascript issues.

Regards,

jm

1 Like

#3

Thanks - it works in my browser. So I guess that it will also work when I moved it to our server. Thanks for your answer!
Ralf

0 Likes

#4

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

1 Like

closed #5

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

0 Likes