mathpix | R Documentation |
Given an image file location, mathpix
performs the relevant
transformations and send the data to the 'Mathpix' API, which returns a
'LaTeX' expression which should generate the typeset equation/expression in
that image. When using 'RStudio', the resulting 'LaTeX' expression is
automatically inserted into the current rmarkdown
document.
mathpix(img, insert = TRUE, retry = FALSE)
img |
image to be converted to LaTeX |
insert |
Should the resulting LaTeX block be inserted into the document (default: TRUE) |
retry |
If Mathpix is not able to process the image, should we try again with a re-processed image? |
You must save your own API key in your
environment (e.g. ~/.Renviron
) with the identifiers MATHPIX_APP_ID
and
MATHPIX_APP_KEY
. This can be tested with mathpix:::credentials()
.
(invisibly) the rmarkdown
LaTeX equation block
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.