Git Product home page Git Product logo

tldraw-katex's Introduction

Tldraw + KaTeX prototype

This repo contains a prototype of how KaTeX integration could look like in tldraw.

Screen recording of the Katex tool prototype

The prototype is very rough, see issues for the known caveats.

Running

I suggest 2 options:

  1. Run locally
  2. Run in a github codespace (it's free!) where everything is installed for you on the github remote machine and you can interact with the code right from your browser

Option 1: running locally

You need node.js javascript engine to run npm command in your terminal (npm stands for "node package manager"). If you don't have node.js I reccomend to install it with nvmnode version manager.

Once you have node installed, run the following from the root of this repo.

npm install
npm run dev

This will start a local development server. The output in the terminal will look something like this:


  VITE v5.3.1  ready in 113 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help

So you can open the address http://localhost:5173/ in your browser to see the running example.

Option 2: running in a codespace

First you need a codespace. Click "code -> codespaces -> plus sign"

Create codespace interface screenshot

Github will create a codespace for you and suggest to open it in VSCode — popular IDE. If you don't have it — no problem, just click cancel.

Open vscode dialog screenshot

Now return back to the repo page and click code again. You'll see a codespace created for you. The name is random, in my case it's verbose space invention You can open it in browser.

Open codespace in browser menu screenshot

Github opens a web version of vscode for you. Find the terminal area. It will greet you.

Terminal on codespace sreenshot

Type the following commands into the terminal (same as locally).

npm install
npm run dev

Looks like github runs npm install for you but there is no harm in running it again

When your dev server is up, a popup will appear. Click the big green button to see the code working!

Open in browser dialog screenshot

The quotas for github codespaces are quite generous but it's still easy to eat it all up by mistake. Active codespaces eat compute quota and storage quota. Switched off codespaces eat storage quota. You can see all your codespaces at http://github.com/codespaces.

License note

The code in this repo is MIT licensed. I will be glad if you use it.

But the original tldraw code has it's own license. That license doesn't allow commercial use without the permission of tldraw creators. Contact them!

tldraw-katex's People

Contributors

oktosha avatar

Stargazers

 avatar fakerr avatar

Watchers

 avatar

tldraw-katex's Issues

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.