| Type: | Package | 
| Title: | Mathematical Formulas and Character Recognition | 
| Version: | 1.0.5 | 
| Maintainer: | Xinyuan Chu <chuxinyuan@outlook.com> | 
| Date: | 2025-03-22 13:17:39 UTC | 
| Description: | By calling the 'SimpleTex' https://simpletex.cn/ open API implements text and mathematical formula recognition on the image, and the output formula can be used directly with 'Markdown' and 'LaTeX'. | 
| License: | MIT + file LICENSE | 
| URL: | https://github.com/chuxinyuan/simpletex | 
| BugReports: | https://github.com/chuxinyuan/simpletex/issues | 
| Depends: | R (≥ 3.6) | 
| Imports: | glue, digest, httr, jsonlite | 
| RoxygenNote: | 7.2.3 | 
| Suggests: | testthat (≥ 2.1.0), knitr, rmarkdown | 
| VignetteBuilder: | knitr | 
| Encoding: | UTF-8 | 
| NeedsCompilation: | no | 
| Packaged: | 2025-03-22 13:18:36 UTC; quwei | 
| Author: | Xinyuan Chu [aut, cre] | 
| Repository: | CRAN | 
| Date/Publication: | 2025-03-22 13:30:02 UTC | 
Mathematical formulas and character recognition
Description
Mathematical formulas and character recognition.
Usage
imgocr(img, mode = "latex_ocr")
Arguments
| img | An image file, supporting jpg, png, bmp format. | 
| mode | Set service model. The value can be 'latex_ocr', 'latex_ocr_turbo', or 'simpletex_ocr'. The default value is 'latex_ocr'. The 'latex_ocr' and 'latex_ocr_turbo' are used for formula identification. 'latex_ocr' is better than 'latex_ocr_turbo', but 'latex_ocr_turbo' is faster. 'simpletex_ocr' is suitable for general image recognition. | 
Value
Text or mathematical formulas for Markdown and LaTeX.
Examples
## Not run: 
  imgocr("path/to/test.jpg")
  imgocr("path/to/test.png", mode = "latex_ocr_turbo")
  imgocr("path/to/test.bmp", mode = "simpletex_ocr")
## End(Not run)