Message Boards Message Boards


How to create a function that calls Symbolize from the Notation package

Posted 9 years ago
1 Reply
0 Total Likes


I use Symbolize from the notation package to symbolize some expressions. When calling Symbolize twice it can happen that the same expression is not the same symbol anymore. Is there a way to create a function that first checks whether an expression has already been symbolized before doing so.

My current Idea is doing something like this:

IsNotSymbolized[symbol_] := 
 If[StringCount[ToString[FullForm[symbol]], "UnderBracket"] > 0 || 
   NumericQ[symbol] || VectorQ[symbol] || MatrixQ[symbol] || 
   ArrayQ[symbol] || StringQ[symbol],

Which is then use like this:

If[IsNotSymbolized[Subscript[S, R]], Symbolize[
SubscriptBox["S", "R"]]], "Already Symbolized"]

Which actually looks like this:

enter image description here

I would like to put all this in one function that symbolizes if it hasn't been already.

Kind Regards, Mathias Breuss

POSTED BY: Mathias Breuss
Posted 9 years ago

the missing image: enter image description here

POSTED BY: Mathias Breuss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract