mathpix: Convert an image of an equation to a 'LaTeX' expression

View source: R/connect.R

mathpixR 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

References

https://mathpix.com/


mathpix documentation built on April 2, 2022, 5:05 p.m.

Related to mathpix in mathpix...