check_margins: Check validity of margins
Description
A helper function to check if margins supplied are compatible with the
dimensions
Usage
check_margins(margin, selecteds)
Arguments
- margin
the margin(s) being specified
- selecteds
which dimensions are selected