A new penal code has been published by Taliban leaders in Afghanistan, which will legalise acts of physical punishment against women.