I have math equations on my RMarkdown document that I'm knitting to a PDF file using knitr. I'm using the Arial font, specified in my YAML as:
title: "My document"
subtitle: "Draft"
output:
pdf_document:
latex_engine: xelatex
mainfont: Arial
geometry: margin = 1in
fontsize: 11pt
The issue is that my equations use the default font instead of the one I set up in the YAML.
For example:
$$\mathrm{P}(Rain \mid Sun ) < \mathrm{P}(Rain \mid Cloud)$$
So I have two different fonts in my overall document, which is not what I want. How do I change the font for mathematical expressions in RMarkdown?

