In R Markdown, the default HTML font size for inline equations is too large for my taste (it seems more consistent with the body font in PDF and Word output). Another extremely similar question details two possible solutions: one applied at the individual formula level and the second to set the formula font size for the document. I seek to set the formula font size for the entire document. Thus far, I am unable to get the proposed solution to work and am seeking insight into how to get it to function properly.
Formula Level Solution (Working)
This is text, and here is an inline formula $W$
When knitting HTML, this can be successfully changed for an individual formula as:
This is text, and here is an inline formula $\small W$
Document Level Solution (Not Working)
The previously cited question/answer indicates that one should be able to add inline custom css. The R Markdown Cookbook makes similar suggestions regarding inline css.
For me, the proposed solution is not working. I've tried the following variations:
First
```{=css}
<style>
.math {
font-size: tiny;
}
</style>
```
Second
```{css}
<style>
.math {
font-size: tiny;
}
</style>
```
Third, outside a code chunk
<style>
.math {
font-size: tiny;
}
</style>
Fourth, outside a code chunk
<style type="text/css">
.math {
font-size: small;
}
body{
font-size: 12pt;
}
</style>
This successfully changes the body text to make it larger, but does not set the equation font smaller. Solution Four is a workaround, but I'd much prefer to change the formula font smaller than make the body font larger. However, it does indicate that the <style> tag will work outside of a code chunk.
None of these approaches seem to change the size of the formula fonts. Several of them can be used to change the body font, either inside or outside a code chunk. I've also referenced an external style.css document, but that doesn't work for formula fonts either. I think I'm going about this the wrong way. Any guidance regarding what I am overlooking would be most appreciated.

