在Mathematica中将对齐添加到Manipulate输出

500*_*500 1 coding-style wolfram-mathematica alignment

考虑以下因素:

Manipulate[
           If[Intersection[Row1, Row2] == {}, 
              Style[Plus @@ {Plus @@ Row1, Plus @@ Row2}, Bold, 20],
              "Error"],
{{Row1, {1}}, {1, 2, 3, 4, 5}, ControlType -> TogglerBar},
{{Row2, {2}}, {1, 2, 3, 4, 5}, ControlType -> TogglerBar}
           ]
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

- 我希望"3"能够居中,是否可能?

Nas*_*ser 5

Manipulate有自己的Alignment选项.你可以看看它是否适合你:

Manipulate[

If[Intersection[Row1,Row2]=={},Style[Plus@@{Plus@@Row1,Plus@@Row2},Bold,20],"Error"],   

{{Row1,{1}},{1,2,3,4,5},ControlType->TogglerBar},
{{Row2,{2}},{1,2,3,4,5},ControlType->TogglerBar},

Alignment->Center
]
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述