Skip to main content
fix minor typos
Source Link
Itai Seggev
  • 14.3k
  • 61
  • 85

This report finally found its way to me, and this is not a bug. I'm sorry support gave you incorrect information.

This has nothing to do with the particular boxes involved, but rather with your use of the typeset generators Panel and Column. Most typeset generators, GraphicsGraphics expression, and certain other boxessymbols have "conditional text formatting rules". Specifically, they check the value of BoxForm`UseTextFormattingQ when converting to a box from. This variable defaults to being True in input cells and False in output, though this can be changed somewhere in the options inspector. The theory is, if you did Convert To StandardForm on code (say, your MakeBoxes rule), you wouldn't necessarily want to go to a form where it can really be easily edited.

So, if you want to create a box structure that always uses box formatting, you can block the variable to False like so:

obj /: MakeBoxes[obj[arg__], fmt_] := With[
     {appearance = Block[
          {BoxForm`UseTextFormattingQ = False}, 
          MakeBoxes[Panel[Column[{arg}], "obj"], fmt]
     ]}, 
     InterpretationBox[appearance, obj[arg]]
]

Workarounds for existing structures would be to use Evaluate in Place rather than Convert To StandardForm (since many of the heads to use this have no evaluation semantics), or change the value of the option "UseTextFormattingWhenConvertingInput" to False.

This report finally found its way to me, and this is not a bug. I'm sorry support gave you incorrect information.

This has nothing to do with the particular boxes involved, but rather with your use of the typeset generators Panel and Column. Most typeset generators, Graphics expression, and certain other boxes have "conditional text formatting rules". Specifically, they check the value of BoxForm`UseTextFormattingQ when converting to a box from. This variable defaults to being True in input cells and False in output, though this can be changed somewhere in the options inspector. The theory is, if you did Convert To StandardForm on code (say, your MakeBoxes rule), you wouldn't necessarily want to go to a form where it can really be easily edited.

So, if you want to create a box structure that always uses box formatting, you can block the variable to False like so:

obj /: MakeBoxes[obj[arg__], fmt_] := With[
     {appearance = Block[
          {BoxForm`UseTextFormattingQ = False}, 
          MakeBoxes[Panel[Column[{arg}], "obj"], fmt]
     ]}, 
     InterpretationBox[appearance, obj[arg]]
]

Workarounds for existing structures would be to use Evaluate in Place rather than Convert To StandardForm (since many of the heads to use this have no evaluation semantics), or change the value of the option "UseTextFormattingWhenConvertingInput" to False.

This report finally found its way to me, and this is not a bug. I'm sorry support gave you incorrect information.

This has nothing to do with the particular boxes involved, but rather with your use of the typeset generators Panel and Column. Most typeset generators, Graphics expression, and certain other symbols have "conditional text formatting rules". Specifically, they check the value of BoxForm`UseTextFormattingQ when converting to a box from. This variable defaults to being True in input cells and False in output, though this can be changed somewhere in the options inspector. The theory is, if you did Convert To StandardForm on code (say, your MakeBoxes rule), you wouldn't necessarily want to go to a form where it can really be easily edited.

So, if you want to create a box structure that always uses box formatting, you can block the variable to False like so:

obj /: MakeBoxes[obj[arg__], fmt_] := With[
     {appearance = Block[
          {BoxForm`UseTextFormattingQ = False}, 
          MakeBoxes[Panel[Column[{arg}], "obj"], fmt]
     ]}, 
     InterpretationBox[appearance, obj[arg]]
]

Workarounds for existing structures would be to use Evaluate in Place rather than Convert To StandardForm (since many of the heads to use this have no evaluation semantics), or change the value of the option "UseTextFormattingWhenConvertingInput" to False.

Source Link
Itai Seggev
  • 14.3k
  • 61
  • 85

This report finally found its way to me, and this is not a bug. I'm sorry support gave you incorrect information.

This has nothing to do with the particular boxes involved, but rather with your use of the typeset generators Panel and Column. Most typeset generators, Graphics expression, and certain other boxes have "conditional text formatting rules". Specifically, they check the value of BoxForm`UseTextFormattingQ when converting to a box from. This variable defaults to being True in input cells and False in output, though this can be changed somewhere in the options inspector. The theory is, if you did Convert To StandardForm on code (say, your MakeBoxes rule), you wouldn't necessarily want to go to a form where it can really be easily edited.

So, if you want to create a box structure that always uses box formatting, you can block the variable to False like so:

obj /: MakeBoxes[obj[arg__], fmt_] := With[
     {appearance = Block[
          {BoxForm`UseTextFormattingQ = False}, 
          MakeBoxes[Panel[Column[{arg}], "obj"], fmt]
     ]}, 
     InterpretationBox[appearance, obj[arg]]
]

Workarounds for existing structures would be to use Evaluate in Place rather than Convert To StandardForm (since many of the heads to use this have no evaluation semantics), or change the value of the option "UseTextFormattingWhenConvertingInput" to False.