knrafto / mathsymbolsinput Goto Github PK
View Code? Open in Web Editor NEWLaTeX-style mathematical symbols input method for macOS
License: MIT License
LaTeX-style mathematical symbols input method for macOS
License: MIT License
Ideally we should show both the command and the symbol we'd replace it with. I think at one time I tried the IMKCandidates API but it didn't really look right, so maybe this needs some custom UI work.
I find myself typing out keyboard shortcuts reasonably often. Others might benefit from including the proper symbols in the default set.
Here's a list copied from Stack Exchange: https://apple.stackexchange.com/questions/55727/where-can-i-find-the-unicode-symbols-for-mac-functional-keys-command-shift-e
It would be nice if pressing tab
completed the command instead of just inserting an incomplete command name. So, e.g., \al would complete to \alpha, inserting α, if that is the only available completion. If there are multiple completions, showing a list of completions would also be nice.
"Math Symbols Input" doesn't exactly roll off the tongue. Maybe a name like "LaTeX input" would be more googlable, and maybe more accurate since it doesn't have to be math symbols.
Examples of where this might help:
Hi,
I was attempting to package this input method with a declarative build setup (see LnL7/nix-darwin#587). It works well, but one problem is that if the list of custom commands is updated then the input method does not pick up the changes until the user logs out. The way this setup works is that it generates a com.mathsymbolsinput.inputmethod.MathSymbolsInput.plist
file and then symlinks that into /Users/USER/Preferences/
.
This is entirely a synthetic problem of my own making (and so don't expect any changes), but I was curious if it might make sense to add some ability to update the internal command buffer if the preference file changes. Potentially either through some sort of watch method (which may not work with the symlink) or by loading the preferences file each time the input method is switched to.
This may also help solve #17. You can see how I am attempting to share configurations between machines here.
I'm not totally sure what to put here though. Suggestions:
Right now it uses Apple's sample from NumberInput
Steps to reproduce:
A newline should be inserted, but instead a duplicate "\foo" is inserted at the cursor.
This is probably an XCode bug; the same thing happens with Chinese Pinyin.
If you try clicking on "About" from the menu while the keyboard focus is in the Chrome address bar, nothing happens. The menu works if the keyboard focus is in the webpage, however.
I'm fairly sure this is a macOS and/or Chrome bug. The same issue occurs with Google Japanese Input's menu. Chrome's address bar is probably highly customized and implements its own input method functionality, and nobody tested the menu.
There's no indication if the input method is active or not, because the "marked text" is not underlined. This is probably an XCode bug, because the same thing happens with Chinese Pinyin.
There seems to be several competing frameworks: https://en.wikipedia.org/wiki/List_of_input_methods_for_Unix_platforms
The top ones are IBus, SCIM, Fcitx, and uim. I'm not sure which one would be best.
i.e. what keys are special?
Steps to reproduce:
The text \foo should be inserted into the find bar, and the find bar should be left open. Instead, the find bar closes too.
Using a more modern language could make development easier, and SwiftUI could help with menus or autocomplete windows.
This is the only resource I can find: https://www.logcg.com/en/archives/2078.html
Dead keys in the US keyboard, and a few other keyboard layouts I tested, don't work with the input method active. Frustratingly, dead keys do seem to work with the "ABC - Extended" layout, and custom layouts made with Ukelele.
Currently we use the "key binding" approach to receive input data from InputMethodKit. Let's say we press Option+e then o to input ó. With the ABC - Extended layout, we get the following events:
With the US layout, we get:
Some options on how to fix this:
For instance, in order to share between multiple computers.
For now, you can copy ~/Library/Preferences/com.mathsymbolsinput.inputmethod.MathSymbolsInput.plist
in its entirety from one computer to the next, but this will delete any previous custom commands on the target computer. And it only works on Mac.
Would it be possible for the extension to not disable the press-and-hold accent popup? If that's not possible, it would be good to include latex sequences for accented characters in the standard command set.
I tried IMKCandidatesWindow but it doesn't look great. We'll probably have to implement our own window logic.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.