The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Introduction to simpletex

Xinyuan Chu

2024-07-07

Introduction

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.

Configure the ID and SECRET for the SimpleTex API

To use the simpletex package, user need to first register with the SimpleTex platform, and then create application. After creating the application, Then you will get SimpleTex API ID and SECRET.

Put your SimpleTex API ID and SECRET in the following code and run it once.

cat(
  '\n# ID and SECRET of SimpleTex',
  'SIMPLETEX_APP_ID = "Your SimpleTex API ID"',
  'SIMPLETEX_APP_SECRET = "Your SimpleTex API SECRET"',
  file = '~/.Renviron', sep = '\n', append = TRUE
)

Basic usage

imgocr(img = "path/to/image", mode = "latex_ocr")

For the output, for example: “E=mc^2”, you can copy only the parts within quotation marks of the output directly into the ‘.md’ or ‘.tex’ document.

Note: in order to the formula to render properly in ‘.md’ or ‘.tex’ documents, you also need to wrap the formula with $ or $$ on both sides.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.