Adapt layout for formula rules