Question: Dragging symbols to the favorites: Why some expressions of type atomic have to be converted to atomic?

Embedded typesetting code in names is still giving me troubles. This is because the functionality and interplay of the characters ", &, #, ; and ` are not documented (appart from some MaplePrimes posts). Sometimes an escape  character (is that term correct?) is required sometimes it can be omitted or replaced by something else. I read somewhere that in former Maple versions strings were composed with back ticks `...` and this has moved to double quotes but both ways work for typesetting (if one knows how to).

Overall, there is allot of guesswork and trial-and-error involved in typesetting.

In the below I discovered a pecularity that prevented me to add certain symbols to the favorite palette.

On the positive side I found anwsers for an older question. On negative side an atomic identity has to be converted to atomic to add it to the favourites. This confuses me.

Maybe someone knows why this has to be done? Does a dragg operation strips of certain characters? Or is it in the case below that the use of the ampersand plays a role which is normally reserved to define neutral operators. Or is it fully unrelated because HTML codes and HTML entities for special symbols start with an ampersand (however an &D entitiy does not seem to exist).

Besides an explanation for the double atomization any insights and guidance with repect to typesetting of names is highly appreciated. Creating an italic captial D as a variable/name has been anwsered to my full satisfaction here. This question is more about a better understanding of typesetting.

Define a symbol with "name quotes" (left single quotes or back ticks)

NULL

`&D;`

`&D;`

(1)

whattype(`&D;`)

symbol

(2)

lprint(`&D;`)

`&D;`

 

type(`&D;`, atomic)

true

(3)

Select and drag the output (1) into the favourites leads to a blue symbol in the favorites .
Clicking on that symbol an executing

D

D

(4)

lprint(D)

D

 

whattype(D)

procedure

(5)

It seems that the drag operation has removed not only the back ticks but also the ampersand and the semicolon. (The purpose of the semi-collon  in this context seems to be the suppression of the ampersand printout (not sure about this)).


Doing the same in 2D (to later on make the symbol atomic using the context menu)

`&D;`

`&D;`

(6)

whattype(`&D;`)

symbol

(7)

lprint(`&D;`)

`&D;`

 

type(`&D;`, atomic)

true

(8)

Now the same input (copied as MathML from the input of (6)) and converted to atomic (by select -> right click -> 2D-Math-> Convert To -> Atomic)

`#mi("\`&D;\`")`

`#mi("\`&D;\`")`

(9)

whattype(`#mi("\`&D;\`")`)

symbol

(10)

lprint(`#mi("\`&D;\`")`)

`#mi("\`&D;\`")`

 

type(`#mi("\`&D;\`")`, atomic)

true

(11)

Seleceting and dragging the output (9) to the favorites leads to a new symbol
Clicking on that symbol an executing

`#mi("&D;")`

`#mi("&D;")`

(12)

whattype(`#mi("&D;")`)

symbol

(13)

lprint(`#mi("&D;")`)

`#mi("&D;")`

 

type(`#mi("&D;")`, atomic)

true

(14)

Removing now  from the favorite palette and adding the output (12) again as before
and clicking on the newly added symbol

`#mi("&D;")`

`#mi("&D;")`

(15)

lprint(`#mi("&D;")`)

`#mi("&D;")`

 

 

In summary`#mi("&D;")` = `#mi("&D;")` and `#mi("\`&D;\`")` = `#mi("\`&D;\`")` (although they are of type atomic) must be converted to atomic to drag their output into the favourite palette.

On the other hand the output "`#mi("\`&D;\`")`" cannot be used as input and converted in the same way. It must be converted to 1D-MathError, invalid neutral operator"`#mi("\`&D;\`")`"

`#mi("\`&D;\`")`;

`#mi("\`&D;\`")`

(16)

before the output can be dragged to the favorite palette.


Download dragging_atomic.mw

Please Wait...