Camford Oxbridge
Camford Oxbridge

Reputation: 894

Compile error of TeX in .rmd file to create .html

I made a .rmd file for a vignette containing TeX scripts for my package.

My procedure

  1. Make a vignette as .rmdfile.
  2. Make a .htmlfile by the R script devtools::build_vignettes() or devtools::document()
  3. Open the resulting .html file via web browser [Chrome]
  4. I found that the tex script is raw in web browser page, that is, it is not compiled yet.

Why does such phenomenon occur ? Now, compile goes well, but a few hours ago, it failed.

Does the following relate ?

    > devtools::build_vignettes()
    Building mypkgName vignettes
    Warning message:
    In system(paste(cmd, "-n")) : 'make' not found
  Movin   aaa.html, bbb.html, ccc.html, aaa.R, bbb.R, ccc.R to doc/
Copying aaa.Rmd, bbb.Rmd, ccc.Rmd to doc/
Building vignette index

Upvotes: 0

Views: 107

Answers (1)

user2554330
user2554330

Reputation: 44838

Most raw LaTeX and raw HTML is just passed through Pandoc without changes. There are some exceptions: math in dollar signs (e.g. $x^2$) will be handled by MathJax, which can handle a subset of LaTeX.

Even if you're dealing with this subset, you will see what looks like raw LaTeX if MathJax can't run. This could happen if you have Javascript turned off in your web browser (maybe by NoScript), or if you can't connect to the MathJax website and haven't asked to reference a local copy of MathJax.

Upvotes: 1

Related Questions