MathCurvesSurfacesWallpaper GroupsGallerySoftwarePOV-Ray
ProgramingLinuxPerl PythonHTMLCSSJavaScriptPHPJavaEmacsUnicode ♥
Web Hosting by 1&1

How to Create a APL or Math Symbols Keyboard Layout ⌨

Xah Lee, , …,

This page shows you how to create a APL (programming language) keyboard layout, for {Windows, Mac OS X, Linux}. Or, you can create a math symbols layout for computer languages such as Fortress, Scheme Lisp, Haskell, LaTeX/XeTeX, or simply as a system to type math symbols in plain text.

APL Symbols in Unicode

APL keyboard layout
APL keyboard layout. img src

Unicode has the complete set of APL chars.

' ( ) + , - . / : ; & l t ; = & g t ; ? [ ] \ _ ¨ ¯ × ÷

APL2 keyboard layout
APL2 keyboard layout. img src

For other math symbols, such as λ ƒ , see: Math Symbols in UnicodeArrows in UnicodeComputing Symbols in Unicode.

Unicode Font

First you need to have Unicode font. See: Best Unicode Fonts for Programing.

Emacs

There are many ways to insert math symbols with emacs.

Insert by Abbrev

You can insert Unicode by abbrev. ⁖ typing alpha becomes α. For how, see: Using Emacs's Abbrev Mode for Abbreviation.

This method is good if you need to insert math symbols occasionally. (one flaw with this solution is that emacs abbrev only allow sequence of English letters to be used as input. So, you cannot define -> as abbrev for .)

Insert by Short Code and a Activation Key

This package lets you type a short code, from 1 to 4 letters, then press 【⇧ Shift+Space】 to change it to a math symbol. See: Math Symbols Input Mode (xmsi-mode). (It's designed for inserting math symbols, not designed for APL in particular. It does not support most of the APL symbols, but you can easily add your own abbrev code to make it so.)

Insert by Key Combo

You can set your keys so that 【❖ Win+‹key›】 or 【▤ Menu+‹key›】 or 【F8 ‹key›】 inserts a math symbol. See: Emacs Custom Keybinding to Enhance Productivity.

Creating Your Own Unicode Layout for {Windows, Mac, Linux}

Pre-defined APL Layout for {Windows, Mac, Linux}

I haven't tried the following.

Here's a project that has the APL layout made for Mac & Windows: http://code.google.com/p/apl-keyboard-layouts/.

blog comments powered by Disqus