Description Usage Arguments Value Examples
This function will take an Rmd file and knit it, or and md file, and any LaTex with $ or $$ delineations, create pngs of these equations, and then insert a link to these equations to display in markdown
1 2 3 4 5 | parse_latex(rmd, new_md, git_username = NULL, git_reponame = NULL,
git_branch = "master", text_height = 20,
insert_string = paste0("\n<img src=\"%s%s\" ", "alt=\"Equation
Fail\"", "height=\"", text_height, "\">\n"),
raw_git_site = "https://rawgit.com", bad_string = "ZZZZZZZZZZZZZZZ", ...)
|
rmd |
Rmd or md file that needs to be parsed |
new_md |
Output md file (usually named README.md for gitHub |
git_username |
Username for repository (GitHub currently) |
git_reponame |
Repository name |
git_branch |
Branch of repository if not master |
text_height |
Height of LaTeX rendered passed ot |
insert_string |
String of HTML to put in LaTeX figure. Must have 2 %s for sprintf |
raw_git_site |
Site where to reference figure.
|
bad_string |
String to sub in for dollar signs temporarily (not need to be changed) |
... |
Arguments to be passed to |
Filename of parsed MD file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | rmd = file.path(tempdir(), "README_unparse.rmd")
download.file(
"https://raw.githubusercontent.com/muschellij2/Github_Markdown_LaTeX/master/README_unparse.rmd",
destfile = rmd, method = "curl")
new_md = file.path(tempdir(), "README.md")
parse_latex(rmd,
new_md,
git_username = "muschellij2",
git_reponame = "Github_Markdown_LaTeX")
library(knitr)
new_html = pandoc(new_md, format = "html")
browseURL(new_html)
new_md = file.path(tempdir(), "README.md")
parse_latex(rmd,
new_md,
git_username = "muschellij2",
git_reponame = "Github_Markdown_LaTeX")
library(knitr)
new_html = pandoc(new_md, format = "html")
browseURL(new_html)#'
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.