Package 'simpletex'

Title: Mathematical Formulas and Character Recognition
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'.
Authors: Xinyuan Chu [aut, cre]
Maintainer: Xinyuan Chu <[email protected]>
License: MIT + file LICENSE
Version: 1.0.4
Built: 2024-11-04 04:34:10 UTC
Source: https://gitlab.com/chuxinyuan/simpletex

Help Index


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)