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)
(invisibly) the rmarkdown
LaTeX equation block
image to be converted to LaTeX
Should the resulting LaTeX block be inserted into the document (default: TRUE)
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()
.