Forum: support


RE: Specify two questions per page in exams2nops [ Reply ] By: David Merriam on 2025-07-04 03:52 | [forum:50093] |
Sorry for the delay, but this looks to be exactly what I was looking for! Thank you very much! |
RE: Specify two questions per page in exams2nops [ Reply ] By: Achim Zeileis on 2025-06-06 16:29 | [forum:50086] |
Interesting application. Yes, you can do that by modifying the {question} environment. There is already a built-in option exams2nops(..., newpage = TRUE) that adds a new page after every exercise. But for doing it after every second exercise you can do the following: quest <- " \\renewenvironment{question}{\\item}{ \\ifodd\\value{enumi} \\vfill \\else \\vfill \\newpage \\fi } " This is an R string that contains the LaTeX code for re-defining the {question} environment. At the beginning of each question it adds just an "\item" (because this is an {enumerate} listing). But at the end it checks whether the enumi item counter is odd or even. If it is odd, just a vertical fill is added. If it is even, a vertical fill and a new page is added. This R code can then be included in the header of the exam: exm <- rep("capitals.Rmd", 10) exams2nops(exm, header = quest) Does this look like what you want? You can also tweak the {question} definition further if you want to add or remove elements at the beginning or the end. |
Specify two questions per page in exams2nops [ Reply ] By: David Merriam on 2025-06-06 15:20 | [forum:50085] |
I think this may be something that would require a higher degree of LaTeX competency than I have, but I'm looking to setup a lab practical for my microbiology lab, where students move between stations during the exam. Is there a way native to R/Exams to force the exam to display a maximum of two questions per page? I can go in and manually do this later if that's the only reasonable solution. Thanks! |