Typing glyphs: Difference between revisions

Jump to navigation Jump to search
1,154 bytes added ,  06:21, 27 September 2022
→‎iOS: Keyboard built with Pythonista for iOS
(→‎iOS: Keyboard built with Pythonista for iOS)
(5 intermediate revisions by 2 users not shown)
Line 10: Line 10:
* Unicomp sells both [https://www.amazon.com/Unicomp-Classic-Buckling-Spring-Keyboard/dp/B01M7V3M61/ref=sr_1_8 entire keyboards] and [https://www.pckeyboard.com/page/product/USAPLSET separate key caps] for their keyboard range.
* Unicomp sells both [https://www.amazon.com/Unicomp-Classic-Buckling-Spring-Keyboard/dp/B01M7V3M61/ref=sr_1_8 entire keyboards] and [https://www.pckeyboard.com/page/product/USAPLSET separate key caps] for their keyboard range.


US keyboard stickers are available for the [[Dyalog APL]] and [[APL2]] layouts:
* mykeyboard.eu sells [https://mykeyboard.eu/catalogue/pbt-crp-r4-alphas-apl_3957/ APL2 key caps] for [[wikipedia:Cherry (company)|Cherry]] switches.


* Tindie sells the [https://www.tindie.com/products/russtopia/apl-keyboard-symbol-sticker-set/ Dyalog APL sticker set]
Keyboard stickers are available too:
* mykeyboard.eu sells the [https://mykeyboard.eu/catalogue/pbt-crp-r4-alphas-apl_3957/ APL2 sticker set]
 
* Tindie sells a [https://www.tindie.com/products/russtopia/apl-keyboard-symbol-sticker-set/ Dyalog APL sticker set] for US keyboards.


Note that these devices only are visual modifications on regular keyboards; they do not automatically enable entry of APL glyphs into software. For this, one of the below methods is required.
Note that these devices only are visual modifications on regular keyboards; they do not automatically enable entry of APL glyphs into software. For this, one of the below methods is required.
Line 65: Line 66:


* ohAitch's [https://github.com/ohAitch/APLiOS APLiOS], aimed primarily at iPadOS, provides a number bar and APL symbol layers.
* ohAitch's [https://github.com/ohAitch/APLiOS APLiOS], aimed primarily at iPadOS, provides a number bar and APL symbol layers.
* [https://github.com/gitonthescene/APLKeyboard APLKeyboard] is built with [http://omz-software.com/pythonista/ Pythonista's] keyboard extension.  The keys are a bit small but it's functional.


== By method ==
== By method ==
Line 90: Line 92:
=== Shifting key ===
=== Shifting key ===


It is quite common to use <kbd>Ctrl</kbd> or <kbd>Alt</kbd> or <kbd>AltGr</kbd> (right-side <kbd>Alt</kbd>) as an additional shifting key. For example, <kbd>AltGr</kbd>+<kbd>4</kbd> would give <source lang=apl inline>≤</source> while <kbd>AltGr</kbd>+<kbd>Shift</kbd>+<kbd>4</kbd> would give <source lang=apl inline>⍋</source>.
It is quite common to use <kbd>Ctrl</kbd> or <kbd>Alt</kbd> or <kbd>AltGr</kbd> (right-side <kbd>Alt</kbd>) as an additional shifting key. For example, <kbd>AltGr</kbd>+<kbd>4</kbd> would give <syntaxhighlight lang=apl inline>≤</syntaxhighlight> while <kbd>AltGr</kbd>+<kbd>Shift</kbd>+<kbd>4</kbd> would give <syntaxhighlight lang=apl inline>⍋</syntaxhighlight>.


* The [https://www.dyalog.com/apl-font-keyboard.htm#tab-1 Dyalog Unicode IME] uses <kbd>Ctrl</kbd>
* The [https://www.dyalog.com/apl-font-keyboard.htm#tab-1 Dyalog Unicode IME] uses <kbd>Ctrl</kbd>
Line 116: Line 118:
=== Keyword look-up ===
=== Keyword look-up ===


* The [https://github.com/Dyalog/ride/releases/latest Dyalog RIDE] (Remote Integrated Development Environment) allows hitting the prefix key (<kbd>`</kbd> by default, but configurable) twice, followed by the (beginning of the) name of a symbol or a functionality. It then displays a drop-down of choices with arrow keys to indicate choice and the Tab key to insert the symbol. E.g. <kbd>`</kbd>,<kbd>`</kbd>,<kbd>d</kbd>,<kbd>i</kbd>,<kbd>v</kbd>,<kbd>Tab↹</kbd> inserts <source lang=apl inline>÷</source>.
* The [https://github.com/Dyalog/ride/releases/latest Dyalog RIDE] (Remote Integrated Development Environment) allows hitting the prefix key (<kbd>`</kbd> by default, but configurable) twice, followed by the (beginning of the) name of a symbol or a functionality. It then displays a drop-down of choices with arrow keys to indicate choice and the Tab key to insert the symbol. E.g. <kbd>`</kbd>,<kbd>`</kbd>,<kbd>d</kbd>,<kbd>i</kbd>,<kbd>v</kbd>,<kbd>Tab↹</kbd> inserts <syntaxhighlight lang=apl inline>÷</syntaxhighlight>.


=== ASCII symbol composition ===
=== ASCII symbol composition ===


* Many APL glyphs can be approximated by overlaying or juxtaposing two ASCII characters. [[ngn/apl]]'s scripted demo interface and [https://abrudz.github.io/lb/apl Adám Brudzewsky's in-browser language bar] allow such a pair of characters and hitting the <kbd>Tab↹</kbd> key to replace them with the corresponding APL character. For example, <kbd><</kbd>,<kbd>-</kbd>,<kbd>Tab↹</kbd> will insert <source lang=apl inline>←</source> and <kbd>T</kbd>,<kbd>o</kbd>,<kbd>Tab↹</kbd> will insert <source lang=apl inline>⍕</source>.
* Many APL glyphs can be approximated by overlaying or juxtaposing two ASCII characters. [[ngn/apl]]'s scripted demo interface and [https://abrudz.github.io/lb/apl Adám Brudzewsky's in-browser language bar] allow such a pair of characters and hitting the <kbd>Tab↹</kbd> key to replace them with the corresponding APL character. For example, <kbd><</kbd>,<kbd>-</kbd>,<kbd>Tab↹</kbd> will insert <syntaxhighlight lang=apl inline>←</syntaxhighlight> and <kbd>T</kbd>,<kbd>o</kbd>,<kbd>Tab↹</kbd> will insert <syntaxhighlight lang=apl inline>⍕</syntaxhighlight>.


[[File:NARS2000 language bar.png|thumb|right|NARS2000 language bar]]
[[File:NARS2000 language bar.png|thumb|right|NARS2000 language bar]]
Line 137: Line 139:
To check your setup is fully functional you can try compiling the following template:
To check your setup is fully functional you can try compiling the following template:
[[File:LaTeX APL template.png|thumb|right|Screenshot of the typeset document]]
[[File:LaTeX APL template.png|thumb|right|Screenshot of the typeset document]]
<source lang=latex>
<syntaxhighlight lang=latex>
\documentclass[11pt]{article}
\documentclass[11pt]{article}


Line 151: Line 153:


\end{document}
\end{document}
</source>
</syntaxhighlight>


Depending on whether you want the whole document to use the APL font or not, you may remove the command to set the main font. If you do so, APL glyphs will be rendered correctly inside code listings and similar environments, but not in the main body of the document.
Depending on whether you want the whole document to use the APL font or not, you may remove the command to set the main font. If you do so, APL glyphs will be rendered correctly inside code listings and similar environments, but not in the main body of the document.
Line 158: Line 160:


LuaLaTeX and XeLaTeX can use the [https://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings ''listings'' package] to include APL source with the following document preamble:<ref>Baker, John D. [https://analyzethedatanotthedrivel.org/2011/08/15/typesetting-utf8-apl-code-with-the-latex-lstlisting-package/ Typesetting UTF8 APL code with the LaTeX lstlisting package]. Analyze the Data not the Drivel. August 15, 2011.</ref>
LuaLaTeX and XeLaTeX can use the [https://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings ''listings'' package] to include APL source with the following document preamble:<ref>Baker, John D. [https://analyzethedatanotthedrivel.org/2011/08/15/typesetting-utf8-apl-code-with-the-latex-lstlisting-package/ Typesetting UTF8 APL code with the LaTeX lstlisting package]. Analyze the Data not the Drivel. August 15, 2011.</ref>
<source lang=latex>
<syntaxhighlight lang=latex>
% set lstlisting to accept UTF8 APL text
% set lstlisting to accept UTF8 APL text
\makeatletter
\makeatletter
Line 185: Line 187:
\lst@RestoreCatcodes
\lst@RestoreCatcodes
\makeatother
\makeatother
</source>
</syntaxhighlight>
 
=== plainTeX ===
 
LdBeth has made a [https://ldbeth.sdf.org/aplfont.html Type1 version] of [https://github.com/rbanffy/3270font 3270 font] with APL support, suitable for traditional TeX implementations that cannot directly use TTF/OTF fonts.
 
[[File:3270 APL font sample.png|thumb|right|Screenshot of the typeset document]]
<syntaxhighlight lang=latex>
\input apldef.tex
 
\font\apl=3270
 
\apl
 
1234567890{\rm Good?}\NG1+2-3{\rm Mixing some roman}
 
I just want some \IS +-\ML\DV\ST\LG\DQ\LO{}!?\ |\CE\FL\DE\EN\LK\RK\ =\NE\LE<>\GE\EU\SE
 
\AD\OR\NA\NO\ \UA\DA\RU\LU\SS\SQ\GU\GD\ \IO\UI\EP\UE\UU\DU\NT\ /\BL\CS\CB\ ,\BC\RO\RV\CR\TR
 
\DD\RR\PP.\SO\RN\OV{}@\ \QQ\BX\CQ\EQ\MQ\IB\XQ\FM\ \DM\LM\GO\OM\AM\DL\&
 
\NG\NL
 
\obeylines\DL S\IS SUM N;I
S\IS I\IS 0
\GO (N<I\IS I+1)/0
S\IS S+I\ST 2
\GO 2
\DL
\bye
</syntaxhighlight>


== References ==
== References ==
4

edits

Navigation menu