Skip to content

Turn keywords into utf8 characters anywhere you need to.

License

Notifications You must be signed in to change notification settings

nqtronix/ahk-utf8-anywhere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ahk-utf8-anywhere

Turn keywords into utf8 characters anywhere you need to.

release: NA platform: windows status: maintained issues: NA license: NA

Getting StartedExamplesNeed Help?AboutCredits


Introduction

Adding special characters to a text document is usually a hassle and requires a character table or specialized tools like LaTeX. Many times it is not worth the effort and without the symbols text or equations look rough and are not well readable.

ahk-utf8-anywhere provides a shortcut to any character you need. Just type in the correcpondig keyword (also called hotstring) and convert it by pressing #. It's that easy!


Key Features

  • extensive: 900+ characters are included
  • intuitive: multiple keywords per character, including pictographic, LaTeX and HTML
  • fast: auto-conversion as you type without any performance impact
  • customisable: add any character to the tool within seconds
  • anywhere: works in any program with a supported font

Getting Started

You've never written a readme and want to do it right straight from the start? Then just follow the steps below. If you run into problems, please ask for clarification.

Step 1: Download third-party software (optional)

  • AutoHotkey
    The tool is written with AutoHotkey, a powerful yet simple scripting program. To change the code you must install it, otherwise you can just run the .exe.

  • Rons CSV Editor
    The character assignments are stored in a simple csv file. To make modifications to them, yoou need a suitable editor which supports UTF8 encoding. I created the csv file with Rons CSV Editor and I highly recommend it. Notepad++ can be used as well, especially for minor edits. Excel and Calc do not work and will break the file.

Step 2: Download ahk-utf8-anywhere

  • Copy this repository
    Clone it or hit Download and extract the .zip file.

Step 3: Run it!

  • Start typing
    Double click on the .exe (or the .ahk, if AutoHotkey is installed) and start typing! For example you can "draw" and arrow => and convert it to ⇒ by pressing # afterwards. Alternatively you can use the hotstrings \Rightarrow (LaTeX), &Rightarrow (HTML) or &rArr (HTML). Use whatever is easiest for you to remember!

  • Get Help
    Type #help# to open the help menu with additional information.

  • Edit the character assignments
    Type #config# to open the .csv file with the default program. Edit the file, save it and type #reload# to update the script. You can also use this to see which characters are available.


Examples

Below you find a list of a few notable examples. For a full list of included characters please open the included look-up table lut.csv , which ypu can open with #config#.

  • Greek Letters
    α, β, γ, ω, π (alpha, beta, gamma, omega, pi)
    Ω, Π (Omega, Pi)

  • Superscript, Subscript, Fracctions
    ⁰, ¹, ², ... ⁹, ⁺, ⁻, ⁼ (sup0, sup1, sup2, sup9, sup+, sup-, sup=)
    ₀, ₁, ₂, ... ₉, ₊, ₋, ₌ (sub0, sub1, sub2, sub9, sub+, sub-, sub=)
    ½, ⅔, ¾, ⅚, ⅞ (1/2, 2/3, 3/4, 5/6, 7/8)
    ¹²³⁄₃₂₁ (sup1 sup2 sup3 frac sub3 sub2 sub1)

  • Symbols
    ✓, ✔, ✗, ✘ (marky, Markn, markn, Markn)
    ☐, ☑, ☒ (box, boxy, boxn)

  • Arrows (combinations limited by utf8)
    ←, →, ↔ (<-, ->, <->)
    ←, ↖, ↑, →, ↘, ↓ ↙ (->l, ->ul, ->u, ->ur, ->r, ->dr, ->d, ->dl)
    ↠, ↣, ↦, ⇥, ↝, ⇝, ⇒, ⤇ (->>, >->, |->, ->|, ~>, ~~>, =>, |=>)
    ⟶, ⟼, ⟹, ⟾, ⟿ (-->, |-->, ==>, |==>, ~~~>)

  • Math
    f′, f″, f‴, f⁗ (', '', ''', '''')
    ¬, ∧, ∨, ⊼, ⊽, ⊻ (neg, and, or, nand, nor, xor)
    ⌀, ∠, ∡, ∢ (dia, ang, angm, angs)
    ∔, ∸, ±, ∓, ⋅, ∗, ⋆, ×, ∕, ÷, ⋇, o (+., -, +-, -+, *, **, ***, x, //, /:, /:x, o)
    √, ∛, ∜ (sqrt, sqrt3, sqrt4)
    ∫, ∬, ∭, ∮, ∯, ∰ (int, int2, int3, into, into2, into3)
    ℜ, ℑ, ℕ, ℤ, ℚ, ℝ, ℂ (Re, Im, NN, ZZ, QQ, RR, CC)
    ∑, ∏, ∐ (sum, prod, coprod)
    ≐, ≟, ≗, ≙, ≚, ≛, ≞, ≝ (=*, =?, =°, =^^, =v, =***, =m, =def)
    ≠, ≡, ≢, ≣ (!=, =_, !=_, =__)
    ≈, ≉, ≋, ≂, ≃, ≄, ≅, ≆, ≇, ≊ (~~, !~~, ~~~, _~, ~_, !~_, ~__, ~!__, !~__, ~~_)
    ⋖, ≮, ≪, ⋘, ≤, ≰, ≲, ⋦, ≴, ≦, ≨, ⪅, ⪉ (<., !<, <<, <<<, <_, !<_, <~, <!~, !<~, <__, <!__, <~~, <!~~)

  • Combining (overlays the character before, might not always render correctly)
    ṙ, r̈, r̃, r̄, ŕ, r̀, r̆, ȓ, r̂, ř, r̊, r⃗ (r&a., r&a.., r&a~, r&a-, r&a´´, r&a``, r&au, r&an, r&a^^, a&av, r&a°, r&a->)
    ṛ, r̤, r̰, ṟ, r̗, r̖, r̮, r̯, r̭, r̬, r̥, r⃯ (r&b., r&b.., r&b~, r&b-, r&b´´, r&b``, r&bu, r&bn, r&b^^, b&bv, r&b°, r&b->)
    r̴, r̵, r̶, r⃒, r⃦, r̸, r⃫ (r&o~, r&o-, r&o_, r&o|, r&o||, r&o/, r&o//)
    r⃝, r⃞, r⃟, r⃠, r⃢, r⃣ (r&ec, r&es, r&ed, r&eb, r&ey, r&ek) [Note: shown incorrectly on github]


Support

FAQ

This FAQ is also build-in to the script and can be accessed by typing #faq#.

  • Q: The script doesn't work! The inserted characters are wrong and/or saving always messes up the file!
    A: If it does, your program may not use UTF8-BOM encoding for editing and/or saving the file. Please check whether your program has a setting for this or choose a better program.

  • Q: Why are some or all characters displayed as a box?
    A: The box is a placeholder for a character not supported by the font you're using. On fileformat.info you find a list of the most common fonts and the characters they support. For programmers I recommend FreeMono, a monospace font similar to Courier.

  • Q: Why are some characters formatted incorrectly, even though they are not missing?
    A: Many fonts do not support "Combining Diacritical Marks" well, so most programs show a best effort representation. Try another font to fix this.

  • Q: Why does editing the csv lookup-table break certain characters?
    A: Most table editors, including Microsoft Excel and OpenOffice Calc, do not handle csv files well. Those programs convert the csv data first into their internal format and later back into a csv file, leading to information loss. For the creation of this script Rons CSV Editor was used.

  • Q: The script replaced only part of a hotstring with a character I did not want! Ho do I get the correct character?
    A: This script chooses the first suitable hotstring and replaces it with the respective character. For example the csv list may contain ""yellow", "yellowgreen" and "green in this order. If you type "yellowgreen" and confirm it with '#', "green" will match, because it was the first suitable match in that list. The priority in the csv file is left to right, bottom to top.

  • Q: Why are the hotstrings case sensitive? How can I change this behavior?
    A: Often it is helpful to differentiate between upper and lowercase characters, espcially if some hotstrings are designed to match the latex expression. To change this behavior remove the 'C' from the command "#Hotstring ? O C" at the top of the script (not recommended).


Get Help

Your question or problem wasn't solved in the FAQ? No worries! Just open up a new issue in the GitHub issue tracker. Please provide all information to reproduce your problem. If you don't have a GitHub account (and can't be bothered to create one,) you can contact me directly.


Contribute

Spotted an error? Open an issue or submit a pull request.

There is no CONTRIBUTING.md yet, sorry. Contributions will inherit the license of this project. If you have any questions, just ask.


About

Status

This project is currently classified as status: maintained
The developers intend to keep the code in working condition by updating dependencies, fixing bugs and solving issues.

I've been using a hardcoded version with a subset of the characters for a few years now and finally decided to update it to a cleaner version with a seperate look-up table. I consider the script feature complete, but it is likely that I'll add more characters or change hotstrings if it seems useful to me.


Known Issues

  • none (that are reported)

Changelog

This project uses Semantic Versioning 2.0.0. During initial development (0.x.x versions) any major increase is substituted with a minor increase (0.1.0->0.2.0 instead of 0.1.0->1.0.0).

The message of each commit contains detailed information about the changes made. The list below is a summary about all significant improvements.

  • 0.1.0 (latest)
    • initial release

Contact

If you haven't done so already, please check out Get Help for the fastest possible help on your issue. Alternatively you can find my public email address on my profile.


Credits and References

Projects Used


License

This project is proudly licensed under the MIT license.

The MIT license was chosen to give you the freedom to use this project in any way you want, while protecting all contributors from legal claims. Good code works, great code works for everyone. If this project has been useful to you, a link back to us would be highly appreciated. Thanks!