Improved Subscript Handling - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Information : Updates : Maple 17 : Improved Subscript Handling

Improved Subscript Handling

 

Changes to subscripts in Maple 17

Type

Keystrokes
Maple 17

Keystrokes
Previous Releases

Example

Literal Subscript

 

2D representation: a__b

a__b

   

Expression Palette: a__n

 

 

 

a _ _ b

 

 

 

a  [Ctrl]+[Shift]+_  b

x__max5 :

x__min1:

x__max+x__min

6

Table/Matrix/Vector reference

 

2D representation #1: ab

ab

2D representation #2: ab

ab

 

Expression palette: an 

 

 

 

a [ b ]

a [Ctrl]+[Shift]+_ b

 

 

 

 a [ b ]

a _ b

result1 11.1:

result213.7:

result3 8.0:

result4 11.9:

 

addresulti,i=1..4

44.7

Variable containing an underscore character

 

2D representation:  a_b

a_b

 

 

 

a  _  b

 

 

a \ _ b

a_b1:

b_c2:

a_b+b_c

3

 

Details

See Also

Details

With Maple 17, we've introduced some new tools and conventions to make it easier to work with the underscore character as well as literal subscripts.

 

Maple's mathematical typesetting supports two different meanings for subscripts. "Index" subscripts are the typeset representation of a reference to an element of an array or vector, in which the subscript represents the particular element being referred to. "Literal" subscripts are part of the variable name itself that are not interpreted as an index of any kind. Variables with literal subscripts are referred to as Atomic Variables.

Literal Subscripts

By convention, anything following a double-underscore now represents a literal subscript in a variable name.

a__b

a__b

(1.1.1)

For example, a variable with the name a__b represented in Maple Input ("1-D") notation appears as 'a' with a subscript of 'b' in Standard Math ("2-D") notation, but the 'b' is not interpreted as an index of any kind. Previously, such a variable would have a 1-D representation of something like `#msub(mi("a"),mi("b"))`.

 

By default, Maple will highlight atomic variables using a different color, making it easier to discriminate between index- and literal-style subscripts when examining a worksheet. The appearance is user-modifiable using Maple's style management tools or can be toggled on or off using the View - Atomic Variables menu item.

Working with the underscore character

We have also made it easier to enter names that contain the underscore character in 2-D mode. In previous versions of Maple, it was necessary to insert a backslash character before the underscore in order to make it appear in the expression. In Maple 17, you simply need to enter an underscore as you would in 1-D mode.

 

This change has made it necessary to update some of the keyboard shortcuts when using 2-D math:

• 

To enter an underscore, simply type the underscore key on your keyboard

a_b

a_b

(1.2.1)
• 

To create an atomic subscript, type the base name followed by two underscores, followed by the subscript.  For example, 'a', '_', '_', 'b'.

a__b

a__b

(1.2.2)
• 

To create an indexed subscript, use the key sequence Ctrl-Shift-underscore (Command-Shift-underscore on Mac OS X) or surround the subscript with square brackets.

ab

ab

(1.2.3)

Changing the default behaviour for entering the underscore character

If you would like to change the default behaviour for underscore entry back to the way it was in previous Maple releases, follow the these steps.

   1. Open the Tools Menu

   2. Select Options...

   3. Select the Interface tab

   4. Choose the Inserts non-atomic subscript option from the drop down list next to Underscore Entry

   5. Press the Apply Globally button.

 

Please note that if you revert this setting, in order to create an atomic variable you will need to either right click on your variable and manually convert to an Atomic Variable by going to 2-D Math - Convert To - Atomic Variable, or simply create an atomic variable by adding an atomic variable from the variables palette.

 

See Also

Indexed Variables, Indexing Arrays, Matrices, and Vectors, Maple Worksheet Shortcut Keys