GithubHelp home page GithubHelp logo

marlon154 / obsidian-ocrlatex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hugo-persson/obsidian-ocrlatex

0.0 0.0 0.0 3.8 MB

This is a plugin for obsidian that will read your latest copied image from clipboard and generate math latex from it

License: MIT License

JavaScript 18.72% TypeScript 79.39% CSS 1.89%

obsidian-ocrlatex's Introduction

About ๐Ÿ—ž๏ธ

This extension takes your latest copied image from your clipboard and converts the math to latex and inserts it at your position in the editor. See GIF below for example of usage with a keybinding: A couple of things happen here

  1. I take a screenshot of the formula on the left
  2. I use a keybinding to trigger the OCRToLatex
  3. A loading indicator is inserted

Getting started ๐Ÿš€

To get started first get an api token, see below. Then go to settings and insert it. After this you are ready to use the plugin. Try to snip a math formula to your clipboard and run the command Generate latex from last image to clipboard

Getting API Token ๐Ÿ”

To use this plugin you need to create a developer account at https://simpletex.cn. Below I describe how to do this

  1. Go to https://simpletex.cn/api
  2. Click "Go to API Dashboard"
  3. Create an account
  4. After this go to User Access Token and click Create token
  5. Copy the token and paste into Obsidian settings
  6. Now you are ready to use the addon ๐Ÿฅณ

Using a Self-Hosted Docker API ๐Ÿณ

It is possible to a self-hosted instance.The self-hosted API should just return a string with quotes containing the LaTeX text, you can use this image from this repo.

  1. Setup the docker container image
  2. Enable Use Docker in the plugin settings
  3. Enter the URL to the container, if you use the image above you need to postfix /predict/ e.g. http://localhost:8502/predict/
  4. Optional add username and password, if container is behind a basic auth proxy (e.g. nginx)

Future improvements โœ…

Attribution

Thanks to these libraries and services for making this plugin possible

obsidian-ocrlatex's People

Contributors

hugo-persson avatar marlon154 avatar mideks avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.