How to control the output of Polygon
The examples in the documentation article for Polygon
should have been re-evaluated before Mathematica 12 was released, but it is evident that they weren't. This is true even for V12.1.1. If you manually evaluate the examples shown in the documentation they will show the new iconized argument form. This is a documentation bug,
That said, you can get the old output form like this:
pol = Defer @ Polygon[{{1, 0}, {0, Sqrt[3]}, {-1, 0}}]
Polygon[{{1, 0}, {0, Sqrt[3]}, {-1, 0}}]
Following the comments under m_goldberg Answer to this question (https://mathematica.stackexchange.com/a/227859) the following code disables the SummaryBox for Polygon
only without disabling all elided forms or modifying the protected symbol BoxForm`UseIcons
:
ClearAll[Region`PolygonDump`summaryBox]
Region`PolygonDump`summaryBox[poly_, format_] := ToBoxes[InputForm@poly, format]
Region`PolygonDump`summaryBox[___] := $Failed
Attributes[Region`PolygonDump`summaryBox] = {HoldAllComplete};
Region`PolygonDump`summaryBox
is the internal function constructing the SummaryBox for Polygon
which I found using GeneralUtilities`PrintDefinitions[Polygon]
. I have not noticed any problems using this but unwanted side effects might occur when modifying core functions and the internal functionality for BoxForm
of Polygon
might change in the future but the presented solution works for me in 12.1.1.0.