Is it possible to automatically export a
.m package when I save my
.nb as can be done using the option
"AutoGeneratedPackage->Automatic" see https://mathematica.stackexchange.com/a/31323/45020 but presrving the section headings and text cells? (Still excluding non-initialization cells.) Unfortunately the AutoGeneratePackage does not include headings by default.
It was pointed out to me by Jason B. that the default export using
Package does preserve the headings as I would like. Can we get this behavior also in some automated method (ideally exporting every time I save the
About my edit: Originally I did not know that
Package does preserve the headings. I assumed that the behavior of
"AutoGeneratedPackage->Automatic" was the default. While
Save As does offer a solution I would much prefer an automatically exporting one.