Message Boards Message Boards

3 Replies
0 Total Likes
View groups...
Share this post:

How can I create a variable that has a left and right subscript using Nota?

Posted 9 years ago

I want to create a variable that has a left and right subscript and right superscript to show reference frames etc. I can get the following to work Notation`Symbolize[Notation`ParsedBoxWrapper[{SubscriptBox["RVC", "B"],SubsuperscriptBox["RV", "BV", "KJK"]}]]

which gives a very odd looking variable (from the pallet it looks like)

enter image description here

but anything with a right superscript gives (raised to a power) errors and anything with a left subscript using the \Invisiblepostscriptbase has other problems. Does anyone have a method that may (or not) use the Notation package to create something more normal looking?

POSTED BY: Dave Mittleider
3 Replies

Here is the answer: 1) Using Symbolize from palette AND Completely Overwriting Yellow Box (i.e. don't just click and paste in cursor, highlight entire yellow box) Symbolize[ParsedBoxWrapper[TagBox[RowBox[{SubscriptBox["","RRR"],SubsuperscriptB??ox["BRV","BV","KJK"]}], "genericRRRTag", Editable->False, Selectable->False]]] 2) Get Name: Names["*RRR*"] 3) Get DisplayForm: pasteINname //DisplayForm 4) get AddInputAlias from palette then paste into the cursor (i.e. don't overwrite yellow box) the results from DisplayForm

This creates a variable and an alias to include it in equations

POSTED BY: Dave Mittleider

Try this:

In[6]:= Style[ Row[{Superscript["", "RVC"], Subsuperscript["BRV", "BV", "KJK"]}]]

Out[6]= \!\(\*
 TemplateBox[{"\"\"", "\"RVC\""}, "Superscript"],
  TemplateBox[{"\"BRV\"", "\"BV\"", "\"KJK\""}, "Subsuperscript"]},
POSTED BY: S M Blinder

This is great. It is what I'm looking for. The next step is to select and paste it as a unit into an equation with other terms that have a similar format. Right now this variable turns into individual strings when I try to use it. If I use "Symbolize" to try and contain it in a single variable I get lots of errors. Do I need to write some kind of wrapper code to get it into format that "Symbolize" or its equivalent Mathematica commands can deal with? Can you point me to the commands that I would need to use? Thank you for your help. I'm embarrassed to say how much time I've spent trying to get this to work even with as much as custom notation is discussed on the forum and here.

I tried this Notation`Symbolize[ Notation`ParsedBoxWrapper[Style[Row[{Superscript["", "RVC"],Subsuperscript["BRV", "BV", "KJK"]}]]]] and I get string parsing errors from the StringJoin function.

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

Group Abstract Group Abstract