Converts an image to LaTeX then inserts that into an rmarkdown equation (surrounded by $$).
rmarkdown_block(img, retry =FALSE)
Arguments
img: image to be converted to LaTeX
retry: If Mathpix is not able to process the image, should we try again with a re-processed image?
Returns
an rmarkdown equation block
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().