Search code examples
rgithubr-markdownmathjax

How to get nice math typesetting in a Github README generated in R with `rmarkdown::render`?


If you look at the README of this Githib repo you will see that the maths rendering is not very nice. These are images:

enter image description here

I generated this README from a Rmd file using this YAML header:

---
title: "The 'jack' package: Jack and other symmetric polynomials"
output: github_document
editor_options: 
  chunk_output_type: console
---

On the other hand, on this repo the maths rendering is quite nice. I wrote it simply by directly typing the md file, there's no post-processing.

So, with rmarkdown::render in R, how should we proceed to get a nice maths rendering?


Solution

  • Credit to @user2554330 for the solution, and thanks to the doc.

    Now I'm using this YAML header and the maths are perfect:

    ---
    title: "The 'jack' package: Jack and other symmetric polynomials"
    output: 
      github_document:
        math_method: NULL
    editor_options: 
      chunk_output_type: console
    ---
    

    (of course this is unrelated to editor_options).