Backport margin() function to composer menu for 0.9.x

refs #343 #876