JerryI / wolfram-js-frontend

Dynamic Notebook Environment for Wolfram Language written in Javascript
https://jerryi.github.io/wljs-docs/
GNU General Public License v3.0
235 stars 8 forks source link

Insert Special Characters #212

Open LoganJFisher opened 2 weeks ago

LoganJFisher commented 2 weeks ago

Is your feature request related to a problem? Please describe. There currently is no convenient way to use various symbols like Greek letters and various math symbols.

Describe the solution you'd like I would appreciate a menu, like is found in Mathematica, which allow you to select from various sets of special characters.

Additional context sizrTi4

JerryI commented 2 weeks ago

A palette window is a good option. For now some greek symbols can be entered using ESC key and first few letters, then it can be selected from the autocomplete menu

JerryI commented 1 week ago

We added it in a form of a snippet (in a new version of wljs-snippets)

image

It works similar to Insert Matrix, Import Data and etc. Just type in the command palette Glyphs toolbar and a helper window will appear in a form of a regular cell.

I added basic greek symbols, fractions, and etc (actually better to use shortcuts for them, i.e. Ctrl+/, Ctrl+2, Ctrl+7...). They can work not only in Wolfram Language, but also in .html, .wlx and .md. This snippet automatically detects the context and uses the corresponding strategy.

PS: To get a new version: wait 2-3 days (typical this is a time interval for a package manager to check updates) or call Check updates from the settings menu and a new version will be fetched automatically.

JerryI commented 1 week ago
Screenshot 2024-06-29 at 13 21 36

here is some examples on how it "adapts" to different cell types