From
G[align_] :=
Module[{}
, Framed[align
, ImageSize -> {{60, 100}, {60, 100}} (* {{wmin,
wmax}, {hmin, hmax}} in 1/72 inch units *)
, Alignment -> align
, FrameStyle -> None
, FrameMargins -> None
]
];
Print @ Grid[#, Frame -> {All, All}] & @
Partition[(G /@
Flatten[Outer[List, {Left, Center, Right}, {Bottom, Center, Top}], 1]) , 3]
Print @ Grid[#, Frame -> {All, All}] & @
Partition[(G /@ Flatten[Outer[List, {-1, 0, 1}, {-1, 0, 1}], 1]) ,3]
I get
I consider the entries marked red to be wrong:
{Left, Top}
is not aligned left,{Right, Bottom}
,{Right, Center}
and{Right, Top}
are not horizontally right-aligned.
Can please somebody explain why this happens?
The numerical ones are aligned as expected, however.
When I use Grid[Framed[...]]
the result does not have the nice feature PageWidth->width
(in 1/72 inch units) of
Grid[{{TextCell[Row[{"..."}], PageWidth -> width, ...]
, {{TextCell[Row[{"..."}], PageWidth -> width, ...]
,
}
,{...}
}
, ItemSize -> {Automatic, Automatic}
, Frame -> {All, 1 -> True}
]
where the columns become smaller if the window becomes narrower than necessary to accommodate what shall be printed. However, with this construct, alignment also goes wrong.
ImageSize -> {{240, 200}, {60, 100}}
$\endgroup$Grid
, but you do not use the option inGrid
; rather, it's inFrame
instead. $\endgroup$