GithubHelp home page GithubHelp logo

insad / unicodeit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from atcold/unicodeit

0.0 0.0 0.0 2.64 MB

Converts LaTeX tags to unicode: \mathcal{H} → ℋ. Available on the web or as Automator script for the Mac.

Home Page: https://www.unicodeit.net

License: Other

Python 56.97% JavaScript 0.20% CSS 0.79% HTML 1.39% TypeScript 40.64%

unicodeit's Introduction

UnicodeIt

Tested on Linux, Mac and Windows: Tests

Converts LaTeX tags to unicode. Available online at unicodeit.net.

Examples

\alpha α, \beta β, \infty ∞       e^+ e⁺, \mu^- μ⁻               \exists ∃, \nexists ∄
\int ∫, \sum ∑, \partial ∂        \to →, p\bar{p} pp̅             \mathcal{H} ℋ, \mathbb{R} ℝ
\slash{\partial} ∂̸                \underline{x} x̲                \phone ☎, \checkmark ✓
\dot{x} ẋ, \ddot{x} ẍ             A^6 A⁶, m_0 m₀                 \Im ℑ, \Re ℜ, \hbar ℏ
\gamma γ, \Gamma Γ                \~{O} Õ                        \perp ⊥, \parallel ∥
\sfrac{3}{5} ⅗                    \therefore ∴, \because ∵       \subset ⊂, \supset ⊃

Python

Install with pip install unicodeit and run

python -m unicodeit.cli \\alpha

or in Python

import unicodeit
print(unicodeit.replace('\\alpha'))

JavaScript / TypeScript

Install with npm install unicodeit --save-dev and use it like this:

var unicodeit = require('unicodeit');
console.log(unicodeit.replace('\\alpha'));

Mac Automator

Create your own Automator Workflow:

  • Create a new "Quick Action" (might also be labeled as "Service").
  • At the top, leave the defaults: "Service receives selected text in any application"
  • Select the checkmark "output replaces selected text".
  • Add the action "Run Shell Script".
  • From dropdown, select to "pass in: as arguments".
  • The command is: /usr/local/bin/python3 -m unicodeit.cli $1. This Python interpreter must have unicodeit installed; e.g. with /usr/local/bin/python3 -m pip install unicodeit.
  • It should look something like this:

automator script

To set a keyboard shortcut, go to System PreferencesKeyboardShortcutsServicesTextUnicodeItAction. Choose a keyboard shortcut like Command+Option+Shift U.

Now you are all set to use your new keyboard shortcut in many apps, like here in Keynote:

keynote_demo

unicodeit's People

Contributors

svenkreiss avatar dependabot[bot] avatar pseyfert avatar milescranmer avatar davidweichiang avatar kmyk avatar duetosymmetry avatar mattleblanc avatar nicolapps avatar twolczanski 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.