As for the PNG files, I gave up after spending a whole day on them. I was able to compress them losslessly to save 6 MB, but this did not carry over into the PDF, where they are not embedded but re-encoded. The best way to save space here would be to switch to SVG, but this is too much work and last time I tried 12 years ago it did not work well. Alternatively, removing transparency would help (and anyway the source SVG is given for each file). But that’s not very future-proof and somewhere I know there’s a teacher who just is going to right-click-save a diagram and will get a nice crisp transparent-background PNG they can instantly reuse. Verdict: at this point, I am calling it good enough. :-)
As for the PNG files, I gave up after spending a whole day on them. I was able to compress them losslessly to save 6 MB, but this did not carry over into the PDF, where they are not embedded but re-encoded. The best way to save space here would be to switch to SVG, but this is too much work and last time I tried 12 years ago it did not work well. Alternatively, removing transparency would help (and anyway the source SVG is given for each file). But that’s not very future-proof and somewhere I know there’s a teacher who just is going to right-click-save a diagram and will get a nice crisp transparent-background PNG they can instantly reuse. Verdict: at this point, I am calling it good enough. :-)