Open tgherzog opened 4 years ago
@randrescastaneda @tonyfujs I've been able to further isolate the problem, although I still don't know how to fix it. If I run this command in the IDE:
bookdown::render_book("index.Rmd")
and then manually edit docs/appendix-coverage-analysis.html
to remove line 58:
<script src="libs/plotly-main/plotly-latest.min.js"></script>
then the math equations work correctly for me. Note that line 58 is one of 4 lines of HTML code that are only generated for the complete book not when the appendix is generated by itself. But this is the only one of the 4 lines that seems to impact the equations.
I added a function mathjax_fix
which will remove the line above (requires that the "stringr" library be installed). This can be run from the console after an HTML build like this:
source("R/report.R")
mathjax_fix()
Ideally, this could be run as a post-process function by bookdown. Well actually more ideally would be to fix the bug in the first place ;)
@tonyfujs @randrescastaneda
I'm having trouble regenerating the report on my local, and could use some help. When I build the entire report in R, then I see gibberish in place of math equations in Andres' appendix 2. But if I rebuild just appendix 2 in preview mode then the math equations appear correctly.
Here are steps to reproduce; I get almost (see below) the same result if I run in the IDE vs the command line:
My Appendix 2 now looks like this:
Now, I run bookdown on just the appendix file:
Now my Appendix 2 looks like this:
Interestingly, if I run
bookdown::render_book
from the RStudio IDE instead of from the command line the HTML output is slightly different, although what I see in my browser is exactly the same effect.Here's the important part of the diff when I run
broken::render_book
from the IDE:Here's the same from when I run from the command line:
Strange, isn't it? Can you reproduce this locally? Any idea what the problem might be?