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`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] := 
    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.

  • $\begingroup$ nCr from this answer. $\endgroup$ – kglr Apr 1 '15 at 22:38
  • $\begingroup$ It appears Symbolize will not accept row boxes. However for typesetting you can adapt the nCr approach to render what you want $\endgroup$ – Mike Honeychurch Apr 2 '15 at 0:54
  • $\begingroup$ I can create (sort of, it needs some adjustment) the form I want with the following: $\endgroup$ – Dave Mitt Apr 2 '15 at 2:41
  • $\begingroup$ 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}}}] &)]] $\endgroup$ – Dave Mitt Apr 2 '15 at 2:48
  • $\begingroup$ 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. $\endgroup$ – Dave Mitt Apr 2 '15 at 2:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.