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?
\inputinputs files. You can set up your main file so it ignores bits of the file you input, whereas another main file would read those bits. Or you can have it ignore, say, the preamble or something. But none of that is functionality provided by\inputitself.\inputis exactly like copy-pasting the entire file into your document at that point. That's all. – cfr Aug 01 '15 at 23:14Most anything that doesn't work as a direct copy/paste doesn't seem to play well with Sagetex. I have found a few packages that (in theory) do what I want for any number of tasks I'm after, only to find that Sagetex makes it break.
A premade package would be wonderful. This started, however, as an exercise to learn how to do deeper things with Latex, and has been ... growing a bit out of hand at this point heh.
– Jason Aug 01 '15 at 23:17examsthough not for quite a while but it worked well for me when I did use it. As I say, though, I can't speak to compatibility with Sagetex. I'm not sure aboutexamdesignbutexamslets you have everything in one file for sure, while still randomising things. – cfr Aug 01 '15 at 23:23Still, I'll bookmark the Exam Topic for future use, thanks!
– Jason Aug 01 '15 at 23:36\inputcan't do what you want but if you can give people enough to work with, somebody can likely suggest alternative methods. – cfr Aug 01 '15 at 23:47LuaLaTeXsolution would be acceptable ? – Tarass Aug 02 '15 at 06:23