def hstack(boxes, padding=0, strength='strong'):
    """
    Stack LayoutBox instances from left to right.
    *padding* is in figure-relative units.
    """
    for i in range(1, len(boxes)):
        c = boxes[i - 1].right + padding <= boxes[i].left
        boxes[i].solver.addConstraint(c | strength)
