I am trying to build a sort of jumbling program for Tex Files. Specifically I want to randomly order problems on quizzes/exams that are generated.
I have gotten most of the work done, but I am left with trying to figure out how to make a clean implementation of inputting the questions themselves. Currently my program seems to work fine as long as I use the /input command and have each question in it's own file, however it would be much nicer if I could have one file with tags or some sort of environment for each problem, then have the master file call the problems by their tags (or environment inputs or whatever)
I have tried to use the CatchFileBetweenTags package, which seems to work fine with regular Tex, but doesn't seem to work once I try to include any sagetex code in the file to catch. Strangely the sagetex code works fine with just the /input command, but catchfilebetweentags doesn't seem to like it. It's possible that I am also not understanding some bit of syntax correctly, as the documentation for catchfilebetweentags seems to be somewhat difficult to parse for me.
So, I'm wondering if there is any way to just use input on only sections of a file instead of the whole thing?