improve the conversion of notebooks to rst format