cgnieder / xsim

eXercise Sheets IMproved
65 stars 20 forks source link

Use rerunfilecheck to ensure that exercise information is up to date #88

Closed N-Coder closed 2 years ago

N-Coder commented 3 years ago

When making structural changes to the exercise of a document (e.g. adding and removing or reordering), xsim sometimes doesn't pick up all the changes and keeps outdated information, leading to wrong information in the output file - even when using clear-aux (which according to docs only checks the number of exercises). My recommendation would be to use the rerunfilecheck package to see if the MD5 hash of the document.xsim cache changed and only clear and rerun depending on this information. The package only works with pdf- and luatex, but that should cover most of the uses.

muzimuzhi commented 3 years ago

XeTeX has added primitive \mdfivesum in 2016, and latex3 has provided engine-independent functions \file_mdfive_hash:n and \file_get_mdfive_hash:nNTF. So it's possible for xsim to do the MD5 check that works on all the common engines, by itself.

cgnieder commented 2 years ago

I implemented the md5 check for the next version.