// Determine the minimum size of the box and use a scaled value it to set its dimensions.
box.setupInnerRectangle(fontSize);
double minimumHeight = box.getInnerRectangle().height;
// TODO: Is this being done twice: here and in its parent or grandparent?
double shapeWidth = panelRectangle.width - KetPanel.LEFT_BORDER_SIZE - KetPanel.RIGHT_BORDER_SIZE;
Offset equationRectangle = new Offset(shapeWidth, FRACTIONAL_EQUATION_LIST_GAP*minimumHeight);
// Generate the label so as to have a size in order to avoid
// overlaps when drawing the rest of the equation.
Box labelBox = equation.getLabelBox(colourScheme);
labelBox.setProperty(Box.RIGHT_ALIGN);
labelBox.setProperty(Box.Y_CENTRE_ALIGN);
labelBox.setup(fontSize, equationRectangle);
// TODO: Distinguish between equationRectangle versions?
equationRectangle = new Offset(shapeWidth-labelBox.getInnerRectangle().width, FRACTIONAL_EQUATION_LIST_GAP*minimumHeight);
box.setupOuterRectangle(equationRectangle);
// NOTE: This over-generalizes box alignment by accepting box
// sizes beyond the given limit. This is an unfinished change,