| mathpix {mathpix} | R Documentation |
Convert an image of an equation to a 'LaTeX' expression
Description
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.
Usage
mathpix(img, insert = TRUE, retry = FALSE)
Arguments
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? |
Details
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().
Value
(invisibly) the rmarkdown LaTeX equation block