Is there a REPL shortcut for a subscript numeral?

848 views
Skip to first unread message

Douglas Bates

unread,
Aug 20, 2014, 11:08:12 AM8/20/14
to julia...@googlegroups.com
I find it convenient to use identifiers like 

julia> a₁ = 2
2

In the iESS emacs mode for a Julia session I can set the input-mode to TeX and type "a_1" to create this identifier.  Is there a key sequence in the REPL to create such an identifier?

John Myles White

unread,
Aug 20, 2014, 11:10:15 AM8/20/14
to julia...@googlegroups.com
Try typing the sequence \_1<TAB>

 — John

Douglas Bates

unread,
Aug 20, 2014, 11:14:39 AM8/20/14
to julia...@googlegroups.com
On Wednesday, August 20, 2014 10:10:15 AM UTC-5, John Myles White wrote:
Try typing the sequence \_1<TAB>

Thanks. 

Vitor Aguiar

unread,
Apr 7, 2015, 1:30:19 PM4/7/15
to julia...@googlegroups.com
Can also do 

\Theta\_\pi

?

Stefan Karpinski

unread,
Apr 7, 2015, 2:19:49 PM4/7/15
to julia...@googlegroups.com
Unicode only supports some (fairly arbitrary) subscripts and superscripts. I doubt that pi is one of them.

Jiahao Chen

unread,
Apr 24, 2015, 5:05:38 PM4/24/15
to julia...@googlegroups.com

Dominique Orban

unread,
Apr 26, 2015, 12:10:05 AM4/26/15
to julia...@googlegroups.com
I really enjoy the unicode feature. It's too bad that

julia> A‖² = 1.234
ERROR
: syntax: invalid character "‖"

Steven G. Johnson

unread,
Apr 27, 2015, 8:39:15 AM4/27/15
to julia...@googlegroups.com


On Sunday, April 26, 2015 at 12:10:05 AM UTC-4, Dominique Orban wrote:
I really enjoy the unicode feature. It's too bad that

julia> A‖² = 1.234
ERROR
: syntax: invalid character "‖"
 
‖ is not allowed in identifiers because it is a punctuation character (Unicode category Po), and we may want to assign some syntactic meaning to it or other punctuation characters in the future (or have it be user-assignable in some way).
Reply all
Reply to author
Forward
0 new messages