Git Product home page Git Product logo

emacs-webkit-katex-render's Introduction

webkit-katex-render: an instant Latex Previewer for Emacs

Demo

./demo.png

Please checkout the demo video.

Preparation

You need emacs compiled with xwidget support.

If you are on mac OS, you can use brew to install it.

brew tap d12frosted/homebrew-emacs-plus
brew install emacs-plus --HEAD --with-xwidgets

On Linux, you can build Emacs from git Repository.

git clone --depth 1 --branch emacs-27 https://github.com/emacs-mirror/emacs.git
cd emacs
./autogen.sh
./configure --with-modules --with-xwidgets
make -j4
sudo make install

Install

  • use-package
(use-package webkit-katex-render
  :init
  ;; if you use doom-emacs
  (setq webkit-katex-render--background-color (doom-color 'bg))
  ;; if you want to set a different path to the html client
  (setq webkit-katex-render--client-path "PATH/TO/CLIENT.html")
  ;; if you want to add your customized ~math-at-point~ function
  (setq webkit-katex-render--math-at-point-function 'function))
  • My config for doom-emacs
(def-package! webkit-katex-render :load-path "~/Source/playground/emacs-webkit-katex-render"
  :commands (webkit-katex-render-mode)
  :config
  (setq webkit-katex-render--background-color (doom-color 'bg)))

Usage

  • M-x webkit-katex-render-mode to start the minor mode
  • Move your cursor to a latex fragment (in either org mode or latex-mode)
  • Try look around and type equations!

Plans

See issue board.

emacs-webkit-katex-render's People

Contributors

fuxialexander avatar zsxh avatar

Watchers

 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.