  Using transfer operator and fundamental measure theories, we examine the
structural and thermodynamic properties of hard rectangles confined between two
parallel hard walls. The side lengths of the rectangle ($L$ and $D$, $L>D$) and
the pore width ($H$) are chosen such that maximum two layers are allowed to
form in planar order ($L$ is parallel to the wall), while only one in
homeotropic order ($D$ is parallel to the wall). We observe three different
structures: (i) a low density fluid phase with parallel alignment to the wall,
(ii) an intermediate and high density fluid phase with two layers and planar
ordering and (iii) a dense single fluid layer with homeotropic ordering. The
appearance of these phases and the change in the ordering direction with
density is a consequence of the varying close packing structures with $L$ and
$H$. Interestingly, even three different structures can be observed with
increasing density if $L$ is close to $H$.
