As I transition from R bookdown to Jupyter-books, I am facing a challenge in replicating the css style I have been using. Particularly, I prefer serif fonts for better readability in textbooks and I have implemented this custom css inside _static which closely mirrors my bookdown text:
p { font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
color: #0;
font-weight: 500;
font-size: 1.4rem;
line-height: 1.8rem;
margin-top: 1.4rem;
margin-bottom: 1.4rem;
padding-right: 0;
vertical-align: baseline;
}
However, when I apply this styling, the math equations rendered by MathJax appear small, matching the default san-serif font of the body text.
--> This size discrepancy is noticeable in display math environments like $$....$$
or $$\begin{align}...\end{align}$$
. In-line math appears correctly relative to the body text.
Is there a way to adjust this so that the math equations are displayed at the same size as the body text?
I am unsure if tweaking css is the right approach for modifying MathJax behavior. It might require adjustments in the original settings, and I'm not sure how to properly modify it within Jupyter-books given the extensive js present in the bookdown html.