Generalisation of opacity formulas for neutron transport