2

I am trying to come up with a variable that has a left and right subscript and right superscript. I have tried the following

Notation`Symbolize[
 Notation`ParsedBoxWrapper[{SubscriptBox["RVC", "B"], 
   SubsuperscriptBox["RV", "BV", "KJK"]}]]

which gives a variable that has a right superscript that in turn has a right superscript and subscript but isn't what I'm looking for

Other things I have tried is the following

nCr /: MakeBoxes[nCr[n_, r_], StandardForm] := 
 RowBox[{SubscriptBox["\[InvisiblePrefixScriptBase]", 
    MakeBoxes[n, StandardForm]], 
   SubscriptBox["C", MakeBoxes[r, StandardForm]]}]

which gives a variable with a left and right superscript but won't translate to a variable with Symbolize.

Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263
Dave Mitt
  • 21
  • 1
  • It appears Symbolize will not accept row boxes. However for typesetting you can adapt the nCr approach to render what you want – Mike Honeychurch Apr 02 '15 at 00:54
  • I can create (sort of, it needs some adjustment) the form I want with the following: – Dave Mitt Apr 02 '15 at 02:41
  • MakeBoxes[MyHead2[a_, b_, c_, d_], form : (StandardForm | TraditionalForm) : StandardForm] := Module[{dispFunc}, dispFunc = GridBox[{{"", "", #1}, {"", #2, ""}, {#3, "", #4}}, GridBoxDividers -> {"Rows" -> {{False}}, "Columns" -> {{False}}}] &; TemplateBox[{MakeBoxes[a, form], MakeBoxes[b, form], MakeBoxes[c, form], MakeBoxes[d, form]}, "String", DisplayFunction -> dispFunc, InterpretationFunction -> (GridBox[{{#1, "", ""}, {"", #2, ""}, {#3, "", #4}}, GridBoxDividers -> {"Rows" -> {{False}}, "Columns" -> {{False}}}] &)]] – Dave Mitt Apr 02 '15 at 02:48
  • with the following at the beginning of the previous code: Clear[MyHead2]; MyHead2 /: if I use the Ctrl+Shift+E to get the underlying code then try and turn the mixed variables into a single variable with NotationSymbolize[NotationParsedBoxWrapper[]] like I do with the first example I gave, all I get are errors. The commands are the same type (ones that come from the pallet) but I can't get the single variable that it is supposed to provide. Are there other ways to do this that don't require the use of the Notation Package? Thanks for your help. – Dave Mitt Apr 02 '15 at 02:57
  • Here is the answer: – Dave Mitt Apr 03 '15 at 21:53
  • 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"],SubsuperscriptBox["BRV","BV","KJK"]}], "genericRRRTag", Editable->False, Selectable->False]]] 2) Get Name: Names["*RRR*"] 3) Get Display form: 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 the alias

    – Dave Mitt Apr 03 '15 at 22:07

0 Answers0