Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding missing superscripts and subscripts symbols #104

Closed

Conversation

chmduquesne
Copy link
Contributor

Hi there,

I noticed missing superscripts and subscripts symbols. Here is an updated list, with additional handy shortcuts.

Cheers,
Christophe-Marie

@fdw
Copy link
Owner

fdw commented Nov 13, 2021

Thank you for the effort! 🙂

Unfortunately, this list is auto-generated from the official Unicode definition, so the next update would overwrite everything.

Seeing that you're not the first one to want to add something here, maybe I should think about a mechanism for that...

@chmduquesne
Copy link
Contributor Author

Cool to see this project moving forward 🙂

I remember toying with extract_emojis.py in #27 and back then rofimoji was only handling emojis. It has become my goto method for inserting any unicode character.

I acknowledge the power of extracting all information from unicode.org, but there are small caveats for the user that I would like to discuss:

  1. Missing characters: this list is not complete. I recently found myself writing a document with a lot of superscript and subscripts, and the fact that unicode.org does not have all of them is frustrating.
  2. Inability to add your own "search terms". The description of a character is sometimes difficult to remember. I would love to be able to edit it (see The forced use of the option markup-rows makes it impossible to search for the symbol '<' #103).

Bottom line: a way to add your own set of files with their own search terms would be very welcome. I believe that people would eventually share their own config, and expand the search terms with machine learning generated descriptions 🤖

@fdw
Copy link
Owner

fdw commented Nov 18, 2021

I remember you too. Happy you're still a fan of rofimoji 😊

Missing characters: this list is not complete. I recently found myself writing a document with a lot of superscript and subscripts, and the fact that unicode.org does not have all of them is frustrating.

Which ones are you missing? superscripts_and_subscripts.csv seems to me to contain all that are defined in Unicode, apart from ² and ³, which are (unfortunately) part of the latin-1_supplement.csv. Should there be any others?

Inability to add your own "search terms".

This happened more by accident, and isn't advertised anywhere, but you can define your own .csv with symbols and additional descriptions. When you tell rofimoji to both show the provided file and yours, the descriptions will be merged.
So, this could be a workaround for now 🙂

However, as there have been several requests for additional keywords and descriptions, I'll think about a way to make that easier and/or more obvious. This could also pave the way for localization...

and expand the search terms with machine learning generated descriptions 🤖

You have quite a vision there. Let's see 😉

fdw added a commit that referenced this pull request Nov 21, 2021
If you want additional descriptions or even additional characters, you
can now add them to
`.local/share/rofimoji/data/<filename>.additional.csv. They will be read
when `<filename>` is requested and sensibly appended.

Might help with #104
@fdw
Copy link
Owner

fdw commented Nov 21, 2021

I've just pushed a branch that will automatically read additional files and expand the provided characters/descriptions. You can try it out; feedback is definitely appreciated 🙂

fdw added a commit that referenced this pull request Dec 5, 2021
If you want additional descriptions or even additional characters, you
can now add them to
`.local/share/rofimoji/data/<filename>.additional.csv. They will be read
when `<filename>` is requested and sensibly appended.

Might help with #104
@fdw
Copy link
Owner

fdw commented Dec 12, 2021

I've just pushed another update to the expansion branch which enables rofimoji to provide additional, custom descriptions. You could try to move your additional ones from this PR to a file in data/additional/ and test it out.

Also, if you have time, could you please re-check which super- and/or subscripts are missing (see my question above)? Thank you!

fdw added a commit that referenced this pull request Dec 12, 2021
If you want additional descriptions or even additional characters, you
can now add them to
`.local/share/rofimoji/data/<filename>.additional.csv. They will be read
when `<filename>` is requested and sensibly appended.

Might help with #104
@chmduquesne
Copy link
Contributor Author

The superscript missing are basically:

  1. all latin letters (except n)
ᵃ superscript a ^a
ᵇ superscript b ^b
ᶜ superscript c ^c
ᵈ superscript d ^d
ᵉ superscript e ^e
ᶠ superscript f ^f
ᵍ superscript g ^g
ʰ superscript h ^h
ⁱ superscript i ^i
ʲ superscript j ^j
ᵏ superscript k ^k
ˡ superscript l ^l
ᵐ superscript m ^m
ⁿ superscript n ^n
ᵒ superscript o ^o
ᵖ superscript p ^p
ʳ superscript r ^r
ˢ superscript s ^s
ᵗ superscript t ^t
ᵘ superscript u ^u
ᵛ superscript v ^v
ʷ superscript w ^w
ˣ superscript x ^x
ʸ superscript y ^y
ᶻ superscript z ^z
  1. all greek letters:
ᵝ superscript beta ^beta
ᵞ superscript gamma ^gamma
ᵟ superscript delta ^delta
ᵋ superscript epsilon ^epsilon
ᶿ superscript theta ^theta
ᶥ superscript iota ^iota
ᶹ superscript upsilon ^upsilon
ᵠ superscript phi ^phi
ᵡ superscript chi ^chi

As for the subscripts,

  1. some of the latin letters:
ᵢ subscript i _i
ⱼ subscript j _j
ₖ subscript k _k
ₗ subscript l _l
ₘ subscript m _m
ₙ subscript n _n
ₒ subscript o _o
ᵤ subscript u _u
ᵥ subscript v _v
ₓ subscript x _x
  1. all greek letters:
ᵦ subscript beta _beta
ᵧ subscript gamma _gamma
ᵨ subscript rho _rho
ᵩ subscript phi _phi
ᵪ subscript chi _chi

@chmduquesne
Copy link
Contributor Author

chmduquesne commented Dec 13, 2021

I've just pushed another update to the expansion branch which enables rofimoji to provide additional, custom descriptions.

Do I have to do it in the source code, or does it support a local dotfile for keeping my modified descriptions? (e.g. ~/.local/share/rofimoji/customizations.csv)

You could try to move your additional ones from this PR to a file in data/additional/ and test it out.

I can do this, sure.

@fdw
Copy link
Owner

fdw commented Dec 13, 2021

Do I have to do it in the source code, or does it support a local dotfile for keeping my modified descriptions?

Neither 🙂 If you have a file in ~/.local/share/rofimoji/data called, for example superscripts_and_subscripts.additional.csv, it will be automatically read when you request superscripts_and_subscripts.

@fdw
Copy link
Owner

fdw commented Dec 13, 2021

Regarding the missing super- and subscripts: I think I found them, in phonetic extensions. As I said, rofimoji is based upon the official Unicode definitions. The characters you found are meant for phonetic descriptions, which is why they're found only there.

Of course, you can define your own file for these and add it to this PR as a new one. But I don't want to touch the Unicode one.

fdw added a commit that referenced this pull request Dec 14, 2021
If you want additional descriptions or even additional characters, you
can now add them to
`.local/share/rofimoji/data/<filename>.additional.csv. They will be read
when `<filename>` is requested and sensibly appended.

Might help with #104
fdw added a commit that referenced this pull request Jan 1, 2022
If you want additional descriptions or even additional characters, you
can now add them to
`.local/share/rofimoji/data/<filename>.additional.csv. They will be read
when `<filename>` is requested and sensibly appended.

Might help with #104
fdw added a commit that referenced this pull request Jan 3, 2022
If you want additional descriptions or even additional characters, you
can now add them to
`.local/share/rofimoji/data/<filename>.additional.csv. They will be read
when `<filename>` is requested and sensibly appended.

Might help with #104
@chmduquesne
Copy link
Contributor Author

Is this in the official distribution yet? I tried the feature ~/.local/share/rofimoji/data/X.additional.csv with a fairly recent install of rofimoji (via pip) but did not get it to work yet.

@fdw
Copy link
Owner

fdw commented Jan 7, 2022

No, it's only on a branch (expansion) at the moment. Can you still test it there? If not, I'll try to build something.

fdw added a commit that referenced this pull request Jan 29, 2022
If you want additional descriptions or even additional characters, you
can now add them to
`.local/share/rofimoji/data/<filename>.additional.csv. They will be read
when `<filename>` is requested and sensibly appended.

Might help with #104
@fdw
Copy link
Owner

fdw commented Jan 29, 2022

I've merged the branch today; maybe this helps?

@fdw
Copy link
Owner

fdw commented Mar 20, 2022

Have you found time to play with it yet? If so, what do you think about adding your changes as a separate file?

@fdw
Copy link
Owner

fdw commented May 28, 2022

I'll close this, as there hasn't been any activity in quite some time. If you want to update the PR, feel free to do so and re-open it.

@fdw fdw closed this May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants