Coder Social home page Coder Social logo

kmgb / latex_input Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 566 KB

Use LaTeX-style inputs to write the equivalent unicode characters anywhere.

License: GNU General Public License v3.0

Python 100.00%
gui-application keyboard-listener keyboard-shortcuts latex unicode

latex_input's Introduction

latex_input's People

Contributors

kmgb avatar

Watchers

 avatar

latex_input's Issues

Math text mode option with font variants

Interface should provide a (default) option that enables math mode.
In math text mode:

  • Literal text is transformed to mathematical italic font variants if they exist

I see no advantage to disabling _{...} and ^{...} outside of math text mode as it could only otherwise be an error.
This change can be done at the same time as properly supporting all font variants like Serif + Bold + Mathematical + Italic, etc.

Better math mode

Currently, math mode just makes all text italic by default.
This doesn't make sense for some characters with italic variants, like capital Greek characters, which LaTeX renders as non-italic even in math mode.

Math mode should generally support:

  • Only converting Latin and lowercase Greek characters to italic variants
  • \sin, \cos, \log, etc to override this italic behavior
  • (potentially out of scope) different space handling -- ignoring by default, better spacing around operators, etc.

Add \mathcal{}, \mathbb{}, \mathfrak{}

mathcal = (MATHEMATICAL) SCRIPT <font> decomposition
mathbb = (MATHEMATICAL) DOUBLE-STRUCK <font> decomposition
mathfrak = MATHEMATICAL FRAKTUR <font> decomposition

Not all latin letters exist in each of these forms. Should take care to prefer the mathematical form, if available.

Keyboard hook fails after computer sleeps

Only Windows tested.

After sleeping and waking computer, CapsLock remains disabled but CapsLock+s doesn't activate the script and the letter 's' is still sent to the foreground application. Perhaps the keyboard Python package should be replaced with an AHK interfacing script on Windows.

Support vulgar fractions

<fraction> decompositions.
Either the name or X/Y parameter may be used to determine the correct conversion.
2150;VULGAR FRACTION ONE SEVENTH;No;0;ON;<fraction> 0031 2044 0037;;;1/7;N;;;;;

Improve parser by creating an AST

Currently, the translation from LaTeX to unicode happens inside the recursive descent parser. It would be better to create an AST of nested types and use the types like MathFrak's repr method to actually perform the conversion.

Save application preferences to configuration file

~/.config/latex_input/config.txt should work

  • Changing an option in the UI should write the new setting to the config file
  • Using launch parameters like --faster-keypresses and --math-mode should not save that setting change

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.